sq6jnx / sr0wx.py

Automatic hamradio weather station written in python
Apache License 2.0
13 stars 4 forks source link

generate CTCSS tones with `sox` #28

Open sq6jnx opened 9 years ago

sq6jnx commented 9 years ago

It may be a good idea to get rid of pygame in generating tones of any kind, mostly CTCSS.

Examples from http://montessorimuddle.org/2012/04/19/generating-and-saving-tones-with-sox/ :

To play a single note (frequency 173.5 Hz) for 5 seconds, use:

> play -n  synth 5 sin 347

To save the note to a mp3 file (called note.mp3) use:

> sox -n note.mp3 synth 5 sin 347

The SoX command to play two notes with frequencies of 347 and 357 Hz is:

> play -n synth 15 sin 347 sin 357

and to make an mp3 file use:

> sox -n beat_10.mp3 synth 15 sin 347 sin 357