Last active
August 1, 2021 20:02
-
-
Save AxGord/1f1c14d040b63a860c33 to your computer and use it in GitHub Desktop.
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
package; | |
import js.Node; | |
import pony.math.Matrix; | |
import pony.midi.devices.Launchpad; | |
import pony.midi.devices.LaunchpadColor; | |
import pony.text.TextTools; | |
import pony.time.Timer; | |
using pony.Tools; | |
/** | |
* LaunchpadDemo | |
* @author AxGord | |
*/ | |
class LaunchpadDemo { | |
static function main() { | |
#if debug | |
Node.require('source-map-support').install(); | |
#end | |
var data = TextTools.includeFile('lphaxe.txt'); | |
trace(data); | |
var m:Matrix<LaunchpadColor> = Matrix.parse(data).map(LaunchpadColor.fromIndex); | |
var lp = new Launchpad(); | |
lp.setMatrix(m); | |
Timer.repeat(50, function() { | |
m = m.hor(1); | |
lp.setMatrix(m); | |
}); | |
} | |
} |
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
4 4 4444 4 4 4444 | |
4 4 4 4 4 4 4 | |
4444 4444 4 4444 | |
4 4 4 4 4 4 4 | |
4 4 4 4 4 4 4444 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment