readscore — Read, preprocess and schedule a score from an input string.


Readscore will issue one or more score events. It can handle strings in the same conditions as the standard score, including preprocessing (carry, sort, ramp, etc). Multi-line strings are accepted, using {{ }} to enclose the string.


readscore Sin 


Sin -- a string (in double-quotes or enclosed by {{ }}) containing one or more score events.


Here is an example of the readscore opcode. It uses the file readscore.csd.

Example 779. Example of the readscore opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

-d -o dac
instr 1
a1 flooper2 1000,p4,2,5,0.1,1 
   out a1

instr 2
ires readscore {{
{12  COUNT 
i1 $COUNT 1 [1 + $COUNT/12]
f0 12
f 1 0 0 1 "fox.wav" 0 0 1

i2 0 1


You can use string opcodes like sprintfk to produce strings to be passed to readscore like this:

Sfil = "/Volumes/Bla/file.aif"
String  sprintfk {{i 2 0 %f "%s" %f %f %f %f}}, idur, Sfil, p5, p6, knorm, iskip
readscore String

See also

event, event_i, schedule, schedwhen, schedkwhen, schedkwhennamed


Author: Victor Lazzarini, 2013