The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Perfect pitch

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

If you need to generate pure tones on BeOS, one of the simplest ways to do it is to use sinus from BeWare. sinus is a command-line tool ported from Linux and some of its functions don’t work perfectly, but you can easily output perfect pitch .wav files like this:

sinus -n 400:400,3.0 -o 400.wav

This will generate a tone starting and ending at 400 Hz, duration 3 seconds, and output to a file called 400.wav. Build a collection of these files and drag them onto SoundPlay, PlaySound, whatever. You can also build tonal sweeps, like this:

sinus -n 100:1200,5.0 -o sweep.wav

This will build a file called sweep.wav starting at 100 Hz and ending at 1200 Hz, 5 seconds long. There are many, many more options. Type sinus with no arguments to get a complete list of options. Note that with the BeOS version, you must output to a file — you can’t dump straight to audio output.

Posted in Audio & Video

(comments are closed).