|
Author |
Topic: midilibrary for processing available (Read 10302 times) |
|
tex
|
midilibrary for processing available
« on: Aug 6th, 2004, 10:15pm » |
|
Hi I coded a midi library for processing. My focus was to receive MidiData to be able to synchronize Processing to music via midi and use it for live visuals. Midiout is also included but not yet testet. Download it here: http://www.tex-breakz.com/promidi.zip The source is also included so feel free for improvements and addons. I have nearly finnished MidiFile support, but how is possible to get files from the data folder of the sketch?
|
|
|
|
tex
|
Re: midilibrary for processing available
« Reply #2 on: Aug 7th, 2004, 9:38am » |
|
Well i know about loadBytes and loadStrings but how can i reach the folder from a class in my library. I tried it with: this.getClass().getResource(""); gave me the processing/lib/build folder System.getProperty("user.dir"); gave me the processing folder So how can I get the data folder of the sketch? I thought this would be the best place for files. Otherwise I tried it by using processing/midi what worked.
|
|
|
|
fjen
|
Re: midilibrary for processing available
« Reply #3 on: Aug 15th, 2004, 2:26pm » |
|
hi tex, everything inside the data-folder is included into the .jar (unzip it to check). ..so actually you should be able to get things just using their file-names. /F btw. you can go (just like with html) up using ../ so doing (from inside processing/lib/build/) "../../sketchbook/sketchname/data/filename.txt" should get you where you want ...
|
« Last Edit: Aug 15th, 2004, 10:52pm by fjen » |
|
|
|
|
bsr
|
Re: midilibrary for processing available
« Reply #4 on: Aug 15th, 2004, 4:05pm » |
|
theres a few wrong links in the documentation.
|
http://hippocamp.net
|
|
|
bsr
|
Re: midilibrary for processing available
« Reply #5 on: Aug 15th, 2004, 4:12pm » |
|
also when running the example code i get 'No field named "test" was found in type "Temporary blah blah". However there is an accessible field "TEXT" whose name closely matches the name "test".
|
http://hippocamp.net
|
|
|
tex
|
Re: midilibrary for processing available
« Reply #6 on: Aug 15th, 2004, 8:43pm » |
|
http://www.tex-breakz.com/promidi.zip New fixed documentation. Sorry for the mistakes. Now it should be correct.
|
|
|
|
bsr
|
Re: midilibrary for processing available
« Reply #7 on: Aug 15th, 2004, 8:50pm » |
|
wicked, i've been wanting to use p5 with midi for ages. look forward to playing with it.
|
http://hippocamp.net
|
|
|
bsr
|
Re: midilibrary for processing available
« Reply #8 on: Aug 16th, 2004, 3:38pm » |
|
still getting an error: Output 1: Microsoft MIDI Mapper Output 2: Microsoft GS Wavetable SW Synth javax.sound.midi.InvalidMidiDataException: channel out of range: 48 at javax.sound.midi.ShortMessage.setMessage(ShortMessage.java:301) at MidiOut.setMidiOutData(MidiOut.java:8 at MidiOut.setNoteOff(MidiOut.java:105) at Temporary_9827_8278.setup(Temporary_9827_8278.java:11) the code will run, but i get an error, it's with the midi out example, can only seem to get it to trigger the internal microsoft synth. no other apps... but that problem may be my own midi settings, will look into it.
|
http://hippocamp.net
|
|
|
tex
|
Re: midilibrary for processing available
« Reply #9 on: Aug 16th, 2004, 9:15pm » |
|
Okay once again my fault. It was a mistake in the documentation, i uploaded a corrected version so try it. I also updated the jar file, in case of an error you now get a better description of the mistake. http://www.tex-breakz.com/promidi.zip I tried the examples and they worked on my windows pc with all available outs. I have the internal soundcard midimapper and softsynth out and two further midiouts from my additional soundcard. To trigger other apps you have to use a tool like midiyoke. I tried it and it worked fine in both directions. http://www.midiox.com/index.htm?http://www.midiox.com/myoke.htm
|
|
|
|
REAS
|
Re: midilibrary for processing available
« Reply #10 on: Aug 17th, 2004, 7:17am » |
|
tex, if you make a small webpage or site for the midi library, i'm happy to link it from the libraries page in the reference section of the site.
|
|
|
|
bsr
|
Re: midilibrary for processing available
« Reply #11 on: Aug 17th, 2004, 2:41pm » |
|
sorted. that midi yoke works a treat, thanks for the pointer. now to try and make something...
|
http://hippocamp.net
|
|
|
mtr
|
Re: midilibrary for processing available
« Reply #12 on: Sep 10th, 2004, 6:39pm » |
|
Hi, Can anyone tell me how I can change the instrument/programme for the midi output? I've been playing about with the values on setController() but without any luck. Thanks.
|
|
|
|
amnesie
|
Re: midilibrary for processing available
« Reply #13 on: Dec 13th, 2004, 1:12pm » |
|
proMIDI doesn't seems to work for me... i'm using processing under MacOS X. when i start the example, it loads, BApplet lauches but it doesn't seem to work and i've got this message : java.lang.ArrayOutOfBoundsException: Array index out of range: 1 at java.util.vector.get(Vector.java:713) at MidiIn.openInput(MidiIn.java:54) at Temporary_6656_2881.setup(Temporary_6656_2882.java: :?
|
|
|
|
tex
|
Re: midilibrary for processing available
« Reply #14 on: Dec 13th, 2004, 4:59pm » |
|
You should make sure that you use a Midi device number that is available. Try: midiIn = new MidiIn(); midiIn.showAvailableInputs(); this should print you a list with all available inputs. For example: Input 1: MIDI Yoke NT: 1 Input 2: MIDI Yoke NT: 2 Input 3: MIDI Yoke NT: 3 Input 4: MIDI Yoke NT: 4 Input 5: MIDI Yoke NT: 5 Input 6: MIDI Yoke NT: 6 Input 7: MIDI Yoke NT: 7 Input 8: MIDI Yoke NT: 8 Now take the inputnumber you need -1 to open the port. In this case to open input 2 you have to type: midiIn.openInput(1); By the way there seem to be some problems on OSX and promidi, i hope i can fix them. Hope that helps otherwise let me know.
|
|
|
|
|