Jump to content

play polytempo -> code/examples

Recommended Posts

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...





- 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....









;;; 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* "")
(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))
   :omn omn
   :port 0
   :channel 1
   :sound 'gm
   :program 'acoustic-grand-piano))

;;; 4) COMPILE that score into your Max-Player/midi-folder => PATH+NAME!!!

 :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

  (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

Link to post
Share on other sites

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...

Link to post
Share on other sites
  • 4 weeks later...

polytemporal fall - algorithmic study

[with tempo relations 3:5:7:11:17:23:29]




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)...









Link to post
Share on other sites

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!!





Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use Privacy Policy