We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › problems with new macbook pro and proMidi ...
Page Index Toggle Pages: 1
problems with new macbook pro and proMidi ... (Read 1877 times)
problems with new macbook pro and proMidi ...
Jul 19th, 2007, 3:40pm
 
hello everybody,

since i have a new mbp my processing programs with promidi don't work anymore. i always get this message:


printPorts of midiIO
<< inputs: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<< outputs: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
output 0 : Java Sound Synthesizer
<<>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.util.Vector.get(Vector.java:710)

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.util.Vector.get(Vector.java:710)
at promidi.MidiIO.openInput(MidiIO.java:311)
at Temporary_3209_2770.setup(Temporary_3209_2770.java:14)
at processing.core.PApplet.handleDisplay(PApplet.java:1237)
at processing.core.PGraphics.requestDisplay(PGraphics.java:568)
at processing.core.PApplet.run(PApplet.java:1406)
at java.lang.Thread.run(Thread.java:613)

at promidi.MidiIO.openInput(MidiIO.java:311)
at Temporary_3209_2770.setup(Temporary_3209_2770.java:14)
at processing.core.PApplet.handleDisplay(PApplet.java:1237)
at processing.core.PGraphics.requestDisplay(PGraphics.java:568)
at processing.core.PApplet.run(PApplet.java:1406)
at java.lang.Thread.run(Thread.java:613)


can somebody help?
thanks
mobic
Re: problems with new macbook pro and proMidi ...
Reply #1 - Jul 20th, 2007, 6:12pm
 
hey mobic.

have a look here. i think this will solve your problem.
http://www.humatic.de/htools/mmj.htm


Cheers

V.
Re: problems with new macbook pro and proMidi ...
Reply #2 - Jul 21st, 2007, 6:13pm
 
thanks for the help.

i copied the files in my osx-library-folder but it didn't solve the problem. do i have to copy the files also in the processing-program-folder?
Re: problems with new macbook pro and proMidi ...
Reply #3 - Jul 21st, 2007, 8:47pm
 
yes. i just tried the same i somehow promidi doesn't accept my device as input. in the code below i added my normal Java-code for the midi-device-list.
It seems that for some reason proMidi doesnt allow all midi-devices.
So if you only want to use basic midi functions you could easily code it yourself.
Have a look at this site which is really great for the sound basics in java:
http://www.jsresources.org/examples/MidiInDump.html

V.


<code>


import promidi.*;
import javax.sound.midi.MidiDevice;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;

MidiIO midiIO;

void setup(){
 size(128*5,128*5);
 smooth();
 background(0);

 //get an instance of MidiIO
 midiIO = MidiIO.getInstance(this);
 println("printPorts of midiIO");

 //print a list of all available devices
 midiIO.printDevices();
 printMidiDevices();

 //open the first midi channel of the first device
 //  midiIO.openInput("Kenton Killamix Mini",1);
}


public static void printMidiDevices() {
 MidiDevice.Info[] aInfos = MidiSystem.getMidiDeviceInfo();
 for (int i = 0; i < aInfos.length; i++) {
   try {
     MidiDevice device = MidiSystem.getMidiDevice(aInfos[i]);
     boolean bAllowsInput = (device.getMaxTransmitters() != 0);
     boolean bAllowsOutput = (device.getMaxReceivers() != 0);
     System.out.println("" + i + "  "
       + (bAllowsInput ? "IN " : "   ")
       + (bAllowsOutput ? "OUT " : "    ")
       + aInfos[i].getName() + ", " + aInfos[i].getVendor()
       + ", " + aInfos[i].getVersion() + ", "
       + aInfos[i].getDescription());
   }
   catch (MidiUnavailableException e) {
     // device is obviously not available...
     System.err.println(e);
   }
 }
}


</code>
Re: problems with new macbook pro and proMidi ...
Reply #4 - Jul 23rd, 2007, 11:37am
 
nice. this works, but i'm not good in java so maybe you can help me a little bit? i just need the midi notes with pitch and velocity for my project. then i would invite you to a beer next time i'm in barcelona ...
Re: problems with new macbook pro and proMidi ...
Reply #5 - Aug 16th, 2007, 5:07pm
 
somebody is working with a newer mac and promidi? i have the same problems with a powermac dual processor ...

if you're working with a mac and using pomidi, please tell me which mac you have ..
Page Index Toggle Pages: 1