|
From: Doug L. <dg...@dl...> - 2012-12-02 08:23:22
|
On Sat, Dec 01, 2012 at 09:40:15PM -0800, Sergei Steshenko wrote: > ----- Original Message ----- > > From: Doug Lee <dg...@dl...> > > To: Sergei Steshenko <ser...@ya...>; sox...@li... > > Sent: Sunday, December 2, 2012 7:32 AM > > > > On Sat, Dec 01, 2012 at 07:36:31PM -0800, Sergei Steshenko wrote: > >> Hello, > >> suppose I've build a sound file (for simplicity, a .wav one) which > > contains just one period of a periodic function. > >> And the shape of that function is according to my needs, i.e. it's not > > a shape readily available from 'sox'. > >> Is there a way to endlessly repeat (infinite loop) playing of that single > > period without gaps ? As if 'sox' is that special periodic function > > signal generator. > > > > I think the `repeat' option is what you want, though whether it's > > gapless for real-time use may depend on your hardware, and it's not > > infinite: > > > > play file.wav repeat 99999 > > > > may be gapless on fast hardware, but > > > > sox file.wav loop999.wav repeat 999 > > > > should be gapless in its creation of loop999.wav. > > So, if instead of 1 period I have, say, 100000 periods (several seconds), and taking into account that modern OSes cache files in RAM, should I expect rarer gap occurences ? I'd say try and see what you get. For a file-to-file (SoX command) operation, you shouldn't get any gaps at all. For a file-to-audio (play command) operation, I can only tell you I think the results can depend on hardware. Others may have more concrete input on that point. -- Doug Lee dg...@dl... http://www.dlee.org SSB BART Group dou...@ss... http://www.ssbbartgroup.com "All these years, the people said, 'He's acting like a kid.' He did not know he could not fly, so he did." --Guy Clark, "The Cape" (Dublin Blues) |