May 2, 20224 yr Hi, sorry I am missing something very basic. I would like to convert a particular pitch to a chord based on its duration. For example, if I have a omn-sequence, I would like to search for all half-notes and add to their current pitch some other pitches in order to form a chord. I have looked at map functions, but I have not found a way of adding something to the already existing pitch instead of replacing it with something completely new. Thanks! Rodrigo
May 2, 20224 yr Hi, here's a function I've made for myself. Best ! Stéphane add-interval-if-length.lisp add-interval-if-length.rtfd.zip
May 2, 20224 yr Another possibility is to generate ONLY chords and "dechord" all events between some length values like this: (setf omn (make-omn :pitch (chord-pitch-unique (chordize-list (gen-divide 4 (rnd-sample 256 (make-scale 'd4 8 :alt '(2 1 3)) )))) :length (rnd-sample 24 '((h q q)(s s s s q e e)(3q = = q h)(h h)(q e e q))) )) (setf omn2 (dictum '((:range (t e) :apply (dechord x))) omn)) S.
May 18, 20224 yr Author On 5/2/2022 at 8:30 PM, rcadiz said: Dear Stephane, thanks! It worked perfectly! Best, Rodrigo I have a strange problem related to this function. As I said before, your code works fine inside opusmodus, I can see the chords in the score and hear them with no problem at all. But when I export the score to xml all the added notes to form the chord are missing. For example, one of the chords I generated this way is the following. When I export this score to xml only the bb3 shows up. What could be wrong? (setf mat2 '((h bb3d4bb4 mf arp-down -))) (def-instrument-set test :instruments (:group clefs :rec (:layout soprano-recorder-layout :port nil :channel 1 :sound 'gm :program '(recorder) :controllers nil :pan (pan 30) :volume 100) )) (ps 'test :rec (list mat2) :tempo 40 :time-signature '(4 4) )
May 18, 20224 yr Author 1 minute ago, opmo said: I don't see any problem here: Yes, but is that opusmodus? Or an external editor? I can see the same thing inside opusmodus, but I just checked that the exported xml file does not contains the extra notes (see the exported test.xml file). Thanks! test.xml
May 18, 20224 yr Your test.xml file is not the same: sop-rec.xml How to save musicxml file: 1. click on the musicxml panel (file) 2. In File menu select "Safe As..."
May 18, 20224 yr Author 2 minutes ago, opmo said: Your test.xml file is not the same as my. sop-rec.xml 1.93 kB · 0 downloads How to save musicxml file: 1. click on the musicxml panel (file) 2. In File menu select "Safe As..." Ok, it works now. I was using menu File, Export Last Score to XML.... and if you do that, the notes are missing. Thanks! Rodrigo
May 18, 20224 yr Export Last Score to XML... is correct method. Looks like there is a bug when arp-down is used. The arp alone works fine. arp-down etc... is customised attribute and is not a part of the musicxml standard.
May 18, 20224 yr Author Just now, opmo said: Export Last Score to XML... is correct method. Looks like there is a bug when arp-down is used. The arp alone works fine. arp-down etc... is customised attribute and is not a part of the musicxml standard. Ok, that explains what I was experiencing. Thanks! However, when I use arp-down with the "Save As..." method it works ok, but not with the "Export Last Score to XML... " one.
Create an account or sign in to comment