
Thanks a lot!
--- Ursprüngliche Nachricht --- Von: Ge Wang
An: ChucK Users Mailing List Betreff: Re: [chuck-users] chuck beginner Datum: Tue, 18 Oct 2005 11:49:05 -0400 Hi Favio!
1. In your ChucK Tutorial, you write as follows... "Given any number of source files that uses the timing mechanism above,...."
The mechanism here is one that simply chucks a duration to 'now':
// advance time by 100 ms 100::ms => now;
Time in the language specification:
http://chuck.cs.princeton.edu/doc/language/time.html
The idea is that as long as each individual program component deals with its own time, chuck can automatically run them concurrently and with sample- synchronous precision.
There are other ways of advancing time, such as with events:
http://chuck.cs.princeton.edu/doc/language/event.html
2. Is it possible to trigger ChucK with MIDI?
It sure is - in the new 1.2.0.2 release, check out gomidi.ck and gomidi2.ck in the examples/midi/ folder. They only print out the messages, but it is very straightforward to add code to control synthesis and other parameters with them. Also, fire up polyfony.ck and polyfony2.ck, which takes notein messages, such as from a keyboard. The only "trick" to running them is that you must specify the midi device to open - and you can find this number using chuck --probe.
For example, in polyfony.ck:
// device to open (see: chuck --probe) 1 => int device;
If you see that the device you want to use (chuck --probe) is 3, then change the 1 to 3, save the file, and run it.
Quite a few folks here have been using MIDI in ChucK. They can likely provide more and better usage examples.
Hope this helps.
Best, Ge!
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Favio Masulli y Becker Contact: 07840 185 746 MSN : protoolz@hotmail.co.uk