schedwhen Instrument Control:Invocation schedwhen schedwhen Adds a new score event. Description Adds a new score event. Syntax schedwhen ktrigger, kinsnum, kwhen, kdur [, ip4] [, ip5] [...] schedwhen ktrigger, "insname", kwhen, kdur [, ip4] [, ip5] [...] Initialization ip4, ip5, ... -- Equivalent to p4, p5, etc., in a score i statement. Performance kinsnum -- instrument number. Equivalent to p1 in a score i statement. insname -- A string (in double-quotes) representing a named instrument. ktrigger -- trigger value for new event kwhen -- start time of the new event. Equivalent to p2 in a score i statement. kdur -- duration of event. Equivalent to p3 in a score i statement. schedwhen adds a new score event. The event is only scheduled when the k-rate value ktrigger is first non-zero. The arguments, including options, are the same as in a score. The kwhen time (p2) is measured from the time of this event. If the duration is zero or negative the new event is of MIDI type, and inherits the release sub-event from the scheduling instruction. Note that the schedwhen opcode can't accept string p-fields. If you need to pass strings when instantiating an instrument, use the scoreline or scoreline_i opcode. Examples Here is an example of the schedwhen opcode. It uses the file schedwhen.csd. Example of the schedwhen opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Instrument Invocation Credits Author: &namejohn; University of Bath/Codemist Ltd. Bath, UK November 1998 New in Csound version 3.491 Based on work by &namegabriel;