August 24, 2025Aug 24 You used a stochastic method. The main objective of functions in Opusmodus is to contribute to new outcomes, if possible. The hocket, for example, allows you to do exactly that, strict hocket or stochastic hocket (personally, I find the latter more interesting and useful in composition today).Opusmodus is Composition Development Environment (CDE) where users extend the system with their own functions and libraries.Please note, I was asking for your example (implementation, input and outpt), not for an analysis of the current gen-hocket methods, which is returning exactly what it should.
August 24, 2025Aug 24 the great thing about Opusmodus is that you can code your own solutions for ideas, problems, or historical models – it gives you a lot of freedom. MAX/MSP, PWGL, or CLM are/were like that too…thx @janusz for your personal support!here is another solution for the traditional hocket... take it or leave it or code it in your own personal way ;-);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generates hocket-voice (defun gen-hocket-voice (elist omnlist) (let ((omnevents (single-events omnlist)) (elist (gen-repeat 5 elist))) (loop repeat (length (single-events omnlist)) for cnt = 0 then (incf cnt) when (= (nth cnt elist) 1) collect (nth cnt omnevents) else collect (if (length-restp (car (nth cnt omnevents))) (nth cnt omnevents) (* -1 (car (flatten (omn :length (nth cnt omnevents))))))))) ;; splits isntruments for binary.. (defun gen-binary-for-hocket (alist) (let ((vlist (sort-asc (remove-duplicates alist)))) (loop for v in vlist collect (loop for i in alist when (= i v) collect 1 else collect 0)))) ;; each number is an instrumnet -> for voices (gen-binary-for-hocket '(1 2 3 2 1 2 3 4 3 2 1))) => ((1 0 0 0 1 0 0 0 0 0 1) (0 1 0 1 0 1 0 0 0 1 0) (0 0 1 0 0 0 1 0 1 0 0) (0 0 0 0 0 0 0 1 0 0 0)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; EXAMPLE ;; rnd-omn-seq (setf omn-seq (make-omn :pitch (make-scale 'c4 23) :length '(s) :span :pitch)) ;; voices 1-4 (setf v1 (gen-hocket-voice (first (gen-binary-for-hocket '(1 2 3 2 1 2 3 4 3 2 1))) omn-seq)) (setf v2 (gen-hocket-voice (second (gen-binary-for-hocket '(1 2 3 2 1 2 3 4 3 2 1))) omn-seq)) (setf v3 (gen-hocket-voice (third (gen-binary-for-hocket '(1 2 3 2 1 2 3 4 3 2 1))) omn-seq)) (setf v4 (gen-hocket-voice (fourth (gen-binary-for-hocket '(1 2 3 2 1 2 3 4 3 2 1))) omn-seq)) ;; check -> when chromatic scale then everything is okayx (merge-voices v1 v2 v3 v4)
August 24, 2025Aug 24 everything okay with this code.... use binary... like janusz coded it...(progn (setf mat '(q c4 d4 e4 f4 g4 a4 b4 c5)) (gen-hocket mat :density '((1 0 0 0 1 0 0 0 0 0 1) (0 1 0 1 0 1 0 0 0 1 0) (0 0 1 0 0 0 1 0 1 0 0) (0 0 0 0 0 0 0 1 0 0 0))) (setf mv (merge-voices v1 v2 v3 v4)))and when you generate the binary seq with.... it's that simple.(defun gen-binary-for-hocket (alist) (let ((vlist (sort-asc (remove-duplicates alist)))) (loop for v in vlist collect (loop for i in alist when (= i v) collect 1 else collect 0)))) ;;; now with OPMO-function... (progn (setf mat '(q c4 d4 e4 f4 g4 a4 b4 c5)) (gen-hocket mat :density (gen-binary-for-hocket '(1 2 3 2 1 2 3 4 3 2 1))) (setf mv (merge-voices v1 v2 v3 v4)))
August 24, 2025Aug 24 Why limit a hoquetus to just four voices? Imagine it instead for fifty guitars dispersed throughout the space—not as a mere progression, but as a finely shaped structure articulated by a vector envelope. A concept piece, perhaps best experienced on a quiet Sunday evening 😅Have a look at the (list-plot...)...(This essentially creates spatial and sonic structures similar to those in Ligeti’s Atmosphères or XENAKIS... and on this point stochastic method would be interesting ;-));; 50 GUITARISTS should play a hocket in an "specific enevelope-order" (setf 50guits (list-plot (vector-map (gen-integer 1 50) (vector-to-envelope2 '(4.2456284 7.2268248 6.4440737) '(3.682579 8.78879 10.000002) (gen-noise 356) :segment (primes 12) :type 3)))) (progn (setf mat (make-omn :pitch '(e4) :length (gen-repeat 50 's))) ;; allvoices for 50 players (gen-hocket mat :density (gen-binary-for-hocket 50guits)))i like to be guitarist number one - just 2 notes to play!
August 25, 2025Aug 25 OM ver. 4.0.30103The function BINARY-VOICE-MAP generate a k-of-n binary voice map over size steps. At each step, draw k ∈ [1, K-MAX] (default 1) and set k of the N voices to 1 at random, the rest to 0; transpose the result to return N columns (voices), each a 0/1 list of length size. If :run-limit is supplied, cap consecutive 1s in each voice to that length by clipping surplus 1s.With this function we cover all possibilities of binary density map. :-)Examples::k-max = 1, no run limit. Exactly one voice is active at every step, the same voice may repeat across steps, so lists may contain long runs of 1s.(binary-voice-map 4 32) => ((1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0) (0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0) (0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1) (0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0)):k-max = 1, per-voice run cap of 1. Lists contain no (1 1) subsequences. If the generator selects the same voice on adjacent steps, the second 1 is clipped to 0, so some steps may become rests (all zeros). Per-step activity is therefore ≤ 1 (often 0 or 1), with a strictly non-sustaining, pointillistic texture.(binary-voice-map 4 32 :run-limit 1) => ((0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0) (1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0) (0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1) (0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0)):k-max = (1 or 2) uniformly per step; thus one or two voices may sound together. Each voice may sustain for up to three consecutive steps; longer runs are clipped, potentially inserting occasional rests (0) only when runs would exceed length 3. This yields mostly sparse lines with intermittent two-voice simultaneities.(binary-voice-map 4 32 :k-max 2 :run-limit 3) => ((0 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0) (0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0) (1 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1) (0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 0))
Create an account or sign in to comment