4

I know how to play a tone for a specific amount of time using SOX.

play -n synth 5 sin 347

I know how to save a tone using SOX.

sox -n note.mp3 synth 5 sin 347

Question is : How can I save a longer tone (hours) without the sound actually playing and not actually having to wait hours for the file to generate?

T. Thomas
  • 233
  • 2
  • 9

1 Answers1

4

Answer: @derobert pointed out the "sox" and "play" command are part of the same package but does different thing. The 3600 below is the time interval in seconds.

sox -n note.mp3 synth 3600 sin 347

The above code will generate an hour long tone without playing it.

play -n note.mp3 synth 3600 sin 347

The above code will play the tone for an hour AND save it to note.mp3

Thanks to @derobert, I should have tried this first.

T. Thomas
  • 233
  • 2
  • 9