How to use the sequenceXtra behaviors

With the sequenceXtra behaviors we hope that you will get even more power and fun from sequenceXtra. Together, sequenceXtra and this behavior kit, makes it very easy to make your own music application. With a few simple steps, You can create advanced MIDI applications for CD-ROM or the Internet. If you have problems with these behaviors, send an email to support@sourceforce.nu.

To use the sequenceXtra behavior kit You will need Director 7 or later with sequenceXtra installed in the Xtras folder.

The behavior package contains a folder named "sequenceXtra" with the following castLibs inside:

To make the behaviors visible in Directors "Library Palette" follow these steps:

  1. Quit Director if it´s running
  2. Move the folder with the castLibs into the "libs"-folder in your Director folder
  3. Start Director
  4. Now you will see a new menu in the Library Palette called "sequenceXtra" with five sub menus. Use them as normal behaviors in the library palette - drag them to a sprite or to the script channel and they will be copied to your internal castLib.

Some basic steps to make it work:

  1. Create the graphics you need
  2. Put them on the stage
  3. Add the behaviors you need to make your movie work
  4. Write your own LINGO to do additional functions

Please take a few moments to do the sequenceXtra tutorial (you find it on http://www.sourceforce.nu). This will give you an idea of what you can do with the sequenceXtra behaviors.



SequenceXtra behavior descriptions


1 Song Handling


CREATE NEW SONG

This behavior creates an empty song in witch the user can do recordings and it make this song "the current song".

PARAMETERS:


OPEN MID file

With this behavior you can create an "open MIDI-file button". It also makes this song "the current song".

PARAMETERS:


OPEN SXS (sequenceXtra) file

With this behavior you can create an "open button". It also makes this song "the current song".

PARAMETERS:


SAVE MID-FILE

Use this behavior to create a "save SMF button".

PARAMETERS:


SAVE SXS (sequenceXtra) FILE

Use this behavior to create a "save button".

PARAMETERS:


PLAY SXS/MID FILE

Use this behavior to play a selected SXS or MIDI-file. The file has to be in the same directory as the movie. You can put the behavior on a button that starts the file or on any sprite and select Play File On "beginSprite" to make it play automatic.

NOTE:
This behavior does NOT work in shockwave runmode.

PARAMETERS:


DOWNLOAD MID OR SXS FILE

Use this behavior to download and (optional) play a SMF or SXS (sequenceXtra) file from an URL.

PARAMETERS:


FIELD TO SONG

Use this behavior to recreate and play songs from data stored in a field created with the behavior "SXS/MID-file to field" (in the category "6 - Additional"). It works fine with short files but is very slow on normal MID-files.

PARAMETERS:


SELECT SONG

Many of the sequenceXtra behaviors refers to a specific song (like "play song", "Set Tempo", "Set Locators"). Use this behavior to make them refer to the song you specify here. You refer to the song with it´s songID. Type it without spaces.

PARAMETERS:

 


2 Track Handling


SHOW/SET TRACK NAME

Use this behavior on a field or a text member to show (and set) the track name. You can either specify a track number or you can let it refer to the track selected with the "Select Track"-behavior.

PARAMETERS:


SHOW TRACK INSTRUMENT

Use this behavior on a text- or a field member to show the selected instrumentfor a track. You can either specify a track number or you can let it refer to the track selected with the "Select Track"-behavior. Use the behavior "Track Instrument PopUp Menu" to set the track instrument.

PARAMETERS:


TRACK INSTRUMENT POPUP MENU

Use this behavior to create a popup menu for selecting instrument. Two new scrolling #field members are created and stored in your Internal castlib ("sxInstrumentNames"). You can change their content if you prefere another font or other instrumnet names.

PARAMETERS:


SET INSTRUMENT FOR ALL TRACKS

Create a button that sets the instruments for the whole band (track 1-16) with this behavior.

PARAMETERS:


SHOW/SET MIXER FUNCTIONS

Use this behavior to create a movable slider that shows and sets one of the track parameters #volume, #panpot, #reverb or #chorus. You can specify one or more track numbers (comma separated) or you can let it refer to the track selected with the "Select Track"-behavior.

NOTE:
Place the sprite in its 'lowest' position on the stage.

PARAMETERS:


TRACK TRANSPOSE (all track but ch 10)

Use this behavior to create a movable slider or a text field that shows and sets the transpose value of all tracks but tracks with channel 10 (drums in GM-synths).

NOTE:
Place the sprite in its 'lowest' position on the stage.

PARAMETERS:


SHOW TRACK QUANTIZE

Use this behavior on a text- or a field member to show the quantize value for a track. You can either specify a track number or you can let it refer to the track selected with the "Select Track"-behavior. Use the behavior "Track Quantize PopUp Menu" to set the track quantize value.

PARAMETERS:


TRACK QUANTIZE POPUP MENU

Use this behavior to create a popup menu for selecting instrument. One new scrolling #field member are created and stored in your Internal castlib ("sxQuantize"). You can change its content if you prefere another font or other labels and values. The quantize values corresponding to the labels are stored in the 'comments' of member("sxQuantize").

NOTE:
You MUST manually activate the parameter "Include Cast Member Comments" in File > Publish Settings > Compression to make this behavior work in Shockwave mode.

PARAMETERS:


SELECT TRACK

With this behavior you can create a track mute button.

PARAMETERS:


SHOW/SET TRACK INFO

Use this behavior on a text member to create a "track inspector". Use it to show and set different track parameters such as transpose, volume, mute and quantize. If you use it on a field member it´s not possible to use TAB to separate the columns. You can either specify a track number or you can let it refer to the track selected with the "Select Track"-behavior.

PARAMETERS:


SHOW TRACK EVENT LIST

Use this behavior on a text member to create a typical "list edit" (as they are called in sequencer programs). If you use it on a field member it´s not possible to use TAB to separate the columns. You can either specify a track number or you can let it refer to the track selected with the "Select Track"-behavior.

PARAMETERS:


SELECT TRACK

Many of the behaviors for the sequenceXtra refers to a track (like "Record Track", "Show/Set Mixer Functions", "Delete Track Events" etc. By selecting at track with this behavior, you can make all (or some) of the other behaviors refer to the same track - "the selected track".

PARAMETERS:


DELETE TRACK EVENTS

Use this behavior to make an "erase button" for a track. You can either specify a track number or you can let it refer to the track selected with the "Select Track"-behavior.

PARAMETERS:


3 Transport Controls


PLAY SONG

Plays a song from a chosen position. To specify a special song (if there are several in RAM), use the behavior "Select Song".

NOTE:
Set the parameter "Play from..." to "the current position" if you want this behavior to interact with the behaviors "rewind/forward" and "position".

PARAMETERS:


PLAY SELECTION

Plays a specified section of a song. To specify a special song (if there are several in RAM), use the behavior "Select Song".

PARAMETERS:


RECORD TRACK

Create a record button with this behavior. You can record both with a MIDI-keyboard or with the mouse (try the "Keyboard Control"-behaviors). To specify "the current song" and/or "the current track" for recording - use the "select song" and "select track" behaviors.

PARAMETERS:


STOP SONG

Create a stop button with this behavior.

PARAMETERS:


REWIND/FORWARD

Use this behavior to create rewind or fast forward buttons. When you use it, you can press 'SHIFT' while clicking the sprite to increase thespeed. Sprites with a "Position Pointer" behavior will be auto updated when you use this behavior.

NOTE:
If the song is playing, it will jump to the new position when the user release the mousebutton.

PARAMETERS:


SHOW STATE

Make PLAY and RECORD buttons show their state depending on the xtra with this behavior.You select a member for each state - STOPPED, PLAYING & RECORDING.

PARAMETERS:


SHOW/SET TEMPO

Use this behavior together with either a field or text member to create a editable display for songtempo or use it with other membertypes to create a movable temposlider. In any case the text or the position will be automatic updated if the song contains tempo changes. If you move the slider during recording, the tempochanges will be recorded.

PARAMETERS:


SET METRONOME

Create a metronome ON/OFF button with this behavior.

PARAMETERS:


SET LOOP

Create a loop ON/ON button with this behavior.

PARAMETERS:


SET LOCATORS (Numerical)

Use this behavior with a text och field member to display and set the left/right locator or with another memberType to set the locator to a predefined value. The locators can be used with the "Play Song" and "Record Track" behaviors to define a section for playback/loop/recording.

PARAMETERS:


SHOW/SET POSITION (Numerical)

Use this behavior with fields or text members. It creates an editable display of the current position.

PARAMETERS:


JUMP TO BAR

Create a button to jump to a specific bar with this behavior.

PARAMETERS:


4 Realtime Controls


PLAY NOTE

With this behavior you can build your own screen keyboard. Placing it on a sprite creates a simulated piano key. Placing it in the script channel will play a note when passing that frame.

NOTE:
If you use this behavior together with the behavior "Record track" it is possible to make recordings by playing on the screen.

PARAMETERS:


PITCH BEND

Use this behavior to simulate a pitch bender on a keyboard. The sprite you attach it to will act like a slider and will send out a pitch bend message to the synth.

NOTE:
If you use this behavior together with the behavior "Record track" it is possible to make recordings by playing on the screen.

PARAMETERS:


CONTROLLER SLIDER

Use this behavior to create a movable slider that sends any controller message to the synt. The value will raise from 0 to 127.

NOTE:
If you use this behavior together with the behavior "Record track" it is possible to make recordings by playing on the screen.

PARAMETERS:


5 Graphical Editors


ARRANGE EDIT

With this behavior you can create a graphical editor for the song arrangement. It works almost like standard sequencer programs do. Just drop it on a sprite with the size you want for your arrange editor.

PARAMETERS:


KEY EDIT

Draw a square with the Vector Tool, put it on the stage and add this behavior to create a graphical editor for a part. It works almost like the key editor in a standard sequencer program.

PARAMETERS:


BAR NUMBERS

This behavior works together with the "Arrange Edit" and "Key Edit" behaviors in combination with "Position Pointer (graphical)". Place it on a text member above the sprite with the "arr" or "key" behavior, select the same group ID, add a position pointer with its behavior and you will get bar numbers that update on scroll, zoom etc.

PARAMETERS:


POSITION POINTER (GRAFICAL)

Works together with the "Arrange Edit" and "Key Edit"-behaviors. It turns a sprite into a following position pointer When it in play or record mode reaches the left or right side of the grafical edit sprite, it will autoscroll the content. It¥s also possible to set the position by moving the sprite.

PARAMETERS:


POSITION POINTER (GRAPHICAL)

With this behavior you can create a grafical locator that works together with the "Arrange Edit" and "Key Edit"-behaviors.

PARAMETERS:


ZOOM BUTTON

Works together with the "Arrange Edit" and "Key Edit"-behaviors. It zooms the content of a graphical edit sprite in the decided direction

PARAMETERS:


SCROLL BUTTON

Works together with the "Arrange Edit" and "Key Edit"-behaviors. It scrolls the content of a graphical edit sprite in the decided direction. If you press "shift" while scrolling the speed of the scrolling increases.

PARAMETERS:


SET TOOL

With this behavior you can create a button to select tool for sprite with the "Arrange" or "Key Edit" behavior.

PARAMETERS:


TRACK INDICATOR

Works together with the "Arrange Edit" behavior. It moves the sprite on the y-axis to indicate the selected track.

PARAMETERS:


6 Additional


CHECK MIDI SYSTEM

Use this behavior to check the users MIDI system in the beginning of your movie. Put it in the script channel or on a graphical sprite in frame 1

PARAMETERS:


SHOW MIDI OUTPUT

Use this behavior field or text member to show the MIDI output selected with the behavior "MIDI output Popup menu".

PARAMETERS:


MIDI OUTPUT POPUP MENU

Use this behavior to create a popup menu for selecting MIDI output. One new scrolling #field member are created and stored in your Internal castlib ("sxOutput"). You can change it's look after it´s created. Use the behavior "Show MIDI output" to show the name of the output you select.

PARAMETERS:


SET MIDI THRU

Set the MIDI thru (the track on wich the incoming MIDI signals are routed thru) to the desired track number.

PARAMETERS:


SET MASTERVOLUME

Use this behavior together with either a field or text member to set the master volume numerically or use it with other membertypes to create a movable mastervolume slider.

NOTE:
This behavior uses a rather complicated sollution with relative track volumes to set the master volume. There is a master volume parameter on some synths, but not on all GM-synths so at the moment I prefere this tricky version.

PARAMETERS:


BUTTON GROUP

This is a simple behavior for creating button groups. Place it on the graphic member intended for the "OFF state". The member will be replaced by the next member in the same castlib when the button is turned ON.

PARAMETERS:


BUTTON TOGGLE

This is a simple behavior for creating toggle buttons. Place it on the graphic member intended for the "OFF state". The member will be replaced by the next member in the same castlib when the button is turned ON.

PARAMETERS:


STOP ALL SONGS (on stopMovie)

Stops all songs on stop movie. It also sets the global variable used by all sequenceXtra behaviors - "gXtraSongs" to VOID

PARAMETERS:


SXS/MID-FILE TO FIELD

Use this behavior in Author mode to create fields with data from a SXS-song or an MID-file. Together with the behavior "Field To Song", this behavior makes it possible to save and use MIDI-songdata INSIDE the director file. Mainly for use with small files, larger files will take a LONG time to write into the field.

NOTE:
This behavior is only for Author mode.

PARAMETERS:


Adding your own LINGO - for advanced users


It is possible to write Your own Lingo that interacts with these behaviors. To do that You need to understand the basic concept behind these behaviors. We really want to ask You to be very careful mixing behaviors and custom Lingo. We created this set of behaviors to make it possible to use sequenceXtra without having to deal with advanced lingo. They are not optimized for mixing with your own sequenceXtra code.

The sequenceXtra behaviors rely on a fairly sophisticated propertyList structure that is stored in the global variable gXtraSongs. In this List, every song has it´s own SongID.


If you want to create a simple script that plays a song that was created with a sequenceXtra behavior and has the SongID #song1, use this syntax:

global gXtraSongs
gXtraSongs.song1.sxPlay()

If you want to manually create a song that can be controlled by the sequenceXtra behaviors:

global gXtraSongs
gXtraSongs[#userSong1] = new(xtra "sequenceXtra", 16)

(for subsequent songs use #userSong2, #userSong3 etc)

If you want to play this song with your own code, write:

global gXtraSongs
gXtraSongs.userSong1.sxPlay()

If you want to select a song (so the Transport Controls behaviors refer to this song):

global gXtraSongs
gXtraSongs.parameters.curSong = #userSong1
(or whatever song You want to control)

If you want to select a track (so all of the Track Handling behaviors refer to this track):

global gXtraSongs
gXtraSongs.parameters.curTrack = 10