Requirements

OCaml, ocamlbuild, ocamllex and Menhir.

Build

$ make

Run

Now we can generate some .wav-file.

For example, the following code:

๐„ž 0๐…ž 0ยฝ๐…ž 1๐…ž 1ยฝ๐…ž 2๐…ž 2ยฝ๐…ž 3๐…ž ๐„ฝ 2ยฝโ™ฉ 2โ™ฉ 1ยฝโ™ฉ 1โ™ฉ 0ยฝโ™ฉ 0โ™ฉ ยท

Corresponds to the following notes:

ABC

In 0ยฝ๐…ž:

  • Number denotes position on the stave: 1 is first line, 1ยฝ is space between first line and second line, 2 is second line etc.

  • Symbol denotes note value.

To compile it, we first need to save it:

$ echo "๐„ž 0๐…ž 0ยฝ๐…ž 1๐…ž 1ยฝ๐…ž 2๐…ž 2ยฝ๐…ž 3๐…ž ๐„ฝ 2ยฝโ™ฉ 2โ™ฉ 1ยฝโ™ฉ 1โ™ฉ 0ยฝโ™ฉ 0โ™ฉ ยท" > abc.synth

Then run synth:

$ ./synth.native abc.synth -o abc.wav

You can find more examples in the examples/ directory.