This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_BACKEND_SPEC = dict( | |
set_learning_phase=__set_learning_phase, | |
is_keras_tensor=__is_keras_tensor, | |
variable=__variable, | |
placeholder=__placeholder, | |
eye=__eye, | |
eval=__eval, | |
random_uniform_variable=__random_uniform_variable, | |
random_normal_variable=__random_normal_variable, | |
random_uniform=__random_uniform_variable, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'lodash'; | |
const ____kludge = (function*() {}).constructor; | |
const isGeneratorFunction = ugh => ugh instanceof ____kludge; | |
const recurse = rules => fn => isGeneratorFunction(fn) ? sagaTeller(fn, rules) : fn; | |
const genWrapper = (value, rules) => ({ | |
...value, | |
fn: recurse(rules)(value.fn), | |
args: value.args.map(recurse(rules)), | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
currentSeq = tops[top] ? tops[top].scene || new EvSeq(new EventEmitter()) : currentSeq; | |
if (verb === states.STAGED || verb === states.SHIT) { | |
console.log("playing " + top); | |
if (verb === states.SHIT) { | |
// reset currentSeq | |
currentSeq.stop(); | |
} | |
// TODO: figure out a way to unsubscribe observables...this will probably in a memory leak | |
Observable.fromEvent(tops[top].event || new EventEmitter(), 'sc') | |
.subscribe(function(msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIDIClient.init; | |
MIDIClient.sources; | |
MIDIIn.connect; // init for one port midi interface | |
MIDIIn.removeFuncFrom(\control, ~controlKludge); | |
~current = 0; | |
~controlKludge = { arg src, chan, num, val; | |
if (val == 127, { | |
[chan,num,val].postln; |
NewerOlder