Jump to content

Recommended Posts

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 BEFOREimage.png.f5ef99a5f73f5943a56689d4e5a7a2d5.png

Looks good !

Link to comment
Share on other sites

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)
      )

 

Link to comment
Share on other sites

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)")
 )



 

Link to comment
Share on other sites

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 > 

Link to comment
Share on other sites

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))

 

Link to comment
Share on other sites

  • 2 months later...

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!

image.png.869b48bf003ec3b6046d89f1347477db.png

After the chords disappear, why?

 

(setf chords (omn :pitch C-chords))

image.png.eb750e13af340395afe7f37c069d67e8.png

(setf melodize (melodize chords))

image.png.e6a8e9527df546dc7646a58acffe4195.png

 

Link to comment
Share on other sites

(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

Link to comment
Share on other sites

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?

 

image.png.410d1ce4bc915144c4ba482926acdbcf.png

 

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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;-)

 

 

image.png.6f642fb760910970858d63bc95bfb321.png

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)))

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)))

Link to comment
Share on other sites

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))

Link to comment
Share on other sites

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

image.png.0cc41c0e0d640c33abde7d52306dc067.png

chord notation with rhythm w

image.png.d51d3d8e9a63ced2248588095a9a204d.png

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!

image.png.224eaf547ad677eccadb6b94e850dd04.png

Link to comment
Share on other sites

There is a system for chord symbols but only for the built in chord library I think.

Look here:

image.png.89c20b455f0616da41efd6bf6f1e9374.png 

 

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy