Jump to content

AM

Members
  • Posts

    793
  • Joined

  • Last visited

Reputation Activity

  1. Like
    AM got a reaction from opmo in convert-to-binary   
    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  
  2. Thanks
    AM reacted to Stephane Boussuge in convert-to-binary   
    Very interesting, thanks !
  3. Like
    AM got a reaction from Stephane Boussuge in convert-to-binary   
    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) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  
  4. Like
    AM reacted to opmo in tempo as FLOAT   
    Maybe a part of the next update 🙂
  5. Like
    AM got a reaction from Stephane Boussuge in convert-to-binary   
    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)  
  6. Like
    AM got a reaction from opmo in convert-to-binary   
    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)  
  7. Like
    AM reacted to o_e in some functions   
    Something similar, only valid for the given octave, but taking the length into account and can handle pitch repetitions and list of lists, no negative/inversed function though:
     
    (defun mute-pitch-event (pch omnlist) (let* ((pos (position-item pch (omn :pitch (flatten omnlist)))) (poslen (position-filter pos (omn :length (flatten omnlist)))) (new (position-replace pos (mapcar #'(lambda (x)(* -1 x)) poslen) (omn :length (flatten omnlist))))) (if (some #'listp omnlist) (gen-divide (mapcar 'length (omn :pitch omnlist)) (make-omn :length new :pitch (omn :pitch (flatten omnlist)) :swallow t)) (make-omn :length new :pitch (omn :pitch omnlist) :swallow t)))) ;;;;-testing-;;;;; (setf test '(t c4 mf cs4 d4 eb4 e eb4 e4 f4 fs4 q g4 s gs4 a4 bb4 b4)) (mute-pitch-event 'eb4 test)  
  8. Like
    AM reacted to Stephane Boussuge in pitch-trajectory   
    Hi,
     
    here's a function I've made for my personal usage.
    May be it could be useful for some users...
    Best
     
    Stéphane
     
    ;;;=================================== ;;; PITCH-TRAJECTORY ;;;=================================== ;;; SB 1.11.21 ;;;=================================== (defun pitch-trajectory (nbpitch range tendency &key (variance 0.5) (type :around) (quantize 1/2) (smooth 1) filter-repeat seed ) (setf seed (rnd-seed seed)) (do-verbose ("pitch-trajectory :seed ~s" seed) (let* ((values (gen-tendency nbpitch tendency :variance variance :type type :seed (seed))) (smoothedval (vector-smooth smooth values)) (out (vector-to-pitch range smoothedval :quantize quantize)) ) (if filter-repeat (filter-repeat filter-repeat out) out)))) #| ;;; Tests divers (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1 :variance 1 ) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1 :variance 0.1 ) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1 :smooth 0.1 ) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1 :quantize 1/4 ) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1 :quantize 1/8 ) (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234 :filter-repeat 1 :variance 1 :quantize 1/8 ) (gen-filter-change (pitch-trajectory 32 '(c4 g5) '(0.1 1 0.1) :seed 1234) 's) |#  
  9. Like
    AM got a reaction from Stephane Boussuge in some functions   
    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))  
     
     
     
     
  10. Like
    AM got a reaction from JulioHerrlein in midi-entry / data saving   
    thanks, julio!!
  11. Like
    AM reacted to JulioHerrlein in midi-entry / data saving   
    Dear André,
     
    Here is a project I did some years ago, with PD and Lilypond. Kind of realtime converter of beats to rhythmic notation.
     
     
  12. Like
    AM got a reaction from JulioHerrlein in midi-entry / data saving   
    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 😄
     
     
  13. Like
    AM reacted to JulioHerrlein in midi-entry / data saving   
    It´s also possible (using MAX or Pure Data) to convert audio impulses to length values using a value in milliseconds as reference for beats and then convert the results to OMN syntax.
     
    Nice Solution, Andre !
  14. Thanks
    AM got a reaction from opmo in midi-entry / data saving   
    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*)
  15. Like
    AM reacted to opmo in Opusmodus 2.2.26862 Update   
    DROP-VOICING
     
    (setf mat '(b2cs4eb4e4 cs3eb4f4gs4 c3d4e4f4 fs2bb3cs4e4))
     
     
    (drop-voicing mat)
     
    The following example returns all chords of type 1:
    (drop-voicing mat :type '(1))
     
     
    In this example we apply a different type to each chord:
    (drop-voicing mat :type '(0 1 2 3))
     
     
    Here the leading voice is set to 'l (lowest voice):
    (drop-voicing mat :type '(0 1 2 3) :leading 'l)
     
    (setf chords '(w b3c4d4e4g4 p h g3b3c4d4e4 mf c4d4e4g4b4 p -                q d4fs4g4b4 b3d4e4fs4g4 b3c4e4g4a4 mf a3c4d4e4f4 p                c4d4e4f4a4 mp d4e4f4a4c5 w bb3d4f4a4 bb3d4eb4f4g4 p                -q eb4f4g4bb4d5 mf c4d4f4a4bb4 mp e4f4g4a4c5 w c4e4g4b4))
     
     
     (drop-voicing chords :type '(0 1 2 3 4 5 4 3 3 1 2 3 4 5 5))
     
     
    (drop-voicing (omn :pitch (library 'standard 'chords 'Giant-Steps)) :type (rnd-sample 32 '(0 1 2 3 4 5) :seed 753) :leading 'l)
     
     
    (setf harm-prog       '(c3g4c5ds5 c3fs4a4d5 g2g4as4d5 c3ds4as4d5         c3ds4a4c5 a2e4a4cs5 d3f4a4d5 e3e4gs4b4 a2e4a4c5         b2ds4fs4b4 e3e4g4b4 ds3c4fs4fs5 e3b3g4e5 e3as4cs5         as2f4as4d5 d3f4as4f5 ds3g4as4ds5 e3g4as4d5 a2e4a4cs5         d3fs4a4d5 g3g4b4d5 c3g4c5ds5 f3gs4c5d5 f3gs4f5         d3g4b4f5 c3g4c5ds5 gs2gs4c5ds5 gs2f4c5d5 d3fs4a4d5         g2f4b4d5 c3ds4g4c5 c3ds4g4c5))
     
    (drop-voicing harm-prog               :type (rnd-sample 32 '(0 1 2 3) :seed 45))
     
    (drop-voicing harm-prog               :type (rnd-sample 32 '(0 1 2 3) :seed 45)               :leading 'l)
  16. Like
    AM got a reaction from JulioHerrlein in midi-entry / data saving   
    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".... 
  17. Like
    AM got a reaction from JulioHerrlein in Patrick Mimran. Extension folder , user function question   
    i've made different user folders...
     
    named:
    user editing
    user pattern matching
    ....
     
    ...or you could put all in the same...
     
    (i realized for my work, that most of the time i'm using a "coded function" only for a specific project/work. so i stopped it to put all special functions into my user library. now, i have the functions only in my project workspace...)
  18. Like
    AM got a reaction from JulioHerrlein in List Segmentation   
    (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))  
  19. Like
    AM reacted to Stephane Boussuge in Short study, Melody on texture   
    Hi,
    here's a short experiment/study composed today for mezzo-soprano, flute, clarinet and bassoon.
     
    Score is a bit commented for clarity and study purpose.
     
    All the best to all OM users.
     
    SB.
     
     
    MelodyOnTexture.mp3
    MelodyOnTexture1GM.opmo
  20. Thanks
    AM reacted to Stephane Boussuge in Trapped Septuor 413188   
    Hi,
     
    here's one of raw outputs from an Opusmodus score I'm working on actually.
     
    That's a work in progress but will be fully documented later in the future...
     
    Stéphane
     
    TrappedSeptuor413188.mp3
    Trapped-Septuor-413188.pdf
  21. Like
    AM reacted to opmo in Opusmodus 2.2.26807 Update   
    2.2.26807 

    – Fixed:
    POLYPHONY OMN-DICTUM
    – Additions:
    MICROPOLYPHONY - length-prob, interval-prob (probability).  POLYPHONY - sustain (overlap).
    – Documentation:
    Edit and changes   
  22. Like
    AM got a reaction from JulioHerrlein in Binary to Integer Function   
    (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
  23. Like
    AM reacted to JulioHerrlein in [HERRLEIN] Hauer Tropes as Clockface Diagrams: Dialogs among Forte, Carter and Ŝedivý - MUSMAT 2021   
    Hauer Tropes as Clockface Diagrams: Dialogs among Forte, Carter and Ŝedivý - MUSMAT 2021
     
    I just did this presentation now !
    All plots done in Opusmodus !
    Hope you like it !
    Best ! Julio
     
     
    Here is the complete session of the Congress !
     
  24. Like
    AM reacted to opmo in String Quartet VEMA (in progress)   
    String Quartet VEMA (work in progress) with micro and spectral strategy.
     
    String Quartet VEMA I.mp3
  25. Like
    AM reacted to opmo in Function studies (Improviation No.1)   
    Function studies (Improviation No.1)
    Some of function used in the study: logarithmic-spiral, ambitus-series, length-weight, length-legato, pitch-figurate...
     
       
     
     
    The score will be part of the next update - "4. Score Examples/Piano/Improvisation No.1.opmo"
     
    Best wishes,
    Janusz
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy