clean + comment
This commit is contained in:
parent
0cfec3a7bd
commit
0695b4bee9
1 changed files with 5 additions and 6 deletions
|
|
@ -68,7 +68,12 @@ export function repl({
|
|||
const toggle = () => scheduler.toggle();
|
||||
const setCps = (cps) => scheduler.setCps(cps);
|
||||
const setCpm = (cpm) => scheduler.setCps(cpm / 60);
|
||||
const all = function (transform) {
|
||||
allTransform = transform;
|
||||
return silence;
|
||||
};
|
||||
|
||||
// set pattern methods that use this repl via closure
|
||||
const injectPatternMethods = () => {
|
||||
Pattern.prototype.p = function (id) {
|
||||
pPatterns[id] = this;
|
||||
|
|
@ -77,11 +82,6 @@ export function repl({
|
|||
Pattern.prototype.q = function (id) {
|
||||
return silence;
|
||||
};
|
||||
|
||||
const all = function (transform) {
|
||||
allTransform = transform;
|
||||
return silence;
|
||||
};
|
||||
try {
|
||||
for (let i = 1; i < 10; ++i) {
|
||||
Object.defineProperty(Pattern.prototype, `d${i}`, {
|
||||
|
|
@ -101,7 +101,6 @@ export function repl({
|
|||
} catch (err) {
|
||||
console.warn('injectPatternMethods: error:', err);
|
||||
}
|
||||
|
||||
evalScope({
|
||||
all,
|
||||
hush,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue