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 › Creating a FileLoader for ProMIDI
Page Index Toggle Pages: 1
Creating a FileLoader for ProMIDI (Read 460 times)
Creating a FileLoader for ProMIDI
May 13th, 2009, 3:05am
 
hello there,

I'm trying to create a midi file loader for creating a Song instance from a .Mid file.

The problem I have is in the promidi.MidiEvent, every constructor are either private, or protected. I want to make one of theses constructor public. But I don't absolutely know how to recreate the promidi.jar file, form the modified .java files in the promidi/promidi folder.

I give you the things I tried:

First, I unzipped the promidi.jar file into a folder, to acces to the class files. It gives me a folder with the promidi and META-INF subfolders. The promidi subfolder contains the original .class files.

Then I use javac to recompile the MidiEvent.java into a new MidiEvent.class file.
Then I move this new Midievent.class into the class subfolder, and it overwrite the original one

but now I don't know how to recreate the promidi.jar file. I tried the ubuntu "create archive" system, but the .jar file I obtain is only 43k, and the old one was 89ko. Quite strange.

Could anybody explain me how to recreate the jar file? And, of course, if the way i modify the MidiEvent.class file is wrong, I would aggre some help too Smiley

EDIT : I tried the following command:
jar cvfm promidi2.jar promidi/META-INF/MANIFEST.MF -C promidi/promidi/ .
it seems to work, but the promidi2.jar file is always 43ko sized...

Thanks a lot

PS : I'm french, sorry if my english is hard to understand Smiley Please tell me if you don't understand qhat I'm talking about.
Could you help me?
Page Index Toggle Pages: 1