tmhglnd / mercury

A minimal and human-readable language and environment for the live coding of algorithmic electronic music.
http://www.timohoogland.com/mercury-livecoding
GNU General Public License v3.0
304 stars 13 forks source link

OSC input address as function arguments #1

Closed tmhglnd closed 4 years ago

tmhglnd commented 4 years ago

Add functionality to allow for osc-addresses as argument in functions of instruments. For example using a gyroscope axis to control cutoff in a filter:

new synth saw note(0 0) name(bass)
    set bass fx(filter /gyro/x 0.5)
tmhglnd commented 4 years ago

This is now in its experimental phase. The implementation is as follows:

set osc localhost 8000 9000
//=> specify network, input and output ports

new synth sine name(tone)
    set tone time(1/8) shape(1 /sine/decay) fx(reverb 0.9 /sine/verb)
    //=> use osc addresses as argument for methods in instrument

new sample hat_min name(hat)
    set hat fx(filter low /hat/cutoff /hat/q)