Sprites.Media.Sequencer.Grid
The block-definition editor of the sequencer: the selected slot's cell volume (channels by beats per bar by bars) unrolled into a table, a column per channel and a row per beat, the bars stacked one after another. The rows come from the volume's own dimensions, so the table follows a tempo change in the right dimension.
- Sprites.Media.Sequencer.Grid.View
- Sprites.Media.Sequencer.Grid.Row
- Sprites.Media.Sequencer.Grid.Header
- Sprites.Media.Sequencer.Grid.Cell
Sprites.Media.Sequencer.Grid.View Void
Sprites.Media.Sequencer.Grid.View(data, selectedSlot, selectedBeat, selectedChannel, model)
The block editor: a scroll area holding the table. The head is a channel per column; the body is one row per beat, repeated over the bars and, within each bar, over the beats per bar, both read from the selected slot's volume dimensions, so the rows follow a tempo change in the right dimension. An empty slot shows a full but empty volume, sized from the tempo, that fills as notes are entered.
| Input | Type | Description |
|---|---|---|
data | Sprites.Reactive.Value | The tune data. |
selectedSlot | Sprites.Reactive.Value | The selection. |
selectedBeat | Sprites.Reactive.Value | The selection - the flat beat down the block. |
selectedChannel | Sprites.Reactive.Value | The selection. |
model | Object | The platform descriptor. |
Returns nothing.
const document = Sprites.Media.Sequencer.NewDocument(Sprites.Platform.C64.Sequencer);
const data = Sprites.Reactive.Value(document);
const selectedSlot = Sprites.Reactive.Value(0);
const selectedBeat = Sprites.Reactive.Value(0);
const selectedChannel = Sprites.Reactive.Value(0);
Sprites.Media.Sequencer.Grid.View(data, selectedSlot, selectedBeat, selectedChannel, Sprites.Platform.C64.Sequencer);
Sprites.Media.Sequencer.Grid.Row Void
Sprites.Media.Sequencer.Grid.Row(data, slot, bar, beatInBar, beatsPerBar, channels, selectedBeat, selectedChannel, model)
One beat row: one two way cell lens per channel, at this beat within its bar. bar and beatInBar are the plain volume indices; the flat beat down the block is the bar times the beats per bar plus the beat within the bar. The first beat of a bar carries a bar-start marker class.
| Input | Type | Description |
|---|---|---|
data | Sprites.Reactive.Value | The tune data. |
slot | Number or Sprites.Reactive.Value | The slot. |
bar | Number | The bar volume index. |
beatInBar | Number | The beat volume index. |
beatsPerBar | Sprites.Reactive.Value or Number | The beats per bar. |
channels | Sprites.Reactive.Value | The channel list. |
selectedBeat | Sprites.Reactive.Value | The selection. |
selectedChannel | Sprites.Reactive.Value | The selection. |
model | Object | The platform descriptor. |
Returns nothing.
const document = Sprites.Media.Sequencer.NewDocument(Sprites.Platform.C64.Sequencer);
const data = Sprites.Reactive.Value(document);
const slot = Sprites.Reactive.Value(0);
const selectedBeat = Sprites.Reactive.Value(0);
const selectedChannel = Sprites.Reactive.Value(0);
const channels = Sprites.Object.Field(Sprites.Platform.C64.Sequencer, 'channels');
Sprites.Ui.Dom.Tag('table', () => {
Sprites.Ui.Dom.Tag('tbody', () => {
Sprites.Media.Sequencer.Grid.Row(data, slot, 0, 0, 4, channels, selectedBeat, selectedChannel, Sprites.Platform.C64.Sequencer);
});
});
Sprites.Media.Sequencer.Grid.Header Void
Sprites.Media.Sequencer.Grid.Header(channel)
One channel column header: the channel's type name from the model.
| Input | Type | Description |
|---|---|---|
channel | Object or Sprites.Reactive.Value | A channel entry. |
Returns nothing.
const channel = { type: 'voice' };
Sprites.Ui.Dom.Tag('table', () => {
Sprites.Ui.Dom.Tag('thead', () => {
Sprites.Ui.Dom.Tag('tr', () => {
Sprites.Media.Sequencer.Grid.Header(channel);
});
});
});
Sprites.Media.Sequencer.Grid.Cell Void
Sprites.Media.Sequencer.Grid.Cell(cellLens, globalBeat, channel, selectedBeat, selectedChannel)
One grid cell over a two way cell lens: the note large when set and a small effect mark when the cell has effects, highlighted when it is the selection, that selects itself on a click. globalBeat is the flat beat this cell sits on; channel is its column.
| Input | Type | Description |
|---|---|---|
cellLens | Sprites.Reactive.Value | A two way lens onto this cell. |
globalBeat | Sprites.Reactive.Value or Number | The flat beat this cell sits on. |
channel | Number | The channel index. |
selectedBeat | Sprites.Reactive.Value | The selection. |
selectedChannel | Sprites.Reactive.Value | The selection. |
Returns nothing.
const document = Sprites.Media.Sequencer.NewDocument(Sprites.Platform.C64.Sequencer);
const data = Sprites.Reactive.Value(document);
const cellLens = Sprites.Media.Sequencer.CellLens(data, 0, 0, 0, 0, Sprites.Platform.C64.Sequencer);
const selectedBeat = Sprites.Reactive.Value(0);
const selectedChannel = Sprites.Reactive.Value(0);
Sprites.Ui.Dom.Tag('table', () => {
Sprites.Ui.Dom.Tag('tbody', () => {
Sprites.Ui.Dom.Tag('tr', () => {
Sprites.Media.Sequencer.Grid.Cell(cellLens, 0, 0, selectedBeat, selectedChannel);
});
});
});