midi

What is the structure of a MIDI file?

旧时模样 提交于 2019-11-27 18:34:32
I want to manually have a function that creates a MIDI file according to users demands, for example. User write 2 patches that contain 8 bars of 4 quarters of A4 (Concert A - 440hz) and C4 (each as a seperated channel) on 120 speed, at velocity 100, instrument piano (01) and patch 49 or whatever. How should the MIDI file look like according to the above. My goal is to learn how to create a function that generates MIDI data, then write everything to a MIDI file. So first I have to understand how to create this function or to understand 'MIDI-file language' so I can write it. Thanks in advance.

Reading MIDI files in Java

喜夏-厌秋 提交于 2019-11-27 17:43:20
I'm trying to read in .MID files to a Java program, and would like to separate each note/chord so as to display them on a UI of some sort. I didn't have much luck using the Sequencer API in Java, and trying to use MidiFileReader directly didn't work for me either. I'll attach the code I used here, if anyone wants to see it: package miditest; import java.io.File; import java.io.IOException; import javax.sound.midi.InvalidMidiDataException; import javax.sound.midi.MidiSystem; import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Sequence; import javax.sound.midi.Sequencer;

Getting input from MIDI devices live (Python)

岁酱吖の 提交于 2019-11-27 15:13:21
问题 I've got a trigger finger (MIDI tablet) and I want to be able to read its input live and make python execute actions depending on the pressed key. I need it for Windows, and preferably working with python 2.5 + Thanks 回答1: PyGame includes a built-in midi module, available for Linux, Windows and MacOS and is very well supported. For example, here is the documentation for pygame.midi.Input: Input is used to get midi input from midi devices. Input(device_id) Input(device_id, buffer_size) Input

generating MIDI in javascript [closed]

江枫思渺然 提交于 2019-11-27 14:19:33
问题 I'd like to generate a sequence of MIDI notes in javascript and then play it. Many plugins support MIDI, but I'm not aware of any supporting "data:" URL. Generating MIDI content is not a big deal - but feeding this content into player is. Anyone knows how this can be done - if not in general, then at least for specific plugin like QuickTime? 回答1: Very neat problem. I've been working a lot lately with base64-encoded images and have regularly been using http://www.greywyvern.com/code/php

Android 6.0 (Marshmallow): How to play midi notes?

删除回忆录丶 提交于 2019-11-27 13:43:20
I'm creating an app that generates live instrument sounds and I'm planning on using the new Midi API featured in Android Marshmallow (version 6.0). I've read the package overview document here http://developer.android.com/reference/android/media/midi/package-summary.html and I know how to generate Midi notes but i'm still unsure: how do I actually play these notes after I've generated their Midi data? Do I need a synthesizer program to play Midi notes? If so, do I have to make my own or is one provided by Android or a 3rd party? I am a novice with Midi so please be as descriptive as possible

Java MIDI - getting data from piano?

南笙酒味 提交于 2019-11-27 13:16:19
问题 I've inherited a Java project that used an old C++ dll to receive MIDI data from a piano connected to the computer. Now that Java has built-in support for MIDI devices, I want to get rid of the legacy C++ dll and just use pure Java. Does Java support receiving data from a piano connected to the computer? I've searched Google for examples to no avail. 回答1: Yes, the JavaSound API can be used to read MIDI data from a MIDI device. JFugue is a Java API for music programming that uses the JavaSound

Simple, Cross Platform MIDI Library for Python [closed]

一笑奈何 提交于 2019-11-27 06:54:43
I want to do build a small app that creates MIDI sounds. I've never dealt with sound in programming so I'd like to start with something that's basic and has good documentation. I want to stick with Python since I'm the most comfortable with it and don't want to overwhelm myself, initially. My time is split about 50/50 between Windows and Ubuntu so something that "just works" on both platforms would be really helpful. Any suggestions? The MIDIUtil Library (hosted here at Google Code) does what you want: write MIDI Files from a pure Python library. Once nice thing about it (and full disclosure:

Does the html5 audio tag encompass .mid (MIDI) unofficially?

自闭症网瘾萝莉.ら 提交于 2019-11-27 06:45:53
问题 It seems clear that officially the html5 audio tag is intended for use with the ogg format. Does the html5 audio tag encompass .mid (MIDI) unofficially? 回答1: Updates: This is a somewhat old question but it is still highly ranked on Google so here are some updates to the answers above - standards and tools that may have not been available when the question was asked but may be useful to people who find this question today: Web MIDI API (this is currently a W3C Editor's Draft from December 26,

Reading notes from MIDI file using NAudio

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:24:43
问题 Task is to get all notes and their time from MIDI file using NAudio library. So far I get all notes from file but I can't get their time. Note noteOn = new Note(); //custom class Note MidiFile midi = new MidiFile(open.FileName); List<TempoEvent> tempo = new List<TempoEvent>(); for (int i = 0; i < midi.Events.Count(); i++) { foreach (MidiEvent note in midi.Events[i]) { TempoEvent tempoE; try { tempoE = (TempoEvent)note; tempo.Add(tempoE); } catch { } if (note.CommandCode == MidiCommandCode

Getting signals from a MIDI port in C#

会有一股神秘感。 提交于 2019-11-27 03:37:22
问题 I bought a MIDI keyboard for my birthday. I found a program (MidiPiano) that gets signals from the MIDI input and translates it into music, but I'd rather like to write one myself. Where can I find documentation for doing such a task? The MIDI protocol is well documented, but not the MIDI ports. I checked two projects from CodeProject (Project MIDI and C# MIDI Toolkit), but spent many hours without getting close to my goal. A reference to a project will be fine, but please, only C#. 回答1: You