Jump to content

rcadiz

Members
  • Posts

    25
  • Joined

  • Last visited

Posts posted by rcadiz

  1. Thanks Stephane! Your function is exactly what I need but it does not work in all cases and I am not sure why.

     

    I usually write materials this way, in a single list

    (setf mat '(h eb4 gs4))
    (gen-ornament '((acc e c4 fs4)) mat :val '(h))

     

    Your code does not work because it expects a list inside a list, it says it can't take the car of h. It is better to always write material inside a list? Why?


    Then I tried this

    (setf mat '((h eb4 gs4)))
    (gen-ornament '((acc e c4 fs4)) mat :val '(h))

     

    But the code does not work either, I get this error: nil is illegal as a sequence start index.


    Then I tried with a longer phrase and it works fine

    (setf mat '((w d3 s eb3 w e3 s eb3 d f3 -h w fs3)))
    (gen-ornament '((acc e c4 fs4)) mat :val '(w))


    But if I try a much longer material, it works but I can't notate the snipet with cmd-1, I get an error about some 1147 midi value and TIME_SIGNATURE_EVENT

    (setf mat '((w d3 s eb3 w e3 s eb3 d f3 -h w fs3 s e3 d3 f3 d e3 -h w d3 s fs3 w eb3 s e3 fs3 eb3 d3 f3 d fs3 -h w d3 s f3 w eb3 s e3 d d3 -h w eb3 s e3 f3 fs3 d g3 -h w e4 s f4 w gs3 s fs3 e4 gs3 fs3 f4 d g3 -h w gs3 s f4 w g3 s fs3 d e4 -h w f4 s fs3 e4 g3 d gs3 -h w fs3 s g3 w gs3 s e4 f4 f3 g3 eb4 d fs3 -h w e3 s g3 w fs3 s e3 d eb4 -h w f3 s fs3 eb4 f3 d e3 -h w g3 s eb4 w e3 s g3 f3 fs3 e3 f3 d fs3 -h w g3 s eb4 w a3 s fs4 d g4 -h w f4 s gs3 fs4 f4 d gs3 -h w g4 s a3 w f4 s g4 a3 gs3 fs4 g4 d gs3 -h w fs4 s a3 w f4 s gs3 d a3 -h w f4 s fs4 g4)))
    (gen-ornament '((acc e c4 fs4)) mat :val '(w))

     

    I need to be able to use cmd-1 to check the output, but I don't understand what the problem is. Any help is much appreciated!

     

    Thanks!

  2. Hi everyone, I am having a hard time trying to add appoggiaturas to selected length values on an omn sequence. Let's say I want to search for all whole durations and add an appoggiatura before this event. I have been trying these kind of solutions using dictum

     

    (setf mat '(w c4 stacc))
    
    (dictum '(
    	(:and w :apply (app e f4))
        )
        mat)
        
     (dictum '(
    	(:and w :apply '(app e f4))
        )
        mat)
        
      (dictum '(
    	(:and w :apply ((app e f4) w))
        )
        mat)   
        
       (dictum '(
    	(:and w :apply (app e f4 w))
        )
        mat)      

     

    All of these fail. I get some error saying the sequenced-event :type nil :phrase (nil nil) is not of type ?event when accessing slot attribute.

     

    I don't think I understand how to use app or acc properly, at least in terms of dictum or patterns. I have also tried with length-map pattern-map with no luck.  

     

    I have also tried to insert a ttrem between two half notes in an omn sequence for example and I encounter the same kind of errors. How can I search for a sequence of events inside dictum? I know how to use both app and ttrem when writing opusmodus expression manually, but not when replacing or finding patterns

     

    I suspect there is some basic issue of the language that I still do not understand.

     

    Many thanks for your help.

  3. 9 hours ago, Stephane Boussuge said:

    I think this error is normal in that case because you are using it on a single list. 

     

    In that case you have to use (rnd-rest 1 mat2 :omn t) , don't put the 1 into parenthesis. this is normal Opusmodus syntax.

    Or if you want to keep you 1 in parenthesis do:

     

    (setf mat2 '((w. f3 p arp q g3 ff stacc+marc w. a3 p arp q c4 ff stacc+marc)))
    (rnd-rest '(1) mat2 :omn t)

     It is normal if you don't use correct syntax you get error.

    S.

    Of course, now I understand what I was doing wrong. Thanks a lot for your help!

     

    Rodrigo

    33 minutes ago, Stephane Boussuge said:

    Wonderful function, I love it !

    Indeed, great function! 

     

    Thanks so much!

     

    Rodrigo

  4.  This is great! Thanks! However, I am trying to understand better how to use this function. What I actually don't understand is the significance of the parameter n and why it must be an integer. If I set n to 1 it should erase only one note from the omn sequence, right? This is not what I am seeing. This is an example of what I mean. 

     

    (setf mat '((5q e2 ff stacc+marc e4 mf e2 ff stacc+marc) (5q fs2 mf d4 fs2) (5q a2 mf c4 a2) (5q b2 mf a3 b2) (5q cs3 mf g3 cs3) (5q c4 mf stacc c4 stacc c4 stacc c4 stacc c4 stacc) (5q b2 mf a3 b2) (5q a2 mf c4 a2) (5q fs2 mf d4 fs2) (5q e2 ff stacc+marc e4 mf e2 ff stacc+marc) (5q f2 mf eb4 f2) (5q g2 mf cs4 g2) (5q bb2 mf bb3 bb2) (5q c3 mf gs3 c3) (5q eb3 mf fs3 eb3) (5q c3 mf gs3 c3) (5q bb2 mf bb3 bb2) (5q g2 mf cs4 g2) (5q f2 mf eb4 f2) (5q eb2 mf fs4 eb2) (5q fs2 mf d4 fs2) (5q b2 mf a3 b2) (5q cs3 mf g3 cs3) (5q a2 mf c4 a2) (5q e2 ff stacc+marc e4 mf e2 ff stacc+marc) (5q g2 mf cs4 g2) (5q c3 mf gs3 c3) (5q c4 mf stacc c4 stacc c4 stacc c4 stacc c4 stacc) (5q g2 mf cs4 g2) (5q eb2 mf fs4 eb2) (5q f2 mf eb4 f2) (5q bb2 mf bb3 bb2) (5q eb3 mf fs3 eb3) (5q bb2 mf bb3 bb2) (5q f2 mf eb4 f2) (5q fs2 mf d4 fs2) (5q b2 mf a3 b2) (5q cs3 mf g3 cs3) (5q a2 mf c4 a2) (5q e2 ff stacc+marc e4 mf e2 ff stacc+marc) (5q b2 mf a3 b2) (5q a2 mf c4 a2) (5q g2 mf cs4 g2) (5q c3 mf gs3 c3) (5q eb2 mf fs4 eb2) (5q bb2 mf bb3 bb2) (5q c4 mf stacc c4 stacc c4 stacc c4 stacc c4 stacc)))
    
    ;; Erases a lot of notes
    (rnd-rest '(1) mat :seed 1)
    
    ;; Even more notes
    (rnd-rest '(2) mat :seed 1)
    
    ;; Erases almost all notes
    (rnd-rest '(3) mat :seed 1)
    
    ;; Erases all but three notes
    (rnd-rest '(4) mat :seed 1)
    
    ;; Crashes
    (rnd-rest '(5) mat :seed 1)
    
    ;; Works great!
    (rnd-rest '(0.1) mat :seed 1)

     

    When n is 1, I get many notes erased from the sequence instead of only one. Perhaps this is because the omn expression is not flattened out? However, if that's the case this function should erase one note per each group of 5q, and that's not what I see. 

     

    When n is 5 the function crashes, I guess that is because the length of each grouping has only 5 notes?

     

    Also, I can use decimals without any trouble at all and it works great, exactly what I had in mind.

     

    So, how should I interpret these results?

     

    Thanks!!

     

  5. Thanks for the quick reply! I will look into the pattern-map function. But, with respect to dictum, how can I specify multiple conditions? For example a specific pitch and duration? Something like this?

     

    (:any (q c4) :apply stacc)

     

    I tried the above and does not work. Also, how could I detect repeated notes in dictum? So, for example, apply this not to any c4, but only to c4s that are repeated.

     

    Thanks!

    Rodrigo

     

     

     

  6. Hello everybody, sorry if this is a basic or too general question, but I wonder what would the best strategy be to apply articulations or dynamics to specific situations of pitch and rhythm. 

     

    For example, let's say I have a omn list of pitches and durations and I want to apply articulations or dynamics to specific situations, such as: repeated pitches that have the same duration, or notes that last more than a quarter note, or each note that is not the same pitch as the previous one, or to each event that is cs4 with duration of 1/4, etc. 

     

    I know that I can write specific functions for each case in particular, but I wonder if there is an easier way within opusmodus. I have been trying to use dictum or def-case for these effects, but I don't think those approaches can handle these kind of situations, but maybe I am wrong. Or maybe there are some maping or pattern-searching opusmodus functions that I am not aware of that could be of some use here. 

     

    Many thanks!

    Rodrigo

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

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


     

  9. Hi, I have been trying to use this split function which I find very handy. But, in particular with this chord sequence, it fails:

     

    (setf mat '((h g2f3f4d5 -) (h a2g3g4e5 -) (q b2a3a4f5 c3b3b4g5 d3cs4c5gs5 eb3d4d5a5) (q e3eb4eb5bb5 f3e4e5b5 f3f4f5c6 f3f4f5c6) (q f3f4f5c6 e3e4f5c6 eb3e4e5c6 d3d4eb5b5) (h cs3cs4d5bb5 b2b3c5a5) (h a2a3b4gs5 gs2g3a4g5) (q fs2f3g4f5 -h.) (q e2eb3f4e5 d2cs3eb4d5 cs2b2cs4cs5 c2bb2b3c5) (h b1gs2bb3bb4 -) (-w) (-w) (-h q. bb1g2gs3a4 e a1fs2g3gs4) (q a1f2fs3g4 a1f2f3fs4 bb1f2f3f4 bb1fs2f3f4) (q b1fs2f3f4 cs2g2fs3f4 d2a2g3f4 e2bb2gs3fs4) (h fs2c3a3g4 -) (-w) (-w) (-h q. g2d3b3gs4 e a2e3cs4a4) (q b2fs3eb4bb4 c3gs3f4c5 d3bb3g4cs5 eb3c4a4eb5) (h e3d4b4e5 -) (h f3eb4c5f5 -) (h f3e4d5g5 q. f3f4eb5gs5 e f3f4e5a5) (q e3f4f5bb5 -h.) (-w) (-w) (-h q. eb3f4f5b5 e d3e4f5c6) (q c3eb4f5c6 b2cs4e5c6 a2c4eb5c6 g2bb3d5c6) (q fs2gs3cs5b5 e2fs3b4bb5 d2e3a4a5 cs2d3g4gs5) (q b1c3f4g5 bb1bb2eb4f5 bb1a2cs4e5 a1g2c4d5) (h a1fs2bb3cs5 a1f2gs3c5) (h bb1f2g3bb4 -q b1f2fs3a4) (q c2f2f3gs4 cs2fs2f3g4 eb2g2f3fs4 e2gs2f3f4) (q fs2bb2fs3f4 gs2c3g3f4 bb2cs3gs3f4 b2eb3a3f4) (h cs3fs3b3fs4 d3gs3cs4g4) (q eb3bb3eb4gs4 e3b3f4a4 f3cs4g4bb4 f3d4a4c5) (w f3e4bb4cs5) (e f3e4c5eb5 e3f4d5e5 eb3f4eb5f5 d3f4e5g5 c3e4f5gs5 bb2eb4f5a5 a2d4f5bb5 g2cs4f5b5) (q f2b3e5c6 eb2a3eb5c6 d2g3d5c6 c2f3cs5c6) (h b1eb3b4c6 -) (-w) (-h q bb1cs3a4b5 a1b2g4bb5) (w a1a2f4a5) (h a1gs2eb4gs5)))

     

    (split-point '(c4) mat)

     

    I get the message "Error: The value nil is not of the expected type number."

     

    I can't find the problem here. 

    Thanks!

  10. 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

     

     

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy