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.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.
| Input | Type | Description |
|---|---|---|
visible | Sprites.Reactive.Value | A boolean shown flag, held true. |
note | Sprites.Reactive.Value | A shared two way value onto the selected cell's note. |
effects | Sprites.Reactive.Value | The selected cell's effects list. |
selectedChannel | Sprites.Reactive.Value | The selected channel. |
model | Object | The 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);
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.
| Input | Type | Description |
|---|---|---|
note | Sprites.Reactive.Value | A lens onto the cell's optionalNote field. |
range | Object | A { 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);