.Dth1
parameter associated to a slider, just below: its current value is 0.314159
. To know what this parameter is about, click the corresponding [?] button. .PO1
parameter associated to a 2-D slider: its current value is ["x"=0,"y"=0]
..Mode
, associated to a menu button. Its current value is "H1"GMclosure
, embedding a scene and a set of distortion functions (the code lives in lib/closure.k). Each Toy is the parent of a closure: I call it its associated closure.getclosure()
duration
, t0
, region
and df
, or instead of any one of them. The OptArgs()
function, called by all (non-meta) projectors, will take care of it whatever its position. (Technical note: meta-projectors also handle closures but in a different way, by calling AddClosureArgument()
; check their code if you want to write your own)
GMclosure
documentation for more):
getEv # returns the local event scene getDF # returns an array containing all distortion functions and their arguments # example for recovering Volume settings for channel ch: # volfunction = cloid.getDF()["Volume"][ch] # volarguments = cloid.getDF()["VolumeArgs"][ch]
wGMtoy
.toy
or closure
, in which case the name of the imported box will be a number within brackets, like {57}.GMC(57)
will be evaluated within that closure. You can also get the Toy ID by calling ToyID(57)
..get()
method of a Toy, which is the method used by default within the Compositor in order to evaluate it, triggers its algorithm, much like the [Snarf] button of the Toy.EditFields
plug-in to set which method you would like:getlastph
will do what we just described: fetch the last [Snarf]ed phrase in the Toy (which is not necessarily Snarf itself, since it may have changed since)
getlastsco
does the same with Csound scores (some Toys return a score)
.getscoh()
method of the Toy.hv $123.getscoh()The problem here is that when saving/restoring the composition, it is very unlikely that the Toy ID stays the same. So better use the number within brackets which identify a closure within the box structure. If the toy box is named "
{14}
", this will do the trick:
hv ToyID(14).getscoh()This is what the "htoy" import shortcut does:
htoy 14
ClickForTyk
main GUI plug-in. The plug-in assumes that you want to wrap one or more lignes from the RL array into a Toy.PP = xy(1,1)then project
Ecoute(xy(0,0), PP)if you want the second argument of Ecoute() to be a modifyable parameter with initial value 1,1
.tempo
local variable will allow playing with the duration
parameter
legato()
call; it will also propose an alternate command without legato()
AirOut()
, with a .dt
parameter setting its second argument.
.transposition
parameter will allow transposing the returns phrase
.channel
parameter will allow setting the MIDI channel of the phrase
.patch
parameter will allows giving a bank/LSB message at the beginning of the phrase. Use the following item (set:...) to choose which set of patches will be available through a menu button. Edit the file userlib/instruments.k to define your sets of patches.
~..°
so that they become Toy-local
Ecoute(xy(0,0),PP)
should lead to the "code": "Ecoute(xy(0,0),~PP°"
SpiralAB(A,B
) would become the "code" "Spiral~A°~B°(~A°,~B°)"
"SpiralAB(~A°,~B°)"
~X°
are replaced by Toy-local parameters ToyLocal__[tid]["X"]
, where tid is the Toy ID.
{o}
", they are replaced with "cloid
", where cloid is the Toy closure ID
()
", this is replaced with "(cloid)
"
)
", this is replaced with ",cloid)
"
()
" and ")
".{o}
" replacement.Ecoute(A,~B°)"
will become:"Ecoute(A,ToyLocal__[tid]["B"],cloid)"
Ecoute(A,~B°,{o})[PHs]"
will become:"Ecoute(A,ToyLocal__[tid]["B"],cloid)[PHs]"
{o}
" since no automatic replacement would otherwise introduce the closure ID.
Ecoute(A,~B°) "
will become:"Ecoute(A,ToyLocal__[tid]["B"]) "
)
" character)
#include
command. This means that the overall syntax of the file is that of plain KeyKit code, and it also means that everything in it will be immediately evaluated.ToyConfig_name()
where name is the name of the TYK file itself."Theta"=["type"="float", "info"="blah blah blah", "min"=0,"max"=2*Pi, "init"=Pi]or
"AAA"=["type"="point", "info"="pas glop pas glop", "xmin"=-2,"xmax"=2,"ymin"=-2,"ymax"=2, "xinit"=0,"yinit"=0]or
"Mode"=["type"="array:list", "info"="blah", "list"=ListArray("option 1", "option 2"), "init"="option 1"]Here if
"type"
is "integer"
or "float"
, the corresponding variable (in this example, Theta
or AAA
) will be modifyable from a slider. If it is "point"
, it will be changed trough a 2D slider. The other fields are self-explanatory I think."array:list"
will create a menu-button. The corresponding variable will be a string. The list of allowed values is stored in field "list"
."string:getastr"
and "string:getafile"
. They allow specifying an input through a pop-up console or a file browser. Examples:
"AFile" = ["type"="string:getafile", "init"="DATA++TEST.txt", "info"="this is an example", "regexp"="\\.txt$"], "AName" = ["type"="string:getastr", "init"="Albert", "info"="my dog´s name", "prompt"="doggy name > "]... note that the fields
"prompt"
and "regexp"
are mandatory !"~n°"=["type"="integer", "info"="blah beuh blop, glop", "min"=1,"max"=10,"init"=1]The syntax is the same as previously, while the variable name must be bracketted in
~...°
. Since a local variable is not an actual KeyKit variable, its name can be almost any string (like ~this kind of name°
or ~this-one:)°
)"Helice 2"=["type"="command", "info"="\nSimple Helice() call:" + "\nHelice(PO2,1,0,0.2,1)" + "\n(PO2 can be modified through the 2D slider)", "code"="Helice(~PO2°,1,0,0.2,1)"]This creates a "Helice 2" entry in the algorithms menu button of the Toy. the corresponding code is stored in the "code" field. There can be any number of commands in a TYK.
ToyConfig_name()
which are not arrays with a "type" field must be one of the following:"bornes"
an xy array defining the area to display
"£"
is 1 if an alternate projection display is provided in the TYK hooks (see below for details)
"info"
is the info you gat at the console with the "About this .tyk" entry in the TOY menu
"orcf"
is the Csound orchestra associated to the Toy (it should be located in the DATA directory, as always with Csound files used by GeoMaestro)
"scoh"
is the score header part (to be appended at the beginning of the eventual score)
"grid"
is either 0, 1, 2, 3, 4 or 5: it makes the Toy display a background grid similar to the main GUI ones you choose with the [grid] button.
"show projections"
is either 0, 1, 2 or 3: it defines the way projections are displayed, as the [proj] button in the main GUI.
cloid
and Toy ID tid
are passed to ToyConfig_name()
as its two arguments (actually, only tid
would be necessary since we can always do cloid = tid.getclosure()
).cloid
and maybe tid
(this may be handy if you have many parameters: you can get them directly though ToyLocal__[tid]["X"]
).
ExtendedPR235.tyk
and zoziaux.tyk
. They illustrate the following points: