AM Posted August 24, 2019 Share Posted August 24, 2019 dear all here is a setup for playing midi-files/scores in polytempi / follow the instructions and have fun! just ask if you have some questions... greetings andré - personally i will use it for exact sample/e-player perfomance with my pieces which are working with "Technology-Assisted Conducting" http://polytempo.zhdk.ch ... in future i will do it all directly from OPMO or lisp - "live score generating" + polytempo-conducting + e-player) - i have already done this with my piece MODULAR FORM but not all controlled by LISP/OPMO, so next step is doing it all in OPMO/LISP ...some explanations about the piece.... andré meier - trompete | komposition - modular form WWW.ANDREMEIER.ORG greetings andré Polytempo - Wikipedia EN.WIKIPEDIA.ORG ;;; POLYTEMPO-PLAY ;;; with a MAX-patch (from my friend thomas peter) and some OSC-send i can play the same/different midis (up to 30) ;;; in different tempos in parallel - any combination, with precise coordination ;;; also possible: change global velocity (means: change velocity inside midi) ;;; time-delay (start) in ms ;;; 1) OSC-send functions: (defparameter *out-socket* (make-socket :type :datagram)) (defparameter *remote-host* "127.0.0.1") (defparameter *remote-port* 7500) (defun udpsend (&rest args) (let ((message (apply' osc::encode-message args))) (send-to *out-socket* message (length message) :remote-host *remote-host* :remote-port *remote-port*))) ;;; 2) a) put the MAX-player-folder on desktop ;;; b) start midiplayer.maxpat ;;; c) midiplayer: define your output source in [midiout@name "from MAX 1"] ;;; d) the MIDIS must be placed in the midi-folder (inside MAX-player-folder) ;;; 3) generate SCORE (here a nonsense example) (setf omn (make-omn :pitch (setf pitches (filter-repeat 1 (flatten (gen-sort (rnd-air :type :pitch :seed 45) :step 5 :sort '> :seed 123)))) :length (gen-length '(1) 1/32) :velocity (pitch-to-velocity 'p 'mf pitches :type :float) :span :pitch)) (def-score sorted-whitenoise (:title "sorted-whitenoise" :key-signature 'atonal :time-signature '(4 4) :tempo 60 :layout (grand-layout 'inst)) (inst :omn omn :port 0 :channel 1 :sound 'gm :program 'acoustic-grand-piano)) ;;; 4) COMPILE that score into your Max-Player/midi-folder => PATH+NAME!!! (compile-score 'sorted-whitenoise :file "your-path/sorted-whitenoise") ;;; 5) play it by evaluate UPSEND -> some examples ;;; /eplayer / midi-name / tempo-factor / velocity factor / time-delay in ms (udpsend "/eplayer" "sorted-whitenoise" 1.0 0.5 0) ;; originaltempo, velocity 0.5 (udpsend "/eplayer" "sorted-whitenoise" 2.3 1.0 0) ;; (* tempo 2.3) etc... (udpsend "/eplayer" "sorted-whitenoise" 0.375 1.0 2000) ;; (* tempo 0.375 with startdelay 2000ms) (udpsend "/eplayer" "stop") ; you can stop with that ;;; a tempo-relations => 23:17:13:9:3:2 -> a complex example with time-delays ;;; also possible with every and different midis you like (progn (udpsend "/eplayer" "sorted-whitenoise" 2.3 1.0 0) (udpsend "/eplayer" "sorted-whitenoise" 0.3 0.8 0) (udpsend "/eplayer" "sorted-whitenoise" 0.2 0.4 0) (udpsend "/eplayer" "sorted-whitenoise" 1.3 1.0 10000) (udpsend "/eplayer" "sorted-whitenoise" 1.7 0.9 16000) (udpsend "/eplayer" "sorted-whitenoise" 0.9 0.7 20000)) (udpsend "/eplayer" "stop") ; you can stop with that Max_Player_19-08-23.zip example.aiff goldberg_13_11.aiff example_11_7_5_3_2.aiff opmo 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted August 24, 2019 Share Posted August 24, 2019 Will have a look if may time with coding permits, sounds very good. Quote Link to comment Share on other sites More sharing options...
AM Posted August 24, 2019 Author Share Posted August 24, 2019 for me usage it has to be "by OSC". i have to be able to control two programs (conducting/display + e-player/samples) simultaneously and in a coordinated way. so i can send DATA for both software-applications well coordinated... Quote Link to comment Share on other sites More sharing options...
AM Posted September 16, 2019 Author Share Posted September 16, 2019 polytemporal fall - algorithmic study [with tempo relations 3:5:7:11:17:23:29] https://soundcloud.com/andr-meier-1/algorithmic-study-polytemporal-fall this is a small example: i coordinate and play MIDIs (in this case this are simple scales) in OPMO via OSC -> maxmsp_player. you can here how precise you can coordinate simple [but polytemporal] scales => all the MIDIs coincide (?) - 30000ms after the evaluation of the code - in an unsiono pitch!!! in that way you can coordinate different scores/midi's (which have individual tempos (!)) very precise. with OSC/maxmsp_player you can change/manipulate the tempi of the midi's (directly from OPMO) so you can be variable with pre-produced midis (perhaps produced in OPMO)... greetings a. Quote Link to comment Share on other sites More sharing options...
loopyc Posted September 19, 2019 Share Posted September 19, 2019 No '13' or '19'? I find the Ulam Prime Spirals and Abarim 'Pillars' to also produce interesting polyrhythms:) Quote Link to comment Share on other sites More sharing options...
AM Posted September 19, 2019 Author Share Posted September 19, 2019 Quote No '13' or '19'? because in such a fast "basic tempo" they were too close to "17" and "23" i think in slower tempo it makes sense to work with numbers they are close/closer to each other. then the perception compares the tempi, when the GAPS are to large it's only "SLOW/FAST".... depends on your ideas... THANKS FOR THE HINT, i will look at it!! andré Quote Link to comment Share on other sites More sharing options...
AM Posted February 2, 2022 Author Share Posted February 2, 2022 POLYTEMPO: here is an easy solution to play POLYTEMPO-textures in OPMO in every "play-tempo-stream" you can write for 4 instruments... then put it in (progn... // then choose different tempos and PLAY it greetings andré p.s. if you want to do it like CONLON then write a list with tempos/beats in :tempo-curve ... example: "tempoverlauf per BEAT" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; damit kannst du einfach dann OMN's eingeben, pro tempo-stream 4 instrumente und dann abspielen, ;; streams überlagernd abspielen (defun play-tempo-stream (&key (inst1 nil) (inst2 nil) (inst3 nil) (inst4 nil) (port 0) (tempo-curve 60)) (def-score stream (:key-signature 'chromatic :time-signature (get-time-signature (omn-to-time-signature inst1 '(1 4))) :tempo tempo-curve :layout (list (bracket-group (treble-layout 'inst1) (treble-layout 'inst2) (treble-layout 'inst3) (treble-layout 'inst4)))) (inst1 :omn inst1 :port port :channel 1 :pan 20) (inst2 :omn inst2 :port port :channel 2 :pan 20) (inst3 :omn inst3 :port port :channel 3 :pan 20) (inst4 :omn inst4 :port port :channel 4 :pan 20)) (score-player 'stream)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; some "random omn" to play (setf p1 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e 3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 3 streams mit je 3 instrumenten ;; konstantes tempo (progn (play-tempo-stream :inst1 p1 :inst2 p1 :inst3 (gen-retrograde p1) :tempo-curve 30 :port 0) (play-tempo-stream :inst1 (pitch-transpose 11 p1) :inst2 (pitch-transpose 12 p1) :inst3 (pitch-transpose 13 (gen-retrograde p1)) :tempo-curve 50 :port 0) (play-tempo-stream :inst1 (pitch-transpose -11 p1) :inst2 (pitch-transpose -12 p1) :inst3 (pitch-transpose -13 (gen-retrograde p1)) :tempo-curve 70 :port 0)) ;;; tempoverlauf per BEAT (progn (play-tempo-stream :inst1 p1 :inst2 p1 :inst3 (gen-retrograde p1) :tempo-curve '((100 1) (160 1) (172 1)) ;; tempo per beat :port 0) (play-tempo-stream :inst1 (pitch-transpose 11 p1) :inst2 (pitch-transpose 12 p1) :inst3 (pitch-transpose 13 (gen-retrograde p1)) :tempo-curve '((122 1) (177 1) (201 1)) ;; tempo per beat :port 0) (play-tempo-stream :inst1 (pitch-transpose -11 p1) :inst2 (pitch-transpose -12 p1) :inst3 (pitch-transpose -13 (gen-retrograde p1)) :tempo-curve '((63 1) (62 1) (67 1)) ;; tempo per beat :port 0)) o_e and opmo 2 Quote Link to comment Share on other sites More sharing options...
o_e Posted February 3, 2022 Share Posted February 3, 2022 Hi, I was fiddeling around with your code below, but I don't get it, can you please explain a little more how it works, when I test it the tempo of instrument1 to 4 are still in the same tempo (inside one play-tempo-stream (), when I try the play-tempo-streams at the same time, it throws me an error. Can you please provide a simple Conlon-Nancarro-ish 2 voice example or something to work along? Thanks in advance! best ole Edit: I get it to work with a fresh morning head, thanks for sharing the code! 15 hours ago, AM said: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; damit kannst du einfach dann OMN's eingeben, pro tempo-stream 4 instrumente und dann abspielen, ;; streams überlagernd abspielen (defun play-tempo-stream (&key (inst1 nil) (inst2 nil) (inst3 nil) (inst4 nil) (port 0) (tempo-curve 60)) (def-score stream (:key-signature 'chromatic :time-signature (get-time-signature (omn-to-time-signature inst1 '(1 4))) :tempo tempo-curve :layout (list (bracket-group (treble-layout 'inst1) (treble-layout 'inst2) (treble-layout 'inst3) (treble-layout 'inst4)))) (inst1 :omn inst1 :port port :channel 1 :pan 20) (inst2 :omn inst2 :port port :channel 2 :pan 20) (inst3 :omn inst3 :port port :channel 3 :pan 20) (inst4 :omn inst4 :port port :channel 4 :pan 20)) (score-player 'stream)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; some "random omn" to play (setf p1 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e 3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 3 streams mit je 3 instrumenten ;; konstantes tempo (progn (play-tempo-stream :inst1 p1 :inst2 p1 :inst3 (gen-retrograde p1) :tempo-curve 30 :port 0) (play-tempo-stream :inst1 (pitch-transpose 11 p1) :inst2 (pitch-transpose 12 p1) :inst3 (pitch-transpose 13 (gen-retrograde p1)) :tempo-curve 50 :port 0) (play-tempo-stream :inst1 (pitch-transpose -11 p1) :inst2 (pitch-transpose -12 p1) :inst3 (pitch-transpose -13 (gen-retrograde p1)) :tempo-curve 70 :port 0)) ;;; tempoverlauf per BEAT (progn (play-tempo-stream :inst1 p1 :inst2 p1 :inst3 (gen-retrograde p1) :tempo-curve '((100 1) (160 1) (172 1)) ;; tempo per beat :port 0) (play-tempo-stream :inst1 (pitch-transpose 11 p1) :inst2 (pitch-transpose 12 p1) :inst3 (pitch-transpose 13 (gen-retrograde p1)) :tempo-curve '((122 1) (177 1) (201 1)) ;; tempo per beat :port 0) (play-tempo-stream :inst1 (pitch-transpose -11 p1) :inst2 (pitch-transpose -12 p1) :inst3 (pitch-transpose -13 (gen-retrograde p1)) :tempo-curve '((63 1) (62 1) (67 1)) ;; tempo per beat :port 0)) Quote Link to comment Share on other sites More sharing options...
AM Posted February 3, 2022 Author Share Posted February 3, 2022 great, that it works fine now! greetings andré Quote Link to comment Share on other sites More sharing options...
o_e Posted February 3, 2022 Share Posted February 3, 2022 I made a simple example to show how it works. You have to set the port and the midi channels to your needs. What I don't get is why the two voices of different length, any explanation is welcome.. The OM MIDI-Export function does not work here, so you have to record the MIDI-Stream in your DAW. Enjoy! (setf pattern (gen-repeat 50 '(s e4 fs4 b4 cs5 d5 fs4 e4 cs5 b4 fs4 d5 cs5))) (defun play-tempo-stream (&key (inst1 nil) (inst2 nil) (port "OM-VE1") (tempo-curve 60)) (def-score stream (:key-signature 'chromatic :time-signature '(3 4) :tempo tempo-curve :layout (list (bracket-group (treble-layout 'inst1) (treble-layout 'inst2)))) (inst1 :omn inst1 :port port :channel 1 :pan 20) (inst2 :omn inst2 :port port :channel 7 :pan 20)) (score-player 'stream)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (progn (play-tempo-stream :inst1 pattern :tempo-curve (mapcar 'list (gen-integer 110 60)(gen-repeat 50 '1)) :port 0) (play-tempo-stream :inst2 pattern :tempo-curve (mapcar 'list (gen-integer 61 111)(gen-repeat 50 '1)) :port 0)) Flextempo.mp3 flextempo.mid opmo 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted February 3, 2022 Share Posted February 3, 2022 I did the SCORE-PLAYER for Andre. I will make a documentation for it soon. JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
AM Posted February 3, 2022 Author Share Posted February 3, 2022 you will have the same DURATION when the pitch-loop and tempo-loop (tempo-progression = TIME) have the same length. so you have to stop the pitch-seq at the end of your BAR/tempo-seq!!! process should equal !? (gen-integer 110 60) (gen-integer 61 111) Quote Link to comment Share on other sites More sharing options...
opmo Posted February 3, 2022 Share Posted February 3, 2022 Example with def-score and score-player only: (setf pattern (gen-repeat 50 (list '(s e4 fs4 b4 cs5 d5 fs4 e4 cs5 b4 fs4 d5 cs5)))) (setf tempo (mclist (gen-integer 110 60) (gen-repeat 50 1))) (def-score score1 ( :key-signature 'chromatic :time-signature '(3 4) :tempo tempo ) (inst1 :omn pattern :sound 'gm :channel 1 :program 0 :pan 27)) (def-score score2 ( :key-signature 'chromatic :time-signature '(3 4) :tempo (reverse tempo) ) (inst1 :omn pattern :sound 'gm :channel 2 :program 0 :pan 100)) (progn (score-player 'score1) (score-player 'score2) ) The score-player plays midi-files and scores. (score-player "~/Opusmodus/Media/MIDI/Bach/Chorals/036500b_.mid") Quote Link to comment Share on other sites More sharing options...
o_e Posted February 3, 2022 Share Posted February 3, 2022 Thank you! As the time-signature is 1/4 now, there is a change in the tempo definition necessary: (setf tempo (mclist (gen-integer 160 10) (gen-repeat 150 1))) then the two instrument's start and end together as it should be.. Can't wait for the score-player doc, any chance the midi export function can work correctly? It is cumbersome to record the midi-stream.. Anyway thanks a lot for this!! best ole PS I do not understand why this: (mapcar 'list (gen-integer 110 60)(gen-repeat 50 '1)) ==>((110 1) (109 1) (108 1) (107 1) (106 1) (105 1) (104 1) (103 1) (102 1) (101 1) (100 1) (99 1) (98 1) (97 1) (96 1) (95 1) (94 1) (93 1) (92 1) (91 1) (90 1) (89 1) (88 1) (87 1) (86 1) (85 1) (84 1) (83 1) (82 1) (81 1) (80 1) (79 1) (78 1) (77 1) (76 1) (75 1) (74 1) (73 1) (72 1) (71 1) (70 1) (69 1) (68 1) (67 1) (66 1) (65 1) (64 1) (63 1) (62 1) (61 1)) (mapcar 'list (gen-integer 60 110)(gen-repeat 50 '1)) ==>((60 1) (61 1) (62 1) (63 1) (64 1) (65 1) (66 1) (67 1) (68 1) (69 1) (70 1) (71 1) (72 1) (73 1) (74 1) (75 1) (76 1) (77 1) (78 1) (79 1) (80 1) (81 1) (82 1) (83 1) (84 1) (85 1) (86 1) (87 1) (88 1) (89 1) (90 1) (91 1) (92 1) (93 1) (94 1) (95 1) (96 1) (97 1) (98 1) (99 1) (100 1) (101 1) (102 1) (103 1) (104 1) (105 1) (106 1) (107 1) (108 1) (109 1)) gives a different result than this: (gen-integer 110 60) ==>(110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60) (gen-integer 60 110) ==>(60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110) Quote Link to comment Share on other sites More sharing options...
opmo Posted February 3, 2022 Share Posted February 3, 2022 Midi Export is working as it should. Quote Link to comment Share on other sites More sharing options...
o_e Posted February 3, 2022 Share Posted February 3, 2022 Can you please examine the midi file, maybe its a bug in my DAW? I've tried it also with quicktime player (7), there is also only one voice.. Edit: MIDI Player X also plays only one voice (the second as in the screenshot below). Thanks! tempomodulation.mid Quote Link to comment Share on other sites More sharing options...
o_e Posted February 4, 2022 Share Posted February 4, 2022 I try to evaluate score1 and score2 seperatly but the DAW can only read one tempo map at a time So, I don't see a way beside recording the midi-stream..? Quote Link to comment Share on other sites More sharing options...
AM Posted February 4, 2022 Author Share Posted February 4, 2022 unfortunately i have no experience with DAW + polytempo... i always needed it for live-instrumental music Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.