Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - AGP

#1576
Support / Re: Midi Volume (Not jPCT But Java)
February 04, 2009, 02:03:21 AM
Thanks for your help, pal, but as yours hasn't worked for me either, I'm going to assume that it's my hardware (or maybe fact that I'm running the Windows 7 beta). But moving the start() call up was a good suggestion.
#1577
Support / Re: Midi Volume (Not jPCT But Java)
February 03, 2009, 10:31:48 PM
By the way, I assume your CHANGE_VOLUME is 7. If not what is it?
#1578
Support / Re: Midi Volume (Not jPCT But Java)
February 03, 2009, 10:07:21 PM
Have a look at mine. It's no different than yours as far as I can tell.

An observation: wouldn't the following code (your code) always yield true for the first one (or false for both, but never true for the second)? You would have to flip that test to make sure either can be true.
        if( synthesizer != null ) {
...
        }
        else if( sequencer != null && sequencer instanceof Synthesizer){
...
        }
#1579
Support / Midi Volume (Not jPCT But Java)
February 03, 2009, 05:48:13 PM
I've read everything on the subject that I could find by searching Google. Figured somebody here might know. I cannot, for the life of me, change the volume of the midi playback in my program. The following is my code. The last part (before the call to start()) is my attempt at discovering which Synthesizer is attached to the Sequencer. And the very last nested loop was an attempt to change everyone's volume. By the way, if my test for synthesizer.getDefaultSoundbank() == null is valid, I'm using the software synthesizer on my computer.

        private void playMidi(String fileName) {
try {
     midiPlayer = MidiSystem.getSequencer(true);
     Synthesizer synthesizer = MidiSystem.getSynthesizer();
     midiPlayer.open();
     synthesizer.open();
     Transmitter transmitter = midiPlayer.getTransmitter();

     if (synthesizer.getDefaultSoundbank() == null) {//MEANING "IF USING HARDWARE (NOT JRE) SYNTHESIZER"
transmitter.setReceiver(MidiSystem.getReceiver());//THIS IS RIGHT FOR HARDWARE
System.out.println("Hardware synthesizer!");
     }
     else {
transmitter.setReceiver(synthesizer.getReceiver());//SYNTHESIZER.GETRECEIVER() IS RIGHT FOR SOFTWARE

System.out.println("Software synthesizer in use!");
     }

     midiPlayer.setSequence(MidiSystem.getSequence(new File(fileName)));

     ShortMessage volumeMessage = new ShortMessage();
     int numberOfChannels = synthesizer.getChannels().length;
     for (int i = 0; i < numberOfChannels; i++) {
volumeMessage.setMessage(ShortMessage.CONTROL_CHANGE, i, 7, 5); //7 IS MASTER VOLUME CONTROLLER, 5 IS VOLUME BETWEEN 0-127
transmitter.getReceiver().send(volumeMessage, -1);
     }
System.out.println("Is the sequencer an instance of Synthesizer? "+(midiPlayer instanceof Synthesizer));

     MidiDevice device = MidiSystem.getMidiDevice(midiPlayer.getDeviceInfo());
     java.util.List<Transmitter> transmitters = device.getTransmitters();
     Transmitter[] transmitterArray = new Transmitter[transmitters.size()];
     transmitterArray = transmitters.toArray(transmitterArray);

for (int y = 0; y < transmitterArray.length; y++) {
for (int x = 0; x < 16; x++) {
volumeMessage.setMessage(ShortMessage.CONTROL_CHANGE, y, 7, 5); //7 IS MASTER VOLUME CONTROLLER, 5 IS VOLUME BETWEEN 0-127
transmitterArray[y].getReceiver().send(volumeMessage, -1);
}
}

     MidiChannel[] channels = synthesizer.getChannels();
     for (int i = 0; i < channels.length; i++){
channels[i].controlChange(7, 5);
System.out.println("Can we lower the volume? "+(channels[i].getController(7)!=0));}

     midiPlayer.start();
}
catch (Exception e) {System.out.println("Midi File Error: "+e.getMessage());}
#1580
Support / Re: Md5 Importer
February 01, 2009, 07:16:48 PM
I've got a really kickass MD2 exporter for MAX named QTip. I've e-mailed the developer a few times, and he's very cool. The exporter costs (I think) 20 bucks, and it works perfectly with jPCT's importer. So, any animated model you can find that you could import into MAX you could export to MD2 using QTip. Works for me.
#1581
Support / Re: Okino Website Claims 3DS Exports Cameras
February 01, 2009, 07:06:57 PM
Thank you, C3R14L.K1L4 and Egon for picking this up without me. I've been spending way too much to buy Okino's exporter! I've got my fingers crossed that Egon will find a way.
#1582
Support / Re: Okino Website Claims 3DS Exports Cameras
January 16, 2009, 03:40:09 AM
As far as I can tell, the only file format supported by jPCT that stores camera data is 3ds. Give me until Saturday and I'll get PolyTrans so I can send you a model with the camera data. And thanks again.
#1583
Support / Re: Okino Website Claims 3DS Exports Cameras
January 15, 2009, 12:31:02 AM
Is the following link to a PRJ file the same thing as a 3DS? It has both cameras and lights, and it looks like pretty much the same thing to me.

http://wolf359a.anet-stl.com/mesh/xwing.zip
#1584
Support / Re: Okino Website Claims 3DS Exports Cameras
January 12, 2009, 09:49:40 PM
Sorry about that, pal. Get better soon.
#1585
Support / Re: Okino Website Claims 3DS Exports Cameras
January 10, 2009, 11:28:19 PM
Do you want the MAX scene itself? Because I re-sent you the 3DS two days ago. But with the MAX scene you could export via other 3DS exporters (like Okino's).
#1586
Support / Re: Okino Website Claims 3DS Exports Cameras
January 09, 2009, 04:18:29 PM
E-mailed you a screenshot. Thanks again.
#1587
Support / Re: Okino Website Claims 3DS Exports Cameras
January 09, 2009, 03:13:57 PM
E-mailed a 3DS of a sheriff sitting down and a camera placed in front of him to you.

I'm not sure what you mean by "is it possible to get the camera settings in MAX in a dialog" but the coordinates for its position are -0.203, -22.073, 6.882. Thanks again, buddy.
#1588
Support / Re: Okino Website Claims 3DS Exports Cameras
January 09, 2009, 02:20:29 AM
No, not just to save time or formultiple views. My background, in this case, is 2D. Several objects on the foreground are 3D. Plus, there's a 3D plane on which the characters walk. But these object won't line up perfectly unless the camera is the exact same way. But there are differences in apperture and other things that just makes this impossible to do manually. I've tried everything. I come close to matching the cameras, but coming close is not nearly enough.
#1589
Support / Re: Camera matching Object3d Z Axis
January 08, 2009, 10:04:50 PM
I'm not the one who started the thread. Just trying to help him. And no, no problem. It works great.
#1590
Support / Re: Okino Website Claims 3DS Exports Cameras
January 08, 2009, 09:57:24 PM
I'm thinking a Camera[] Loader.load3DScamera(String, float) method. That way, you would load the cameras from only the files you wanted, and would set only the camera you wanted for the world at a time.