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
0 answers

What does music21.instrument.partitionByInstrument() really do?

I've been working on a music generation model using LSTM and I am a little confused about data preprocessing. I am using the music21 library to process the '.mid' files and I am confused about what is the difference between these two code snippets…
0
votes
1 answer

Issue In Hand Compiled Midi File

I'm trying to learn how MIDI files work, and so I'm trying to hand compile a small MIDI track, writing the bytes myself. Here are all of the bytes I've done so far: /*-----Header-Data----//-------Value-|-Description--------*/ 0x4d, 0x54, 0x68,…
FireTheLost
  • 131
  • 7
0
votes
1 answer

How to Convert music score to MIDI number or pitch notes?

I am curious is it possible to convert scores to notes in codes? For example, convert this image of melody to ['0','C#5', 'G#5', 'F#5', 'E5', 'D#5', 'C#5', 'B5', ]... or convert to [-1, 73, 80, 78, 76, 75, 73, 83]... I know that the way to convert…
Megan
  • 541
  • 1
  • 3
  • 14
0
votes
0 answers

How would I use a coding language preferably C# to get the slider data from Mixerpad software with the sq 5 mixer?

I use a alen and heath sq 5 with the software on a Mac mini. I want to read the slider information from the mixerpad software that I use at the Mac mini and I want to be able to take that data and use that in my code.
0
votes
1 answer

UIButton setImage not updating from non touch action

As a noobie to obj-c, I've been stuck on this issue for a day or two. If anyone could help it would be greatly appreciated. I have an ipad app I am working on with buttons that change images (think 'mute on off' button) to represent and control an…
0
votes
1 answer

Play midi files in google Colab notebook

I want to play a midi file with in the notebook, and I came across the following code: from music21 import midi def playMidi(path): mf = midi.MidiFile() mf.open(path) # path='abc.midi' mf.read() mf.close() s =…
Adi Cohen
  • 23
  • 3
0
votes
0 answers

How to detect a midi message in a byte stream?

I'm having a hard time extracting midi messages from a JavaScript byte stream right now. I am reading data from a device using the Serial Web API (yes, I know the Web Midi API exists, but this does not work in that case and I do not want to use…
Philip
  • 3,486
  • 1
  • 24
  • 37
0
votes
1 answer

Python Pygame.midi get note octave

Have a code that reads what note pressed on the midi: import pygame.midi def number_to_note(number): notes = ['c', 'c#', 'd', 'd#', 'e', 'f', 'f#', 'g', 'g#', 'a', 'a#', 'b'] return notes[number%12] def readInput(input_device): while…
0
votes
1 answer

Can I live capture midi with rtmidi while using Ableton?

I'm creating a pygame that renders midi notes on a grid and I'd like to be able to use the same midi input through Ableton at the same time. Right now I'm using this to capture: inport = mido.open_input(synth_name) msg = inport.receive() Is there a…
nmowery
  • 81
  • 1
  • 1
  • 2
0
votes
1 answer

Set the Modulation Wheel Value programmatically

I'm musician and using a music software which provides a plugin in which I can use some javascript code to edit or create MIDI Data in Real Time. I want to implement a logic that increases the value of the Modulation Wheel when a specific button or…
0
votes
0 answers

An example MIDI Channel Message to change Instruments

Can someone provide an example of a midi channel message that would set the instrument to be a piano? This is how I currently try to set the instrument for the channel, but it doesn't seem to be working: var inMessage =…
N0ctrn
  • 45
  • 5
0
votes
0 answers

Rust Windows crate. MidiInOpen causing STATUS_ACCESS_VIOLATION

I'm trying to read from a MIDI device in windows but running MidiInOpen() causes a (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) Code is as follows: use windows::Win32::Media::Audio; use std::ptr::NonNull; pub struct InstanceData { } extern…
user14948227
0
votes
0 answers

Convert the following codes(MIDIDDSP) to MIDI or wav

I am confused about these codes. Basically, I am trying using MIDIDDSP to synthesis midi file. However, I couldn't find how to convert the following codes to MIDI. The link of this model is Minimal example Here are the simple codes they've provided,…
Megan
  • 541
  • 1
  • 3
  • 14
0
votes
1 answer

C# Memory keeps increasing when firing MIDI-events processed by DryWetMidi

I am currently working with the DryWetMidi package to control the KORG nanoKONTROL2 MIDI board with C#/.Net and I noticed that the memory of my application will increase when I fire a lot of MIDI messages (in other words: when I move the faders a…
0
votes
2 answers

Powershell | Bypassing Syntax Rules Applying to Serial Command

I have a PS script written to apply some basic configuration to a device over a COM connection. After some user input is recorded, it is used to format a minified java string to send to the device over USB. My issue is that powershell is applying…
grelbatron
  • 31
  • 3