All Projects → chrisguttandin → midi-player

chrisguttandin / midi-player

Licence: MIT license
A MIDI player which sends MIDI messages to connected devices.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to midi-player

BS2-Web
Novation Bass Station II Web interface
Stars: ✭ 34 (+61.9%)
Mutual labels:  midi, web-midi
pacer-editor
Web editor for the Nektar Pacer MIDI controler
Stars: ✭ 16 (-23.81%)
Mutual labels:  midi, web-midi
Prelude
A web app for practicing musical sight reading skills
Stars: ✭ 24 (+14.29%)
Mutual labels:  midi, web-midi
seq66
Seq66: Seq24-based live MIDI looper/editor. V. 0.99.1 2022-11-27. NSM support; Linux/Windows; PDF user manual. Help access to tutorial and PDF.
Stars: ✭ 95 (+352.38%)
Mutual labels:  midi
DeepMusic
A python package for high level musical data manipulation and preprocessing, making data ready to be fed to a neural network.
Stars: ✭ 24 (+14.29%)
Mutual labels:  midi
guitar
🎸 Online guitar toy and tablature recorder/player
Stars: ✭ 80 (+280.95%)
Mutual labels:  midi
mpe-player
Browser Based Audio Oscillators using MPE devices & MPE.js
Stars: ✭ 16 (-23.81%)
Mutual labels:  midi
midiGenerator
Generate midi file with deep neural network 🎶
Stars: ✭ 30 (+42.86%)
Mutual labels:  midi
CureSynth Whip
Polyphonic MIDI Synthesizer for STM32F7
Stars: ✭ 45 (+114.29%)
Mutual labels:  midi
orca
Lua port of @neauoire orca for monome norns
Stars: ✭ 75 (+257.14%)
Mutual labels:  midi
patchmaster
MIDI processing and patching system
Stars: ✭ 22 (+4.76%)
Mutual labels:  midi
MidiJack
MIDI input / output plugin for Unity
Stars: ✭ 19 (-9.52%)
Mutual labels:  midi
py midicsv
A Python port and library-fication of the midicsv tool by John Walker. If you need to convert MIDI files to human-readable text files and back, this is the library for you.
Stars: ✭ 55 (+161.9%)
Mutual labels:  midi
ddrm-jfsebastian
J.F. Sebastian is a tool that provides new ways to control Deckard's Dream synthesizer
Stars: ✭ 29 (+38.1%)
Mutual labels:  midi
ofxOscMidi
Midi in, OSC out with Midi thru. Based on openFrameworks
Stars: ✭ 66 (+214.29%)
Mutual labels:  midi
MIDISequencerAUv3
A great start point for making AUv3 MIDI sequencer apps.
Stars: ✭ 24 (+14.29%)
Mutual labels:  midi
models
Programmatically control Elektron's model:cycles & model:samples via midi using Go.
Stars: ✭ 26 (+23.81%)
Mutual labels:  midi
Arduino-USBMIDI
Allows a microcontroller, with native USB capabilities, to appear as a MIDI device over USB to a connected computer
Stars: ✭ 98 (+366.67%)
Mutual labels:  midi
purescript-school-of-music
Port of the Haskell School of Music to Purescript
Stars: ✭ 21 (+0%)
Mutual labels:  midi
onyxite-customs
Toolkit for converting and building songs for Rock Band, Guitar Hero, Clone Hero, and other similar rhythm games
Stars: ✭ 80 (+280.95%)
Mutual labels:  midi

midi-player

A MIDI player which sends MIDI messages to connected devices.

version

This module provides a player which sends MIDI messages to connected devices. It schedules the messages with a look ahead of about 500 milliseconds. It does not directly rely on the Web MIDI API but expects a MIDIOutput to be passed as constructor argument. But theoretically that could be anything which implements the same interface.

Usage

midi-player is published on npm and can be installed as usual.

npm install midi-player

The only exported function is a factory method to create new player instances.

import { create } from 'midi-player';

// This is a JSON object which represents a MIDI file.
const json = {
    division: 480,
    format: 1,
    tracks: [
        { channel: 0, delta: 0, noteOn: { noteNumber: 36, velocity: 100 } },
        { channel: 0, delta: 240, noteOff: { noteNumber: 36, velocity: 64 } },
        { delta: 0, endOfTrack: true }
    ]
};

// This is a quick & dirty approach to grab the first known MIDI output.
const midiAccess = await navigator.requestMIDIAccess();
const midiOutput = Array.from(midiAccess.outputs)[0];

const midiPlayer = create({ json, midiOutput });

// All MIDI messages have been sent when the promise returned by play() resolves.
await midiPlayer.play();

If you want to play a binary MIDI file you can use the midi-json-parser package to transform it into a compatible JSON representation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].