JulioHerrlein Posted April 30 Share Posted April 30 Hello, I did some text attributes for displaying chord symbols but when I use the make-omn, I don´t know how to retrieve the chord symbols. I´d like to use this for a a lesson. The display of chords is good, but I need also to chaneg the chord lengths to create some examples. The ideia is to create automatic harmonizations using pre-defined voicings. I know that I filtered out the attributes in the make-omn expression below, but how can I retrieve the chord symbols and change the lengths ? Thanks for the help ! Best, Julio Here is the code (add-text-attributes '(Am7 "Am7") '(C6 "C6") '(E7b9 "E7b9") '(Gsdim7 "G#o") '(G7 "G7") '(G7-13 "G7(13)") '(Cs7s9 "C#7(#9)") '(Bhd "Bm7b5") '(Dm7 "Dm7") '(Fmaj7 "Fmaj7") '(G74b9 "G7,4(b9)") ) (setf C-chords '((w a2g3c4e4 am7) (w c3a3e4g4 c6) (w e3gs3d4f4 e7b9) (w gs2f3b3d4 gsdim7) (w g2f3b3e4 g7-13) (w cs3f3b3e4 cs7s9) (w b2f3a3d4 bhd) (w d3a3c4f4 dm7) (w f3c4e4a4 fmaj7))) ;; I know that I filtered out the attributes in the expression below, but how can I retrieve the chord symbols and change the lengths ? (make-omn :pitch (omn :pitch C-chords) :length '((e e e eh) (h w)) :span :length ) CHORD SYMBLOS BEFORE Looks good ! Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted April 30 Author Share Posted April 30 CHORD SYMBLOS BEFORE Looks good ! Any Help ? Quote Link to comment Share on other sites More sharing options...
jesele Posted May 1 Share Posted May 1 Hi Julio, unsure if this is the correct way. Is this what you are looking for? Jesper (setf atr (add-text-attributes '(Am7 "Am7") '(C6 "C6") '(E7b9 "E7b9") '(Gsdim7 "G#o") '(G7 "G7") '(G7-13 "G7(13)") '(Cs7s9 "C#7(#9)") '(Bhd "Bm7b5") '(Dm7 "Dm7") '(Fmaj7 "Fmaj7") '(G74b9 "G7,4(b9)")) ) (setf C-chords '((w a2g3c4e4 am7) (w c3a3e4g4 c6) (w e3gs3d4f4 e7b9) (w gs2f3b3d4 gsdim7) (w g2f3b3e4 g7-13) (w cs3f3b3e4 cs7s9) (w b2f3a3d4 bhd) (w d3a3c4f4 dm7) (w f3c4e4a4 fmaj7))) (setf omn1 (make-omn :pitch (omn :pitch C-chords) :length '((e e e eh) (h w)) :articulation (omn :articulation C-chords) :span :length) ) Quote Link to comment Share on other sites More sharing options...
opmo Posted May 1 Share Posted May 1 I would explicitly name the chord attributes with additional character [ch-atr]: (add-text-attributes '([Am7] "Am7") '([C6] "C6") '([E7b9] "E7b9") '([Gsdim7] "G#o") '([G7] "G7") '([G7-13] "G7(13)") '([Cs7s9] "C#7(#9)") '([Bhd] "Bm7b5") '([Dm7] "Dm7") '([Fmaj7] "Fmaj7") '([G74b9] "G7,4(b9)") ) Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted May 1 Author Share Posted May 1 Thank you, Jesele and Janusz ! Janusz, puting the [ ] creates a bug in the notation engine... Don´t know why... Best, Julio ((w a2g3c4e4 am7) (w c3a3e4g4 cadd6) (w e3gs3d4f4 e7b9) (w gs2f3b3d4 gsdim7) (w g2f3b3e4 g7-13) (w cs3f3b3e4 cs7s9) (w b2f3a3d4 bhd) (w d3a3c4f4 dm7) (w f3c4e4a4 fmaj7)) OM 3 > audition-musicxml-omn-snippet Error: OMN Parse Error: fail 1 (abort) Return to top loop level 0. Type for backtrace or :c <option number> to proceed. Type :bug-form "<subject>" for a bug report template or :? for other options. OM 4 : 1 > Quote Link to comment Share on other sites More sharing options...
opmo Posted May 1 Share Posted May 1 Yes, we can't use the character in attributes. What about: (add-text-attributes '(.Am7 "Am7") '(.C6 "C6") '(.E7b9 "E7b9") '(.Gsdim7 "G#o") '(.G7 "G7") '(.G7-13 "G7(13)") '(.Cs7s9 "C#7(#9)") '(.Bhd "Bm7b5") '(.Dm7 "Dm7") '(.Fmaj7 "Fmaj7") '(.G74b9 "G7,4(b9)") ) '((w a2g3c4e4 .g7) (w e3gs3d4f4 .e7b9) (w gs2f3b3d4 .gsdim7) (w g2f3b3e4 .g7-13) (w cs3f3b3e4 .cs7s9) (w b2f3a3d4 .bhd) (w d3a3c4f4 .dm7) (w f3c4e4a4 .fmaj7)) JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted May 1 Author Share Posted May 1 It worked ! Thanks, Janusz ! Quote Link to comment Share on other sites More sharing options...
david Posted July 8 Share Posted July 8 Hi, In your example, is it possible to keep chords above staff ? (setf atr (add-text-attributes '(.Am7 "Am7") '(.C6 "C6") '(.E7b9 "E7b9") '(.Gsdim7 "G#o") '(.G7 "G7") '(.G7-13 "G7(13)") '(.Cs7s9 "C#7(#9)") '(.Bhd "Bm7b5") '(.Dm7 "Dm7") '(.Fmaj7 "Fmaj7") '(.G74b9 "G7,4(b9)")) ) (setf C-chords '((w a2g3c4e4 am7) (w c3a3e4g4 c6) (w e3gs3d4f4 e7b9) (w gs2f3b3d4 gsdim7) (w g2f3b3e4 g7-13) (w cs3f3b3e4 cs7s9) (w b2f3a3d4 bhd) (w d3a3c4f4 dm7) (w f3c4e4a4 fmaj7))) Good thanks Julio! After the chords disappear, why? (setf chords (omn :pitch C-chords)) (setf melodize (melodize chords)) Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted July 8 Share Posted July 8 7 hours ago, david said: After the chords disappear, why? Because you ask to Opusmodus with the function omn "(setf chords (omn :pitch C-chords))" to return only pitch. Quote Link to comment Share on other sites More sharing options...
david Posted July 8 Share Posted July 8 Ok Stéphane. is it possible to transform the chords into melody in order to keep the chord notation displayed? Quote Link to comment Share on other sites More sharing options...
david Posted July 8 Share Posted July 8 how can I retrieve the chord symbols and melodize chords? Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted July 9 Author Share Posted July 9 (setf chords_and_names '((h g2f3a3bb3d4 .gm9) (d2f3a3c4e4 .dm9) (f2a3c4e4g4 .fmaj9) (a2g3b3c4e4 .am9) (e2g3b3d4fs4 .em9)) ) (ps 'gm :treble (list (make-omn :pitch (melodize (drop-voicing (omn :pitch chords_and_names))) :length '(e) :span :pitch)) :bass (list (make-omn :pitch (omn :pitch chords_and_names) :length (omn :length chords_and_names) :articulation (omn :articulation chords_and_names) )) :time-signature '(4 4) ) Try to process in different staves, one for the chords and chord symbols and other for melodies, with independent processing. best, Julio Quote Link to comment Share on other sites More sharing options...
david Posted July 9 Share Posted July 9 Thank you very much Julio, that's exactly what I'm trying to do. However you can see the chord notation does not appear in the staff above, is it possible to do this? According to stephane, "it's Because i ask to Opusmodus with the function omn "(omn :pitch chords_and_names))" to return only pitch...don't know why... I would like to take this opportunity to ask you about your book? JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted July 9 Author Share Posted July 9 Just put the articulation part in the stave ou want it to appear (ps 'gm :treble (list (make-omn :pitch (melodize (drop-voicing (omn :pitch chords_and_names))) :length '(e) :articulation (omn :articulation chords_and_names) :span :pitch)) :bass (list (make-omn :pitch (omn :pitch chords_and_names) :length (omn :length chords_and_names) :articulation (omn :articulation chords_and_names) )) :time-signature '(4 4) ) About my Opusmodus book, according to Janusz it´s in the revision phase. Soon it will be released. I´m looking forward to it too. Best ! Julio Quote Link to comment Share on other sites More sharing options...
david Posted July 9 Share Posted July 9 Julio, you are the best I allowed myself to put quintuplet in order to be with time and harmony;-) whoouu articulation for chord notation...i don't know why...it gets complicated;-) I know you are a jazz man and improviser and i have your book Combinatorial Harmony. my goal being to create studies of improvisations jazz standards. Do you have any suggestions for use with opusmodus, knowing that I am looking for a means of tonal harmony? Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted July 9 Author Share Posted July 9 David, REcently I build a kind of harmonization tool. It´s very simple and similar to this post. I built a chord list with my favorite voicings and also voicings for simple acompaniment, like the ones in the examble above. - 5 note voicings (bass + 4 note chords) major, minor, dom, alt, dom dim, half diminished, diminished, sus, etc all basic in all keys. I use it for creating progressions that can be randomized or specified. And I also built a melody generator with all the correponding modes for the chords. That´s it. But now I bought an acoustic piano and I love to just play it and sing along... That´s life ! Best, Julio david and Stephane Boussuge 2 Quote Link to comment Share on other sites More sharing options...
david Posted July 10 Share Posted July 10 a harmonization tool? woow I would love to see that!!! do you talk about it in your book? I share with you my research on lady-bird standard. I'm interested in hearing your opinion if you have time and inclination. At the moment, this is the only method I have found to produce realistic solos, play directly by simply reading score. Best, David Lady.B.1 2 3 5 (1-5)M1.opmo Quote Link to comment Share on other sites More sharing options...
david Posted July 15 Share Posted July 15 hi, I have an error message. it seems that certain characters are not accepted?? (setf atr (add-text-attributes '(.cmmaj7 "mmaj7");;;don't work '(.dm7b5 "dm7b5") '(.ebmaj7#11 "ebmaj7#11");;;don't work '(.fm7b5 "fm7b5") '(.g9sus4 "g9sus4") '(.g#dim7maj7 "g#dim7maj7");;;don't work '(.adim7maj7 "adim7maj7");;;don't work '(.bm7b5 "bm7b5")) ) (setf chords_and_names '((h c4eb4g4b4 .cmmaj7)(h d4f4gs4c5 .dm7b5) (h eb4g4a4d5 .ebmaj7#11) (h f4gs4b4eb5 .fm7b5) (h g4a4c5f5 .g9sus4) (h gs4b4d5g5 .g#dim7maj7) (h a4c5eb5gs5 .adim7maj7)(h b4d5f5a5 .bm7b5) (h c5eb5g5b5 .cmmaj7))) Quote Link to comment Share on other sites More sharing options...
jesele Posted July 15 Share Posted July 15 The # sign for one. I use this to replace. (defun substitute-illegal-characters (chord-string) (strcat "." (map 'string (lambda (c) (case c (#\º #\') (#\/ #\;) (#\# #\s) (t c))) chord-string)) ) And then (setf chord-symbols (list "Em7b5" "A7b9" "Cm7" "F7" "Fm7" "Bb7" "Ebmaj7" "Ab7" "Bbmaj7" "Em7b5" "A7b9" "Dm7" "Bbm7" "Eb7" "Fmaj7" "Em7b5" "Ebmaj7#11" "D7#9" "G7b13" "Cm9" "Ab7#11" "Bbmaj7" "Em7b5" "A7b9" "Dm7b5" "G7b9" "Cm7b5" "F7b9" "Bbmaj7")) (setf chord-symbols1 (loop for x in chord-symbols collect (substitute-illegal-characters x))) (setf atr (loop for x in chord-symbols1 and y in chord-symbols collect (add-text-attributes (list (read-from-string x) y)))) Dont know why cmmaj7 doesn't work, I have mmaj chords working Jesper Quote Link to comment Share on other sites More sharing options...
david Posted July 15 Share Posted July 15 thank you Jesper. an chord is missing g#dim7maj7 or adim7maj7 I have an error message Error: The value 0.0, derived from the initarg :omn-symbol, can not be used to set the value of the slot omn-symbol in #<user-attribute-sticky #<error printing user-attribute-sticky #x30200562D86D>, because it is not of type symbol. > While executing: ccl::%shared-initialize, in process Listener-1(7). > Type cmd-. to abort, cmd-\ for a list of available restarts. > Type :? for other options. (setf chord-symbols (list "Em7b5" "A7b9" "Cm7" "F7" "Fm7" "Bb7" "Ebmaj7" "Ab7" "Bbmaj7" "Em7b5" "A7b9" "Dm7" "Bbm7" "Eb7" "Fmaj7" "Em7b5" "Ebmaj7#11" "D7#9" "G7b13" "G9sus4" "Cm9" "Ab7#11" "Bbmaj7" "Em7b5" "A7b9" "Dm7b5" "G7b9" "Cm7b5" "F7b9" "Bbmaj7")) (setf chord-symbols1 (loop for x in chord-symbols collect (substitute-illegal-characters x))) (setf atr (loop for x in chord-symbols1 and y in chord-symbols collect (add-text-attributes (list (read-from-string x) y)))) (setf chords_and_names '((h c4eb4g4b4 .cmmaj7)(h d4f4gs4c5 .dm7b5) (h eb4g4a4d5 .ebmaj7#11) (h f4gs4b4eb5 .fm7b5) (h g4a4c5f5 .g9sus4) (h gs4b4d5g5 .g#dim7maj7) (h a4c5eb5gs5 .adim7maj7)(h b4d5f5a5 .bm7b5) (h c5eb5g5b5 .cmmaj7))) oups (defun substitute-illegal-characters (chord-string) (strcat "." (map 'string (lambda (c) (case c (#\º #\') (#\/ #\;) (#\# #\s) (t c))) chord-string)) ) (setf chord-symbols (list "Em7b5" "A7b9" "Cm7" "F7" "Fm7" "Bb7" "Ebmaj7" "Ab7" "Bbmaj7" "Em7b5" "A7b9" "Dm7" "Bbm7" "Eb7" "Fmaj7" "Em7b5" "Ebmaj7#11" "D7#9" "G7b13" "G9sus4" "Cm9" "Ab7#11" "Bbmaj7" "Em7b5" "A7b9" "Dm7b5" "G7b9" "Cm7b5" "F7b9" "Bbmaj7")) (setf chord-symbols1 (loop for x in chord-symbols collect (substitute-illegal-characters x))) (setf atr (loop for x in chord-symbols1 and y in chord-symbols collect (add-text-attributes (list (read-from-string x) y)))) (setf chords_and_names '((h c4eb4g4b4 .cmmaj7)(h d4f4gs4c5 .dm7b5) (h eb4g4a4d5 .ebmaj7#11) (h f4gs4b4eb5 .fm7b5) (h g4a4c5f5 .g9sus4) (h gs4b4d5g5 .g#dim7maj7) (h a4c5eb5gs5 .adim7maj7)(h b4d5f5a5 .bm7b5) (h c5eb5g5b5 .cmmaj7))) Quote Link to comment Share on other sites More sharing options...
jesele Posted July 16 Share Posted July 16 My code was just an example with other chords. This should work for yours. Jesper (defun substitute-illegal-characters (chord-string) (strcat "." (map 'string (lambda (c) (case c (#\º #\') (#\/ #\;) (#\# #\s) (t c))) chord-string)) ) (setf rhythm '(h h h h h h h h h)) (setf chords '(c4eb4g4b4 d4f4gs4c5 eb4g4a4d5 f4gs4b4eb5 g4a4c5f5 gs4b4d5g5 a4c5eb5gs5 b4d5f5a5 c5eb5g5b5)) (setf chord-symbols '("cmmaj7" "dm7b5" "ebmaj7#11" "fm7b5" "g9sus4" "g#dim7maj7" "adim7maj7" "bm7b5" "cmmaj7")) (setf chord-symbols1 (loop for x in chord-symbols collect (substitute-illegal-characters x))) (setf atr (loop for x in chord-symbols1 and y in chord-symbols collect (car (add-text-attributes (list (read-from-string x) y))))) (setf chords_and_names (loop for r in rhythm and c in chords and a in atr collect (list r c a))) Or everything as a function. (defun add-chord-syms (lengths chords chord-symbols) (labels ((substitute-illegal-characters (chord-string) (strcat "." (map 'string (lambda (c) (case c (#\º #\') (#\/ #\;) (#\# #\s) (t c))) chord-string)))) (let* ((chd-syms (loop for x in chord-symbols collect (substitute-illegal-characters x))) (atr (loop for x in chd-syms and y in chord-symbols collect (car (add-text-attributes (list (read-from-string x) y)))))) (loop for r in lengths and c in chords and a in atr collect (list r c a)))) ) (setf rhythm '(h h h h h h h h h)) (setf chords '(c4eb4g4b4 d4f4gs4c5 eb4g4a4d5 f4gs4b4eb5 g4a4c5f5 gs4b4d5g5 a4c5eb5gs5 b4d5f5a5 c5eb5g5b5)) (setf chord-symbols '("cmmaj7" "dm7b5" "ebmaj7#11" "fm7b5" "g9sus4" "g#dim7maj7" "adim7maj7" "bm7b5" "cmmaj7")) (setf chords_and_names (add-chord-syms rhythm chords chord-symbols)) Quote Link to comment Share on other sites More sharing options...
david Posted July 16 Share Posted July 16 Thank you Jesper forgive me, I'm a beginner...I'm trying to advance step by step in this fantastic software. but it's really not easy to start when you come from (so-called classical) music training... I don't understand why there isn't a simple function to manage chord notation. Opusmodus should be able to deduce the chord notation from the notes written on staff... there is a "chordie" application which does very well, but I would like to see that in opus modus chord notation with rhythm h chord notation with rhythm w in both cases, the chord notation remains not great with snippet (ps 'gm :treble (list (make-omn :pitch (pitch-transpose 12 (melodize (drop-voicing (omn :pitch chords_and_names)))) :length '(e = = :articulation (omn :articulation chords_and_names) :span :pitch)) :bass (list (make-omn :pitch (omn :pitch chords_and_names) :length (omn :length chords_and_names) :articulation (omn :articulation chords_and_names) )) :time-signature '(4 4) ) the result is better, I don't understand why the chord notation of the first measure doesn't work! Quote Link to comment Share on other sites More sharing options...
jesele Posted July 16 Share Posted July 16 There is a system for chord symbols but only for the built in chord library I think. Look here: An example from the above ;; Figure 1 (J. Coltrane, Giant Steps, 1959) '((h (b3 maj7) (d3 7)) (h (g3 maj7) (bb3 7)) (w (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (gb3 7)) (w (b3 maj7)) (h (f3 m7) (bb3 7)) (w (eb3 maj7)) (h (a3 m7) (d3 7)) (w (g3 maj7)) (h (cs3 m7) (fs3 7)) (w (b3 maj7)) (h (f3 m7) (bb3 7)) (w (eb maj7)) (h (cs3 m7) (fs3 7))) To analyze chords for chord-symbols is complicated. The same 4 notes could be many different chords. Using text attributes for chords is a workaround since with the built in system, you're a bit locked to the basic voicings. Don't know why the first chord symbol is not showing Jesper Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.