Hi! sndbuf.valueAt( int ) has been added. In CVS; will be in 1.2.0.5. We are making a massive update to expose addition API from STK. We will release as soon as this is done. Thanks for the suggestion! Best, Ge! For CVS users, there is also examples/basic/valueat.ck, which tests this feature: --- the not recommended way to play a sndbuf --- sndbuf buf; "../data/kick.wav" => buf.read; // the patch (no sndbuf involved) impulse i => dac; // infinite time-loop while( true ) { // index int pos; // repeat for each sample repeat( buf.samples() ) { // set next sample buf.valueAt( pos ) => i.next; // increment index pos++; // advance time by one samp 1::samp => now; } } On Feb 13, 2006, at 5:22 PM, Charlls Quarra wrote:
Hi,
I think a way to look ahead buffer values ahead could help solve a few issues, like avoid popping when a buffer jump is done;
while (true) ... if (must_jump) { if ( std.fabs( buf.last() - buf.valueAtPos( toPos ) )< 0.01 ) { toPos => buf.pos; false => must_jump; } } ... 100::ms => now;
¡Llamá a todo el mundo con las mejores tarifas! Comprá tus tarjetas de llamadas en tres simples pasos en Yahoo! Telefonía_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users