midi

Why doesn't this simple CoreMIDI program produce MIDI output?

老子叫甜甜 提交于 2019-11-28 17:36:08
问题 Here is an extremely simple CoreMIDI OS X application that sends MIDI data. The problem is that it doesn't work. It compiles fine, and runs. It reports no errors, and does not crash. The Source created becomes visible in MIDI Monitor. However, no MIDI data comes out . Could somebody let me know what I'm doing wrong here? #include <CoreMIDI/CoreMIDI.h> int main(int argc, char *args[]) { MIDIClientRef theMidiClient; MIDIEndpointRef midiOut; MIDIPortRef outPort; char pktBuffer[1024];

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

一世执手 提交于 2019-11-28 12:05:09
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? rsp 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, 2012 - ie. today - so it may change) MIDI.js - playing MIDI with JavaScript jasmid - MIDI synthesis with

Getting signals from a MIDI port in C#

删除回忆录丶 提交于 2019-11-28 10:14:46
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#. You need to wrap all the needed functions listed at http://msdn.microsoft.com/en-us/library/dd757277(VS.85).aspx

Swift UnsafeMutablePointer<Unmanaged<CFString>?> allocation and print

放肆的年华 提交于 2019-11-28 09:26:58
I'm new to swift and I have some difficulties to deal with pointers of unmanaged CFString (or NSString). I'm working on a CoreMIDI project that implies usage of UnsafeMutablePointer?> as you can see in this function : func MIDIObjectGetStringProperty(_ obj: MIDIObjectRef, _ propertyID: CFString!, _ str: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus My problem is that I want to allocate a buffer to receive the content of the property (_str) then call the function above, and finally print the content in the console by using println. At the moment I wrote this : // Get the first midi

MIDI music support in HTML5

ε祈祈猫儿з 提交于 2019-11-28 07:02:20
问题 Now playing midi in html is supported with javascript and windows media player/quicktime browser plugins. I'm wondering if there are any news about html5 is going to support playing midi with audio tag in the future ? 回答1: If you want to play midi files, you can see how they did it here: http://mudcu.be/midi-js/. The example page makes use of MIDI.js. Note that it even uses soundfonts, all via scripting. Pretty neat. If you're more interested in controlling midi devices, or having midi

Converting MIDI ticks to actual playback seconds

喜你入骨 提交于 2019-11-28 06:02:31
I want to know how to convert MIDI ticks to actual playback seconds. For example, if the MIDI PPQ (Pulses per quarter note) is 1120, how would I convert it into real world playback seconds? The formula is 60000 / (BPM * PPQ) (milliseconds). Where BPM is the tempo of the track (Beats Per Minute). (i.e. a 120 BPM track would have a MIDI time of (60000 / (120 * 192)) or 2.604 ms for 1 tick. If you don't know the BPM then you'll have to determine that first. MIDI times are entirely dependent on the track tempo. You need two pieces of information: PPQ (pulses per quarter note), which is defined in

Java Midi in Mac OSX Broken?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 04:10:25
问题 I'm trying to play midi within a browser, and have been using a Java Applet that works just fine on PCs. Its extremely unreliable on OSX, so I wrote a simple test case that exhibits the same problem: import javax.sound.midi.*; import java.io.InputStream; import java.io.IOException; import java.io.FileInputStream; import java.io.FileNotFoundException; public class MidiPlayer { public static void main(String[] args) { try { Sequencer sequencer = MidiSystem.getSequencer(); if (sequencer == null)

Need a library that generates WAVE from Midi

人盡茶涼 提交于 2019-11-28 01:19:23
问题 I have about 80 compositions written in MIDI and I want to convert them in to WAVE using a sound library. So they can be played on all computers and sound the same. Is there a library that can automate this? Preferably in C#, but other programming languages are fine too. 回答1: This is what's called a Soft Synth, you will also need a set of instrument samples if you want them the sound the same on all machines. You may find that you will save memory if you just convert them all to wave files

Best way to play MIDI sounds using C#

南笙酒味 提交于 2019-11-27 22:02:44
I'm trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C# . One of the issues I'm running into is playing the midi files that are used to represent the metronome "clicks". I've found a few articles online about playing MIDI in .NET, but most of them seem to rely on custom libraries that someone has cobbled together and made available. I'm not averse to using these, but I'd rather understand for myself how this is being done, since it seems like it should be a mostly trivial exercise. So, am I missing something? Or is it just

Java getting input from MIDI keyboard

℡╲_俬逩灬. 提交于 2019-11-27 18:52:53
I have designed my own synthesizer in java and I now want to connect it with a midi keyboard. My class below searches through all the midi devices that have transmitters. It successfully finds my midi keyboard. I add my own receivers to each transmitter for each device so that it should pick up everything possible. From reading all the help documents and java doc I know that a Transmitter sends MidiEvents to a Receiver which then handles them with the send method. So I wrote my own inner class implementing Receiver and just used a println statement to check if there was anything detected at