Subsystem Search

Subsample MIDI map: the definitions file

The file a music project keeps its own names in: the notes, controllers, MIDI channels and programs it works with, each given its number once. A MIDI map mounts the file under a prefix it chooses, with definitions: {my: project.yaml}, and then writes my.kick wherever it would write the number. Subsample reads the four sections below and leaves every other section alone, so the same file can name things for other tools without either tool knowing about the other. Numbers are read as written, so a leading zero is just a leading zero: 036 is 36, and note numbers can be lined up in a column without changing what they mean. A key written twice where it belongs once, such as a second notes: section or one name given twice, is refused, naming both lines.

Its sections

Form
a block of keys
Example
{notes: {kick: 36, snare: 38}, channels: {kit: 10}}

The file a music project keeps its own names in: the notes, controllers, MIDI channels and programs it works with, each given its number once. A MIDI map mounts the file under a prefix it chooses, with definitions: {my: project.yaml}, and then writes my.kick wherever it would write the number. Subsample reads the four sections below and leaves every other section alone, so the same file can name things for other tools without either tool knowing about the other. Numbers are read as written, so a leading zero is just a leading zero: 036 is 36, and note numbers can be lined up in a column without changing what they mean. A key written twice where it belongs once, such as a second notes: section or one name given twice, is refused, naming both lines.

notes in definitions

Form
names to integer
Example
{kick: 36, snare: 38}

The notes the project has names for, so a map can answer to my.kick instead of to 36. A name works anywhere a map takes a note, and the built-in General MIDI drum names under drum are the same idea with the names already filled in.

cc in definitions

Form
names to integer
Example
{cutoff: 74, sampler_release: 21}

The controllers the project has names for, so a map can put a parameter on my.cutoff instead of on 74, and moving the knob to another controller is one edit here.

channels in definitions

Form
names to integer
Example
{kit: 10, bass: 2}

The MIDI channels the project has names for, so a map can answer on my.kit instead of on 10, and a project that moves its drums to another MIDI channel changes one line.

programs in definitions

Form
names to integer
Example
{brushes: 1}

The programs the project has names for, so a map can say which instrument set a Program Change message switches to by name.