[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Re: solution: midi input => supercollider 'notes'



And docs:

https://patrickkidd.com/pk/trac/wiki/SuperCollider

On 5/16/06, Patrick Stinson <patrickkidd.lists@xxxxxxxxx> wrote:
I've seen a lot of "how do I get my keyboard into my synthdef"
questions, so I slapped out a python script using my rtmidi/scosc
packages that will do just that in order to dispell some of the
mysteries of notes and synthdefs. The example is intended to describe
the following:

 * how to play "notes" in supercollider
 * how to use the python rtmidi package
 * how to use the python scosc package
 * how great python is as a supercollider client

There are no external dependencies - rtmidi handles device input. Just
write your  synthdef that takes key and vel parms, like the following
example:

RUN THESE:

$ svn co https://svn.patrickkidd.com/pk/repos
$ cd repos
$ sudo python setup.py install


INPUT THIS (sclang):

SynthDef("PKMIDISine", { arg out = 0, vel = 100.0, key = 69;
        Out.ar(out, SinOsc.ar(key.midicps, vel / 127.0));
        })


CLICK *BOOT*


RUN THIS

$ pkscmidi -S PKMIDISine


NOW READ THE CODE, IT'S REALLY EASY!
see my site for more info

--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/



--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/