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
| // Example usage, a MIDI proxy that picks the first available MIDI input and routes its messages to the first MIDI outputs | |
| navigator.getUserMedia({midi: true}, function (MIDIAccess) { | |
| try { | |
| var input = MIDIAccess.getInput(MIDIAccess.enumerateInputs()[0]); | |
| var output = MIDIAccess.getOutput(MIDIAccess.enumerateInputs()[0]); | |
| } catch (e) { | |
| console.error("Couldn't find suitable MIDI devices"); | |
| } |
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
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
NewerOlder