This file contains hidden or 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
| "use strict"; | |
| const events = require("events"); | |
| class WebMIDIEmitter extends events.EventEmitter { | |
| constructor(access, deviceName) { | |
| super(); | |
| this.access = access; | |
| this.deviceName = deviceName; |
This file contains hidden or 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
| "use strict"; | |
| function test(name, testfn) { | |
| function ptest(promise, timeout) { | |
| const timerId = setTimeout(() => { | |
| console.error(`test failed: ${ name }`); | |
| throw Error(`timeout (${ timeout }ms)`); | |
| }, timeout); | |
| promise.then(() => { |
This file contains hidden or 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
| "use strict"; | |
| const test = require("eater/runner").test; | |
| const assert = require("assert"); | |
| const scsynth = require("../../src"); | |
| const context = new scsynth.SCContext(); | |
| // test("aa", () => { | |
| const synthdef = { |
This file contains hidden or 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
| "use strict"; | |
| const fs = require("fs") | |
| fs.readdirSync(__dirname).filter((x) => { | |
| return x.includes("SCUnit") && !x.includes("Kernel") && !x.includes("Expressions"); | |
| }).sort().map(x => x.replace(".js", "")).forEach((x) => { | |
| console.log(` ${ x }: require("./${ x }"),`) | |
| }); |
This file contains hidden or 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
| "use strict"; | |
| const fs = require("fs"); | |
| const decoder = require("synthdef-decoder"); | |
| const toPairs = require("lodash.topairs"); | |
| const files = fs.readdirSync(__dirname).filter(x => /\.scsyndef$/.test(x)); | |
| const ugen = {} | |
| files.forEach((fileName) => { |
This file contains hidden or 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
| "use strict"; | |
| const events = require("events"); | |
| class SyncDate extends events.EventEmitter { | |
| constructor() { | |
| super(); | |
| this.deltaTime = 0; | |
| this.syncTimes = []; | |
| } |
This file contains hidden or 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
| "use strict"; | |
| const events = require("events"); | |
| class BeatEmitter extends events.EventEmitter { | |
| constructor(transport, api) { | |
| super(); | |
| this.transport = transport; | |
| this.api = api || global; | |
| this._running = false; |
This file contains hidden or 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
| module.exports = { | |
| "Up": [ 0, 1, 2, 3 ], | |
| "Down": [ 3, 2, 1, 0 ], | |
| "UpDown": [ 0, 1, 2, 3, 2, 1 ], | |
| "DownUp": [ 3, 2, 1, 0, 1, 2 ], | |
| "Down&Up": [ 3, 2, 1, 0, 0, 1, 2, 3 ], | |
| "Up&Down": [ 0, 1, 2, 3, 3, 2, 1, 0 ], | |
| "Converge": [ 0, 3, 1, 2 ], | |
| "Diverge": [ 2, 1, 3, 0 ], | |
| "Con&Diverge": [ 0, 3, 1, 2, 1, 3 ], |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>memory leak</title> | |
| </head> | |
| <body> | |
| <button id="test">test</button> | |
| <div id="debug"></div> | |
| <script src="build/web-audio-engine-old.js"></script> |
This file contains hidden or 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 numpy as np | |
| import matplotlib.pyplot as plt | |
| x = np.linspace(0.0, 1.0, 1000) | |
| y = np.sin(x * np.pi * 2) | |
| plt.figure(figsize=(18, 3)) | |
| plt.subplot(141) |