sequenceXtra commands

Below is a list of all commands added to Lingo when You use sequenceXtra. Words enclosed in {} are optional parameters. Since this is not the manual the description of each command is very brief. Please download the manuals for a complete explanation of all aspects of sequenceXtra. The listing is organized under the following headings:

Global functions

sxOpenSequencer()

opens sequenceXtra and connects to MME (Win) or QuickTime/OMS (Mac)

sxCloseSequencer()

closes sequenceXtra

new(xtra "sequenceXtra", trackCount)

creates a new sequenceXtra song with the number of tracks indicated by trackCount

sxGetOutputList()

returns a list of all MIDI devices known to sequenceXtra

sxSetOutput(outputNumber)

connects sequenceXtra to the device inicated by outputNumber

sxSendInputWaiting(boolean) toggles a function that will call a handler in the movie script when therer are waiting events in the input buffer
sxSendOutputWaiting(boolean) toggles a function that will call a handler in the movie script when therer are waiting events in the output buffer

sxSendMIDI(event)

sends one MIDI event to the current MIDI device

sxGetMIDIIn()

returns the oldest MIDI event from the input buffer and deletes it from the buffer

sxGetMIDIOut() returns the oldest MIDI event from the output buffer and deletes it from the buffer

sxFlushMIDIIn()

clears the input buffer of all pending MIDI events

sxFlushMIDIOut() clears the output buffer of all pending MIDI events
sxSetMIDIThruState(boolean) turns MIDI Thru on or off globally
Start, Stop and Recording

sxPlay(mySong{,{startposition{,endpostion}}})

start playback

sxStop(mySong)

stops playback

sxContinue(mySong)

resumes playback

sxRecord(mySong,trackNumber,method{,startposition{,endposition}})

starts a recording. method selects between sequenceXtras various recording methods

sxPanic()

resets all physical MIDI devices connected to the current logical device

sxGetState()

returns the current state of sequenceXtra

sxSetInputFilter(filterList)

activates a filter that will allow only the listed eventTypes to be recorded

sxSetOutputFilter(filterList)

activates a filter that will allow only the listed eventTypes to be sent out

sxSetLocatorL(mySong, position)

sets the left locator position (used by sxSetLoopState)

sxSetLocatorR(mySong,position)

sets the right locator position (used by sxSetLoopState)

sxGetLocatorL(mySong, position)

returns the left locator position

sxGetLocatorR(mySong, position)

returns the right locator position

sxSetLoopState(mySong, loopCount)

sets the state of the loopfunction

sxGetLoopState(mySong)

returns the state of the loopfunction

sxGetSongLength(mySong)

returns the length of the referred song

sxGetLastEvent(song{,format})

return the position of the last MIDI event in the referred song

sxGetLastNote(song{, format})

return the position of the last note event in the referred song

Timing and Metronome

sxSetTempo(mySong,newTempo)

sets the tempo of mySong
(multiple tempos allowed)

sxGetTempo(mySong)

returns the current tempo of mySong

sxGetTempoList(mySong)

returns a list of all tempo values in mySong

sxSetRelativeTempo(mySong, tempoChange)

changes the tempo by a value related to the current tempo in mySong

sxGetTick()

returns the current position of sequenceXtra in ticks

sxGetPos(mySong{, format{, tick }})

returns the current position of mySong in the format indicated by format.
If the parameter tick is used the position is calculated from that value

sxSetMetronome(state)

sets the state of the metronome

sxGetMetronome()

returns the current state of the metronome

sxSetCountIn(bars)

sets the number of count-in bars

sxGetCountIn()

returns the current number of count-in bars

sxSetMetronomeVelocity(velocity)

sets the velocity of the metronome

sxGetMetronomeVelocity()

returns the current velocity of the metronome

sxSetMetronomeChan(channel)

sets the MIDI channel of the metronome

sxGetMetronomeChan()

returns the current MIDI channel of the metronome

sxSetMetronomeNote(noteNumber)

sets the MIDI note of the metronome

sxGetMetronomeNote()

returns the current MIDI note of the metronome

sxSetTimeSign(mySong, {nominator, denominator} or {timeSignList})

sets the time signature of mySong
(multiple time signatures allowed)

sxGetTimeSign(mySong)

returns the current time signature of mySong

sxGetTimeSignList(mySong)

returns a list of all time signatures of mySong

Parts

sxGetPartInfo(mySong, partID)

returns all data about the part with ID# partID

sxGetPartID(mySong, trackNum, partName)

returns the ID# of the part with the name partName

sxSetPartUpbeat(mySong, partID, upbeatLength)

sets the upbeat length of part partID

sxGetPartUpbeat(mySong, partID)

returns the upbeat length of part partID

sxSetPartTranspose(mySong, partID, transposevalue)

sets the transposevalue of part partID

sxGetPartTranspose(mySong, partID)

returns the transposevalue of part partID

sxSetPartMute(mySong, partID, muteState)

sets the muteState of part partID

sxGetPartMute(mySong, partID)

returns the muteState of part partID

sxSetPartName(mySong, partID, partName)

sets the partName of part partID

sxGetPartName(mySong, partID)

returns the partName of part partID

sxCreatePart(song, trackNum, startPosition {, eventList})

creates a new part at position startPos on track trackNum

