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

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.

InputTypeDescription
dataSprites.Reactive.ValueThe tune data.
selectedSlotSprites.Reactive.ValueThe selection.
selectedBeatSprites.Reactive.ValueThe selection - the flat beat down the block.
selectedChannelSprites.Reactive.ValueThe selection.
modelObjectThe 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);
The selected slot's block as a scrolling table of beats and channels.

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.

InputTypeDescription
dataSprites.Reactive.ValueThe tune data.
slotNumber or Sprites.Reactive.ValueThe slot.
barNumberThe bar volume index.
beatInBarNumberThe beat volume index.
beatsPerBarSprites.Reactive.Value or NumberThe beats per bar.
channelsSprites.Reactive.ValueThe channel list.
selectedBeatSprites.Reactive.ValueThe selection.
selectedChannelSprites.Reactive.ValueThe selection.
modelObjectThe 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);
  });
});
One beat row of one cell lens per channel, with a bar-start marker on the first beat of a bar.

Sprites.Media.Sequencer.Grid.Header Void

Sprites.Media.Sequencer.Grid.Header(channel)

One channel column header: the channel's type name from the model.

InputTypeDescription
channelObject or Sprites.Reactive.ValueA 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);
    });
  });
});
A column header showing the channel's type name.

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.

InputTypeDescription
cellLensSprites.Reactive.ValueA two way lens onto this cell.
globalBeatSprites.Reactive.Value or NumberThe flat beat this cell sits on.
channelNumberThe channel index.
selectedBeatSprites.Reactive.ValueThe selection.
selectedChannelSprites.Reactive.ValueThe 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);
    });
  });
});
A cell showing its note with a small effect mark, highlighted when selected.