Generate tones of specific frequency on mac command line

后端 未结 3 1280
灰色年华
灰色年华 2021-02-04 12:38

I need to generate musical notes of a given frequency on the command line

Here is a list of the frequencies of notes http://www.phy.mtu.edu/~suits/notefreqs.html

3条回答
  •  不知归路
    2021-02-04 13:07

    SoX works really good for this purpose and it's available in brew:

    $ brew install sox
    $ play -n synth 3 sin 523.25
    

    You can also save the sound to a file:

    $ play -n out.wav synth 3 sin 523.25
    

提交回复
热议问题