GeoMaestro
Compositor importation reference
Importing a box in the compositor is documented in the compositor page.
This is summarized in the standard syntax section
Then alternate syntaxes are described in the hard-coded import shorcuts section, and the way to define your own shortcuts is detailed in the user shorcuts section.
Note that you can get a summary of all syntaxes and shortcuts in the KeyKit console by typing "?", "??" or "???" at the import prompt.
The following conventions are used:
- words or letters appearing in
bold
must be entered as is
- words in
italic
are arguments to be replaced with appropriate values
- arguments of the form
type:atype
are evaluated as KeyKit code, so they can be variable names or full valid KeyKit expressions
- optional arguments are displayed within
{brackets}
- dots like
...
means a file has to been selected (with the file browser )
standard import syntax
type:integer (-) box of duration integer
type:ligne (£) box
type:phrase (ph) box
type:score (C) box
wclass (T) box: tool of class wclass (if importable)
w ... (f) box: audio file
& n {m} (&) box echoing box n (and optionaly box m)
&& n {m} (&&) box echoing box n (and optionaly box m)
h ... (h) box: score stripped from everything after the first i-statement
hf ... (h) box: full score
hv expr (h) box: score returned by evaluating expr
orc ... (h) box: direct orchestra reference
s i (s) box: MIDI synthesizer RegSynth()
[i]
0 (0) box: black hole
x i (x) box: Csound effect RegGMFX()[i]
# (#) box: wave renderer
b ... .box file
hard-coded import shorcuts
The function Compositor_import_shortcuts()
defines the following syntaxes:
(T) boxes:
pb pitchbend shaper
group group tool
kboom kboom tool
closure toy
toy toy
(ph) boxes:
snarf the value of Snarf, as an explicit phrase
pac ch1 {ch2 ..} the patches in Ev["PAC"] for channels ch1, ch2, ...
pat bnk num {ch} patch number num in bank bnk affected to channel ch
named str first patch found whose name includes str
m filename MIDI file filename
im filename MIDI file filename interned (no external reference)
£integerp RL[integer]["ph"]
phrl i {tid} a command generating RL[i] within closure GMC(tid)
(-) boxes:
-integer silent box of duration seconds(integer)
(£) boxes:
£integer RL[integer]
££integer the actual command used to generate RL[integer]
(C) boxes:
£integerc RL[integer]["score"]
xsco filename full Csound score filename, unchanged
ixsco filename (..same, only interned, with no reference to filename)
sco filename score stripped from header, comments & symbols
isco filename (..same, only interned, with no reference to filename)
(h) boxes:
htoy tid score header (if any) referenced by the toy {tid}
user shorcuts
The user may define in its GeoPostInit.k file a User_iMacros
array (it can also be a User_iMacros()
function returning an array)
This allows for simple shortcuts (without arguments): indexes are the keywords to be used, items are strings providing the replacements.If a ":" appear in a replacement, the actual replacement is the part before the ":", the other part being used to give the imported box its name.
Example: if
User_iMacros["piano"]="PATCH(20,0):WT grand piano"
or
User_iMacros()["piano"]="PATCH(20,0):WT grand piano"
.. then importing a box with the keyword "piano" will load a (ph) box phrase of value PATCH(20,0), that is a program/bank changes message, and this box will be named "WT grand piano".
The fact that User_iMacros
can be a function is useful to built a large array of shortcuts, or to provide dynamic values. For example, if we want to extend the previous example so that each 16 channels are available, we can code:
function User_iMacros()
{
a = []
for (c=1; c<=16; c++)
a["piano"+string(c)] = "PATCH(20,0,"+string(c)+"):WT grand piano ("+string(c)+")"
a["2Snarf"] = repeat(Snarf,2)
return(a)
}
... now importing "piano5" will give us a patch for channel 5 in a box called "WT grand piano (5)"
besides, importing "2Snarf" will give a (ph) box whose value is the current value of Snarf
, repeated twice.
-- Back --