interval.rs/README.md

1.7 KiB

#Interval Music Maker v1.2 ####Ellie Diode, May 2019 ####Public Domain

##Introduction Interval.rs is a terse, nonlinear, compiled language for composing music. Code is read from a .ITV plaintext source file and converted to PCM audio data, which is emitted to stdout by the compiler. Interval is designed with unconventional music in mind, particularly that involving polyrhythms and microtonal tunings. Notes are defined by position in time, pitch, and ringing duration, and played using simple sine waves modulated by a gaussian envelope generator. Any number of notes can be played simultaneously, and note definitions can be supplied out of the order in which they play.

###How to Compile Interval.rs is written in Rust version 1.31.1, and depends only on Rust's stdlib. With the Rust compiler installed under a Unix-like OS, you can compile this source file with this shell command: rustc -O interval.rs to produce the interval binary.

###How to Use Interval can be run at the command line with the following syntax: ./interval [input file] [output file] This will attempt to read Interval code from the input file, generate audio based on it, and emit the resulting data, prefixed with a suitable RIFF header, into the output file (which will be in .wav format). The audio stream is signed 16-bit little endian samples, at a sample rate defined by a static variable in the source code (48 kHz by default).

###Example Usage Under Linux with ALSA, you can compile and play a .ITV source file with a command like this: ./interval test.itv This will write WAV data into test.wav, creating it if it does not exist and overwriting it if it does.

###Documentation Please refer to the source code in interval.rs for documentation on .ITV file syntax.