Simple compiled music-making language
Go to file
rjt 9810f8b094 Added spaces, so tildegit renders titles correctly. 2020-05-02 01:15:41 -04:00
.gitignore initial commit of version 1.2 2019-05-16 12:47:19 -05:00
LICENSE initial commit of version 1.2 2019-05-16 12:47:19 -05:00
README.md Added spaces, so tildegit renders titles correctly. 2020-05-02 01:15:41 -04:00
example.itv fixed readme 2019-05-18 10:06:46 -05:00
example.wav fixed readme 2019-05-18 10:06:46 -05:00
interval.rs fixed version numbers 2019-05-17 21:24:44 -05:00

README.md

Interval Music Maker v1.4

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 has no external crate dependencies. With the Rust compiler installed under a Unix-like OS, you can compile this source file by running rustc -O interval.rs to produce the interval binary executable.

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.