Function Examples
Functions, arguments, values and results
273 topics in this forum
-
Just downloaded and installed the latest version 2.1.26172. Documentation for the function "pprint-score" seems to be missing. - Rangarajan
- 3 replies
- 1.1k views
- 1 follower
-
Hi, is there a function for distributing one voice successively into a defined number of voices as described in my attachment? Best, Achim
-
- 1 reply
- 910 views
- 1 follower
-
-
I wonder if it's possible to evaluate a function (that has a seed argument) a set number of times (using gen-loop) with a predefined, custom seed list applied to the function. Something that I'm trying to achieve in the example below. Thank you! (setf seeds (vector-round 1 100 (gen-white-noise 8 :seed 13))) (setf rhythm (gen-loop 8 (euclidean-rhythm 16 4 16 's :type 2 :seed seeds)))
- 6 replies
- 1.7k views
- 2 followers
-
Dear friends, I´m looking for a specific kind of repeating function. In the example below, I have one d4 in the first violin. Then comes an a4, etc. LOOKING FOR SOMETHING LIKE: 1) to have repetitions of the same note in the blank space (instead of pauses), but all have to be measured inside the exact space that is between the first and second note. Sometimes this spaces of rests are different among each pair of subsequent notes. The function must calculate the spaces among each pair of notes before making the repetitions 2) alternatively, this repetitions could be kind of irregular, leaving some spaces of pauses, like a density control. …
- 8 replies
- 1.8k views
- 1 follower
-
Is there some function in Opusmodus for Vuza Canons ? It´s very interesting ! All the best ! Julio Rhythmic canons (6) – alpof ALPOF.WORDPRESS.COM This post is a follow-up on the subject of rhythmic canons and the last post. Today I will talk specifically about Vuza canons, i.e. non-periodic canons. I'll start with an example. Let's take the motive $latex A=\{0,1,8,9,17,28\}$. Can this be a motive for a rhythmic canon, i.e. does it tile $latex \mathbb{Z}_n$ for some integer… http://canonsrythmiques.free.fr/pdf/zurichepos.pdf
-
- 0 replies
- 1k views
-
-
Hi, I'am having hard times to understand length-to-rest: (setf one '(-q e f5 mp 3q b5 mp 3e f6 mp 3e g5 p 3wq. gs5eb6 p)) (setf two (length-to-rest 'q one :type 'under)) ==>(-q -e -3q -3e - 3wq. f5 mp) ;;simplified example works as expected (setf three '(q f4 3q b4 a4 b4 e d4 3wq gb5eb5)) (setf four (length-to-rest 'q three :type 'under)) ==>(q f4 -3q - - -e 3wq gb5eb5) what am I missing? thanks for help!
-
- 3 replies
- 1.1k views
- 1 follower
-
-
I've been studying HARMONIC-PATH and TONALITY-MAP functions to determine the exact similarities and differences between the two. While I understand the purpose of those functions in principle from reading the documentation and experimenting with different ideas, I wonder if - for educational purposes - someone could briefly highlight the main explicit differences between the two. In the short example below, both functions produce very similar results, so the question may be when to use one function instead of the other. And is it possible to achieve the same result with both functions? I appreciate anyone's advice or insight into this. Thanks! (setf…
- 2 replies
- 1.2k views
- 1 follower
-
The existing STRAWINSKY-ROTATION function generates pitch and choral material using the given 12-tone row. Is it possible to use the same function with fewer pitches? I attached an example that I'd like to produce. Like the STRAWINSKY-ROTATION function, I'd like to take any number of pitches and then use cyclic-rotation to transpose each inversion so that the beginning note is always the same. Thank you!
- 2 replies
- 965 views
- 2 followers
-
Opusmodus has a rich set of predefined chords. But I am a bit confused about how to use this. For example, how do I get the "major" triad with "d4" as the tonic in C Major scale? I tried this: (expand-chord '(d4 maj)) but I get "(d4fs4a4)" instead of "(d4f4a4)" - Rangarajan
- 9 replies
- 1.9k views
-
I wonder if anyone has a suggestion on producing this list (with sublists) in Opusmodus, in which the first number decreases in value, the second number stays the same, and the third number increases in value? Thank you! ( (7) (3) (6) (3) (1) (5) (3) (2) (4) (3) (3) (3) (3) (4) (2) (3) (5) (1) (3) (6) (3) (7) )
- 4 replies
- 1.3k views
- 2 followers
-
Hi, I have a simple question, how can I change the resolution of harmonics to quarter tones or sixth tones. (harmonics 'e1 10) thanks! ole
-
- 2 replies
- 1k views
-
-
Hi, vector-to-pitch is a very useful function. I want something quite similar with but with a small change. What it does now (from the doc): (vector-to-pitch '(g3 g4) (gen-white-noise 10 :seed 89))(vector-to-pitch '(g3 g4) (gen-white-noise 10 :seed 89)) => (ab3 g4 eb4 a3 b3 eb4 g4 g3 gb4 e4) Instead of giving (low high) as the first argument, I would like to give, for example, a specific scale. Let us say that I want vector-to-pitch to convert the generated white noise to pitches in Major Scale, with tonic of C4. Is this possible? - Rangarajan
- 5 replies
- 1.5k views
- 1 follower
-
Dear Friends, Sometimes my composition process is very related to harmony and voice-leading. For example starting with a sequence of chords in 4-part writing as a foundation for a string quartet or saxophone quartet. So, I have some questions regarding this: 1) How to make ornaments and developing the texture in each voice individually but keeping the harmonic movement based on the first "chorale", the fundation of the composition. Maybe harmonic path ? But do you have other hints ? 2) How to repeat the notes of a given chord within that foundational 4-part structure Something like this... …
- 7 replies
- 1.7k views
- 2 followers
-
Hi, When I evaluate: (interval-to-pitch '(2 2 1 2 2 2 1) :start 'c7) => (c7 d7 e7 f7 g7 a7 b7 c8) This is expected. But when I evaluate: (interval-to-pitch '(2 2 1 2 2 2 1) :start 'c8) => (c8 bb7 gs7 g7 f7 eb7 cs7 c7) Is this expected? - Rangarajan
-
- 2 replies
- 954 views
- 1 follower
-
-
Hi, I was looking at the documentation of "gen-walk" function and have a doubt. It is my understanding that the probability of "forward" and probability of "backward" can each range from 0 to 1, but the sum cannot be greater than 1. However, the sum could be less than 1. So, I think it is not correct to have forward probability as 1 and backward probability as 0.7. This would make the total exceed 1. However, it is OK to have forward probability as 0.3 and backward probability as 0.4. In this case the stationary probability would be 1 - 0.3 - 0.4 = 0.3 Am I correct in my understanding? If this is correct, then there is a mistake in the documen…
-
- 3 replies
- 1.2k views
- 1 follower
-
-
Hi, I am trying to understand the polygon-rhythm function, but having some difficulty with the finer details. The expression (polygon-rhythm 5 8 4) returns 8 points (randomly generated) like this: => (-1/8 -1/8 1/8 1/8 1/8 1/8 1/8 -1/8) Likewise, (polygon-rhythm 5 16 4) returns 16 points: => (1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 1/16 1/16 -1/16 -1/16 -1/16 -1/16 -1/16 1/16) This: (polygon-rhythm 3 16 8) also returns 16 points: => (-1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 -1/16) What is the role of the first and 3rd arguments to this function? Next: What does the keywo…
-
- 7 replies
- 1.4k views
- 1 follower
-
-
dear all here's an example (from my current work)... this little video shows how i generate/display SCORE (instrumental parts) on a screen + virtual conductor (piano part). the example is "nonsense", but shows how it looks/works... you see the bars (generating), the cue, beat... and the arrow (that shows you where to read/play) ...also you hear some bad (sry) sound-simulation of the setup. in this way i can generate a whole piece in realtime on STAGE (all musicians will read their part from their own screen). this one will be for 5 instruments, ePlayer and modular synthesizer. during the performance an algorithm (or some data-streams) w…
- 5 replies
- 3.7k views
- 1 follower
-
Hi, Is it possible to change the offset from find-everyother somehow? (find-everyother 2 '(1 2 3 4 5 6)) --> (1 3 5) like this: (find-everyother 2 '(1 2 3 4 5 6) :offset 1) --> (2 4 6) thanks!
- 2 replies
- 3.5k views
- 1 follower
-
I like how the function unfold allows for rather concisely expressed transformations. I also like that with this function, methods can easily by commented out or added without changing the nesting structure of the overall Lisp program. However, what I do not like is that the unfold methods don't support any further arguments, and as a result the required preliminary work with def-unfold-set is rather cumbersome. So, I rolled by own version of unfold that addresses this shortcoming. This new function works as follows: you can use the names of arbitrary Opusmodus functions, as long as they expect an OMN sequence as first argument. The following example applies…
- 8 replies
- 3.9k views
- 2 followers
-
Dear All, I´m creating some permutations and I´d like to assign a text under each note to make clear the use of certain intervals. substitute-map '(T 2M 3M 4J 5J 6M 7M) '(c3 d3 e3 f3 g3 a3 b3) '(c3 d3 e3 f3 g3 c3 c3 c3 g3 c3 c3 d3)) But in the evaluation, I get this: (t 2m 3m 4j 5j t t t 5j t t 2m) With lowercase letters, I get 2m , 3m and 5J instead of 2M, 3M and 5J (uppercase names of intervals). Since I want it for pedagogical reasons, can it be generated with the corresponding UPPERCASE letters ? Thanks in advance. All the best, Julio
- 2 replies
- 2.4k views
-
Hi, In the docs it says that arp-adlib makes an arpeggio up or down randomly, but there are only arps upward, what am I missing? thanks! (setf arp '(c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib c4d4e4g4a4b4d5fs5 arp-adlib))
- 2 replies
- 2.4k views
-
In the video "Opusmodus Parametric Composition" by Jorvd, from 2019-12, at 11:10, he demonstrates using harmonic-path to combine a melody and chords. I entered this code to match the video, and it didn't work for me. Here's what he showed: (setf chords '(c3g3c4ds4 gs2f3c4d4 c3g3c4ds4 gs2f3c4d4 c3g3c4ds4 d3g3b3f4 c3g3c4g4 d3f3c4gs4 ds3g3c4g4 cs3g3as3f4 ds3a3c4fs4 fs3a3c4ds4 c3g3c4ds4 g2g3b3d4 gs2f3c4d4 b2d3f4 c3g3c4ds4 f3gs3c4d4 g2g3b3d4 c3ds3g3ds4 as2e3g3g4 f2f3c4gs4 g2g3b3d4 cs3g3as3f4 b2g3d4g4 c3g3c4ds4 f3gs3c4f4 g2g3b3d4 gs2ds3c4gs4 gs2ds3c4gs4 as2as3d4f4 ds3as3…
- 5 replies
- 2.7k views
- 1 follower
-
Dear All, One interesting thing that could be implemented as a function could be a form of generating Negative Harmony. In the video below, there are some explanation of what it is and the origin in the Levy book. It was a trendy topic due to the Jacob Collier interview. And there are a lot of fun videos making versions of pop tunes using negative harmony. The way I understand it, it is simply a kind of mapping notes in relation to an axis, like in the figure below. So we need a function that could map a note in any register to another note in the closest register to the first on. So, any C note will be mapp…
- 9 replies
- 7.4k views
- 1 follower
-
Hi, I don't understand the result of harmonic-path, as I understand it, it should be (something like): (eb4 g4 bb4 d4 gs4 c4 eb4 fs5 b5 bb5 ds5 fs5 b5 d5 g4 b4 eb4 g4 bb4 g4) below is the evaluation and I don't understand it, what am I missing..? (harmonic-path '(eb3g3bb3d4 gs3c4ds4fs4 b3ds4fs4bb4 g3b3d4fs4) '(c4 d4 e4 f4 g4 a4 b4 c5 d5 e5 f5 e5 d5 c5 b4 a4 g4 f4 e4 d4)) ==>(eb4 g4 bb4 d4 gs4 c4 eb4 fs5 b5 bb5 eb5 g5 bb5 d5 gs4 c4 eb4 fs4 b4 bb4) It seems that I am overlooking something obvious, so I'am greatful for some help! Thanks!
- 2 replies
- 2.3k views
-
Dear Friends, I´m interested in the 4-note combinations of the diatonic scale without repeating elements. (combination2 4 '(c3 d3 e3 f3 g3 a3 b3)) The filter-repeat and the remove-duplicates are not giving the right result. PARTIAL RESULT,,, combination2, size: 4 ((b3 b3 b3 b3) (a3 b3 b3 b3) (g3 b3 b3 b3) (f3 b3 b3 b3) (e3 b3 b3 b3) (d3 b3 b3 b3) (c3 b3 b3 b3) (b3 a3 b3 b3) (a3 a3 b3 b3) (g3 a3 b3 b3) (f3 a3 b3 b3) (e3 a3 b3 b3) (d3 a3 b3 b3) (c3 a3 b3 b3) (b3 g3 b3 b3) (a3 g3 b3 b3) (g3 g3 b3 b3) (f3 g3 b3 b3) (e3 g3 b3 b3) (d3 g3 b3 b3) (c3 g3 b3 b3) (b3 f3 b3 b3) (a3 f3 b3 b3) (g3 f3 b3 b3) (f3 f3 b3 b3) (e3 f3 b3 b3) (d3 f3 b3 b3)…
- 5 replies
- 2.6k views