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
9
votes
2 answers

Reading MIDI Files

What is the best way to read a MIDI file (chronologically) with multiple tracks? (Java) Note: I don't want to play the MIDI file, just read the messages. Couple ideas: Is it safe to assume there are no note events shorter than the 1/64th note? Or…
worbel
  • 6,509
  • 13
  • 53
  • 63
8
votes
9 answers

MidiUnavailableException in Java?

I'm having some trouble playing MIDI files in Java. What I get is a MidiUnavailableException (MIDI OUT transmitter not available) when I try to play it. My code is standard: try { midiseq = MidiSystem.getSequencer(); midiseq.open(); …
Bai Li
  • 1,108
  • 1
  • 16
  • 25
8
votes
1 answer

AKMIDIListener not receiving SysEx

I am using AudioKit's AKMIDIListener protocol on a class to listen for MIDI messages. This is working fine for standard messages such as Note On, but SysEx messages are not coming through. func receivedMIDINoteOn(noteNumber: MIDINoteNumber,…
Oscar
  • 668
  • 6
  • 12
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
8
votes
1 answer

music21: read MIDI file's BPM and instrument info and write it back to file

I'm trying to implement a code that reads MIDI file and writes it back. I have the following code to parse the duration,pitch,and position. import music21 from music21 import * piece=converter.parse('input.mid') all_parts=[] for part in…
ytrewq
  • 3,670
  • 9
  • 42
  • 71
8
votes
2 answers

How to create a virtual MIDI device

I have to write an application (like a step sequencer or arpeggiator) that sends MIDI note to a generic DAW , so I think that only way to implement such thing is to create a virtual MIDI device that should be recognised as a MIDI input/output…
Kill KRT
  • 1,101
  • 2
  • 17
  • 37
8
votes
3 answers

Midi implementation within .Net

Does anyone have any guidance or recommendations for writing a MIDI-based application in C# Winforms? I have recently bought a new effects pedal that has a full MIDI implementation (or so I'm led to believe) but the manufacturers have seen fit to…
ZombieSheep
  • 29,603
  • 12
  • 67
  • 114
8
votes
6 answers

.NET API for music programming?

In short words I am looking for a .NET translation of JFugue. Update I realize that there is no real .NET alternative for JFugue, the posts bellow are always great as a guideline for one who wants to develop it by his own. Thanks for all of…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
8
votes
4 answers

Using MIDIPacketList in swift

I am looking at some of the examples of midi output using core midi. Specifically this question and this I have code that works based on these in objC and I now want to try to translate that to swift. the line I least understand is this one:…
Thomas
  • 151
  • 1
  • 5
8
votes
1 answer

Creation of MIDI file in Haskell

I would like to create a simple program that will generate MIDI files. No, I don't want to use Haskore, because it is kinda overkill for this project. I think something like this library will be sufficient. What I want to be able to do: create new…
Mark Karpov
  • 7,499
  • 2
  • 27
  • 62
8
votes
2 answers

How to get Exact Time of a MIDI event

I'm trying to read a MIDI file and I want to determine the exact time of a NoteOn event from it in C#. I tried to use absolute time, but the output was something like 256632. What is this number ? This is the line of my code that returns the time…
odyse
  • 340
  • 4
  • 9
7
votes
3 answers

Superposing music tracks in Mathematica & MIDI pedal events

All of the following refers to music/MIDI (SoundNote objects), not sampled sounds. Unfortunately Mathematica doesn't seem to be able to import MIDI. I'm trying to make a simple MIDI importer based on MIDI <-> CSV for single-instrument files…
Szabolcs
  • 24,728
  • 9
  • 85
  • 174
7
votes
1 answer

How to create a nested dictionary from existing dictionary with set and list of tuples

I have parsed a midi file, and I've successfully gotten a dictionary of notes broken up by instrument. An abbreviated example of this is note_dict below, truncated for the purposes of this question. My end goal is to have a nested dictionary that…
Tim
  • 71
  • 3
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
7
votes
3 answers

python synthesize midi with fluidsynth

I can't import fluidsynth. [Maybe there's an better module?] I'm trying to synthesize midi from python or pygame. I can send midi events from pygame. I'm using mingus, and it seemed pyfluidsynth would be good / easiest. I think this means…
ninMonkey
  • 7,211
  • 8
  • 37
  • 66