Questions tagged [web-midi]

The Web MIDI API allows web applications to use MIDI input and output devices on the client system. Web applications will be able to send and receive MIDI messages. It is intended to enable non-music MIDI applications as well as music ones.

The Web MIDI API allows web applications to use MIDI input and output devices on the client system. Web applications will be able to send and receive MIDI messages. It is intended to enable non-music MIDI applications as well as music ones.

79 questions
8
votes
2 answers

how to connect Web Midi API to native application (like Ableton live)

[If there is a better place to ask this question, please let me know!] Note: I'm on a Mac. I have successfully connected a MIDI keyboard with my browser (Chrome), using the Web MIDI API. I am wondering if I can also hook up applications (like…
Hoff
  • 38,776
  • 17
  • 74
  • 99
7
votes
2 answers

JavaScript Sequencer MIDI file timing resolution (PPQN)

I read a lot about MIDI resolution and studied some codes like Tone.js and heartbeat. But I don't understand why there are different Pulses Per Quarter Note (PPQN) values and what the effect it has on playing notes. When I have 960 PPQN so this…
JCss
  • 99
  • 9
6
votes
1 answer

Clearing MIDI output buffer

Using the Web MIDI API, I can send some messages: // Note on output.send([0x90, 0x20, 0x50]); I can also schedule some messages to be well-timed and sent in the future: // Note off, 1 second later output.send([0x80, 0x20, 0x40], performance.now() +…
Brad
  • 159,648
  • 54
  • 349
  • 530
6
votes
2 answers

How do you transpose a midi file?

I'm using this MIDI.js library: https://github.com/mudcube/MIDI.js To load the plugin and play the midi file, I'm doing this: window.onload = function () { MIDI.loadPlugin({ soundfontUrl: "./soundfont/", instruments: […
Prabhu
  • 12,995
  • 33
  • 127
  • 210
5
votes
0 answers

Electron - Sending Sysex message via the Web MIDI API crashes renderer

I'm working on an Electron app that can send sysex (system exclusive) MIDI messages to a MIDI device and every time I try to send the sysex message, the renderer crashes. I can send non-sysex messages (noteOn, noteOff, etc..) to the device without…
Andrej
  • 61
  • 5
4
votes
1 answer

Web Audio API - Correct way to stop oscillator connected to release envelope

I'm creating a polyphonic synthesizer using WebAudioAPI and WebMIDIAPI. I have a gain node for each of my two oscillators which is then connected to a master gain node. I was wondering how to correctly stop (and delete if necessary?) the oscillator…
Alistair Hughes
  • 387
  • 2
  • 3
  • 13
4
votes
1 answer

Linking users to chrome flags page

I've created a site that utilizes the new Web Midi Api, native in Chrome Canary. Since web midi isn't enabled by default, I would like to simply direct my users to chrome://flags/#enable-web-midi where they can enable midi. I discovered that…
Matt Forte
  • 43
  • 3
4
votes
2 answers

Web MIDI API not implemented in Chrome Canary?

Support for the Web MIDI API has been added to Chrome Canary since early 2013. Why then, when I type requestMIDIAccess in the JavaScript console and hit enter, do I get "ReferenceError: requestMIDIAccess is not defined"? According to official…
Joncom
  • 1,985
  • 1
  • 18
  • 29
4
votes
1 answer

Detect if a MIDI interface is connected in Web MIDI API

I am experimenting with the Web Midi API in Chrome/OS X. So far I get good results but I am wondering: Is there a way to detect if a MIDI interface is connected/disconnected WHILE an application is running? The way it works for now is to restart the…
solitud
  • 683
  • 5
  • 15
3
votes
3 answers

Live MIDI input to JSON?

I'm wondering if there are any libraries to read live MIDI input from a USB device and translate that data to a web-friendly format like JSON. I've come across a few that can read MIDI files, but this needs to be directly from a USB device. No sound…
Jason Barry
  • 738
  • 5
  • 17
3
votes
1 answer

How can I request MIDI device permission on Electron?

I have a MIDI device (launchpad) that I want to use with an Electron application. I was able to read events on the MIDI device using Microsoft Edge Chromium using Web MIDI API (https://github.com/djipco/webmidi). However, in order to start reading…
Francisco F.
  • 111
  • 1
  • 3
  • 14
3
votes
1 answer

How to specify Web MIDI channel?

How can I specify which channel to send a midi message on, with the MIDI Web API? This example from the official docs shows how to send a message on channel 1. But in the code snippet, I don't find any reference to that. // This example sends a…
Hoff
  • 38,776
  • 17
  • 74
  • 99
3
votes
1 answer

How to handle device plug/unplug with Web MIDI?

I am working on an online musical score reading trainer, a prototype is available here. I was able to implement access to previously connected MIDI keyboard, however, I am struggling to implement a hot plug/unplug scenario. My last take looks like…
Tomasz Słota
  • 126
  • 1
  • 8
3
votes
1 answer

How to parse Web MIDI API input messages (onmidimessage)

Let's assume I'm already using the Web MIDI API to listen on MIDI inputs for messages, and now I'm trying to understand and make use of the data I'm receiving. How can I parse some basic information out of a…
ChaseMoskal
  • 7,151
  • 5
  • 37
  • 50
3
votes
1 answer

Why is this Web MIDI API code not detecting MIDI events?

I'm writing a Chrome app, using the current stable build of Chrome (42.0.2311.152). I have this problem both on Linux and on my Chromebook. I have a USB MIDI keyboard which is being recognized, but no MIDI events are detected. I have checked with…
fcahoon
  • 73
  • 1
  • 6
1
2 3 4 5 6