Compose
in code.
An open-source language for music composition. Transform phrases, write rules for counterpoint, or work in microtones.
Imitation and Return
Remix the artwork From idea to score.
Choose a technique, hear the musical result, and see the Carmen code that made it.
Phrase and Answer
The answer reuses the opening melody at a new pitch. Compare a fifth and an octave above the theme over the same bass line.
- Melody
- Bass
Theme
Source excerpt
let answer = theme |> transpose(7);
let bass = [1/2 (d3, a3), 1/2 (c3, g3), 1/2 (bb2, f3), 1/2 (a2, e3)];
Install Carmen
Install the command-line tools for Carmen 0.6.0 with Cargo. If you need Cargo, install Rust first.
cargo install carmen-lang --version 0.6.0 --lockedRun carmen --version to confirm the install. Then download the example score and run carmen phrase-fifth.carmen from the folder where you saved it.
macOS development preview
Carmen Studio
Write beside the piano roll or notation. Compare takes over the same passage and prepare parts from the score you hear.
Explore Studio