[chuck-users] KBHit events

Julien Saint-Martin julien.saintmartin at googlemail.com
Thu Dec 5 07:18:50 EST 2013


Hi Manuel,

Maybe your problem is as follow:
For each key press there is two kb events: key down and key up.

A simple solution maybe to write "kb => now;" twice.

Cheers,
Julien





2013/12/5 Manuel Bärenz <manuel at enigmage.de>

> Hello again,
>
> I also wanted to demonstrate a simple sequencer prototype that lets me
> record a file and then plays it back to me. I've come this far:
>
> KBHit kb;
>
> me.sourceDir() + "/bum.wav" => string filename;
>
> adc => WvOut b => blackhole;
> filename => b.wavFilename;
> kb => now;
> b.closeFile();
>
> SndBuf buf => dac;
> filename => buf.read;
> kb => now;
>
> But strangely, the program doesn't wait for the second kb event, but
> exits directly after the first key that I hit. Any ideas what I'm doing
> wrong?
>
> Best, Manuel
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> 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/20131205/6d71adf7/attachment.html>


More information about the chuck-users mailing list