xy is a live coding & sequencing language which serves as a reference for the PreProcessor.sc class extension.
If anyone here is new… to install an extension:
Quarks.gui
+ PreProcessor
thisProcess.recompile
You must install ‘git’, which is the software version handling protocol used by ‘GitHub’, from the same author as Linux. It’s as easy as installing SC.
Preprocessors are universally recognized across programming languages… allowing one to create custom & unique forms of behavior.
In SC, the interpreter is accessible through the keyword this
, and the interpreter’s .preProcessor
function (which all interpreted code can be forcibly piped through) exists in the core library.
this.preProcessor_
{
|code| inform(code)
// the final value must be the code to execute
// the code can be forcibly modified using
// any form of text or string manipulation
// and the interpreter itself is available
// as the last of *two* arguments defined in
// it's source function: arg code, interpreter;
}
The PreProcessor quark aims to extend the functionality of SC’s core .preProcessor
for the interpreter.
xy was made to serve as a point of reference, & as a skeleton/template, or foundation, for one’s further vision.
((
s.waitForBoot
{
this.preProcessor_
(
PreProcessor
(
)
.startDelimiter_
(
"`,"
)
.endDelimiter_
(
",`"
)
)
;x =
(
lang:
(
\y
),
languages:
(
\y:
{
|code event|
var separate = split(code,$,)
;
var instr = separate[0].asSymbol
;
var xy = separate[1].asList collect: switch
(_,
$`, 0,
$x, 1,
$y, 1.177)
;
(event.put
(
\y, Pbind
(
\amp, Pseq(xy, inf),
\instrument, instr,
\dur, 1/4
)
)
)}
)
)
}))
// `,bass,x`xy,`.(x).y.play
`,default,x`xy,`.(x).y.play