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
0
votes
1 answer

How to accurately change tempo for playing midi files of all resolutions?

I have a midi editor app in Java swing that can play back the loaded music. The resolution (ticks per quarter note value) can vary from 24 to 1000, with most midi files being in the higher range. I implemented a feature where the user can set the…
ShokoN
  • 101
  • 1
  • 1
0
votes
2 answers

Is there a way to make midi sounds in my Android app?

I'm trying to make an app that can play different midi files at the same time. The files would not be streaming and I would like to include them in the apk. A maximum of 12 would be played at the same time... Mp3 or a combination of both would also…
EltMrx
  • 37
  • 2
  • 14
0
votes
1 answer

How do I send tempo or timing information to AVAudioUnitMIDIInstrument in Mac OS swift using AVFoundation

I have a Mac OS desktop app which hosts virtual instrument plugins as AVAudioUnitMIDIInstrument. My app is basically a music sequencer. I would like to trigger instruments that use drum loops and/or arpeggiators. This requires sending some sort of…
dmann200
  • 529
  • 4
  • 11
0
votes
1 answer

For loop adding notes to a midi file, toneJS

I'm creating a midi file based on frequencies. I'm using ToneJS (in Node.js) to create the midi file with this code: exports.createMidiFile = (req,res,next) => { // create a new midi file var midi = new Midi() // add a track const track =…
Elna Haim
  • 545
  • 1
  • 5
  • 19
0
votes
1 answer

pygame midi read PC (program change) messages

My goal is to listen to a MIDI to USB adapter that is connected to my guitar pedalboard switcher. When a program change, (PC) message is received, play the appropriate mp2 file. I've tried a number of different Python MIDI modules and pygame has…
pzig98
  • 21
  • 2
0
votes
1 answer

midi | How do I tell when the string sound is Pizzicato (A sort of finger-pinch noise)

first thing - Pizzicato means that you sort of pinch the violin/cello/bass with your fingers and you get more of a guitar-pinching noise instead of a regular violin. When I convert the midi to mp3 using a random program - the program makes this…
Alon
  • 7,618
  • 18
  • 61
  • 99
0
votes
1 answer

Catching and processing multiple keyboard inputs at once

I am developing a Unity game that relies on MIDI input from a piano keyboard, using the DryWetMIDI library. I have to detect when a chord has been played and process the chord as a whole. Currently, my approach is to wait for 0.1 seconds after the…
jintsuyi
  • 15
  • 4
0
votes
0 answers

Cannot change tempo in midi with "Set_Tempo"

I am trying to change a tempo in a midi file with the mido library using the MetaMessage('set_tempo', tempo=tempo, time=tiem) attribute to the tempotrack. When setting the initial tempo to 552528 with time = 0, the bpm is correctly set to 108.59178.…
Ky6000
  • 103
  • 1
  • 9
0
votes
2 answers

AudioKit - Midi - How do I determine the state of a know without events?

Sorry, this may be a dumb question, but I am new to MIDI and no musician - I am trying to figure out if I can use a MIDI Controller for some other control application. I know how to set up the MIDI system and receive MIDI events using AudioKit.midi…
Michael J
  • 145
  • 10
0
votes
0 answers

No Midi receive with Sanford.Multimedia.Midi

I use the Midi Toolkit from Leslie Sanford. I can send midi messages without problems. But I can't receive any message. When I send a "note on" with sendmidi.exe dev "loopMIDI Port2" ch 13 on 13 42 (tool url: https://github.com/gbevin/SendMIDI) I…
hoss
  • 25
  • 3
0
votes
1 answer

MIDI, how to get measures and notes

Many MIDI libraries like mido and pretty_midi provide list of all messages in MIDI files. I am looking for a code to get the list of measures and all notes in each measure. Is there a specific library for calculating beats and measures (bars)?
Mironline
  • 2,755
  • 7
  • 35
  • 61
0
votes
0 answers

Edit messages in midi file without re-encoding

I'm using the mido library. I have a midi file and I want to change its messages. I don't want to encode messages using the Message() function because I already have it encoded in the form: .…
0
votes
1 answer

Convert midi time to bars and beats

I am trying to figure out how to convert from midi time to bars and beats. Here is a sample midi file. If you download that and open the file in a program like GarageBand, you'll see the third track contains four notes in the first bar: Now if you…
duhaime
  • 25,611
  • 17
  • 169
  • 224
0
votes
2 answers

Problem animating Java Swing slider in time with midi sequencer

I'm building a simple drum machine app and wanted to try animating a slider to move in rhythm with the beat to show which 16th note of the bar the drum machine is on. I've set up a sequencer that runs in a 16 beat loop with the javax.sound.midi api.…
NMard
  • 25
  • 7
0
votes
1 answer

Build MIDI merger program in python, with option for recovery

I've tried to merge 2 midi files into one, such that the second midi file will not be heard when playing the output midi file. I've managed to get a result that plays only the first song, but I wonder if there is a way to hide (encrypt) the second…
adsl
  • 123
  • 7