sampler offset option
Dear experts,
Is there a way to provide an offset to the sampler object, using inline code?
Many thanks in advance,
Jan-Bernard
Dear experts,
Is there a way to provide an offset to the sampler object, using inline code?
Many thanks in advance,
Jan-Bernard
Comments
Hi Jan-Bernard,
What do you mean exactly with an offset? Do you mean that you want to start playback only after a certain delay? If so, then you might want to look at
coroutineswhich allow you to specify timing in a more flexible (and less sequential) way thansequenceitems:Or is that not what you mean?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Sorry, that is not what we want. With offset, we mean : start playing the track at a certain moment of the track (start at 1:01 for instance...)
Thanks, JB
Hi JB,
Ah, I see. No, the pygame mixer doesn't allow you to seek through the stream. There's a few options.
wavemodule to open the audio files (in.wavformat), and write only the part from a certain moment onward to a new wave file, which you then use in the sampler.pyaudiothat does allow you to seek through files.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!