BASS.NET API for the Un4seen BASS Audio LibraryMidiShortMessageSongPosition Property BASS.NET API for the Un4seen BASS Audio Library
Gets or Sets the song position value from/to Data1 and Data2 as a combined value.

Namespace: radio42.Multimedia.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public short SongPosition { get; set; }

Property Value

Type: Int16
Remarks

The song position value ranges from 0 to 16383 (128*128 values).

Some master device that controls sequence playback sends this message to force a slave device to cue the playback to a certain point in the song/sequence. In other words, this message sets the device's "Song Position". This message doesn't actually start the playback. It just sets up the device to be "ready to play" at a particular point in the song.

This value is the also called the MIDI Beat upon which to start the song. Songs are always assumed to start on a MIDI Beat of 0. Each MIDI Beat spans 6 MIDI Clocks. In other words, each MIDI Beat is a 16th note (since there are 24 MIDI Clocks in a quarter note).

This property should only be used when StatusType is SongPosition.

The Data1 byte will contain the LSB value (single steps) and the Data2 byte the MSB value (128th steps) both ranging from 0 to 128.

Example: If a Song Position value of 8 is received, then a sequencer (or drum box) should cue playback to the third quarter note of the song. (8 MIDI beats * 6 MIDI clocks per MIDI beat = 48 MIDI Clocks. Since there are 24 MIDI Clocks in a quarter note, the first quarter occurs on a time of 0 MIDI Clocks, the second quarter note occurs upon the 24th MIDI Clock, and the third quarter note occurs on the 48th MIDI Clock).

See Also

Reference