Skip to content

hclarke/cmd_synth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

cmd_synth

reverse polish notation synth. takes synth descriptions on stdin, and writes a wav to stdout.

compiling:

it's just one c file.

gcc main.c -o synth

example usage:

this will play an A note for 1 second, and output a wav file:

echo "440 sin" | synth 1 > out.wav

to display all of the commands available:

synth --help

playing a sound (OSX):

echo "440 sin" | synth 1 > tmp.wav && afplay tmp.wav

example inputs

A440:

440 sin

middle C (9 half-steps down from A440):

440 -9 exp mul sin

A440 with vibrato (20 Hz oscilation between 400 and 480 Hz):

440 40 20 sin mul add sin

vibrato as a function:

[ sin mul add sin ] @vibrato
440 40 20 vibrato

About

command line synth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages