[chuck-users] classes / bpm?
Martin Ahnelöv
operagasten at gmail.com
Tue Oct 16 11:44:46 EDT 2007
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
More information about the chuck-users
mailing list