midi

Reading a MIDI file in Python

给你一囗甜甜゛ 提交于 2019-12-07 00:18:15
问题 I want to be able to read events from a MIDI file in Python. I have looked for libraries, but can't find one that works with my MIDI file in windows. I do not need to do anything real time, and just want a simple library that gives me events and times. Would it be easier to write one for myself? Any help would be appreciated. 回答1: the structure of a midi file is quite simple. if you can't find a ready-made library (i am not aware of any) and you only need events and time, i suggest you try

MidiUnavailableException in Java?

我只是一个虾纸丫 提交于 2019-12-06 23:52:27
问题 I'm having some trouble playing MIDI files in Java. What I get is a MidiUnavailableException (MIDI OUT transmitter not available) when I try to play it. My code is standard: try { midiseq = MidiSystem.getSequencer(); midiseq.open(); midiseq.setSequence(MidiSystem.getSequence(sound1)); midiseq.setLoopCount(Sequencer.LOOP_CONTINUOUSLY); midiseq.start(); } catch (Exception e) {e.printStackTrace();} midiseq is a Sequencer ; sound1 is an InputStream . This code works on several other computers,

how to play midi file in android use fmod

蹲街弑〆低调 提交于 2019-12-06 14:15:21
问题 I am trying to play midi file using fmod. But there is an error says that :a resource that the plugin requires cannot be found,(ie the DLS file for MIDI playback) I have searched results for problems like this,and referred to the fmod.h files. It seems that I need a file named "gs_instrument.dls" but I cannot find it in my mac as well as the android simulator filesystem. I have also searched the resources in the web,no result either. So what should I do if I want to play midi file in android

Update list of Midi Devices in Java

不羁岁月 提交于 2019-12-06 13:17:03
I work on a MIDI-based project in Java and struggle to refresh the list of Midi Devices. As far as i know MidiSystem.getMidiDeviceInfo(); should give me an Info[] Array. Nothing happens for me however. The Objects inside the Array stay the same when new devices are plugged in or out and so is it's length. Searching Stackoverflow brought me to this 6 year old question . One of the comments suggests, that being on OSX/macOS might be the issue. I haven't tried my program on Windows or Linux yet, but it should work on OSX/macOS anyways. Another comment suggests setting the cache time to something

Browsers in 2013 with Web MIDI API?

一个人想着一个人 提交于 2019-12-06 09:53:51
Does anybody knows if there's a browser whith Web MIDI support? ... I've tried the samples on http://webaudio.github.io/web-midi-api/ but they throw me an error that my navigator has not such properties. Im working on google-chrome and firefox. If, there's no browsers that support MIDI, when do u estimate we will have one, maybe in the next 2 years? According to this posting (dated June 28th 2013), "initial experimental support" for Web MIDI is now available in Chrome Canary. As of now, there are no browsers that support the Web MIDI API yet. First off, the spec isn't finalized yet and there

How to load custom DLS or SoundFonts to Android MIDI

橙三吉。 提交于 2019-12-06 02:55:35
问题 I have an application that plays MIDI files through the SONiVOX EAS library. Is it possible to load my own DLS or SoundFont wavetables into the player and have the library use these sounds for MIDI playback? 回答1: Ok, I change my answer completely, as the Jet Creator obviously wasn't what you were looking for. I took a look into the eas library, and found, (in eas.h) /*---------------------------------------------------------------------------- * EAS_LoadDLSCollection() *----------------------

Playing note with pygame.midi

最后都变了- 提交于 2019-12-06 01:42:34
问题 I'm trying to play a sound with the pygame.midi module. Here is the code I use : #!/usr/bin/env python import pygame.midi import time pygame.midi.init() print pygame.midi.get_default_output_id() print pygame.midi.get_device_info(0) player = pygame.midi.Output(0) player.set_instrument(0) print 'Playing...' player.note_on(64) time.sleep(1) player.note_off(64) print 'Played' pygame.midi.quit() I've found similar codes while searching for exemples, here is the output : 0 ('ALSA', 'Midi Through

Soundfonts on Android

筅森魡賤 提交于 2019-12-05 20:38:23
I'm having trouble figuring out how to use soundfonts on android (that have a .sf2 extension). I looked into JET Creator but it seems really complicated for simply playing soundfonts. I don't need to have interactive music as provided by JET, I just need to be able to play different notes of the soundfont on command when necessary. Any advice/suggestions? This is not possible. You can playback midi files with mediaplayer, but you'll have to generate them yourselves, and you cannot supply a soundfont to it. 来源: https://stackoverflow.com/questions/6006363/soundfonts-on-android

export midi with sound fonts on iOS

China☆狼群 提交于 2019-12-05 20:14:29
Is it possible to export a midi sequence with soundfonts assigned to them as a .wav file? If so, can anyone put me in the right direction? I'm currently using MIKMIDI , and I haven't run into any example that does that so far. MIKMIDI doesn't include the ability to do this without implementing most of it yourself. That said, it is possible. In essence, you need to create your own Core Audio graph including a MIDI synthesizer unit. Then, in the render callback for the instrument unit, you pull events out of the MIKMIDISequence based on timestamps calculated using the AudioTimeStamp and number

CoreMIDI/PGMidi Virtual midi error in iOS6

社会主义新天地 提交于 2019-12-05 17:16:00
问题 Faced with two errors. This code worked in iOS 4 and 5, but after update to 6, it is not working ( I found following, but don't know how to fix it in the code. Beginning in iOS 6, apps need to have the audio key in their UIBackgroundModes in order to use CoreMIDI’s MIDISourceCreate and MIDIDestinationCreate functions. Without the key set, these functions will return kMIDINotPermitted (-10844). 2012-09-23 03:40:04.773 MidiStudio[1017:907] Error (Create MIDI virtual source): -10844:Error Domain