All Activity
- Last week
-
OMN Parse Error
There is a variable 'r inside your OMN — but what is it bound to? Within the OMN format, r doesn’t work as a proper length value; must be e replaced by a negative length value, otherwise you get an error... => (1/4 c4 pp stacc 1/8 r 1/8 c6 pp marc 1/16 d4 pp ten 1/4 cs4 pp stacc 1/8 c4 pp leg 1/8 b5 pp marc 1/16 eb4 pp ten 1/4 c6 pp stacc 1/8 r 1/8 r ... When i replace the variable 'r by -1/4 it works... => (1/4 c4 pp stacc 1/8 -1/4 1/8 c6 pp marc 1/16 d4 pp ten 1/4 cs4 pp stacc 1/8 c4 pp leg 1/8 b5 pp marc 1/16 eb4 pp ten 1/4 c6 pp stacc 1/8 -1/4 1/8 -1/4 ... (setf flute-omn (replace-map '((r -1/4)) (build-omn-with-rests flute-pitches flute-rhythms flute-velocities flute-articulations)) Personally, I wouldn’t use the variable "p", beause in the system it’s used for “piano” (which is why it’s highlighted in red). Also, it’s probably clearer and easier not to generate the OMN using a LOOP, but instead to use "make-omn". That way, you can also replace specific variables (like your 'r) more easily/more organized. (make-omn :pitch :length :velocities :articulation greetings andré
-
dsyk started following OMN Parse Error
-
OMN Parse Error
I’m writing a piece for flute, oboe clarinet using infinity series and I get the following error: <<automatic abort>> OM 6 > infinity-series gen-repeat gen-repeat flatten infinity-series gen-repeat gen-repeat flatten infinity-series gen-repeat gen-repeat flatten ps Error: OMN Parse Error: fail 1 (abort) Return to top loop level 0. Type :b for backtrace or :c <option number> to proceed. Type :bug-form "<subject>" for a bug report template or :? for other options. OM 7 : 1 > What am I doing wrong? My code (with the help of Chat GPT) is: ;; --------- Helper Functions --------- (defun make-crescendo (start end steps) (let* ((dynamic-scale '(pp p mp mf f ff)) (start-index (position start dynamic-scale)) (end-index (position end dynamic-scale)) (range (if (< start-index end-index) (subseq dynamic-scale start-index (1+ end-index)) (reverse (subseq dynamic-scale end-index (1+ start-index))))) (expanded (loop for i from 0 below steps collect (nth (floor (* (/ i steps) (length range))) range)))) expanded)) (defun build-omn-with-rests (pitches rhythms velocities articulations) (flatten (loop for p in pitches for r in rhythms for v in velocities for a in articulations collect (cond ((and (eq p 'r) r) (list r 'r)) ((and p r v a) (list r p v a)))))) (defun introduce-rests (pitch-list probability) (loop for p in pitch-list collect (if (< (random 1.0) probability) 'r p))) ;; --------- Common Settings --------- (defparameter tempo 72) (defparameter time-signature '(4 4)) (defparameter rest-probability 0.3) ;; --------- Flute Material --------- (setf flute-pitches (introduce-rests (infinity-series 100 '(c4 cs4) :ambitus '(c4 c6)) rest-probability)) (setf flute-rhythms (gen-repeat 25 '(q e e s))) (setf flute-velocities (make-crescendo 'pp 'ff 100)) (setf flute-articulations (gen-repeat 25 '(stacc leg marc ten))) (setf flute-omn (build-omn-with-rests flute-pitches flute-rhythms flute-velocities flute-articulations)) ;; --------- Oboe Material --------- (setf oboe-pitches (introduce-rests (infinity-series 100 '(d4 ds4) :ambitus '(d4 d6)) rest-probability)) (setf oboe-rhythms (gen-repeat 25 '(e e s q))) (setf oboe-velocities (make-crescendo 'pp 'ff 100)) (setf oboe-articulations (gen-repeat 25 '(leg marc ten stacc))) (setf oboe-omn (build-omn-with-rests oboe-pitches oboe-rhythms oboe-velocities oboe-articulations)) ;; --------- Clarinet Material --------- (setf clarinet-pitches (introduce-rests (infinity-series 100 '(e4 f4) :ambitus '(e4 e6)) rest-probability)) (setf clarinet-rhythms (gen-repeat 25 '(s q e e))) (setf clarinet-velocities (make-crescendo 'pp 'ff 100)) (setf clarinet-articulations (gen-repeat 25 '(marc ten stacc leg))) (setf clarinet-omn (build-omn-with-rests clarinet-pitches clarinet-rhythms clarinet-velocities clarinet-articulations)) ;; --------- Final Score (Playback + Export) --------- (ps 'gm :title "Infinity Series Trio - Final Version with Rests" :time-signature time-signature :tempo tempo :inst '(flute oboe clarinet) :fl (list flute-omn) :ob (list oboe-omn) :cl (list clarinet-omn))
-
zoomak joined the community
-
jon started following Generating symmetry-based forms
-
Generating symmetry-based forms
The following function generates symmetrical structures based on sequences of tones, which can evolve over multiple generations, resulting in nested symmetries. Here are a few examples mapped to pitches, integers, and rhythms. (defun gen-symmetrical-structure (&key row gen) (let* ((seq1 (filter-repeat 1 (loop repeat gen for i in (rnd-sample '(3 5 7 11) :norep t) append (progn (setf r1 (filter-first 11 row)) (setf r2 (filter-last 11 row)) (setf n i) (setf rev (probp 0.5)) (setf r1 (if (null rev) r1 (reverse r1))) (setf r2 (if (null rev) r2 (reverse r2))) (flatten (gen-rotate (random 2) (list (filter-first n r1) (filter-last n r2)))))))) (seq2 (flatten (gen-rotate (random 2) (list (filter-first (length seq1) seq1) (pitch-invert-start 'fs4 (reverse (filter-first (length seq1) seq1)))))))) (filter-repeat 1 (flatten seq2)))) ;; with one GEN (pitch-list-plot (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen 1) :join-points t :style :fill) ;; with x GEN (pitch-list-plot (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen (+ 2 (random 10))) :join-points t :style :fill) ;; remapped to integer (list-plot (pitch-to-integer (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen (+ 2 (random 10)))) :join-points t :style :fill) => (9 5 7 1 10 11 4 8 3 2 0 6 9 5 7 1 10 11 4 8 3 2 0 2 3 8 4 1 7 5 9 6 0 2 3 8 4 11 10 11 10 1 7 5 9 6 3 7 5 11 2 1 2 1 8 4 9 10 12 6 3 7 5 11 8 4 9 10 12 10 9 4 8 1 2 11 5 7 3 6 12 10 9 4 8 1 2 11 5 7 3) ;; remapped to lengths (length-list-plot (gen-length (pitch-to-integer (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen (+ 2 (random 10)))) '1/32) :join-points t :style :fill) => (11/32 3/32 9/32 5/16 3/8 3/16 1/16 7/32 5/32 1/8 1/16 7/32 5/32 1/8 1/32 1/4 11/32 3/32 9/32 5/16 3/8 3/16 1/16 7/32 5/32 1/8 1/32 1/4 11/32 3/32 9/32 5/16 1/16 3/32 9/32 1/32 1/8 11/32 1/4 7/32 5/32 5/16 3/16 -1/32 1/16 3/32 9/32 1/32 1/8 11/32 1/4 7/32 5/32 5/16 1/4 7/32 5/32 5/16 3/16 -1/32 1/16 3/32 9/32 1/32)
-
Background process for real-time operations
With the following functions, you can run a background process (e.g., a loop function that constantly reloads data, for example from a text file) and do other things in parallel, such as modifying functions, etc. This is helpful when working with LISP/Opusmodus to process data in real time. I’ve tested this for a few days now, and it seems to run well and stable — at least as stable as the background process functions are free of bugs. Starting the process: Give the process a name and "add" your function (Here’s an example I made) -> process name “mididateien-generieren”, and my function within it is called “gen_1.midi” (mp:process-run-function "mididateien-generieren" nil #'gen_1.midi) Stopping the background process (progn (print "mididateien-generieren gestoppt") (mp:map-processes (lambda (proc) (when (string= (mp:process-name proc) "mididateien-generieren") (mp:process-kill proc))))) If anyone has better solutions for this, I’d be happy to hear them! Greetings André
-
-
-
-
mstep started following gen-acc/rit
-
-
-
Luis joined the community
-
LuisCoelho joined the community
-
gen-acc/rit
One more small (improved) function: a starting rhythm (pattern) gradually changes its values towards a constant pulse/value (endvalue). Other possible applications: An initial pitch sequence evolves into a steady, constant pitch. A start pattern for velocity gradually shifts towards a fixed velocity. (defun gen-acc/rit (alist endvalue) ;; startpattern + endvalue (loop while (not (equal alist (gen-repeat (length alist) endvalue))) collect (setf alist (loop for i in alist when (/= i endvalue) collect (if (> i endvalue) (- i 1) (+ i 1)) else collect i)))) (list-plot (flatten (gen-acc/rit '(1 7 4 2 11 9 5 3) 3)) :join-points t :style :fill) => ((2 6 3 3 10 8 4 3) (3 5 3 3 9 7 3 3) (3 4 3 3 8 6 3 3) (3 3 3 3 7 5 3 3) (3 3 3 3 6 4 3 3) (3 3 3 3 5 3 3 3) (3 3 3 3 4 3 3 3) (3 3 3 3 3 3 3 3)) (list-plot (flatten (gen-acc/rit '(1 7 4 2 11 9 5 3) 15)) :join-points t :style :fill) => ((2 8 5 3 12 10 6 4) (3 9 6 4 13 11 7 5) (4 10 7 5 14 12 8 6) (5 11 8 6 15 13 9 7) (6 12 9 7 15 14 10 8) (7 13 10 8 15 15 11 9) (8 14 11 9 15 15 12 10) (9 15 12 10 15 15 13 11) (10 15 13 11 15 15 14 12) (11 15 14 12 15 15 15 13) (12 15 15 13 15 15 15 14) (13 15 15 14 15 15 15 15) (14 15 15 15 15 15 15 15) (15 15 15 15 15 15 15 15)) (list-plot (flatten (gen-acc/rit '(1 2 3 1 5 7 11 3 13 ) 6)) :join-points t :style :fill) => (((4 6 2 6 2 12 3 4 10) (5 6 3 6 3 11 4 5 9) (6 6 4 6 4 10 5 6 8) (6 6 5 6 5 9 6 6 7) (6 6 6 6 6 8 6 6 6) (6 6 6 6 6 7 6 6 6) (6 6 6 6 6 6 6 6 6))
-
-
-
gen-acc
a simple small function I had to write for a project: it generates a kind of accelerando towards the value 1 (defun gen-acc (alist) (loop while (not (equal alist (gen-repeat (length alist) 1))) collect (setf alist (loop for i in alist when (> i 1) collect (- i 1) else collect i)))) (gen-acc (rnd-order (primes 11))) => ((30 2 6 12 10 18 28 1 4 16 22) (29 1 5 11 9 17 27 1 3 15 21) (28 1 4 10 8 16 26 1 2 14 20) (27 1 3 9 7 15 25 1 1 13 19) (26 1 2 8 6 14 24 1 1 12 18) (25 1 1 7 5 13 23 1 1 11 17) (24 1 1 6 4 12 22 1 1 10 16) (23 1 1 5 3 11 21 1 1 9 15) (22 1 1 4 2 10 20 1 1 8 14) (21 1 1 3 1 9 19 1 1 7 13) (20 1 1 2 1 8 18 1 1 6 12) (19 1 1 1 1 7 17 1 1 5 11) (18 1 1 1 1 6 16 1 1 4 10) (17 1 1 1 1 5 15 1 1 3 9) (16 1 1 1 1 4 14 1 1 2 8) (15 1 1 1 1 3 13 1 1 1 7) (14 1 1 1 1 2 12 1 1 1 6) (13 1 1 1 1 1 11 1 1 1 5) (12 1 1 1 1 1 10 1 1 1 4) (11 1 1 1 1 1 9 1 1 1 3) (10 1 1 1 1 1 8 1 1 1 2) (9 1 1 1 1 1 7 1 1 1 1) (8 1 1 1 1 1 6 1 1 1 1) (7 1 1 1 1 1 5 1 1 1 1) (6 1 1 1 1 1 4 1 1 1 1) (5 1 1 1 1 1 3 1 1 1 1) (4 1 1 1 1 1 2 1 1 1 1) (3 1 1 1 1 1 1 1 1 1 1) (2 1 1 1 1 1 1 1 1 1 1) (1 1 1 1 1 1 1 1 1 1 1)) (length-list-plot (omn-to-time-signature (flatten (gen-length (gen-acc (rnd-order (primes 11))) 1/32)) '(4 4)) :join-points t :style :fill :line-width 0.5) ;; press: cmd1 Here are two practical examples in combination with GEN-SORT (progn (setf pitchseq (vector-to-pitch '(fs3 g5) (gen-noise 8))) (make-omn :pitch (setf pitches (flatten (gen-sort pitchseq))) :length (filter-last (length pitches) (gen-length (gen-acc (rnd-sample (length pitchseq) (primes 11))) 1/32)))) (progn (setf pitchseq (vector-to-pitch '(fs3 g5) (gen-noise 11))) (make-omn :pitch (setf pitches (flatten (gen-sort pitchseq))) :length (length-staccato (filter-last (length pitches) (gen-length (gen-acc (rnd-sample (length pitchseq) (primes 11))) 1/32)) :value 1/32)))
-
Drum Loop Not Looping Seamlessly in live-coding-midi
I will see what I can do.
- Earlier
-
-
Opusmodus 3.0.29668 (Update)
Imrovements and additions to respell function.
-
opmo reacted to a post in a topic: Real-Time Pitch Memory: Compositional Feedback System Using MaxMSP and OPUSMODUS
-
-
-
Spring sale on Composer Workshop
-
reconstruct-to-piano
reconstruct-to-piano function should be removed from the documents.
-
Stephane Boussuge reacted to a post in a topic: Real-Time Pitch Memory: Compositional Feedback System Using MaxMSP and OPUSMODUS
-
reconstruct-to-piano
They do seem somewhat similar. Split-chord was not doing what I had hoped with my material, this is why I was looking at reconstruct-to-piano. Thanks for input.
-
reconstruct-to-piano
Not sure, but I think it evolved into split-chord Jesper
-
reconstruct-to-piano
Greetings: This function appears in the documentation. However, it does not appear in OM to be a compiled function. Has this been removed? With thanks.
-
Real-Time Pitch Memory: Compositional Feedback System Using MaxMSP and OPUSMODUS
just one more really messy sketch: you could "re-import" the OPMO-generated score (via midi) to MaxMSP (bach.roll -> bach.score).the notes you see are coming from the right channel – just a bunch of random pitches… nothing serious, but it shows a possible idea example.mov
-
Heisch joined the community
-
Drum Loop Not Looping Seamlessly in live-coding-midi
Thank you @mstep , I appreciate you checking and confirming. While I understand the technical basis, my primary use for Live Coding looping in this case is real-time idea generation, where even a small timing gap disrupts the musical flow and makes judging rhythmic ideas difficult. For this workflow, seamless looping is essential. Is there any way to adjust the start delay in Live Coding? @opmo Are there alternative methods within Opusmodus to achieve truly seamless looping using live coding? @opmo Any insights or potential workarounds for achieving perfect real-time loop timing would be greatly appreciated. Thanks again for your help!
-
Drum Loop Not Looping Seamlessly in live-coding-midi
Hello, i did run your code and also experienced the timing issue, when the loop restarts. To me it seems the slight off in the Live-Coding-Instrument is by design because of the below quote:
-
-
Real-Time Pitch Memory: Compositional Feedback System Using MaxMSP and OPUSMODUS
That idea is really brilliant!! Thanks for sharing !!
-
Drum Loop Not Looping Seamlessly in live-coding-midi
Hi Admin and everyone else, Hope you're having a good week. Following up on our previous exchange regarding the slight off before loops repeat in Live Coding mode. I'm still consistently experiencing this on my system, even when using General MIDI as suggested. To help me troubleshoot whether this is specific to my setup or if I'm perhaps misunderstanding something fundamental, would you perhaps be able to share a very simple code example (maybe a basic drum loop) that demonstrates perfectly seamless looping on your end? Alternatively, if any other forum members reading this have a moment, could they perhaps try running the code I posted previously and confirm if they experience any slight gap or hesitation before the loop restarts? Thanks again for your time and any further assistance the community can offer. I really appreciate the help as I learn Opusmodus. Best regards,
-
wkz changed their profile photo
-
wkz joined the community
-
apostaat joined the community
-
Real-Time Pitch Memory: Compositional Feedback System Using MaxMSP and OPUSMODUS
Real-Time Pitch Memory: Compositional Feedback System Using MaxMSP and OPUSMODUS This text outlines a specific aspect of a larger project I am developing for live electronics and instruments. Since the work heavily involves live electronic processing in real time, it is based on a MaxMSP patch that I am currently building. An important component of this system involves integrating OPUSMODUS for certain compositional processes—specifically, the processing of pitch material collected in real time via a pitch follower from an improvising musician. In MaxMSP, this means that every few seconds, the most recently played pitches (as MIDI note numbers) are saved into a .txt file. Meanwhile, in OPUSMODUS, I run a routine that checks once per second whether a new pitch list has been saved (i.e., a list that differs from the previous one). If a new list is detected, I generate an OMN sequence based on this list and export it as a MIDI file. Only ten MIDI files are generated and continuously overwritten in a rotating manner. These MIDI files can then be precisely triggered within MaxMSP (e.g., when a specific pitch is detected, a stored MIDI file is played back) and integrated into the live electronic performance. Essentially, the system acts as a memory/archive that is generated from the live improvisation of the performer. Through a specific grammar created in OPUSMODUS, this musical material can then be re-injected into the live setting, forming a loop between improvisation, analysis, and compositional feedback. Another development step would be to replace the current .txt-based communication with a direct OSC (Open Sound Control) connection, streamlining the entire process. demo-video.mov could sound like this: electric feedbacker guitar (live and improvised) + this system (in a test setup) demo_sound.m4a
-
marqrdt started following Additional method of specifying key signature
-
Additional method of specifying key signature
Hi, I posted this question to the forum a few days ago: https://opusmodus.com/forums/topic/3886-incorrect-pitch-notation-for-minor-key-in-def-score/#comment-13346. The main issue was that OM was respelling my accidentals when I rendered my score with def-score and set the key-signature to '(d minor). For example it was rendering cs4 as db4, etc. I partially solved the problem by setting the key-signature to 'chromatic or 'atonal. Now all the accidentals are rendered correctly as per my OMN. What's missing is that my score does not have a b-flat in the key signature. My suggestion: Allow the key-signature parameter in def-score to specify a custom key-signature such that the OMN rendered in the is not respelled as per a common key signature. This could also allow composers to render uncommon key signatures like those found in some Bartok scores, like just having a b-flat and a-flat with no e-flat. I imagine it could look something like: :key-signature '(bb ab), or ('bb fs) to combine sharps and flats. OM is by far the most powerful software available for algorithmic composition, but I, maybe others, have gotten pretty quick with writing raw OMN to sketch out music I've written on paper or otherwise. In many cases, it can be a more efficient and ergonomic way of entering music than tools like Sibelius which often require switching between a mouse, keyboard (computer or musical). Thanks for taking the time to read this.
-
Drum Loop Not Looping Seamlessly in live-coding-midi
To retrieve all the controllers and related components, we delay the start slightly. This is what you observe during Live Coding when a loop is active. Live Coding is designed for a different functionality, so if you intend to use it for recording, I recommend setting the desired score length directly in your def-score instance. The start delay:
-
Drum Loop Not Looping Seamlessly in live-coding-midi
Yes, I noticed the slight shift as well. Then, I selected MIDI 2.0 in the Logic setup, and the live recording was perfectly in sync. What you could do is extend the score to the desired length, send it to the MIDI player, and save it. Then, open the MIDI file in your DAW. Life MIDI recording in Logic with MIDI 2.0 setup:
-
Drum Loop Not Looping Seamlessly in live-coding-midi
Thank you so much for your quick response! I'm still noticing the issue on gm—while it's less apparent when using General MIDI, there's still a slight pause right before the loop returns to bar one, almost as if the BPM is slightly out of sync with the loop itself. I've restarted Opusmodus and tried several different approaches, but I'm still experiencing this unwanted behavior on my system. Just to clarify, I'm a beginner—so it's possible I'm overlooking something simple. I’d really appreciate any further insights or suggestions! Thanks again for your help.
-
mstep started following Drum Loop Not Looping Seamlessly in live-coding-midi
-
Drum Loop Not Looping Seamlessly in live-coding-midi
i have a similar problem with the below code, that creates a one-bar-electro-style beat. i looped this code with the live-coding tool and recorded the midi to ableton. if you import the attached midi-file into ableton, you should see that starting from the second 16th note all the notes start a little bit too early, at the end of the beat there are short notes that where never programmed in the opusmodus-script and when the beat starts again in the next bar its too late. as i-m a total opusmodus-newbie i wouldn-t be surprised if this comes from errors in my script... EDIT: I also attached a screenshot of the recording in Ableton. ;; 1 bar of electro rhythms (setf bd-rhythm (polygon-rhythm '(0 3 6 10) 16 0 )) (setf snare-rhythm (polygon-rhythm '(4 12) 16 4 )) (setf closed-hh-rhythm (polygon-rhythm '(0 1 2 3 4 5 6 7 8 9 10 11 13 15) 16 0)) (setf open-hh-rhythm (polygon-rhythm '(14) 16 14)) (setf clap-rhythm (polygon-rhythm '(4 12) 16 4)) ;; Accents for the rhythms (setf bd-velocity (list 'ff 'f 'mf)) (setf sn-velocity (list 'ff 'mf)) (setf closed-hh-velocity (list 'p 'mf 'ff 'mf)) (setf open-hh-velocity 'f) (setf clap-velocity (list 'mf 'ff)) ;; Set midinotes for "Vinyl SP From Mars" Sample Pack ;; Why do i need to set midinote 'c2 in Opusmodus to generate a 'c1 for Ableton? (setf bd-midinote 'c2) (setf snare-midinote 'ds2) (setf closed-hh-midinote 'fs2) (setf open-hh-midinote 'g2) (setf clap-midinote 'e2) ;; create midi-data for the beat-loop out of the rhythms, accents and midi-notes (setf bd-beat (rhythm-map bd-midinote bd-velocity bd-rhythm)) (setf sn-beat (rhythm-map snare-midinote sn-velocity snare-rhythm)) (setf clap-beat (rhythm-map clap-midinote clap-velocity clap-rhythm)) (setf closed-hh-beat (rhythm-map closed-hh-midinote closed-hh-velocity closed-hh-rhythm)) (setf open-hh-beat (rhythm-map open-hh-midinote open-hh-velocity open-hh-rhythm)) ;; create score and send it to Ableton via the IAC Bus (def-score drums (:key-signature 'atonal :time-signature '(4 4) :tempo 140 ) (Bass-Drum :omn bd-beat :port "IAC Bus 1" :channel 1) (Snare :omn sn-beat) (Clap! :omn clap-beat) (Closed-Hihat :omn closed-hh-beat) (Open-Hihat :omn open-hh-beat) ) Electro Beat Loop.mid
-
Drum Loop Not Looping Seamlessly in live-coding-midi
I did a test with 'gm sound and I don't hear and delays. ;; Kick: 4-on-the-floor (quarter notes) (setf kick (make-omn :length (gen-repeat 16 'q) :pitch (gen-repeat 16 'c2) :velocity '(fff))) ;; Snare: hits on beats 2 and 4 of each bar (setf snare (make-omn :length '(q - q - q - q - q - q - q - q -) :pitch '(d2 d2 d2 d2) :velocity '(ff))) ;; Hi-hats: 16th notes across 4 bars (setf chh (make-omn :length (gen-repeat 64 's) :pitch (gen-repeat 64 'gb2) :velocity '(f))) (def-score techno-loop (:time-signature '(4 4) :tempo 128 :start 1 :end 4) (kick :omn kick :sound 'gm :channel 10 :sound 'gm :program 0) (snare :omn snare :channel 10 :sound 'gm :program 0) (chh :omn chh :channel 10 :sound 'gm :program 0)) (live-coding-midi (compile-score 'techno-loop))