midi

Add MIDI Events to Clock - Java

和自甴很熟 提交于 2019-12-12 04:59:54
问题 I am creating a simple MIDI application in C# with an open source library that allows the user to specify a channel, pitch and velocity and add them to a Clock. This clock can then play all the notes in the sequence that they were added. Everything works great and now I am in the process of creating a Java version of the application, the only trouble I seem to be having is that I can't find any simple tutorial or explanation of how the clock system works within MIDI Java. Does the Clock exist

enable android-midi-lib channels

流过昼夜 提交于 2019-12-12 04:35:44
问题 I have downloaded https://code.google.com/p/android-midi-lib/ in an attempt to play solid strings sounds for long durations. I would like to understand how to use MIDI channels other than the default grand piano. Channels should be the answer. Changing them doesn't seem to have an effect. Do all 16 channels sound like a grand piano in Android? Or am I missing something?!? I have adapted the example file write routine from the referenced project. I have tried 5 MIDI channels. They all sound

Get ID from MIDI devices in C++

 ̄綄美尐妖づ 提交于 2019-12-12 04:14:29
问题 I'm a musician and a programmer and would like to create my own program to make music. I'll start with a console application in C++ before I make a GUI. I'm quiet new to C/C++ and know how to make a basic console application and have read about the Win32 API. I was looking into MSDN for multimedia in Win32 applications and I found a lot of functions for MIDI: http://msdn.microsoft.com/en-us/library/dd798495(VS.85).aspx I can receive how many MIDI devices are plugged in this way: #include

MIDI Song with CC

[亡魂溺海] 提交于 2019-12-12 03:16:37
问题 Following this Midi player and wanted to add a Custom Control (CC) to reduce Channel 0 and 1 volume to 10% using ShortMessage: http://www.jsresources.org/examples/MidiPlayer.html I find it didn't reduce the volume right after the midi song start playing. ShortMessage volMessage = new ShortMessage(); for(int i=0;i<2;i++) { try{ volMessage.setMessage(ShortMessage.CONTROL_CHANGE,i, 7, 10); } catch(InvalidMidiDataException e) {} midiReceiver.send(volMessage,-1); } Has anyone done using

Virtual MIDI on Android - possible?

一笑奈何 提交于 2019-12-12 02:52:34
问题 Atm I use the kshoji USB-MIDI-Driver to send MIDI data to a USB MIDI device. But I can not send MIDI data to another app on the same device. I'm looking for a Android solution similar to virtual MIDI ports on Linux, iOS/OS x or the Windows loopBe1 driver. Is it possible to write my data directly to the Input of a connected MIDI interface and other apps read this? (Not the best solution, because the user will need at least one hardware MIDI device). Or is it possible to create an virtual USB

OSX Core MIDI- Calling MIDIPacketListAdd from NSTimer

岁酱吖の 提交于 2019-12-12 01:52:20
问题 I'm sending a string of MIDI packets using MIDIPacketListAdd. I want to change the packets dynamically during playback, so I'm using a NSTimer to add each packet before the scheduled time the packet should go out. The code works perfectly, the address of the current packet is updated correctly, I have verified that all the data is correct. However, no MIDI data is being sent when MIDIPacketListAdd is called from the timer. I add the first two packets before starting the timer to make sure

JFugue 5 external midi device

那年仲夏 提交于 2019-12-12 01:27:05
问题 Been trying for a long time to send a sequence to a midi device with jFugue 5: MusicReceiver device = getDeviceByName("name"); Player player = new Player(); Pattern pattern = new Pattern("A"); device.sendSequence(player.getSequence(pattern)); Can't go beyong "Unhandled exception type MidiUnavailableException" on "device.sendSequence" . static MidiDevice.Info getDeviceInfoByName(String name) { for (MidiDevice.Info info : MidiSystem.getMidiDeviceInfo()) { if (info.getName().equals(name)) {

Java: Embedding Soundbank file in JAR

女生的网名这么多〃 提交于 2019-12-11 12:52:56
问题 If I have a soundbank stored in a JAR, how would I load that soundbank into my application using resource loading...? I'm trying to consolidate as much of a MIDI program into the jar file as I can, and the last thing I have to add is the soundbank file I'm using, as users won't have the soundbanks installed. I'm trying to put it into my jar file, and then load it with getResource() in the Class class, but I'm getting an InvalidMidiDataException on a soundbank that I know is valid. Here's the

pygame.midi.MidiException: 'Device id invalid, out of range.'

拥有回忆 提交于 2019-12-11 12:51:21
问题 I'm on Mac OSX Yosemite 10.10.5 and I'm trying to play midi sounds with pygame.midi with this code: import pygame.midi pygame.midi.init() print pygame.midi.get_default_output_id() # -1 print pygame.midi.get_device_info(0) # None player = pygame.midi.Output(0) And I get this output: -1 None Traceback (most recent call last): File "midi.py", line 11, in <module> player = pygame.midi.Output(0) File "/Library/Python/2.7/site-packages/pygame/midi.py", line 414, in __init__ raise MidiException(

Are there any advantages of making the method makeEvent() static?

你离开我真会死。 提交于 2019-12-11 11:16:02
问题 package hf; import javax.sound.midi.*; public class BeatBox1 { public static void main(String[] args) { BeatBox1 boom = new BeatBox1(); boom.go(); } public void go() { try { Sequencer player = MidiSystem.getSequencer(); player.open(); Sequence seq = new Sequence(Sequence.PPQ,4); Track track = seq.createTrack(); for(int i = 5;i<125;i+=5) { track.add(makeEvent(144,i,i)); track.add(makeEvent(128,i,i+2)); } player.setSequence(seq); player.start(); } catch(Exception e) { System.out.println(