![](https://opusmodus.com/forums/uploads/set_resources_33/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
rcadiz
-
Posts
25 -
Joined
-
Last visited
Content Type
Forums
Events
Store
Video Gallery
Posts posted by rcadiz
-
-
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.
-
Hi! Thanks for your help. However, I don't want to append two sequences, one after the other. Instead, I would like to merge them vertically, as merge-voices does. But that function, when applied to omn sequences that contain articulations, erases them. That's why I am looking for an alternative.
-
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
-
I found another case where it does not work, please see below
(setf mat2 '(w. f3 p arp q g3 ff stacc+marc w. a3 p arp q c4 ff stacc+marc)) ;; Crashes ;; Error: In a call to length: t (of type boolean) is not of type sequence. (rnd-rest '(1) mat2 :omn t)
-
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!!
-
Hi! If I have an omn sequence including pitches, lengths, and articulations is there any way to change events into rests? Some kind of procedure of "filtering out" (silencing) some notes in either a deterministic or random fashion.
Thanks!
Rodrigo
-
Hi! Is there a function like merge-voices that would work for omn sequences with articulations? If I merge two sequences with merge-voices containing articulations they are lost in the merging process.
-
I updated OM and now it works. Thanks!
Rodrigo
-
Well, that function is totally missing from my OpusModus installation. When I search for it, I get nothing. When I try to use it, the code editor does not change to blue, so it does not recognize that function, I am using Version 3.0.28962 (3.0.28962). Was this function deprecated?
Thanks!
-
Hi Stephane, sorry to insist with this topic, but I could not find any reference to such a function. If I try to invoke this function I get an Undefined operator error. And there is nothing in the documentation. Could you please point me towards any example of the usage of this function?
Many thanks!!
Rodrigo
-
Dear Stephane, do you mean there is a function with that specific name I could use? Or are you referring to the = symbol? I looked for such a function but couldn't find it. Sorry if I misunderstood you suggestion.
Thanks!
Rodrigo
-
Thanks Stephane! I will look into that.
Best,
Rodrigo
-
Thanks! I just realized I was missing the :and dictum type which does apply to multiple conditions. But I still don't see how many dictums could be used to apply articulations to repeated pitches.
-
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
-
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
-
Just now, opmo said:
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.
-
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
-
1 minute ago, opmo said:
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!
-
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) )
-
Great! It works! I see what the problem was now.
Thanks!
Rodrigo
-
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!
-
Dear Stephane, thanks! It worked perfectly!
Best,
Rodrigo
-
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
-
Hi, any updates on this issue? I can't run OpusModus on my M1 Mac Mini. Can't even compile the examples, it crashes all the time.
Add appoggiatura before length value
in Function Examples
Posted
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
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
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
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
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!