sxBuildPart(song, partID, eventList)

fills part partID with the events in eventList, replacing all previous content

sxAddToPart(song, partID, eventList)

adds the events in eventList to part partID

sxClearPart(song, partID)

deletes all events in part partID, leaving the empty part on the track

sxGetPart(song, partID {, filterList})

returns all events in part partID
If filterlist is used only the listed eventTypes will be returnde

sxSetPartStart(mySong, partID, startPos)

sets the start position of part partID

sxGetPartStart(mySong, partID {,format})

returns the start position of part partID

sxSetPartLength(mySong, partID, partLength)

sets the length of part partID

sxGetPartLength(mySong, partID)

returns the length of part partID

sxJoinParts(mySong, fromPartID, toPartID)

joins part fromPartID with part toPartID

sxSplitPart(mySong, partID, splitPosition)

splits part partID at position splitPosition, resulting in two parts

sxDeletePart(mySong, partID)

deletes part partID and all of its content

Tracks

sxSetMIDIThru(mySong, trackNumber)

makes track trackNumber the current MIDI thru track

sxGetTrackInfo(mySong, trackNumber)

returns all info about track trackNumber

sxSetTrackTranspose(mySong, trackNumber, transposevalue)

sets the transposevalue for track trackNumber

sxGetTrackTranspose(mySong, trackNumber)

returns the transposevalue for track trackNumber

sxSetTrackMute(mySong, trackNumber, muteState)

sets the muteState for track trackNumber

sxGetTrackMute(mySong, trackNumber)

returns the muteState for track trackNumber

sxSetTrackName(mySong, trackNumber, name)

sets the name of track trackNumber

sxGetTrackName(mySong, trackNumber)

returns the name of track trackNumber

sxSetTrackQuantize(mySong, trackNumber, quantizeValue)

sets the current quantizeValue of track trackNumber

sxUnQuantizeTrack(mySong, trackNumber)

resets all events on track trackNumber to their original unquantized positions

sxClearTrack(song, trackNumber)

deletes all parts and their events from track trackNumber

sxDeleteTrackEvents(song, trackNumber, from, to)

deletes all events on track trackNumber between position from and position to

sxSetTrackChannel(mySong , trackNumber, channel)

sets the MIDI channel for track trackNumber

sxGetTrackChannel(mySong , trackNumber)

returns the MIDI channel for track trackNumber

sxSetTrackInstrument(mySong , trackNumber, programNumber)

sets the program Change value for track trackNumber

sxGetTrackInstrument(mySong , trackNumber)

returns the program Change value for track trackNumber

sxSetTrackVolume(mySong , trackNumber, volume)

sets the MIDI volume for track trackNumber

sxGetTrackVolume(mySong, trackNumber)

returns the MIDI volume for track trackNumber

sxSetTrackPan(mySong , trackNumber, pan)

sets the MIDI pan value for track trackNumber

sxGetTrackPan(mySong , trackNumber)

returns the MIDI pan value for track trackNumber

sxSetTrackReverb(mySong , trackNumber, reverb)

sets the reverb value (Control Change 91) for track trackNumber

sxGetTrackReverb(mySong , trackNumber)

returns the reverb value (Control Change 91) for track trackNumber

sxSetTrackChorus(mySong , trackNumber, chorus)

sets the chorus value (Control Change 93) for track trackNumber

sxGetTrackChorus(mySong , trackNumber)

returns the chorus value (Control Change 93) for track trackNumber

sxCreateTrack(mySong )

creates a new track in mySong

sxBuildTrack(mySong , trackNumber, partList)

fills track trackNumber with the events in partList replacing all previous content on track trackNumber

sxGetTrack(mySong , trackNumber{, filterList})

returns all MIDI data on track trackNumber
(
if filterList is used only the listed eventTypes are returned)

sxBuildSong(mySong, trackList)

replaces all data in mySong with trackList

sxMergeTracks(song, fromTrack, toTrack)

merges fromTrack with toTrack, leving fromTRack intact

sxAddToTrack(mySong, trackNumber, partList)

adds the parts in partList to track trackNumber

sxAddToSong(mySong, trackList)

adds the tracks (and all their events) in trackList to mySong

sxGetTrackCount(mySong)

returns the number of tracks in mySong

sxGetPartCount(mySong, trackNumber)

returns the number of parts on track trackNumber

sxGetMarkerList(mySong)

returns a list of all markers and their names in mySong

sxGetKeySignList(mySong)

returns a list of all key signatures in mySong

sxChannelSort(mySong)

rebuilds mySong by moving all events to a track that corresponds to every events MIDI channel

Saving and opening files

sxOpen(mySong, filePath)

opens a sequenceXtra song into mySong, replacing all previous content

sxSave(mySong, filePath)

saves mySong as a sequenceXtra song to disk

sxOpenSMF(mySong, filePath)

opens a standard MIDI FIle (SMF) into mySong, replacing all previous content

sxSaveSMF(mySong, filePath)

saves mySong as a standard MIDI file (SMF) type 1 to disk

sxDownload(mySong, URL) downloads a sequenceXtra song into mySong, replacing all previous content
sxDownloadSMF(mySong, URL) downloads a standard MIDI File (SMF) into mySong, replacing all previous content