Each instance of a RePlay element corresponds roughly to what would be a "track" in a Sequencer-type program. Don't take the comparison too closely, however, because there is no inherent coupling between elements as there is with tracks. By setting up the configuration so that several RePlay elements are triggered by the same control event, you can synchronize their sequences for playback and recording, but trying to do this with a large number of tracks — as a sequencer does — would get unwieldy fast. If you have a true Sequencer program, and you would like to use a MusicWeaver diagram in conjunction with it, you can link its input and output into the diagram by use of ProduceMidi and AcceptMidi elements.
In addition to standard MIDI events — and System Exclusive blocks —, the recorded sequence preserves all 'marks' added to the events as well as any 'director' packets that appear in the stream being recorded. This extra information is then available at playback, if desired, to control the configuration. [This is assuredly a feature, but it can trip you up quite well... If you record a sequence from any path that involved splitting the MIDI stream, for instance, the marks in the stream will be recorded, and will still be there when you play it back! If you pass the playback through more processing, the already-present marks could easily confuse things. If in doubt, use a ClearMarks element, either on playback or before recording.]
The sequence is stored in a special format to preserve this added data. There is no direct conversion between this and standard midifile form; use the 'MidiFile' module to generate standard files readable by other programs (or feed a stream in real time to an external sequencer through a 'ProduceMidi' element).
In a RePlay element's control panel there are a number of options you may select for recording and playback, described below. Note that the PLAY, RECORD, and STOP buttons are "touch buttons" — they are activated when the mouse-button is pressed, not, as with standard buttons, when it is released. This permits more natural and precisely timed actuation when capturing a performance or playing it back.
If you set the mode to 'Immediate', recording begins the moment you press the RECORD button. The label of the button turns solid red (and the status display at left shows ">>> RECORDING >>>").
If the mode is either "Trig on MIDI" or "Trig on Control", recording does not begin immediately when the RECORD button is pressed, although recording mode is entered (indicated by a red border appearing around the button label, and the status showing "READY REC."). Recording will then be triggered by an appropriate event.
With "Trig on MIDI", recording begins with the first MIDI event to arrive on the 'Record Midi' connector after RECORD is pressed. Alternatively you can use any event arriving on the 'Control' input to initiate recording by selecting "Trig on Control". Be warned, though, not to expect to record the event you trigger off if you use the latter mode. Because the two paths are not synchronous, the event will probably have come and gone on the 'Record Midi' connection before recording actually gets started. (In contrast of course, when using 'Trig on Midi' the triggering event is always recorded.)
Recording is stopped, and record mode terminated, by pressing the STOP button (also if the PLAY button is pressed). The actual end-time of the recording. however, is not determined by when you actually hit STOP. It is always marked by the last event that was recorded. It does not matter how long you take before you click the button — the interval between the last event and the actual stop time is not noted.
You cannot resume a recording once it has been stopped. The current sequence is always cleared when record mode is entered.
The PLAY button is always enabled. Actuating it will immediately begin playing the sequence currently in memory, terminating recording mode first if necessary. The 'Start Delay' slider (below) is ignored on such a direct start.
With the playback selector at 'Manual', only the PLAY will start playing the sequence. The other playback modes provide other ways of starting in addition to the button. "Play on MIDI" and "Play on Control" are only active if the sequence is "AT START"; if a sequence has been stopped and not rewound, it cannot be restarted by an incoming event.
When the playback mode is "Play on MIDI" (and the sequence is at its start), any MIDI event arriving on the "Record Midi" connection will initiate playback. If the 'Start Delay' slider is non-zero, playback only actually begins when that delay has elapsed. This allows you to synchronise a sequence to the rhythm of a piece while triggering it from an earlier event in the stream.
Similarly, when the playback mode is "Play on Control", any event (of any kind) arriving on the "Control" connection will initiate playback. 'Start Delay' is again observed here.
Selecting "Play on Load" causes playback to begin when a sequence file is loaded into the module. This can be used for instance to send an initialization sequence when a configuration is loaded, or at any time thereafter. The 'BLAST OUT' feature (see below) may be useful here as well.
When any mode other than 'Manual' is in effect, the label of the PLAY button is outlined in blue, signifying this readiness to be triggered. You will likely use the event-triggered modes in conjunction with filtering of the relevant incoming stream, so that one specific note or other event will trigger the playback. To turn off triggering, select "Manual".
When a sequence reaches its end it is by default rewound, depending on the Rewind Mode selection. You can suppress this by setting the mode to "No Auto Rewind". If you set the mode to "Loop", it is not only rewound but restarted, and will loop continuously until either the mode is changed again or the STOP button is pressed.
If 'End Delay" is non-zero, it is interpolated between the last event of the sequence, and the moment of rewind. This controls both how quickly a loop repeats and also how soon an arriving input event is able to trigger another playback (as this can only happen when the sequence is AT START).
It does not, however, reset the system completely. Only the sounds and notes themselves are turned off — no controllers or other states are affected. In particular, it does not reset the sustain pedal, so if this was left "on", any subsequent notes will still be sustained.
You can, however, convert (all) the time values in the sequence to be in arbitrary 'ticks' rather than microseconds. The tick rate can then be altered with the Tempo slider to change the speed of playback. The setting of the slider when the conversion is actually made is used as the "scale factor" to compute the initial tick count in each interval. The mode is selected from the "Timing in:" popup just below the Tempo slider. If you change this selection (and there is a sequence in the store) you will get an alert to check that you really do want to make the conversion.
The notation used for the Tempo slider is probably not obvious. It is labelled as "beats/minute" (from 60 to 240, default 120) but this number has no actual relation to the events in the stream being played back. What it does in actuality is determine the ratio of stored ticks to microseconds; using the "beats/minute" convention to provide this in a hopefully familiar form.
As mentioned, the setting of the slider is used to scale the conversion from one mode to the other. If you convert to 'Scaled' with the slider at the default 120 b/m, you can then play back at any rate from half speed (60 b/m) to double (240 b/m). If the slider is moved to another value first, the conversion will be done on that basis, and the available tempo range will change appropriately.
If you go back the other way, from scaled to microseconds, with the slider set at a different point from the first conversion, the new stored intervals will be computed with that value, and playback will become fixed at the new tempo.
The Start Delay and End Delay sliders are also only effective during playback. Both delays are scaled in 1/100ths of a second; this is true whether timing is in microsec or ticks. However, the values are actually stored in the current timing mode, which means that if you change the tempo, the actual delay periods will change to maintain a constant relation to the other intervals in the sequence.
A non-zero Start Delay value delays the actual start of a triggered playback by that amount. (It does not delay playback if this is initiated directly with the PLAY button.)
End Delay comes into effect when a sequence finishes normally. The sequence will not return to its start until this delay has elapsed, so both looping and triggered-restart are affected.
Note that all the timing parameters are stored with the sequence file itself when it is saved. They are not kept in the configuration settings.
The Load... button similarly opens a File Panel to locate and read a previously saved sequence. Alternatively you can drag the file's icon into the RePlay control panel. The name of the loaded file again appears in the yellow field at top left.
There is a unique icon provided for these files, but unfortunately — because RePlay is an add-on rather than an executable — the icon will never get automatically associated with the type. (You will probably see a generic 'audio' icon.) If you want this icon on your files, you will have to set it up yourself.
To do this, once you have stored at least one sequence file so that the type is
known to the system, start up the FileTypes application from the Preferences
menu. In the list of types, under 'audio', find "x-weaver-midisegment" and select
it. Then drag the RePlay icon into the grey area of the FileTypes panel;
this should open up another window with its details. In the 'Supported Types'
area, you will see the icon for sequence files; just drag this into the empty
icon area at top centre of the main FileTypes panel, and close that application.
You should now find that all your sequence files have that icon.
Pete Goodeve Berkeley, California e-mail: pete@jwgibbs.cchem.Berkeley.EDU pete.goodeve@computer.org