Skip to content

Instantly share code, notes, and snippets.

View jschloer's full-sized avatar

Jason Schloer jschloer

View GitHub Profile
const secretMachine = Machine({
id: 'secret',
initial: 'wait',
context: {
secret: '42'
},
states: {
wait: {
after: {
1000: 'reveal'
navigator.requestMIDIAccess().then(
(midiAccess) => {
for(var input of midiAccess.inputs.values()){
input.onmidimessage = (msg) => {
// weed out the timing messages
if (msg.data.length > 0 && msg.data[0] !== 248){
console.log(msg)
}
}
// real quick, send a midi message
@jschloer
jschloer / rrv4index.ios.js
Last active January 4, 2017 04:08
React Router V4 for React Native
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,