Load/play a score of note events
Name | Type | Opt | Description |
---|---|---|---|
label | symbol | Supplies a name for the object. Any detonate objects with the same name argument will share the same event data. |
bang | Performs the same function as | .|
int | contextual argument [int] |
After a In left inlet: The delta time (delay), in milliseconds, since the previous recorded event. This denotes the "inter-onset interval --the time between the beginnings of notes--which effectively determines the rhythm in which the events are recorded. This need not necessarily be the true time in which they occur; detonate believes any (non-negative) delta time it receives. When detonate receives a number in the left inlet while recording, it treats the number as the inter-onset interval (the time elapsed since the previous event), combines it with the numbers most recently received in the other inlets, and records them together as a note event. As with most Max objects, the numbers received in the other inlets are stored for use in subsequent note events triggered by the receipt of a number in the leftmost inlet. When detonate has received a message, a subsequent number in the 2nd inlet is treated as the key number (pitch) of a note. If the number is the same as the pitch of the current note in the score (or a nearby note), the information recorded for that note--except for the delta time--is sent out. When detonate is neither recording nor following, a number in the left inlet has the same effect as the message. |
message has been received, all numbers received are treated as parameters of a note event.
(inlet1) | key-number (pitch) [int] |
In 2nd inlet: The number is treated as the key number (pitch) of the note. If no key number has ever been received, | is used by default.
(inlet2) | velocity [int] |
In 3rd inlet: The velocity of the note. If the velocity is 0--indicating a note-off-- the event will be treated as the end of an earlier note-on the same key, and will determine the duration of that earlier note. If no velocity number has ever been received, it is | by default.
(inlet3) | duration [int] |
In 4th inlet: In lieu of a note-off message, a note duration can be supplied as part of the note-on event. If no duration value has ever been received, and no note-off event is received to end the note, a duration of | milliseconds is used by default.
(inlet4) | MIDI-channel [int] |
In 5th inlet: The MIDI channel of the note. If no channel has ever been specified, notes are recorded on channel 1. |
(inlet5) | track-number [int] |
In 6th inlet: The number of a track on which to record the note event. Overdub recording is not possible with detonate, but each recorded note can be tagged with a track number for storing separate tracks of notes internally. If no track number has ever been received, notes are recorded on track 1. |
(inlet6) | extra [int] |
In 7th inlet: An "extra" number, which can be used for any purpose, attached to the note event. This number can be used to provide an additional event parameter, or to serve as a control value in sync with the note. If no number has ever been received in this inlet, it is recorded as | by default.
(inlet7) | second-extra [int] |
In right inlet: A second "extra" number. |
float | contextual argument [float] |
Converted to | .
list | delta-time and inputs [list] |
The first number in the list is used as the delta time, and the other numbers are treated as if they had been received in the other inlets, respectively from left to right. |
clear | Erases the contents of detonate. | |
delay | note-occurence-offset [int] |
The message | followed by a number will move the entire sequence of recorded note values over with the first note of the sequence beginning at the specified number.
follow | pitch [int] |
Causes detonate to behave like a score reader, comparing incoming pitch information to the events stored in its score. When a key number is received in the 2nd (pitch) inlet, and it is the same as the pitch of the current note in the score, detonate sends out the information recorded for that event--except for the delta time--and then moves ahead to the next note event. |
followat |
pitch [int] velocity [int] MIDI channel [int] |
The word detonate to look for a note event with those attributes in its stored score. If such a note is found, detonate commences score-following from the next event onward. If not, it simply prints in the Max window. | , followed by a pitch, a velocity, and a MIDI channel number, causes
export | time and file format (pair of numbers) [list] |
Same as | .
import | filename [list] |
Same as | .
next | Once playback of the score has been started with a detonate simply prints the message in the Max window. | message, sends out the event information (except the delta time) for the current note in the score, then sends out the delta time for the next note. That delta time can in turn be used as a delay time before sending another message to detonate. When is received on the last note of the score, there is no note following that one, so a unique value of is sent out the left outlet to signal the end of the score. If a message is received while the score is not being played back,|
nth | event-number [int] |
The word | , followed by a number, sends out the note information of the event in the score indicated by the number. (Events are numbered beginning with 0.) In place of the delta time for the event, the (cumulative) starting time of the event is sent out the left outlet.
mute |
event-parameter [int] parameter-value [int] mute-flag (1 or 0) [int] |
Permits the selective muting of note events that meet specific criteria. The word | must be followed by an event parameter number, a parameter value, and a value of or signifying "mute" or "unmute". Event parameters are numbered beginning at 0 for delta time, 1 for pitch, etc. For example, the message mutes notes on MIDI channel 10 (channel is parameter 4), preventing their note information from being sent out; those notes can later be unmuted by the message .
params |
error-tolerance [int] millisecond-advance [int] octave-match-flag [int] |
The word detonate for cases when the received pitch does not match the pitch of the current note in the score. The first number tells detonate how many errors to tolerate before moving ahead in the score. The second number tells how many milliseconds to move ahead in the score when too many errors have occurred. The third number, if non-zero, tells detonate to treat a received pitch that is an octave too high or too low as if it were a match. For example, the message means to allow three successive errors (with octave displacements considered to be a match) before moving ahead one second in the score and resuming. By default, detonate allows 2 errors before moving ahead 200 milliseconds, and does not consider octave pitch displacements to be a match for the stored note. | , followed by three numbers, modifies the score-following behavior of
setparam | ParameterIDs and settings (9 items) [list] |
The message | followed by nine list elements will set the parameters of the object much like entering the information into the object's inspector. The first element in the list is a number and signifies which parameter to edit. The remaining elements are the desired settings listed, from left to right, as the "parameter name", the "display mode", the "minimum value", the "maximum value", the "default value", the "graph interval", the "default scaling", and the "Display MIDI note number" flag.
start | Begins playing back the score, by simply sending out the first delta time. Once playback of the score has been started, | messages can be used to send out the next event information.|
record | In left inlet: Begins recording numbers coming in the inlets, treating them as parameters of note events to be recorded. The onset of an event is recorded each time a number is received in the left inlet. | |
startat |
pitch [int] velocity [int] MIDI channel [int] |
The word detonate to look for a note event with those attributes in its stored score. If such a note is found, detonate sends out the delta time of the next event, and a subsequent message will refer to that next event. If no such note is found, detonate simply prints in the Max window. | , followed by a pitch, a velocity, and a MIDI channel number, causes
stop | Stops detonate from recording, playing, or following. It is not necessary to stop detonate before switching directly between , , and . | |
read | filename [list] |
The word detonate score. If is followed by the name of a MIDI file in Max's search path, that file is read in directly without opening a dialog box. The message can also be followed by a number which--if non-zero--causes the time values in the file to be interpreted as milliseconds rather than as bars, beats and ticks at a certain tempo. If the number is 0 or not present, the times are read as bars and beats. | by itself opens a dialog for loading in a standard MIDI file as contents of the
restore | Same as | .|
unmute |
event-parameter [int] parameter-value [int] |
The word | , followed by an event parameter number and a parameter value, undoes an earlier of the same criterion. For example, has the same meaning as .
unmuteall | Undoes the effects of all previous | messages.|
write | time and file format (pair of numbers) [list] |
Opens a dialog for saving the contents of detonate as a standard MIDI file. The word may optionally be followed by up to two numbers. If the first number is non-zero, the file will be saved with time represented in milliseconds rather than as bars, beats, and ticks in a certain tempo. If the number is 0 or not present, the file is saved as beats. The second number indicates the MIDI file format: 0 (all notes on a single track) o multi-track format, using the track parameter to separate the notes). The contents of detonate are also saved as part of the patch, when the patch is saved. |
writemax | filename [symbol] |
The message | followed by a symbol, saves the patch as a Max text file named after the symbol.