i 1 0 4 1.0 440 ; A440
.[~ * 440 + 440]
33
is the identifier in
i 33 0 11
.A pattern is a python dict that has been repurposed to describe the conditions for matching against an event.
Pattern syntax:
{pfield_index: ((string | numeric) | [(string | numeric), ...]), ...}
The format is very precise, and must follow strict rules. The key is an integer that refers to the index of a pfield. The value is either a string, numeric, or a list of strings and numeric values. The values are used to match against a pfield data type from within an event.
This system only works with pfield data types. Whitespace and
comments are not recognized. If matching against a numeric
type, the pattern matcher does distinguish between an integer
and a floating point number. i.e. 440
is not 440.0
.
Pattern examples:
{0: 'i'} # All i-events
{0: 'f'} # All f-tables
{0: ['i', 'f']} # All i-events and f-tables
{0: 'i', 1: 33} # All i-events for instr 33
{0: 'i', 1: range(5, 11)) # All i-events for instrs 5 through 10
{5: 440} # Events that contains 440 in pfield 5
A function for operating on pfield values used in conjuction with csd.sco.operate_numeric. or csd.sco.map_().
A pfunction requires a minimum of one argument that is reserved
for a pfield numeric value. This argumented is denoted by an
x
. Additional arguments are optional.
Example:
def multiply(x, y):
return x * y
print csd.sco.map_(score, {0: 'i'}, 5, multiply, 3.0)
A pfield_list is either a single pfield or a list of pfields.
i.e. pfield, [pfield], or [pfield, pfield, ...].
A pfield_list does not support a recursive list structure, i.e as [value, [value]].
A selection is a score reformatted into a repurposed python dict that stores collected event strings with their respective indexes.
Selection syntax:
{event_index: (event | [event, ...]), ...}
The purpose of a selection is to be to pull specific events from a score and store for later processing.
Selections are created with the select functions in csd.sco. Once they are processed, they must be recombined with the original score with the merge function to be converted back into a string.
A statement is a Csound score command that begins an active score event.
From the Csound manual:
- a - Advance score time by a specified amount
- b - Resets the clock
- e - Marks the end of the last section of the score
- f - Causes a GEN subroutine to place values in a stored function table
- i - Makes an instrument active at a specific time and for a certain duration
- m - Sets a named mark in the score
- n - Repeats a section
- q - Used to quiet an instrument
- r - Starts a repeated section
- s - Marks the end of a section
- t - Sets the tempo
- v - Provides for locally variable time warping of score events
- x - Skip the rest of the current section