-
Posts
798 -
Joined
-
Last visited
Content Type
Forums
Events
Store
Video Gallery
Everything posted by AM
-
ANTON WEBERN - Variationen für Klavier Op.27, I converted into BINARY INFORMATION // "Verdoppelung der Welt" // (inspired by Armin Nassehi's Book "Muster - Theorie der digitalten Gesellschaft") Bildschirmaufnahme 2022-01-29 um 13.10.42.mov
-
but happend again the solution is to quit/start OPMO - but not a big problem, i'm happy...
-
this little CONCEPTUAL project goes on: converting "something" (musical paramters in this case) into a binary form and reconvert it (binary back into musical parameters) => like kind of A/D-D/A-converters and have a look how "the reality is different/changing", experimenting with mapping/resolution etc... i don't think primarily musically with this work but more technically and see what results from that. ;;; SUB (defun fill-to-x-bit (listseq &key (bitlength 7)) (loop for i in listseq when (< (length i) bitlength) collect (append (gen-repeat (- bitlength (length i)) 0) i) else collect i)) (defun length/rest-to-binary (alist) (loop for i in alist when (length-restp i) collect 0 else collect 1)) ;;;; CONVERTING PITCH/LENGTH or VELOCITY TO BINARY INFORMATION (defun convert-to-binary (alist &key (parameter 'pitch) (lengthspan '(24 100)) (velocity-resolution 127) (pitch-resolution 127) (bitlength 7)) (let ( (alist (progn (setf alist (cond ((stringp alist) (flatten (midi-to-omn alist :instrument 1))) (t alist))) (if (omn-formp alist) (cond ((equal parameter 'pitch) (setf alist (omn :pitch alist))) ((equal parameter 'length) (setf alist (omn :length alist))) ((equal parameter 'velocity) (setf alist (omn :velocity alist)))) alist)))) (cond ((pitchp (car alist)) (progn (setf alist (pitch-to-midi (pitch-melodize alist))) (fill-to-x-bit (decimal-to-binary (vector-round 1 (if (null pitch-resolution) (- (find-max alist) (find-min alist)) pitch-resolution) alist)) :bitlength bitlength))) ((lengthp (car alist)) (fill-to-x-bit (decimal-to-binary (vector-round (car lengthspan) (cadr lengthspan) (mapcar 'float (omn :length alist)))) :bitlength bitlength)) ((velocityp (car alist)) (fill-to-x-bit (decimal-to-binary (vector-round 1 velocity-resolution (get-velocity alist))) :bitlength bitlength))))) ;;;; CONVERTING BINARY INFORMATION BACK TO OMN (defun convert-to-omn (binlist &key (parameter 'pitch) (lengthspan '4/4) (length/rest nil) (velocityspan '(pppp ffff)) (pitchspan '(c3 c5)) (bitlength 8)) (let ((binlist (gen-divide bitlength (flatten binlist)))) (cond ((equal parameter 'pitch) (midi-to-pitch (vector-round (car (pitch-to-midi pitchspan)) (cadr (pitch-to-midi pitchspan)) (binary-to-decimal binlist)))) ((equal parameter 'length) (if (null length/rest) (gen-length-constant (binary-to-decimal binlist) lengthspan) (loop for i in (gen-length-constant (binary-to-decimal binlist) lengthspan) for j in length/rest when (= j 0) collect (* i -1) else collect i))) ((equal parameter 'velocity) (vector-to-velocity (car (get-velocity (list (car velocityspan)))) (car (get-velocity (list (cadr velocityspan)))) (loop for i in (binary-to-decimal binlist) collect (* i (float (/ 1 (sum (binary-to-decimal binlist))))))))))) evaluate here and you see the original and reconverted SAMPLE ;;; SOME EXAMPLES OF THE PROCESS SEQ to BINARY, THEN MAPPED BACK TO OMN ;;; IF THE BITLENGTHS ARE DIFFERENT YOU GET DIFFERENT RESulTS ;;; ALSO DIFFERENT RESULTS WITH VELOCITY / LENGTHS => it depends on RESOLUTION etc... ;; cmd-E or cmd-1 (pitch-list-plot (list (setf seq '(c4 cs5 fs3 c5 f5) );; original (convert-to-omn (convert-to-binary seq :bitlength 32) ;; reconverted :bitlength 32 :pitchspan (get-ambitus seq :type :pitch))) :join-points t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (length-list-plot (list (setf seq '(-e e -q h e)) ;; original (convert-to-omn (convert-to-binary seq :bitlength 32) ;; reconverted :parameter 'length :length/rest (length/rest-to-binary seq) :bitlength 32 :lengthspan '4/4)) :join-points t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (velocity-list-plot (list (setf seq '(p p ffff mp )) ;; original (convert-to-omn (convert-to-binary seq :bitlength 32) ;; reconverted :parameter 'velocity :bitlength 32 :velocityspan '(ppp mf))) :join-points t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
i restarted opusmodus and now it works
-
also this do not work (setf voice1 '(-d_whs s f4 ppp g4 e4 fs4 e4 fs4 fs4 -d_whs s d4 eb4 -e s d4 - e4 -d_whs s d4 eb4 -e s d4 - e4 -d_whs s cs4 g4 - fs4 e4 d4 fs4 -d_whs s fs4 g4 e4 e4 fs4 e4 e4 -d_whs s eb4 eb4 cs4 cs4 eb4 cs4 f4 -d_whs s f4 f4 fs4 fs4 e4 e4 e4 -d_whs s d4 eb4 -e s d4 - e4 -d_whs s f4 f4 g4 g4 f4 f4 f4 -d_whs s d4 d4 -e s d4 - f4 -d_whs s e4 g4 fs4 fs4 fs4 fs4 e4 -d_whs s eb4 eb4 cs4 cs4 eb4 cs4 f4 -d_whs s d4 g4 - e4 fs4 - e4 -d_whs s f4 g4 fs4 fs4 fs4 fs4 e4 -d_whs s d4 eb4 -e s d4 - e4)) (omn-to-time-signature voice1 '(4 4)) > Error: There is no applicable method for the generic function: > #<standard-generic-function omn-symbol #x3020009144EF> > when called with arguments: > (nil) > While executing: #<ccl::standard-kernel-method no-applicable-method (t)>, in process Listener-2(8). > Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. > If continued: Try calling it again > Type :? for other options.
-
it's not working on my system
-
why does the MERGE-VOICES not work with this two voices? (voices are with MAKE-OMN, no problem to display as "single voices") thanx for help andré (setf voice1 '(-d_whs s f4 ppp g4 e4 fs4 e4 fs4 fs4 -d_whs s d4 eb4 -e s d4 - e4 -d_whs s d4 eb4 -e s d4 - e4 -d_whs s cs4 g4 - fs4 e4 d4 fs4 -d_whs s fs4 g4 e4 e4 fs4 e4 e4 -d_whs s eb4 eb4 cs4 cs4 eb4 cs4 f4 -d_whs s f4 f4 fs4 fs4 e4 e4 e4 -d_whs s d4 eb4 -e s d4 - e4 -d_whs s f4 f4 g4 g4 f4 f4 f4 -d_whs s d4 d4 -e s d4 - f4 -d_whs s e4 g4 fs4 fs4 fs4 fs4 e4 -d_whs s eb4 eb4 cs4 cs4 eb4 cs4 f4 -d_whs s d4 g4 - e4 fs4 - e4 -d_whs s f4 g4 fs4 fs4 fs4 fs4 e4 -d_whs s d4 eb4 -e s d4 - e4)) (setf voice2 '(-d_whs s fs3 ppp e3 g3 f3 g3 f3 f3 -d_whs s a3 gs3 -e s a3 - g3 -d_whs s a3 gs3 -e s a3 - g3 -d_whs s bb3 e3 - f3 g3 a3 f3 -d_whs s f3 e3 g3 g3 f3 g3 g3 -d_whs s gs3 gs3 bb3 bb3 gs3 bb3 fs3 -d_whs s fs3 fs3 f3 f3 g3 g3 g3 -d_whs s a3 gs3 -e s a3 - g3 -d_whs s fs3 fs3 e3 e3 fs3 fs3 fs3 -d_whs s a3 a3 -e s a3 - fs3 -d_whs s g3 e3 f3 f3 f3 f3 g3 -d_whs s gs3 gs3 bb3 bb3 gs3 bb3 fs3 -d_whs s a3 e3 - g3 f3 - g3 -d_whs s fs3 e3 f3 f3 f3 f3 g3 -d_whs s a3 gs3 -e s a3 - g3)) (merge-voices voice2 voice2) > Error: There is no applicable method for the generic function: > #<standard-generic-function omn-symbol #x3020009144EF> > when called with arguments: > (nil) > While executing: #<ccl::standard-kernel-method no-applicable-method (t)>, in process Listener-2(8). > Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. > If continued: Try calling it again > Type :? for other options.
-
it would be very interesting to work with that! also with the "chromatische Temposkala" by Stockhausen ...as EXTENSION for all your row/serialism-functions
-
i like to simulate parts with individual tempo curves (each instrument has its own tempo progession) and calculated "meeting-points". for that you will need INTEGERS. i wrote some pieces with with tempopolyphonic approaches - but i would like to simulate it with OPMO --- the software for REALTIME-conducting (PolytempoNetwork) and PolytempoComposer is here: https://polytempo.zhdk.ch PolytempoComposer: "The application PolytempoComposer allows to explore, sketch and organise complex tempo structures. It is a tool to calculate the exact time of every beat in a constant or variable tempo. Furthermore, it enables composers to find or adjust synchronisation points between voices in different tempos. Due to the graphical user interface, composers can manipulate the parameters of a complex tempo polyphony without any in-depth mathematical knowledge." --- in this video (was for something else: i'm sending new tempo curves data from OPMO to the conductingAPP (still without sheet music - only the conducting)) you can see how to manipulate tempo curves so that the end of the phrase is always at second 15. and how to reach a meeting point (e.g. T2 on 1) within the tempo curve at a different point in time. this can be calculated using the POLYTEMPO-COMPOSER app, output/saved as lisp format and then imported and conducted (by the APP). I would like to hear that and simulate it in advance on OPMO. I've already programmed it appropriately (to generate a SCORE with these tempo curves), but the ERROR is always because of float tempos. without float you won't create any usable polytempo structures on OPMO. if you round, the timepoints are of course no longer correct. Bildschirmaufnahme 2021-11-15 um 21.56.13.mov
-
dear opmo it would be extremely helpful and useful if possible to enter the tempo as FLOAT as well. is there any possibility? thanx andré
-
here is another little function to COMBINE the binary-information i got from CONVERT-TO-BINARY -> gen a new structure from it so, with CONVERT-FROM-BINARY and BINARY-LAYER-ADD you could do things like: compose music => convert to binary data => generate music by this data .... ad infinitum conceptual .... ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ADDING 3 BINARY-LAYERS IN A WAY THAT INFORMATION COULD BE ENCODED ;;; first layer with 0/1 ;;; second layer with 0/2 ;;; third layer with 0/4 (defun binary-layer-add (lists) (loop for i in (first lists) for j in (second lists) for k in (if (null (third lists)) (gen-repeat (length (second lists)) 0) (third lists)) collect (+ i (* j 2) (* k 4)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (list-plot (binary-layer-add (list (flatten (convert-to-binary '(c4 cs5 fs3 c5 f5) :bitlength 8)) (flatten (convert-to-binary '(-e h -q h e) :bitlength 8)) (flatten (convert-to-binary '(p p ffff mp mf ) :bitlength 8)))) :join-points t :point-radius 0) (list-plot (binary-layer-add (list (flatten (convert-to-binary '(c4 cs5 fs3 c5 f5) :bitlength 32)) (flatten (convert-to-binary '(-e h -q h e) :bitlength 32)) (flatten (convert-to-binary '(p p ffff mp mf ) :bitlength 32)))) :join-points t :point-radius 0) (list-plot (binary-layer-add (list (flatten (convert-to-binary '(c4 cs5 fs3 c5 f5) :bitlength 16)) (flatten (convert-to-binary '(-e h -q h e) :bitlength 16 :length-resolution 64)) (flatten (convert-to-binary '(p p ffff mp mf ) :bitlength 16)))) :join-points t :point-radius 0)
-
here some functions (that i'm using currently). perhaps anyone/OPMO would include/optimze them.. take the ideas... greetings andré 1) rnd-order/sort-omn => picks omn-seqs/bars in rnd-order and sorting it (a mix-up and sort-process for OMN) (defun rnd-order/sort-omn (omnlist &key (type nil) (sort 'a) (step nil)) (let* ((int-seq (gen-integer 0 (1-(length omnlist)))) (sorted-int (gen-sort (rnd-order int-seq) :type type :sort sort :step step))) (loop for i in (flatten sorted-int) collect (nth i omnlist)))) (rnd-order/sort-omn '((w c4 mf) (h d4 ppp ten e4 ten) (q g4 leg a4 leg b4 leg) (e c5 d5 e5 f5 g5))) => ((q g4 leg a4 leg b4 leg) (w c4 mf) (h d4 ppp ten e4 ten) (e c5 d5 e5 f5 g5) (w c4 mf) (q g4 leg a4 leg b4 leg) (h d4 ppp ten e4 ten) (e c5 d5 e5 f5 g5) (w c4 mf) (h d4 ppp ten e4 ten) (q g4 leg a4 leg b4 leg) (e c5 d5 e5 f5 g5)) 2) filter-events by pitch (in all octaves!) / pos and neg ;; SUB (defun p-octaves (plist) (loop for i in '(-48 -36 -24 -12 0 12 24 36 48) append (pitch-transpose i plist))) ;;; MAINS (defun filter-events-pos (pitchlist omnlist) (loop for i in (single-events omnlist) when (null (member (second i) (p-octaves pitchlist))) collect '(-1/32) else collect i)) (defun filter-events-neg (pitchlist omnlist) (loop for i in (single-events omnlist) when (null (member (second i) (p-octaves pitchlist))) collect i else collect '(-1/32))) ;;;;; (filter-events-pos '(c4 d4 g4) '(t c4 mf cs4 d4 eb4 e4 f4 fs4 g4 gs4 a4 bb4 b4)) => ((t c4 mf) (-1/32) (t d4 mf) (-1/32) (-1/32) (-1/32) (-1/32) (t g4 mf) (-1/32) (-1/32) (-1/32) (-1/32)) (filter-events-neg '(c4 d4 g4) '(t c4 mf cs4 d4 eb4 e4 f4 fs4 g4 gs4 a4 bb4 b4)) => ((-1/32) (t cs4 mf) (-1/32) (t eb4 mf) (t e4 mf) (t f4 mf) (t fs4 mf) (-1/32) (t gs4 mf) (t a4 mf) (t bb4 mf) (t b4 mf))
-
thanks, julio!!
-
i know, of course, that LISP is not an environment for REALTIME actions (pure data / max would be much more suitable) - so I had to outsmart the system a little to import data (from a modularsynth and other applications) almost "on the fly" to generate a LIVE-SCORE (with the influence of this datas) at the concert/on the stage.... maybe i should learn MAX... for more smart-coded REALTIME things
-
MIDI KEYBOARD to OSCulator (translates MIDI to OSC) to OPMO (reading pitch (midi number) and set to variable X) 1) evaluate (setq *osc-receive*.......) 2) start/evaluate LOOP-section 3) start LIVE-CODE 4) play your midi-keyboard => in every cycle of LIVE-CODING the "keyboard-pitch" will be read --- to variable X -> tempo and pitch are changing (by new cycle start) 5) stop all, incl. evaluate (process-kill *osc-receive*)
-
here is a short sketch of how you can integrate a midi keyboard into live coding. evaluate the BASIC SETUP as before but in a LOOP (here 10 times) the LIVE-CODING setup, so a new value X (the PITCH (midi number) from the external keyboard) is always read in (which comes from the keyboard)... these values can now be used on various parameters. for this sketch only pitch + tempo (see: tempo (list (* x 3)) VIDEO: at the beginnig you see data coming in from midi keyboard midi keyboard to live-coding.mov some code/sketch (defparameter *remote-host* "127.0.0.1") (defparameter *in-port* 1234) (defparameter *in-socket* (make-socket :type :datagram :local-port *in-port* :format :binary)) (setq *osc-receive* (process-run-function "osc-receive-process" #'(lambda () (loop do (print (setf x (second (osc::decode-message (receive-from *in-socket* 2048)))) #.*terminal-io*))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (loop repeat 10 do (progn (def-score test1 (:key-signature '(c maj) :time-signature '(4 4) :tempo (list (* x 3)) :start 1 :end 4) (part1 :omn (make-omn :pitch (list (midi-to-pitch x)) :length (gen-length-cartesian 1 1 'n 'n 'q '(2 3) '(13 4) '(1 2 3 4 5 6)) :span :length) :port 4 :channel 1 :sound 'gm :program 0 :volume 127)) (live-coding-midi (compile-score 'test1))) do (print x) do (sleep 3)) (process-kill *osc-receive*) ;; Prozess wieder anhalten
-
I have now found a SOLUTION that might be also interesting for LIVE CODING: With the APP OSCulator you can convert midi-input (by an external keyboard) into OSC and then read it in real time (via osc-library + code) in OPMO (see video). Of course, it could also be done directly from OSC (then via an APP such as TouchOSC from the mobile or tablet). you just have to reread the values (by a loop-function) as you can see in the video; in this way, certain parameters of the LIVE-CODING could be controlled / influenced from the outside. LINKS: OSC to LISP: GitHub - zzkt/osc: a common lisp implementation of the Open Sound Control protocol aka OSC GITHUB.COM a common lisp implementation of the Open Sound Control protocol aka OSC - GitHub - zzkt/osc: a common lisp implementation of the Open Sound Control protocol aka OSC OSCulator: Home | OSCulator OSCULATOR.NET Links your controllers to your favorite music and video software. Works with Nintendo Wiimote, iPhone and more. TouchOSC: TouchOSC | hexler.net HEXLER.NET VIDEO: left- PROTOKOL to see what's MIDI-in right - midi to osc (OSCulator) bottom - OPMO with midi-data PRINT in the listener midi via osc to opmo.mov BASIC CODE: (defparameter *remote-host* "127.0.0.1") (defparameter *in-port* 1234) (defparameter *in-socket* (make-socket :type :datagram :local-port *in-port* :format :binary)) (setq *osc-receive* (process-run-function "osc-receive-process" #'(lambda () (loop do (print (osc::decode-message (receive-from *in-socket* 2048)) #.*terminal-io*))))) ;; instead of PRINT you could use SETF (process-kill *osc-receive*) ;; STOP "listening process" ;;; CODE by philippe kocher
-
with OSC - (with the external osc-library i've sended you) - it should work similiar? loop-function which PRINT the revcevied osc-values over and over (it works). i would like to do that with MIDI but i'm not a lisp pro.... (code not by me) (defparameter *in-port* 9999) (defparameter *in-socket* (make-socket :type :datagram :local-port *in-port* :format :binary)) (setq *osc-receive* (process-run-function "osc-receive-process" #'(lambda () (loop do (print (osc::decode-message (receive-from *in-socket* 2048)) #.*terminal-io*))))) (process-kill *osc-receive*) ;; Prozess wieder anhalten
-
thanx! but... it's "only a LISP problem" with LOOP and SLEEP my code should read X (the midi-values) every 2 seconds - (sleep 2). i don't know why "LISP don't safe" variable X inside the loop when i'm doing "midi-entry"....
-
dear all as so often i try out strange things i switch on midi-entry, read the pitches which i enter from a keyboard. everything clear so far. I am now trying to do this in a 2-second-loop (with sleep-function), so that variable X would always be assigned new values. at the end of the loop sequence, however, X is NIL. only when I evaluate X again are the values assigned. (see video) (the idea is... to IMPORT live-midi into a "realtime-process") some ideas? thanx andré clip.mov
-
(gen-divide '(1 2 3 4 5 6) '(1 2 3 4 5 6 7 8 9 10)) => ((1) (2 3) (4 5 6) (7 8 9 10))
-
(binary-to-length '(1 0 0 0 1 0 0 1 0 1 0 1 1) :value 1) => (4 3 2 2 1 1) greetings
-
the LOOP-cycles produces data-sequences with lengths about 5 to 20 sec for this... stop and wait via SLEEP is oaky.... inside the loop: i send the datas (the sequences) to screens (generative score + conducting for the musicians / polytempo) and MAXMSP (sound/modsynth) ... this is via OSC for accuracy/coordination so it works fine like that... but: LISP is not exactly suitable for REALTIME processing
-