Moontide manual Contents

Tone, part and scene settings

A synthesizer has settings that no program change carries: the filter cut-off of its current tone, the pan of a part, the delay of the whole scene. Claude can set them in the code, in the .midi() options, the way it sets a sound or a control. The level is the key of the option, and the values are in the instrument's own units.

note("c3 e3 g3 c4").midi('SYNTH-PORT', {
  midichannel: 1,
  sound: 'Saw Lead',
  tone: { filterCutoff: 600 },
  part: { pan: 40 },
  scene: { reverbLevel: 80 },
})

Because the settings are in the code, the history, a restored version and your hand edits keep them like any other part of the music. Moontide stores no setting of its own. This page builds on MIDI instruments and the setup file.

Which instruments can take them

Only an instrument whose model describes settings. No shipped model does. The model that holds them is your own file in the data folder (see "Models of your own" on the instruments page), and get_midi_instruments lists the settings it declares. Three kinds of instrument can take settings, each only when your own model describes them:

The levels

A name written at the wrong level is refused, and the refusal says where it belongs. A value outside its range is refused too, with the range. A refused change keeps the previous music playing and sends nothing.

How a channel becomes a part

The parts are counted in the order of the model's channels, so the lowest channel is part 1. A rhythm channel that comes after four melodic ones is part 5, whatever channels you list in instruments.json.

When settings are sent

Every setting the code writes is sent with every evaluation, not only what changed. Each channel gets its bank select and program change first, then its tone settings, its part settings and its controls. The scene settings follow after all the channels. A change that waits for a bar or phrase line sends them at the line, with the sound. They go out again, with the sound, after a replug, after a reset and when an instrument is switched on.

What stays

Moontide stores no setting. The code is the only record.

What can never be written

Moontide sends a setting only into an area that holds nothing for good, and it checks the message itself just before it leaves.

An instrument whose temporary areas Moontide does not know gets no settings at all.

What to set on the instrument

What Claude reads

The settings topic of Claude's Strudel reference holds the rules that are true on every instrument: the levels, what each reaches, what is refused, when settings are sent, and that nothing is stored. get_midi_instruments adds, for each instrument, the names and ranges of each level, and a Notes line with what undoes a setting there and what was heard on it. The sound search gives the engine of each sound. See Asking Claude for the reference topics.

What was heard

All of this was tried by the person who built it, on one rig, in short sessions. The count and the instrument are stated for each.

Sessions with Claude, on a made-up instrument with a fake MIDI device, where nothing was heard and only the level and the names were judged:

What was verified

Verified:

  • The bytes of the settings (address, value, checksum and order) were checked in a real browser against a fake MIDI device, for all three kinds of instrument: every engine, the SC-55 offsets, and every MT-32 setting at its lowest and highest value. The refusals, the value that stays, the bar line and a replug were checked there too.
  • On a loopback port of one Mac, with nothing listening, the messages that arrived were the messages the page had sent, in order.
  • What was heard is stated above, instrument by instrument.

Not verified:

  • The loopback is not full proof of what a real cable carries: in four earlier runs a second copy of a bank select pair arrived that the page never sent, and the cause was not found.
  • A change on a bar line, and a replug, on a real instrument.
  • A ZCore or JUPITER-X model setting sent to a part holding another engine's tone: that it changes nothing you can hear was not checked. The page refuses it before it is sent.
  • The SC-55: what a program change or a reset does to an offset on its own, whether the cutoff still changes above the range of the manual, and a slow attack and release.
  • The MT-32: the reverb, the resonance of partial 1, the order of the four bits of the partial mute, the rhythm setup of each key, the one unexplained silence of Munt that a restart fixed, and the spacing between data sets on a real MT-32. A real MT-32 was not tried.
  • Any other instrument.