I have two questions for the ChucK group - 1) regarding the midisender.ck file located at: http://www.rattus.net/~packrat/audio/ChucK/files/midisender.ck how do I use this in ChucK? I'm assuming that I need to drop it somewhere so it can be called by ChucK. I use ChucK on both Windows and Linux. 2) I need to be able to figure out how to handle time-based stuff using bpm. for example, if I have a song that is 80 bpm, how do I send quarter notes at that tempo? I've done some research on the 'net, and it seems that figuring this out is harder than I think it should be. considering I'm a math idiot, can someone give me some simple(r) way to do this? -- Josh Lawrence http://www.hardbop200.com
Josh Lawrence wrote:
2) I need to be able to figure out how to handle time-based stuff using bpm. for example, if I have a song that is 80 bpm, how do I send quarter notes at that tempo? I've done some research on the 'net, and it seems that figuring this out is harder than I think it should be. considering I'm a math idiot, can someone give me some simple(r) way to do this?
I have an old metronome class here: http://developer.kde.org/~wheeler/files/Metro.ck Usage would be something like: Metro metro; metro.run(); while(true) { metro.pulse => now; // do something related to the beat } -Scott http://intranet.bln.native-instruments.de/forum_us/showthread.php?t=318
tis 2007-10-16 klockan 10:04 -0500 skrev Josh Lawrence:
I have two questions for the ChucK group -
1) regarding the midisender.ck file located at:
http://www.rattus.net/~packrat/audio/ChucK/files/midisender.ck
how do I use this in ChucK? I'm assuming that I need to drop it somewhere so it can be called by ChucK. I use ChucK on both Windows and Linux.
Since it's a public class, multiple shreds can access it. However, I don't really have an idea about how you do that. Please, kassen! Explain! Also, no, currently chuck doesn't have a way to import libraries or files, so you'll have to copy/paste your code when recycling.
2) I need to be able to figure out how to handle time-based stuff using bpm. for example, if I have a song that is 80 bpm, how do I send quarter notes at that tempo? I've done some research on the 'net, and it seems that figuring this out is harder than I think it should be. considering I'm a math idiot, can someone give me some simple(r) way to do this?
Actually, it's extremely easy! minute/bpm will return the number of samples per beat/quarter note. In pure chuck: 80.0 => float bpm; minute/bpm => dur beat; and so on. Gasten
On 10/16/07, Martin Ahnelöv
don't really have an idea about how you do that. Please, kassen! Explain!
From then on, any chuck code that runs in that VM can instantiate objects of
Well, you just execute the file that contains the public class in a VM.
that class.
example;
-----------B.ck----------------------
Foo bar;
<<
participants (4)
-
Josh Lawrence
-
Kassen
-
Martin Ahnelöv
-
Scott Wheeler