[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Playback Head position



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-

Am 06.06.2006 um 05:56 schrieb Tim Kreger:

Hey all,
it there anyway to establish the current frame position for any of the PlayBuf, Diskin, etc. It seems a difficult thing to do, anyone done this or have any pointers? Its not something I would be wanting to poll each sample but I have application where I need to find the time in the sound file or audio buffer.


Cheers

Tim


Attachment: TapeUnit.sc
Description: Binary data