[chuck-users] Create a pause of e.g. 2 seconds between notes or samples to be played
Michael Heuer
heuermh at gmail.com
Wed Feb 5 10:42:41 EST 2020
Hello Herman,
ChucK supports advancing time by chucking a duration to now, e.g.
note.play();
2::second => now;
note.play();
LiCK (a Library for ChucK) <https://github.com/heuermh/lick> has a TimeSignature class, which provides static durations
TimeSignature.common(120) @=> TimeSignature ts;
note.play();
ts.q => now;
note.play();
and those that are dynamic to tempo changes, with anticipation and delay humanization
TimeSignature.common(120) @=> TimeSignature ts;
ts.quarterProvider() @=> QuarterProvider q;
0.1 => q.anticipation;
0.0 => q.delay;
while (true)
{
note.play();
q.get() => now;
ts.tempo() - 1 => ts.tempo;
}
Cheers!
michael
> On Feb 5, 2020, at 9:24 AM, herman verbaeten <hverb54 at hotmail.com> wrote:
>
> Hi,
>
> I've only recentely started studiing ChucK and i'm looking for an easy way to integrate a pause between notes to be played in a "while()" loop. Could someone tell me in what direction to look for a solution? thanks in advance!
>
> Herman
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu <mailto:chuck-users at lists.cs.princeton.edu>
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users <https://lists.cs.princeton.edu/mailman/listinfo/chuck-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200205/e22ea8ad/attachment.html>
More information about the chuck-users
mailing list