woops, needs an additional class (attached).
also, to execute in one block:
(
fork {
x = TapeUnit.new;
x.setPath( mySoundFilePath );
x.server.sync; // be sure synthdefs have been sent
x.play( 0 );
10.wait;
x.stop( 0.1 );
x.dispose;
}
)
best, -sciss-
Am 06.06.2006 um 12:54 schrieb Sciss:
you could exchange PlayBuf for a combo of BufRd and a Phasor. Use a PulseCount to count the cycles. Playhead is then cycles * framesPerCycle plus current phasor value. You can send this playhead position to sclang via SendTrig. Attached is a streaming audiofile class i'm still working on - so it's incomplete and has some bugs, but you can see how to calculate the current frame position in the OSC responder (currentPos is the value to look at).to try out : x = TapeUnit.new; x.setPath( mySoundFilePath ); x.play( 0 ); best, -sciss-
Attachment:
TypeSafe.sc
Description: Binary data