Jump to content

Avner Dorman

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by Avner Dorman

  1. Dear Julio, Thanks for sharing these codes. So I'm trying to understand if the following approach could work - it seems to work for your example (but not for every progression). (setf chordstovl2 '(b3eb5g3 cs6e7gs3 b4f5g6 f7e5c2 d4f7e4 gs7e2a8)) (defun voicelead (chords) (chord-closest-path (list (car chords)) chords)) (voicelead (ambitus '(c4 c5) chordstovl2)) but (voicelead (harmonic-progression '(0 3 6 2) '(c major) :size 4 :step 2 :relative nil :variant 'r)) can generate one of two options. The second one is obviously better since it uses a common tone. Even with ambitus-chord I'm not able to make it work consistently. If you have any thoughts I'd be happy to hear them. All the best, Avner
  2. Hi Janusz, Any idea why this stopped working? I've changed :map shift to :map step but it's still not working... thanks! Avner
  3. Hi Torsten, Would these work? (pitch-melodize '(c4e4g4)) => (c4 e4 g4) And (pitch-to-midi '(c4e4g4)) =>((60 64 67)) or (flatten (pitch-to-midi '(c4e4g4))) => (60 64 67) All the best, Avner
  4. Thanks so much!!! This is great! I wrote the following functions that automatically add the pitch class as text above each note. This is really useful for me when teaching set theory. I am sharing them in case anyone else needs something like this Also, I'd be curious to know how the text font might be modified. ;; convert pitch-classes to nums (defun pc-to-num (pitches) (substitute-map '(num0 num1 num2 num3 num4 num5 num6 num7 num8 num9 num10 num11) '(0 1 2 3 4 5 6 7 8 9 10 11) (modus (pitch-to-integer pitches)))) ;; interweave two lists (defun interweave (list1 list2) (if (null list1) list2 (cons (car list1) (interweave list2 (cdr list1))))) ;; add pcs as a num to each pitch (defun show-pcs (pitches) (interweave pitches (pc-to-num pitches))) ;; test (setf pitches '(c4 bb4 f4 eb4 fs4 d4 g4 b4 e4 a4 cs4 gs4)) (show-pcs pitches) Pitches with PCS.pdf Pitches.pdf
  5. Is there an easy way to add the pitch class as text above each note of the score? For example, add a '0' above any 'c' in a score?
  6. You're very welcome :-) music21 has so much to offer - I just wish there was an easy way to convert its tools and objects into opusmodus functions. I really enjoy the workflow of opusmodus and using lisp. Perhaps when opusmodus can read xml files directly into omn it would be easy to combine the two. All the best, Avner
  7. Thanks so much! :-) Perhaps it's too 'old school' for opusmodus - but I think it would be great to have something like this at some point (especially for teaching purposes) - http://web.mit.edu/music21/doc/moduleReference/moduleFiguredBassExamples.html Thanks again for the help with this.
  8. Thanks Stephane, I must say that I don't quite understand gen-chord3 - every time I evaluate the expression (gen-chord3 '(c4 eb4 g4) '((6 5) (5 3) (4 2))) I get a different result. Also, what I was hoping to do was to convert traditional figured bass (i.e., use steps in the key) into chords. Perhaps there isn't an easy way to accomplish this in opusmodus right now. Either way, would you mind explaining why gen-chord3 evaluates to different pitches every time? Thanks! Avner
  9. Perhaps it would be possible to make the harmonic progression function have the option of counting the size based on the interval inputted by the user? Under certain circumstances, it's useful to specify the size, but under other circumstances, it's a bit cumbersome. I've made my own simple version that does this (but doesn't include all the options of the original function). I called bass-progression. (defun bass-progression (progression steps scale) (harmonic-progression progression scale :size (loop for i in steps collect (+ (length i) 1)) :step steps)) Example: (bass-progression '(0 1 2 3 4) '((2) (2 3) (2 3 4) (2 3 4 5)) '(c major)) => (c4e4 d4f4b4 e4g4d5g5 f4a4f5c6f6 g4b4)
  10. So here's what I have so far. Any suggestions would be welcome ;;;; a function that splits a list ;;;; (defun split-list (lst) (if lst (if (cddr lst) (let ((l (split-list (cddr lst)))) (list (cons (car lst) (car l)) (cons (cadr lst) (cadr l)))) `((,(car lst)) ,(cdr lst))) '(nil nil))) ;;; figured-bass function ;;;; (defun figured-bass-progression (progression) (harmonic-progression (car (split-list progression)) '(c major) :size (loop for i in (car (cdr (split-list progression))) collect (+ (length i) 1)) :step (car (cdr (split-list progression))))) ;;;; test (figured-bass-progression '(0 (2 2) 1 (2 2 1) 2 (2 3) 3 (2 1 2) 4 (2 2 2) 5 (2 3) 6 (2 3) 7 (2 2)))==> (c4e4g4 d4f4g4b4 e4g4c5 f4a4c5d5 g4b4d5f5 a4c5f5 b4d5g5 c5e5g5) My questions are: 1. Why would (2 2 1) create a 4/3 chord? Why would (2 1 2) create a 6/5 chord? Shouldn't this be the other way around? 2. Would it be possible to convert this to traditional terminology? So one could write '(f4 (6 5)) and get the chord '(f4a4c5d5)? Obviously, this is not crucial, but I am curious to learn how to program better in lisp. Thanks! Avner
  11. Thanks, Stephane! for some reason, the gen-chord3 examples provided with opusmodus don't seem to work. However, I think perhaps harmonic-progression could do the trick. For example, the following creates a series of 6/5 chords (harmonic-progression '(0 3 4 4) '(c major) :size '4 :step '((2 1 2))) and here are some 4/3 chords - (harmonic-progression '(0 3 4 4) '(c major) :size '4 :step '((2 2 1))) perhaps this is enough - although I do think it gets a bit cumbersome. If you have ideas on how to create a function that would streamline this process, I'd appreciate hearing them. I think something more similar to traditional figured bass notation format would be easier to work with (at least for me....) Thanks! Avner
  12. I think it would be nice to have some figured bass functions. I started with these simplistic functions and I am wondering if anyone has thoughts on how to generalize them. I think it'll probably be best if eventually one would be able to simply input a list of bass notes and figures - something like (figured-bass '(c3 (5 3) d3 (4 3) e3 (6) '(c major)) and the function would return the figured bass realized. (defun five-three (degree root type) (tonality-map `(,type :root ,root :map shift) (chordize (pitch-transpose (- degree 1) (interval-to-pitch '(2 2)))))) (five-three 2 'd 'major) => (e4g4b4) (defun six-three (degree root type) (tonality-map `(,type :root ,root :map shift) (chordize (pitch-transpose (- degree 1) (interval-to-pitch '(2 3)))))) (six-three 3 'c 'minor) => (eb4g4c5) (defun six-four (degree root type) (tonality-map `(,type :root ,root :map shift) (chordize (pitch-transpose (- degree 1) (interval-to-pitch '(3 2)))))) (six-four 5 'e 'minor) => (b4e5g5)
  13. sorry - it's my autocorrect :-) I love opusmodus, by the way!!!
  14. Has anyone tried to implement pitch spelling algorithms in Opusmodus? There is already some code available on Dave Meredith's site - http://www.titanmusic.com/software.php - but it's far beyond my lisp knowledge to adapt these to Opusmodus. I believe the codes are designed to read midi files and respell them
  15. Is there an easy way to remove or hide stems? Thanks!
  16. Sorry if I am not clear - yes the return is what I want. Now I'd like to have a new function that only accepts the collection and returns this same notes. So (newfunction (pcs '3-2)) gives the same result. These are obviously wrong - (defun newfunction (tonality) (tonality-map '((tonality) :root b3 :map shift) (make-scale 'c4 12))) (defun newfunction (tonality) (tonality-map '(tonality :root b3 :map shift) (make-scale 'c4 12))) My goal is to create more complex functions that make use of tonality-map - I realize this might seem unneeded in this simple example - but as the code gets complex I think this function would be helpful for me. Many Thanks!!!
  17. I have a basic lisp question - I'd like to create a function that takes a tonality as its argument and performs something like the following line: (setf test (tonality-map '((pcs '3-2) :root b3 :map shift) (make-scale 'c4 12))) So (defun pitches (tonality) .....) - and then (pitches (pcs '3-2)) would return the list (b3 c4 d4 b4 c5 d5 b5 c6 d6 b6 c7 d7) Thanks so much!
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy