This file contains 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 React from "react" | |
import { Route, Switch } from "react-router-dom" | |
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
<Route {...rest} render={props => ( | |
<Layout> | |
<Component {...props} /> | |
</Layout> | |
)} /> | |
) |
This file contains 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
<configuration> | |
<system.webServer> | |
<handlers> | |
<add name="iisnode" path="server/server.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<rewrite> | |
<rules> | |
<rule name="Static Assets" stopProcessing="true"> |
This file contains 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
/* | |
Only play highest note in a chord | |
*/ | |
var notes = []; | |
function highestPitch() { | |
var highestPitch = -1; | |
notes.forEach(function(note) { | |
if (note.pitch > highestPitch) |
This file contains 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
# Checks a MIDI file to see if there are any overlapping notes | |
# An overlapping note is defined as two MIDI on events in sequence | |
import math | |
from mido import MidiFile, tick2second | |
input_midi = MidiFile(r'my_midi_file.mid') | |
notes = {} # stores which note is being held when iterating through each event | |
tempo = 120 # default, tempo will be read from the file | |
numerator = 4 # default, will be read from the file |