Questions tagged [midi]

MIDI (Musical Instrument Digital Interface) is a protocol used to allow music hardware, software and other equipment to communicate with each other.

MIDI is a widely-used protocol which can transmit note, controller, program, timing and vendor/hardware musical instrument specific (so called system exclusive/SysEx) information. The MIDI protocol can be used to allow your software to communicate with other MIDI-compatible software or hardware.

Some useful resources on the MIDI protocol:

1972 questions
5
votes
1 answer

How to divide a decimal MIDI pitch-bend value into 2 separated 7 bit values correctly?

I'm trying to make a sort of custom midi player, to do so I'm using an array that already has memorized correctly the midi messages data like this: int array[3000][4]={{time,status,data1,data2},{...},...} when I want my program to send the midi…
Febio Mosca
  • 127
  • 10
5
votes
3 answers

How to get Note On/Off messages from a MIDI sequence?

I am hoping to get notifications of note on/off events in a playing MIDI sequence to show the notes on a screen based (piano) keyboard. The code below adds a MetaEventListener and a ControllerEventListener when playing a MIDI file, but only shows a…
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
5
votes
1 answer

Send and Receive MIDI with Swift and CoreMIDI

I'm not very familiar with Swift/Objective-C or the Cocoa environment and I've been having a lot of trouble figuring out how to send or listen for data from a USB device with CoreMIDI. I'm trying to send the message (144, 36, 5) to my MIDI…
Weebs
  • 435
  • 6
  • 17
5
votes
1 answer

How to deal with multiple identical MIDI USB devices

My c# application must use multiple identical USB MIDI interfaces which are all from the same manufacturer. In device manager, all devices appear with the same driver name / CLSID - only the PNPDeviceID is different. When I list all MIDI inputs /…
lenniep
  • 679
  • 4
  • 11
  • 27
5
votes
1 answer

MIDI.js note duration does not change

As the documentation for mudcube MIDI.js seems to be lacking in this regard, I'm hoping there is someone who might be able to point me in the right direction. To put it plainly, using midi.js, how do you adjust the duration and ending of midi…
catch22
  • 391
  • 1
  • 3
  • 13
5
votes
2 answers

MIDI.js - Unable to change instruments

I am trying to initialize MIDI.js with a glockenspiel instead of the default acoustic piano. But I am getting no sounds I have glockenspiel-ogg.js and glockenspiel-mp3.js (downloaded from https://github.com/gleitz/midi-js-soundfonts ) in a…
wolffmart
  • 81
  • 1
  • 7
5
votes
1 answer

C#/.NET MIDI sequencer: Parse MIDI file and generate timed Note-On messages

I need to parse a MIDI file and generate note-on messages at the right moments. I'm currently using a port of http://csharpsynthproject.codeplex.com/ (this is the port here) The problem with this port is that the sequencer and the synth are so…
P i
  • 29,020
  • 36
  • 159
  • 267
5
votes
5 answers

Windows MIDI streaming and SysEx

I am using the ancient Windows Multimedia API (midiXyz functions from WinMM.dll) from C#. After opening a Midi Out device/port in non-streaming mode (midiOutOpen), sending SysEx with (midiOutLongMsg) works fine. After opening a Midi Out device/port…
MillKa
  • 413
  • 4
  • 10
5
votes
1 answer

Convert MIDI to Java data structure (List, Hash Map, ???)

I want to grab a MIDI file, read it, and then store the data in some sort of data structure. Using this site I found an easy way to read the file, which works like a charm: Reading MIDI Files Now I need to figure out a way to grab that output and…
5
votes
2 answers

Play a single note with DirectMusic

I'm using DirectMusic for MIDI playback in an application I'm developing. Does anyone know if it's possible to use DirectMusic to play individual notes? Currently, I'm converting an in-memory data structure that represents entire 'songs' into a MIDI…
Rob
  • 25,984
  • 32
  • 109
  • 155
5
votes
1 answer

Play midi files using chrome

I am using embed player for playing midi files. It is playing in mozilla and in explorer how can i play that midi files in chrome, is there any extension or plugin by which i can play midi in chrome. here is my code
lostTiger
  • 82
  • 2
  • 4
5
votes
2 answers

Newer version of JRE doesn't load soundbank but older version does

I have the following code that tries to load a soundbank. I've tested the code on Windows 7 with JRE 1.6.03 and 1.6.43. The old version of the JRE (1.6.03) works fine but the new version throws an exception. What's going on? public Main() { try…
gsgx
  • 12,020
  • 25
  • 98
  • 149
5
votes
0 answers

How to mix audio file and music from the midi file in Android?

I was able to play both the audio(mp3, wav, etc) and midi music(.mid) at a time using SoundPool Class. But how can i save the output(mixer of audio file + midi music) into an audio file(mp3, wav, etc.,). Please suggest me best approach to achieve…
sandeep
  • 481
  • 1
  • 6
  • 14
5
votes
1 answer

Reading MIDI file (C): 0x00 appearing after the end of a var-length value

I'm trying to write some functions to read in a MIDI file. I've been referring to a number of sites that give the specification, but mostly this one: http://www.sonicspot.com/guide/midifiles.html (archive) I have been testing it on a MIDI file for…
benwad
  • 6,414
  • 10
  • 59
  • 93
5
votes
1 answer

Saving a very simple MusicSequence into MIDI doesn't reproduce sound

I'm trying to save a very basic one note MusicSequence (MusicSequence Reference) into a MIDI file. The file is being written right now and the duration of the note also (if I put duration 4 then the MIDI file lasts 2 secs, if I change it to 2 then…
fdiaz
  • 2,600
  • 21
  • 27