Skip to content

Instantly share code, notes, and snippets.

@mortuosplango
Last active September 20, 2015 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mortuosplango/62bfc6e2f0cad8f846dd to your computer and use it in GitHub Desktop.
Save mortuosplango/62bfc6e2f0cad8f846dd to your computer and use it in GitHub Desktop.
#‎Hackpact2015‬ laad.com.mx/hackpact2015eng.html
‪#‎Day‬ 1
s.boot;
(
var cl = PureUGen.allSubclasses.select{
|cls|
var method = cls.class.findRespondingMethodFor(\ar);
try {
(method.notNil
and:
method.argList.contains("freq")
and:
method.argList.contains("bufnum").not
and:
method.argList.contains("rq").not
)
}
{ false }
};
w = Window.new.front;
a = TextField(w, Rect(10, 10, 150, 150));
a.string = "";
a.keyDownAction = {
|field|
var in = field.value;
if(in != "", {
if(x.notNil, {x.free});
x = play {
var tree;
in.do{
|chr|
if(tree.notNil, {
if(chr.isAlphaNum,
{
tree = cl[chr.digit].post.ar(tree);
},
{
tree = tree * chr.ascii.post;
}
);
}, {
if(chr.isAlphaNum,
{
tree = cl[chr.digit].post.ar();
},
{
tree = chr.post.ascii;
}
);
});
};
tree.dup
};
});
}
)
http://soundcloud.com/uiae/live-coding-hackpact2015-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment