Sprites.Media.Sequencer.Note

The always-open Note window of the sequencer editor: it edits the selected cell's note and its effects.

Sprites.Media.Sequencer.Note

Sprites.Media.Sequencer.Note.Window Void

Sprites.Media.Sequencer.Note.Window(visible, note, effects, selectedChannel, model)

The Note window: the channel of the selection, the note dropdown, and the effects section. note and effects are the shared two way values the editor derives from the selected cell, the same values the keyboard and the grid read and write, so the dropdown follows a note pressed on the keyboard and a key pressed follows a note picked here. It is always open, with no close button.

InputTypeDescription
visibleSprites.Reactive.ValueA boolean shown flag, held true.
noteSprites.Reactive.ValueA shared two way value onto the selected cell's note.
effectsSprites.Reactive.ValueThe selected cell's effects list.
selectedChannelSprites.Reactive.ValueThe selected channel.
modelObjectThe platform descriptor.

Returns nothing.

const model = Sprites.Platform.NES.Sequencer;
const visible = Sprites.Reactive.Value(false);
const note = Sprites.Reactive.Value(60);
const effects = Sprites.Reactive.Value([{ type: 'vibrato', params: { speed: 6, depth: 4 } }]);
const selectedChannel = Sprites.Reactive.Value(0);
Sprites.Ui.Button.SetValue(visible, true, () => {
  Sprites.Ui.Dom.Text('Open Note window');
});
Sprites.Media.Sequencer.Note.Window(visible, note, effects, selectedChannel, model);
The always-open Note window editing the selected cell's note and effects.

Sprites.Media.Sequencer.Note.Dropdown Void

Sprites.Media.Sequencer.Note.Dropdown(note, range)

The note dropdown: a blank option for no note, then one option per semitone in the range, labelled with its note name. Bound to the cell's note field, so picking a note writes it into the selected cell and clearing it selects the blank option.

InputTypeDescription
noteSprites.Reactive.ValueA lens onto the cell's optionalNote field.
rangeObjectA { low, high } semitone range.

Returns nothing.

const range = { low: 21, high: 108 };
const note = Sprites.Reactive.Value(60);
Sprites.Media.Sequencer.Note.Dropdown(note, range);
A blank option for no note, then one option per semitone in the range.