midi

Get note data from MIDI file

走远了吗. 提交于 2019-12-20 10:10:54
问题 Is there a way to get the note data from a MIDI file? That is, I want to break down the MIDI file into its constituent parts so they are in the form of a unique word (or any other data type). What I want to do in the end is take in a MIDI file and find patterns in the notes. Get in each note, find it's frequency (of being played) and note how likely other notes are to be played after it. It would be nice to do this in C/C++, but any language would be fine. 回答1: Nik Reisman - sorry, but I don

Terminate Java Midi output

我怕爱的太早我们不能终老 提交于 2019-12-20 04:15:34
问题 I wrote this short program to learn the javax.sound.midi system. This is using Java 6. The output is as expected (a series of System.out.println() strings that are triggered by Sequencer events) but the problem is, after the last sound effect, the program stays in a loop and doesn't terminate as expected. Can anyone tell how to fix this? Thanks for your help: import javax.sound.midi.MidiEvent; import javax.sound.midi.ShortMessage; import javax.sound.midi.InvalidMidiDataException; import javax

What is the 0x43 MIDI event?

跟風遠走 提交于 2019-12-19 10:52:57
问题 I'm trying to write a MIDI parser, but I'm reaching a MIDI event that isn't documented in the official documentation (namely http://www.midi.org/techspecs/midimessages.php). In one of the MIDI files that I have, I notice that immediately after a note-on event of 81 70 90 3c 00 , I get the following bytes: 00 43 1e . However, I have not seen any documentation about 0x43 acting as a MIDI event identifier. How should I interpret 0x43 , and where can I find more information about that? Edit: The

How to get Exact Time of a MIDI event

谁说胖子不能爱 提交于 2019-12-18 08:47:56
问题 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 : (note as NoteOnEvent).AbsoluteTime 回答1: A MIDI file only contains incremental times. Included as a variable length value between 1 and 4 bytes before each MIDI event. The library you are using is being helpful in providing you with the AbsoluteTime

How to control the MIDI channel's volume

独自空忆成欢 提交于 2019-12-18 06:54:17
问题 I have this code: Synthesizer synthesizer = MidiSystem.getSynthesizer(); synthesizer.open(); Instrument[] instrument = synthesizer.getDefaultSoundbank().getInstruments(); synthesizer.loadInstrument(instrument[29]); MidiChannel[] channels = synthesizer.getChannels(); MidiChannel channel = channels[1]; channel.programChange(29); channel.noteOn(noteNumber, 127); Teszthang.sleep(2000); channel.noteOff(noteNumber); so this is an example, to play a sound in max volume (127) for 2 seconds. but i

MIDI player/synthesizer library for the iPhone

久未见 提交于 2019-12-18 01:31:12
问题 Does anyone know if there is a free/cheap MIDI player/synthesizer library that I can incorporate into my iPhone application? As I understand it the iPhone doesn't have native support for MIDI playback. To work around this limitation I've created a bank of .caf sound samples that I playback myself but I'd really like to improve the implementation and use MIDI if possible. Any advice would be greatly appreciated. 回答1: Since 10 october of 2011, that is since iOS5, Apple has started delivering

wav-to-midi conversion

血红的双手。 提交于 2019-12-17 22:53:44
问题 I'm new to this field - but I need to perform a WAV-to-MIDI conversion in java. Is there a way to know what exactly are the steps involved in WAV-to-MIDI conversion? I have a very rough idea as in you need to; sample the wav file, filter it, use FFT for spectral analysis, feature extraction and then write the extracted features on to MIDI. But I cannot find solid sources or papers as in how to do all that? Can some one give me clues as in how and where to start? Are there any Open Source APIs

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

ぃ、小莉子 提交于 2019-12-17 18:59:31
问题 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

Simple, Cross Platform MIDI Library for Python [closed]

感情迁移 提交于 2019-12-17 08:48:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . 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

AKMIDICallbackInstrument implementation issue

℡╲_俬逩灬. 提交于 2019-12-14 01:01:04
问题 Updating to the latest version of AudioKit left me changing several AKCallbackInstrument instances over to the new AKMIDICallbackInstrument class which now incorporates the former as legacy behavior. When doing so however, I ran into this weird error. Maybe a Swift nuance I am missing? let callback = AKMIDICallbackInstrument() { status, note, velocity in if status == .noteOn { //errors out // do something } } Comparing status to .noteOn errors out with: "Expression type 'Bool' is ambiguous