Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been googling for a while now and I can't find what I am looking for.

I'm in the need of a console program that can play notes.


play C C D D E E

share|improve this question
up vote 2 down vote accepted

You can do this with the play command from the sox package, e.g.

for note in C C D D E E; 
    play -n -c1 synth 1 sine $note;

which plays a 1-second sine wave for each of the notes in turn.

The man page for sox provides all of the options that can be used with the synth effect. It is very powerful if not the most user-friendly way to generate audio.

share|improve this answer
perfect! Exactly what I was looking for! – heldt Oct 13 '11 at 12:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.