Page 3 of 7 FirstFirst 12345 ... LastLast
Results 41 to 60 of 121
  1. #41
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    Thanks, nick, you know what worries me most of all, the code you saw contains the first sound block (one of the smallest) THERE ARE 14 MORE!
    Not even to speak of the large code-block that deals with the midi data calculation which is used to program the FM-editor (I am not "showing of" here). So it would be almost impossible to design the program in a good java manner and from scratch. Instead the java program should adapt to the pascal source code else it is a impossible task. I did think about the overall design which should involve several classes envoke.

    You are right the big loop of the listed code above, loops around pretty fast and the clock (at what ever rate) controllers several counters/ variables (tel/ count, teller/ counter, tijd/ time) which, on there turn, together with some random operators, send the bytes out at the right time. In short the loop spins around and at a given time each of these variables opens a gate to midi. Further links=left, rechts=right, midde, middle for stereo panning. The midi_data(algemeen,'fdb',7,6,8,data); concerns the FM editing (stored in a 3 dimensional array called data or dt) I do not even understand this myself.

    Finally, I think it is almost impossible to understand what the program does, try to see it as a musical score: it is a collection of instructions for a small musical machine called FBO-1 (which knows what to do with all, when lined up in the right order and moment//what does a pianist need to understand of the Waldstein sonata of Beethoven in order to play it?

    There will be a special fboController class that deals with the clock, some swing stuff (for latter) and one single midi_in code concerning the pedal which triggers each sound block.

    I will just literly translate the pascal code into jave, envoke the clock and try out some rates, what you think? The midi_data procedure among others are already written in java (have to do an other check), so they should do there part of the story just like a score?

  2. #42
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    The question what´s wrong with my code concerns the java clock code only (the pascal code is "correct" since it worked).

  3. #43
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Thumbs down rejected

    I understand your question, what you need to do is read what zosden has up already ( the beginner stuff ) Beginner Java

    Your code is not sufficiently well accomplished to make review productive. It is not like we are going to come in here and dispense with classes and so on and have an accomplishment,...

    We do it like this:

    public static void main String args ,.... and so on

    class Orchestra orchid = new Orchestra(Sound,Tempo,Insturments,Score);

    and about a dozen other things.....

    then all manner of start and run and what you need to do is practice your beginner Java,... so that you might be able to understand my answers.

    ftr has taught, I wonder if this is familiar to him. When I tried to get in cs at ut they told you to go across the street to the co-op bookstore and get a manual for a cdc-7700, you we supposed to be up to speed on your own in a week or two.

    No rest for the wicked, no mercy from the cruel and no drivel. Go look a zosden's page, check back tomorrow.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  4. #44
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    I did study most of Sun´s stuff The Java™ Tutorials
    But that does not mean it is all well digested yet. I should admit this static or not drives my static (I know what it means but its not digested). So for the change I´ll follow your zosden (one can´t go over that stuff enough) but for the moment go to sleep (time is relative, as you know)

  5. #45
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Lightbulb large code-block

    Quote Originally Posted by willemjav View Post
    Not even to speak of the large code-block
    Do those as disc files ..... at least think of them that way for now.
    Quote Originally Posted by willemjav View Post
    ... the FM-editor
    If you mean, frequency modulation, that is done with mathematics, Java Methods ( code ) and knowledge
    Quote Originally Posted by willemjav View Post
    So it would be almost impossible to design the program in a good java manner and from scratch. Instead the java program should adapt to the pascal source code else it is a impossible task. I did think about the overall design which should involve several classes envoke.
    Not really, but it will be awhile before you grasp what the Pascal code is doing. It's either comprehend and read the Pascal or do a bunch of concepting in math and signal processing and write it in Java. More likely what ends up is some combination of both.
    Quote Originally Posted by willemjav View Post
    You are right the big loop of the listed code above, loops around pretty fast and the clock (at what ever rate) controllers several counters/ variables (tel/ count, teller/ counter, tijd/ time)
    Not really, the score controls the variables, all the clock does is read a variable and ship it ~ ready or not. Sort of like marching zombie armies controlled by a master making time on a tymphonic kettle. They neither moan nor think, tick tick tick tick tick tick......

    Quote Originally Posted by willemjav View Post
    which, on there turn, together with some random operators
    There are no random anything, what you are thinking of is the humanistics ~ the creative as the controlling force.
    Quote Originally Posted by willemjav View Post
    send the bytes out at the right time. In short the loop spins around and at a given time each of these variables opens a gate to midi.
    that is coded as if(condition) usually condition expands to some or another math or method calls,... keep an expansive view for how condition shows up in code.
    Quote Originally Posted by willemjav View Post
    Further links=left, rechts=right, midde, middle for stereo panning. The midi_data(algemeen,'fdb',7,6,8,data); concerns the FM editing (stored in a 3 dimensional array called data or dt)
    Those are always variables.
    Quote Originally Posted by willemjav View Post
    I do not even understand this myself.
    Somewhat rote, more thinking than simple study but you have to write some code before you will ever make it through the first hell.

    Quote Originally Posted by willemjav View Post
    Finally, I think it is almost impossible to understand what the program does, try to see it as a musical score: it is a collection of instructions for a small musical machine called FBO-1 (which knows what to do with all, when lined up in the right order and moment
    Order is a list, moment is the clock pulling Note of the TreeMap if time between notes has elapsed, let the clock run free - control the picker-puller with a time between next note out. it's if(conditino)shipNextNote(); Just like that, maybe with round braces carrying whatever information is needed but make it short. IOW how many millesceconds before next note gets dispatched:
    Java Code:
    if(--counter < 0){shiptNextNote();counter=time_between_notes;return;}
    ]
    Quote Originally Posted by willemjav View Post
    There will be a special fboController
    Frequency Base Oscillator is called Time Base or timebase or however your convention accepts that. It is also the clock, it runs at one kilohertz. Just because the clock ticks in a room does not mean that the zombies march nor ill tides blow.
    Quote Originally Posted by willemjav View Post
    swing stuff
    all swing is gui equals buttons for stop, start, play. Later we add other buttons. Right now it is start, stop and maybe one or two other buttons when you think of them. Those buttons can be hooked directly to Java Methods.
    Quote Originally Posted by willemjav View Post
    code concerning the pedal which triggers each sound block.
    Clock triggers, releasing the next whatchamacallit.
    Quote Originally Posted by willemjav View Post
    I will just literly translate the pascal code into jave, envoke the clock and try out some rates, what you think?
    That's where this is clearly going.
    Quote Originally Posted by willemjav View Post
    The midi_data procedure among others are already written in java (have to do an other check), so they should do there part of the story just like a score?
    You getting momentum initialized in the right direction. Read zosden's beginner Java stuff.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  6. #46
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    Untitled Document Is an empty shell, an attempt that starts to explain the basics of a Java beginning, which then, suddenly, stops on my computer (is it yours?). –seeds fall on the dry floor…. Read the bible about that “. Since I know you so well”, I know that you did not intent to insult me?

  7. #47
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,814
    Rep Power
    25

    Default

    willemjav:
    Have you seen the JavaSoundDemo code from Sun? I downloaded it several years ago. One of its demos - Groove has some overlap with what I've read in this thread.
    Here's the Readme.txt from that download:
    The classes for the Java Sound demo are contained in the JavaSoundDemo.jar
    file. Running the demo requires the Java 2 SDK, Standard Edition 1.3.
    To run the Java Sound demo :

    % java -jar JavaSoundDemo.jar

    Although it's not necessary to unpack the JavaSoundDemo.jar file to run
    the demo, you may want to extract its contents if you plan to modify
    any of the demo source code. To extract the contents of JavaSoundDemo.jar,
    run this command from the JavaSound directory :

    jar xvf JavaSoundDemo.jar


    This JavaSound demo consists of a set of demos housed in one GUI
    framework that uses a JTabbedPane. You can access different groups of
    demos by clicking the tabs at the top of the pane. There are demo
    groups for Juke Box, Capture & Playback, Midi Synthesizer and Rhythm
    Groove Box.

    Juke Box :

    A Juke Box for sampled (au, wav, aif) and midi (rmf, midi) sound
    files. Features duration progress, seek slider, pan and volume
    controls.


    Capture & Playback :

    A Capture/Playback sample. Record audio in different formats
    and then playback the recorded audio. The captured audio can
    be saved either as a WAVE, AU or AIFF. Or load an audio file
    for streaming playback.


    Midi Synthesizer :

    Illustrates general MIDI melody instruments and MIDI controllers.
    A piano keyboard represents notes on and off. Features capture
    and playback of note on and off events.


    Rhythm Groove Box :

    Illustrates how to build a track of short events. Features
    a tempo dial to increase or descrease the beats per minute.


    You can run anyone of the samples in stand-alone mode by issuing a
    commands like this from the JavaSound directory:

    java -cp JavaSoundDemo.jar Juke
    java -cp JavaSoundDemo.jar CapturePlayback
    java -cp JavaSoundDemo.jar MidiSynth
    java -cp JavaSoundDemo.jar Groove


    When running the Java Sound demo as an applet these permissions
    are necessary in order to load/save files and record audio :

    grant {
    permission java.io.FilePermission "<<ALL FILES>>", "read, write";
    permission javax.sound.sampled.AudioPermission "record";
    permission java.util.PropertyPermission "user.dir", "read";
    };

    The permissions need to be added to the .java.policy file.

    ================================================== ====================

    You may send comments via the javasound-comments@sun.com alias,
    which is a one-way alias to Sun's Java Sound API developers, or via the
    javasound-interest@sun.com alias, which is a public discussion list.

  8. #48
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    thanks norm I´ll look at it
    (I´v read the sun stuff some time ago
    and it does contain midi I remember)

  9. #49
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Post site down or something

    The link I cited seems to be off this morning, no details. I know the discussion does not go far but I chose to direct a short list site in the hopes that you would get over some ideas that are charactaristic of early work, read and work from the readme Norm posted.

    There will be a base structrue of five or ten Java classes that we need to write, possibly a translator could have helped but in any event we will have to find what base classes are necessary to do the Java level work. There are one or two midi-drivers that are installed by default with Java. Getting them to work requires that you do some beginner level skill building in Java. That takes awhile.

    Try these two sites:

    David Eck

    Java Notes

    The second will have get-going material, and does not fall on the floor.

    The first one is definitely more "computer science" and probably doesn't even mention midi.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  10. #50
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    David Eck´s book together with the sun stuff was my introduction to java
    Also read parts of Thinking in java.
    Eck´s book is especially good for those who learn/begin programming in java

  11. #51
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Nit: This thread has moved into a completely different topic.
    I suggest it be split or at least renamed to "Implementing MIDI sequencing in Java"

  12. #52
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    But now it is code time, the package, Cites, will contain about twenty classes (each sound-block is already a class and there 15).
    Before beginning to convert the sound blocks, I should have written three other important classes. The first, called fmEditing, contains all the methods concerning the editing and storing the midi data is ready. The second class, midiforFbo1, is closely related with the other classes, it takes care of the midi out (see method midi_out(byte[] byte). This class was the missing link of my thread. It presents the midi driver on mac (and pc). The third class, called fboController will do some swing stuff (radio button for each sound block etc.). This class will also communicate with the midiforFbo1 in order to get the midi_in(byte[] byte) method to read the midipedal out which triggers each sound block. So I will create objects of midiforFbo1, fboController and of each sound block class into the fmEditing. In the controller class, which is an object in the fmEditing, I have to create another object of the midiforFbo1 to read the pedal out (and I know how to do that).


    Java Code:
    /*
     * Cites.java
     *
     * Created on July 16, 2008, 6:11 PM
     *
     * To change this template, choose Tools | Template Manager
     * and open the template in the editor.
     */
    
    /**
     *
     *
     */
    package cites;
    
    
    
    //import java.awt.Choice;
    //import java.io.BufferedReader;
    
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.util.ArrayList;
    import java.util.Scanner;
    
    
    
    
    public class fmEditing {
      private static final int b_toon1=0,  b_fractie1=0,     b_toon5=3,  b_fractie5=110,
                               b_toon2=1,  b_fractie2=7,     b_toon6=4,  b_fractie6=90,
                               b_toon3=2,  b_fractie3=5,     b_toon7=5,  b_fractie7=65,
                               b_toon4=2,  b_fractie4=124,   b_toon8=6,  b_fractie8=36,
                               algemeen=0,
                               operator3=24,
                               operator4=16,
                               links=0,
                               rechts=127,
                               midde=64,
                               klok=237;
        private int            operator, kanaal1, kanaal2, startgetal, dumpteller, clkpls,
                               k1, k2, k3, k4, tt1, tt2, tt3, tt4, p1, p2, hb, lb;
       
       
        
        private                int[][][] dt; //1-8, 0-60, 0-4 (byte 0-256)
        private                int[] dump; // 0-600
        private                String[] midinaam; // 1-4
        
       
        midiforFbo1 fbo1;
        
    
        
        
                               
    
             
        
        public fmEditing() {                     // on macbook goes scanner on the g4 NOT
    dt = new int[9] [61] [257];              // so use laadresource on macbook
    dump = new int [] { 4,  1,  0,  0,  2,  0,  0, 60,  0,  2,  0,  0, 10,
    
    29, 31,  3, 15,  2,  8,  0,  0,  0,  0,  0,  3,  1,
    
    16,  6,  8, 10,  8, 10,  0,  0,  0,  0,  0,  1,  0,
    
    4,  7,  1,  1,  2, 200,  0, 80,  5, 112,  0,  0,  0,
    
    29, 31,  9, 15,  1,  0,  0,  0,  0,  0,  2,  1,  1,
    
    23,  3, 15, 10,  8,  5,  0,  0,  0,  0,  1,  2,  0,
    
    4,  1,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0,  0,
    
     26, 10, 31, 15, 12,  0,  0,  0,  0,  0,  0,  1,  1,
    
     26, 15, 31, 15, 15,  9,  0,  0,  0,  0,  0,  0,  0,
    
    4,  4,  1,  1,  2, 100, 70,  0,  1,  0, 231,  0,  0,
    
     28,  0,  0, 15,  0, 12,  0,  0,  0,  0,  0,  3,  1,
    
     27,  3, 31, 15, 15, 15,  0,  0,  0,  0,  0,  0,  0,
    
    4,  0,  1,  1,  2, 220, 40, 96,  1,  3, 215,  0,  0,
    
    31, 31,  0, 15,  0,  7,  0,  0,  0,  0,  0,  4,  1,
    
     31, 31,  0, 15,  0, 20,  0,  0,  0,  0,  2,  5,  0,
    
     4,  3,  1,  1,  2, 230, 40, 96,  1,  2,  0,  0,  0,
    
     31, 31,  0, 15,  0, 37,  0,  0,  0,  0,  0,  1,  1,
    
     31, 31,  0, 15,  0,  5,  0,  0,  0,  0,  0,  1,  0 };
    
          // dump = new int[601];
           midinaam = new String[5];
        // laadresource("citesresource.txt");
         fbo1 = new midiforFbo1(0,0,true) ;         // implements the midiout/ in to FBO1
         
        }
        
       
    public void resetFbo()  {
        
       midiforFbo1.midi_out(new byte[]{(byte)255}); 
      
       for (tt1 = 1; tt1 < 8; tt1++)  {
       
         //midi_aansturing2(1,tt1,1,0); //midi systeemkanaal 1
         midi_aansturing2(1,tt1,0,1); //1 noot per midikanaal 
         midi_aansturing2(1,tt1,4,1); //voice bank 1
         midi_aansturing2(1,tt1,7,2); //oktaaf 0
         midi_aansturing2(1,tt1,6,0); //detune=0
         midi_aansturing2(1,tt1,3,0); //limit low=0
         midi_aansturing2(1,tt1,2,127); //limit high=127
         midi_aansturing2(1,tt1,13,0); // poly on
         midi_vel(1,8,127); //vel op max
         midi_stereo(1,8,midde);
     
       //sound keuze}      lege sound alle parameters zijn 0/  8 kan 
       midi_instrument(1,12);    midi_instrument(2,12);
       midi_instrument(3,12);    midi_instrument(4,12);
       midi_instrument(5,12);    midi_instrument(6,12);
       midi_instrument(7,12);    midi_instrument(8,12);
       }
       
       
       for (tt1 = 1; tt1 < 8; tt1++)  {          //zet de data array op 0
       
         for (tt2 = 1; tt1 < 60; tt1++)  {
           
           for (tt3 = 1; tt1 < 4; tt1++)  {
    
             dt[tt1][tt2][tt3]=0;
           }
         }
       } System.out.println("MIDI RESET OF FBO1");
    }
    
       
    
    
        
      public static int random(int g, int a, int z)  {
          z = z + a;
          return (int)(Math.random()*(z+1)) + a;
          }
            
    
    
    
     public void syn1(String k, int kan, int w)  { //data voor lfo alg etc, 
                                                    // niet voor de operators 
                                                          
          p2=1;
          if (k.equalsIgnoreCase("alg")) {
            p1=12;
            p2=2;
            hb=((8*dt[kan][12][1])+w)/16;
            lb=((8*dt[kan][12][1])+w)% 16;
          } 
          else
          if (k.equalsIgnoreCase("fdb")) {
            p1=12;
            p2=1;
            hb=(dt[kan][12][2]+(8*w))/ 16;
            lb=(dt[kan][12][2]+(8*w))% 16;
          }
          else
          if (k.equalsIgnoreCase("mod")) {
            p1=9;
            p2=1;
            hb=(dt[kan][9][2]+(128*w))/ 16;
            lb=(dt[kan][9][2]+(128*w))% 16;
          }
          else
          if (k.equalsIgnoreCase("snc")) {
            p1=10;
            p2=1;
            hb=(dt[kan][10][2]+(128*w))/ 16;
            lb=(dt[kan][10][2]+(128*w))% 16;
          }
          else
          if (k.equalsIgnoreCase("wav")) {
            p1=14;
            hb=(32*w)/ 16;
            lb=(32*w)% 16;
          }
          else
          if (k.equalsIgnoreCase("spd")) {
            p1=8;
            hb=w / 16;
            lb=w % 16;
          }
          else
          if (k.equalsIgnoreCase("amd")) {
            p1=9;
            p2=2;
            hb=((dt[kan][9][1]*128)+w)/ 16;
            lb=((dt[kan][9][1]*128)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("pmd")) {
            p1=10;
            p2=2;
            hb=((dt[kan][10][1]*128)+w)/ 16;
            lb=((dt[kan][10][1]*128)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("ams")) {
            p1=13;
            p2=2;
            hb=((dt[kan][13][1]*16)+w)/ 16;
            lb=((dt[kan][13][1]*16)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("pms")) {
            p1=13;
            p2=1;
            hb=(dt[kan][13][2]+(16*w))/ 16;
            lb=(dt[kan][13][2]+(16*w))% 16;
          }
          else
          if (k.equalsIgnoreCase("trs")) {
            p1=15;
            hb=w / 16;
            lb=w % 16;
          }
          else
          if (k.equalsIgnoreCase("pm ")) {
            p1=58;
            p2=1;
            hb=(dt[kan][58][2]+(128*w))/ 16;
            lb=(dt[kan][58][2]+(128*w))% 16;
          } 
          else
          if (k.equalsIgnoreCase("prt")) {
            p1=58;
            p2=2;
            hb=((128*dt[kan][58][1])+w)/ 16;
            lb=((128*dt[kan][58][1])+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("pd ")) {
            p1=59;
            p2=1;
            hb=dt[kan][59][2]+(16*w)/ 16;
            lb=dt[kan][59][2]+(16*w)% 16;
          }
          else
          if (k.equalsIgnoreCase("bnd")) {
            p1=59;
            p2=2;
            hb=((16*dt[kan][59][1])+w)/ 16;
            lb=((16*dt[kan][59][1])+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("o1 ")) {
            p1=11;
            p2=1;
            hb=((dt[kan][11][2]*32)+(dt[kan][11][3]*16)+(dt[kan][11][4]*8)+(w*64))/ 16;
            lb=((dt[kan][11][2]*32)+(dt[kan][11][3]*16)+(dt[kan][11][4]*8)+(w*64))% 16;
          }
          else
          if (k.equalsIgnoreCase("o2 ")) {
            p1=11;
            p2=2;
            hb=((dt[kan][11][1]*64)+(dt[kan][11][3]*16)+(dt[kan][11][4]*8)+(w*32))/ 16;
            lb=((dt[kan][11][1]*64)+(dt[kan][11][3]*16)+(dt[kan][11][4]*8)+(w*32))% 16;
          }
          else
          if (k.equalsIgnoreCase("o3 ")) {
            p1=11;
            p2=3;
            hb=((dt[kan][11][2]*32)+(dt[kan][11][1]*64)+(dt[kan][11][4]*8)+(w*16))/ 16;
            lb=((dt[kan][11][2]*32)+(dt[kan][11][1]*64)+(dt[kan][11][4]*8)+(w*16))% 16;
          }
          else
          if (k.equalsIgnoreCase("o4 ")) {
            p1=11;
            p2=4;
            hb=((dt[kan][11][2]*32)+(dt[kan][11][3]*16)+(dt[kan][11][1]*64)+(w*8))/ 16;
            lb=((dt[kan][11][2]*32)+(dt[kan][11][3]*16)+(dt[kan][11][1]*64)+(w*8))% 16;
          }
     }
           
           
     public void syn2(String k, int kan, int w, int op)  {
     
          p2=1;                              
          if (k.equalsIgnoreCase("ar ")) {
            p1=4+op;
            p2=2;
            hb=((dt[kan][p1][1]*64)+w)/ 16;
            lb=((dt[kan][p1][1]*64)+w)% 16;
          }
          else 
          if (k.equalsIgnoreCase("dir")) {
            p1=5+op;
            p2=3;
            hb=((dt[kan][p1][1]*128)+(dt[kan][p1][2]*31)+w)/ 16;
            lb=((dt[kan][p1][1]*128)+(dt[kan][p1][2]*31)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("d2r")) {    
            p1=6+op;
            p2=2;
            hb=((dt[kan][p1][1]*64)+w)/ 16;
            lb=((dt[kan][p1][1]*64)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("rr ")) {
            p1=7+op;
            p2=2;
            hb=((dt[kan][p1][1]*16)+w)/ 16;
            lb=((dt[kan][p1][1]*16)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("d1l")) {
            p1=7+op;
            p2=1;
            hb=(dt[kan][p1][2]+(w*16))/ 16;
            lb=(dt[kan][p1][2]+(w*16))% 16;
          }
          else
          if (k.equalsIgnoreCase("lev")) {
            p1=0+op;
            hb=w / 16;
            lb=w % 16;
          }
          else
          if (k.equalsIgnoreCase("adj")) {
            p1=2+op;
            p2=2;
            hb=((dt[kan][p1][1]*16)+w)/ 16;
            lb=((dt[kan][p1][1]*16)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("vl1")) {
            p1=1+op;
            p2=2;
            hb=(dt[kan][p1][1]+(w*16))/ 16;
            lb=(dt[kan][p1][1]+(16*w))% 16;
          }
          else
          if (k.equalsIgnoreCase("dt1")) {
            p1=3+op;
            p2=2;
            hb=((dt[kan][p1][1]*128)+dt[kan][p1][3]+(w*16))/ 16;
            lb=((dt[kan][p1][1]*128)+dt[kan][p1][3]+(w*16))% 16;
          }
          else
          if (k.equalsIgnoreCase("dt2")) {
            p1=6+op;
            p2=1;
            hb=(dt[kan][p1][2]+(w*64))/ 16;
            lb=(dt[kan][p1][2]+(w*64))% 16;
          }
          else
          if (k.equalsIgnoreCase("mul")) {
            p1=3+op;
            p2=3;
            hb=((dt[kan][p1][1]*128)+(dt[kan][p1][2]*16)+w)/ 16;
            lb=((dt[kan][p1][1]*128)+(dt[kan][p1][2]*16)+w)% 16;
          }
          else
          if (k.equalsIgnoreCase("vlr")) {
            p1=5+op;
            p2=2;
            hb=((dt[kan][p1][1]*128)+dt[kan][p1][3]+(31*w))/ 16;
            lb=((dt[kan][p1][1]*128)+dt[kan][p1][3]+(31*w))% 16;
          }
          else
          if (k.equalsIgnoreCase("am ")) {
            p1=5+op;
            p2=1;
            hb=((dt[kan][p1][2]*31)+dt[kan][p1][3]+(128*w))/ 16;
            lb=((dt[kan][p1][2]*31)+dt[kan][p1][3]+(128*w))% 16;
          }
     }
        
    
    
     
     
     public void midi_instrument(int kan, int instr) { //midi instrumenten keuze per kan
         fbo1.midi_out(new byte[]{(byte)240, (byte)67, (byte)117, (byte)112, (byte)(64+kan-1), 
         (byte)(instr-1), (byte)247});
     }
        
    
     public void midi_toon(int kan, int tn, int frac, int dyn) {  //miditoon met fractie dyn=0: uit}
         fbo1.midi_out(new byte[]{(byte)240, (byte)67, (byte)117, (byte)112, (byte)(16+kan-1), 
         (byte)tn, (byte)frac,(byte)dyn, (byte)247});
    }
          
    
    
      public void midi_aansturing1(int sys_k, int kan, int par, int 
                                    dat_h, int dat_l)  {   //aansturing over systeemkanaal 1
          fbo1.midi_out(new byte[]{(byte)240, (byte)67, (byte)117, (byte)(sys_k-1), 
          (byte)(24+kan-1), (byte)(64+par), (byte)(dat_l), (byte)(dat_h), (byte)247});
      }
        
      
      public void midi_aansturing2(int sys_k, int kan, 
                                int par, int dat)  { //aansturing over systeemkanaal
          fbo1.midi_out(new byte[]{(byte)240, (byte)67, (byte)117, (byte)(sys_k-1), 
          (byte)(24+kan-1), (byte)(par), (byte)(dat), (byte)247});
     }
        
        
      public void midi_vel(int k1, int k2, int dt) { //voor dynamiek
           for (int i = k1; i < k2; i++)
           midi_aansturing2(1,i,8,dt);
      }
         
    
      public void midi_stereo(int k1, int k2, int dt)  { //panorama aansturing
        int i=0;
            for ( i = k1; i < k2; i++)
            midi_aansturing2(1,i,9,dt);
      }
     
    
    
      protected void midi_datadump(int dmpt, int k1, int k2)   {
                         //fn= de te laden file met de waarde: citedata.1...273
                         //dt= datageheugen van de parameterwaarden
                         //k1/ k2= van kanaal1 tot kanaal2 overdracht
      int hb=0, lb=0, p1=0, p2=0, w=0, i=0, j=0, h=0, op=0, gt=0;
          int[] df_array;
          df_array = new int[40];
          String kr="";            //lees data van de dump-array voor synth waarden
       
         dmpt=(dmpt-1)*39;
         for (i = 1; i < 40; i++)  {
             df_array[i]=dump[i+dmpt]; //i: 1=lfo etc/2=op3/3=op4
         }           
         for (j = 1; j < 14; j++)  {   //data algemeen 
           if (j==1) 
             kr="alg";
           else
           if (j==2)
             kr="fdb";
           else
           if (j==3)
             kr="mod";
           else
           if (j==4)
             kr="snc";
           else
           if (j==5)
             kr="wav";
           else
           if (j==6)
             kr="spd";
           else
           if (j==7)
             kr="amd";
           else
           if (j==8)
             kr="pmd";
           else
           if (j==9)
             kr="ams";
           else
           if (j==10)
             kr="pms";
           else
           if (j==11)
             kr="trs";
           else
           if (j==12)
             kr="prt";
           else
           if (j==13)
             kr="prt";
           
           w=df_array[j];
           
           syn1(kr,k1,w);
           for (i = k1; i < k2; i++)  {  
             midi_aansturing1(1,i,p1,hb,lb);          
             dt[i][p1][p2]=w;
           }
         }
         
    //op3 aan
         w=1;
         syn1("o3 ",k1,w);
         for (i = k1; i < k2; i++)  {
           midi_aansturing1(1,i,p1,hb,lb);          
           dt[i][p1][p2]=w;
         }
         
    //op4 aan
         w=1;
         syn1("o4 ",k1,w);
         for (i = k1; i < k2; i++)  {
           midi_aansturing1(1,i,p1,hb,lb);          
           dt[i][p1][p2]=w;
         }
         
    //data operator 3 
         op=24;
         for (j = 1; j < 14; j++)  {   //data algemeen 
           if (j==1) 
             kr="ar ";
           else
           if (j==2)
             kr="d1r";
           else
           if (j==3)
             kr="d2r";
           else
           if (j==4)
             kr="rr ";
           else
           if (j==5)
             kr="d1l";
           else
           if (j==6)
             kr="lev";
           else
           if (j==7)
             kr="adj";
           else
           if (j==8)
             kr="vll";
           else
           if (j==9)
             kr="vlr";
           else
           if (j==10)
             kr="dt1";
           else
           if (j==11)
             kr="dt2";
           else
           if (j==12)
             kr="mul";
           else
           if (j==13)
             kr="am ";
      
           w=df_array[j+13];
           syn2(kr,k1,w,op);
           for (i = k1; i < k2; i++)  {
             midi_aansturing1(1,i,p1,hb,lb);          
             dt[i][p1][p2]=w;
           }
        }
         
    //data operator4
         op=16;
         for (j = 1; j < 14; j++)  {   //data algemeen 
           if (j==1) 
             kr="ar ";
           else
           if (j==2)
             kr="d1r";
           else
           if (j==3)
             kr="d2r";
           else
           if (j==4)
             kr="rr ";
           else
           if (j==5)
             kr="d1l";
           else
           if (j==6)
             kr="lev";
           else
           if (j==7)
             kr="adj";
           else
           if (j==8)
             kr="vll";
           else
           if (j==9)
             kr="vlr";
           else
           if (j==10)
             kr="dt1";
           else
           if (j==11)
             kr="dt2";
           else
           if (j==12)
             kr="mul";
           else
           if (j==13)
             kr="am ";
           
           w=df_array[j+26];
           syn2(kr,k1,w,op);
           for (i = k1; i < k2; i++)  {
             midi_aansturing1(1,i,p1,hb,lb);          
             dt[i][p1][p2]=w;
           }
        }
     }
           
    
    
      protected void midi_data(int op, String k, int w, int k1, int k2)  {
                // k=lfo/oper. etc naam (3 kar), w=parameterwaarde
                // op=algemeen of operator3 of operator4, k1/ k2 kanaal tot kanaal
                // alg=algemeen (0) operator3 (24) operator4 (16)
                // dt=data overdracht voor waardengeheugen 
       int p1=0, p2=0, hb=0 ,lb=0, i=0;   
        
          if (op==0)  { 
           
            syn1(k,k1,w);
            for (i = k1; i < k2; i++)  {
              midi_aansturing1(1,i,p1,hb,lb); // algemeen       
              dt[i][p1][p2]=w;
            }
        }
            
          
          if (op>=16 && op<=24) {
            syn2(k,k1,w,op);
            for (i = k1; i < k2; i++)  {
              midi_aansturing1(1,i,p1,hb,lb); //operator 3 of 4     
              dt[i][p1][p2]=w;
            }
          }
      }
      
      
     
      
      
       private void laadresource(String path) {                       // the source file reader 
            String str=null, inputLine=null;
            int indx=0;
            Scanner scanner=null;
            
            
            try {
            scanner = new Scanner( new FileReader(path) ); // open file: path
            }
            catch (FileNotFoundException e) {
            System.out.println(path + " not present");
            }
            if (scanner==null) {
            System.out.println(path + " can not read that file");
            }
            
            while (scanner.hasNext())  {              // reads until end of file
             str = scanner.next();    
                if (str.equalsIgnoreCase("*dt"))  {   // lines withou *dt get ignored
                    while (scanner.hasNextInt()) {
                        dump[indx] = scanner.nextInt(); // reads all/ only integers of line *dt
                        System.out.println("file numbers " + indx + "  " + dump[indx]);
                        indx++;    
                    } 
                }
                else str = scanner.nextLine();
            }
              
            scanner.close();
           
    
        } // end of source file reader
       private void closeFbo1() {
       //sound keuze        //lege sound alle parameters zijn 0/  8 kan 
            midi_instrument(1,12);    midi_instrument(2,12);
            midi_instrument(3,12);    midi_instrument(4,12);
            midi_instrument(5,12);    midi_instrument(6,12);
            midi_instrument(7,12);    midi_instrument(8,12);
            midi_vel(1,8,127);
            midi_stereo(1,8,midde);
            System.out.println("close Cités/Fbo1");
       }
       
      
    
            
      
      public static void main(String[] args) {
       new Cites();     
      
      }
    }
    The other two classes are ready to be shipped soon

  13. #53
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    Sorry this text fall of the shelf concerning fishtoprecords remark
    Yes, the thread should probably have both names pascal/ java conversions and real time FM (frequency modulation) editing in java.

  14. #54
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    sorry again, there is a strategic mistake in the above:
    Each soundblock class should create an object of fmEditing and fboController, in order to edit and trigger controlle the soundblock! From here the midi driver will be one level down. (looking forward to your detailed comments, nick..... )

  15. #55
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default

    at least but not at last, the controller class will harbor the important clock issue

  16. #56
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Smile premature move

    Quote Originally Posted by willemjav View Post
    at least but not at last, the controller class will harbor the important clock issue
    ftr's got the drift on this, but you are not ready for it yet. Soon as we can we re-Thread on Implementing midi in Java, right now it's the Controller class <em> harbors</em> the clock class, not is the Clock class. In OO it's: has-a, not is-a. So, using kiss you just put a variable in class Controller, named clock. Reading that clock yields to intermediate level Java coding skills. Your work is showing progress, definite progress.

    I am swamped right now trying to absorb RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies ,...

    Try for the moment, try studying whatever comes up under:doing Java Sound with midi

    any version of java, any source you can find. I will look at your code later today, there will be issues that derive from going from Pascal to Java.

    You got a fancy editor, good but those can be confusing for awhile, do not change any templates just yet. You are still hardcoding your dat in the source file, good for now - we will get to reading in a data file from a conventional file soon enough.

    What we could do here, pending moderator's review, is split coding midi in Java as Pat suggested and let this revert to writing the current stores from Pascal as os-dependent data files using Pascal as Pascal, writing in the conventions of Pascal. That get's back to my 'filename as headers' idea. The resolution of that is simple, just split out meta information before writing the file from Pascal, midi already has header format for that. It can be in the midi file,..... uh, you need to study the midi package in Java. Then what the pascal code is doing will become more apparent.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  17. #57
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Post code review

    Java Code:
     // What we are doing here is storing our data as strings.
     // It is much more efficient to do this with Integers or 
     // Short or a cast from reading an array of integers recursively
     // or any of a textbook full of techniques in intermediate independent study....
     public void syn2(String k, int kan, int w, int op)  {
     
     the foumulae such as hb=((dt[kan][p1][1]*64)+w)/ 16; can work directly on raw data
     read in from a normal file as we know them from our use of the computer.
     
     // This should be a class:
     public void midi_instrument(int kan, int instr) { 
         
    // iow:
    public class MidiInstrument extends javax.sound.midi.Instrument implements http://java.sun.com/j2se/1.4.2/docs/api/javax/sound/midi/MidiDevice.html
    
    // Tanslate "toon" in to ISO-8859 English, sub-dialect N.A. Street-English. 
    // This can be either a tone ( most likely ) or could be ?... dis-ambiguate
    public void midi_toon(int kan, int tn, int frac, int dyn) {  //miditoon met fractie dyn=0: uit}
    
    // Translate aansturing over systeemkanaal
    public void midi_aansturing1(int sys_k, int kan, int par, int dat_h, int dat_l)  {   // 1
    
    // Okay, you have re-factoring showing up. That's one of the Pascal to Java translation where 
    // you will have to drop some preconceptions and roll over to the next Concert Hall. These coding
    // names evidence a variable or method call in place of hardcoding values.
    public void midi_aansturing2(int sys_k, int kan, int par, int dat)  { //aansturing over systeemkanaal
    
    Translate: //aansturing over systeemkanaal
    
    Translate: //voor dynamiek
    
    public void setMidiVelocity(int k1, int k2, int dt) { 
           for (int i = k1; i < k2; i++)
           midi_aansturing2.setVeolcity(k1,k2,dt);
      }
    
    // This we be a phase difference of some kind. 
    // Difference is coded in Java like difference
    // is coded in arithmetic:  Val_Result = Val_Second - Val_First; 
    public void midi_stereo(int k1, int k2, int dt)  { //panorama aansturing
     
    // This is file read/store ? Where are we dumping the data to?
    // If this is where data gets pushed to the port then this is a 
    // method call in a http://java.sun.com/j2se/1.4.2/docs/api/javax/sound/midi/Sequencer.html
    // which plays a midi Sequence, according the drive of a Controler class, which
    // reads the clock, sets various variables here and there - the button pushes of a GUI class
    // from Swing set variables directly in the Controller class, all it does is read them. To
    // fathom how that is done we have to disentangle ( break out in street english )in our mind
    // the code here from the physical machine actually running. That is not hard to do. It is 
    // best done sitting under a tree relaxing, just sort of over-viewing the entire concpt.
    protected void midi_datadump(int dmpt, int k1, int k2)   {
    Translate:  //fn= de te laden file met de waarde: citedata.1...273
    Translate:  //dt= datageheugen van de parameterwaarden
    Translate:  //k1/ k2= van kanaal1 tot kanaal2 overdracht
    
      int[] df_array = new int[40];
      for(.........)
          int[index] df_array = ?... what?....;
    
    be patient with the above, it will be zero progress, then suddenly an ah-ha!....
    
    // Every one of these is a variable, spell them in names closer to 
    // the actual name in a human-readable language
    kr="alg";
    kr="fdb";
    kr="mod";
    kr="snc";
    kr="wav";
    kr="spd";
    kr="amd";
    kr="pmd";
    kr="ams";
    kr="pms";
    kr="trs";
    kr="prt";
    kr="prt";
    
    
    // There are two things this could be:
    protected void midi_data(int op, String k, int w, int k1, int k2)  {
    Translate: // k=lfo/oper. etc naam (3 kar), w=parameterwaarde
    Translate: // op=algemeen of operator3 of operator4, k1/ k2 kanaal tot kanaal
    Translate: // alg=algemeen (0) operator3 (24) operator4 (16)
    Translate: // dt=data overdracht voor waardengeheugen 
    
    // The source file reader here is close to testable.
    // Make triple sure that there are multiple backups
    // in multiple unreachable places before trying to do any
    // real work on actual files that contain date from the 
    // previous effort.....  and read that again. And again,... then be sure to sit under a tree thinking about all of this before touching the keyboard.
    
    private void loadresource(String path) {
        String str=null, inputLine=null;
        int indx=0;
        Scanner scanner=null;
    
    
    /**** We have a saying in computer science: ****/
    /**** Sit on your hands and keep your mouth shut. ****/
    
    // What the close does here is not clear, probably trying to close the midi port is 
    // what we should look at, and that is best done by studying the Java Midi classes.
    // The file read in of the data should be closed long ago, we read ahead and what 
    // we get into is more power is available in Java, the mental concepts do not trasnlate
    // well because of some difficulties buried in preconceptions. 
    private void closeFbo1() {
    
    // These are notes being played likely....
            midi_instrument(1,12);    midi_instrument(2,12);
            midi_instrument(3,12);    midi_instrument(4,12);
            midi_instrument(5,12);    midi_instrument(6,12);
            midi_instrument(7,12);    midi_instrument(8,12);
            midi_vel(1,8,127);
            midi_stereo(1,8,midde);
    
    // Use a gui.
            System.out.println("close Cités/Fbo1");
       }
    
    //  To explain what this does, you have to arrive at the idea that Java can be doing
    //  things in the code at two places at once, probably five or six places like having 
    //  several virtual machines to act as independent computers to keep up with all of 
    //  the reading and writing and playing notes and getting control information from the 
    //  data file as well as the Panel on the screen. 
    //  We need start, stop and exit buttons at a minimum
      public static void main(String[] args) {
       Cites cities = new Cites();     
       cities.start();
      }
    }
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  18. #58
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

  19. #59
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,814
    Rep Power
    25

    Default

    willemjav,
    I put together an applet that demos some of what is included in the JavaSound Demo I mentioned earler:
    Java Sound Demo

  20. #60
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    8

    Default impressive

    norm, impressive
    you might turn into a musician, (maybe not)
    my java console is spinning nods
    and the key board freezes
    go to the beach now look into to it some latter



    Java Plug-in 1.5.0
    Using JRE version 1.5.0_13 Java HotSpot(TM) Client VM
    User home directory = /Users/wdragstra


    ----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    ----------------------------------------------------

    MRJ Plugin for Mac OS X v1.0.1
    [starting up Java Applet Security @ Mon Aug 04 16:43:27 CEST 2008]
    Mon Aug 04 16:43:29 CEST 2008 JEP creating applet Imgslides (willem dragstra, composer)
    file loaded
    timer started
    timer stopped
    Mon Aug 04 16:43:43 CEST 2008 JEP creating applet Imgslides (willem dragstra, composer)
    file loaded
    timer started
    timer stopped
    Mon Aug 04 17:37:24 CEST 2008 JEP creating applet Imgslides (willem dragstra, composer)
    file loaded
    timer started
    timer stopped
    Mon Aug 04 17:37:29 CEST 2008 JEP creating applet JavaSoundApplet2 (http://shellknob2007.googlepages.com/)
    java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.mmj)
    at java.security.AccessControlContext.checkPermission (AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(Acc essController.java:427)
    at java.lang.SecurityManager.checkPermission(Security Manager.java:532)
    at java.lang.SecurityManager.checkLink(SecurityManage r.java:818)
    at java.lang.Runtime.loadLibrary0(Runtime.java:816)
    at java.lang.System.loadLibrary(System.java:993)
    at de.humatic.mmj.MidiSystem.loadLibrary(MidiSystem.j ava:77)
    at de.humatic.mmj.MidiSystem.getDevices(MidiSystem.ja va:276)
    at de.humatic.mmj.spi.CoreMidiProvider.getDeviceInfo( CoreMidiProvider.java:37)
    at javax.sound.midi.MidiSystem.getFirstDevice(MidiSys tem.java:1321)
    at javax.sound.midi.MidiSystem.getFirstDevice(MidiSys tem.java:1380)
    at javax.sound.midi.MidiSystem.getFirstDevice(MidiSys tem.java:1345)
    at javax.sound.midi.MidiSystem.getDefaultDevice(MidiS ystem.java:1126)
    at javax.sound.midi.MidiSystem.getDefaultDeviceWrappe r(MidiSystem.java:1076)
    at javax.sound.midi.MidiSystem.getSynthesizer(MidiSys tem.java:307)
    at MidiSynth.open(MidiSynth.java:103)
    at JavaSound2.open(JavaSound2.java:108)
    at JavaSound2.stateChanged(JavaSound2.java:98)
    at javax.swing.JTabbedPane.fireStateChanged(JTabbedPa ne.java:290)
    at javax.swing.JTabbedPane$ModelListener.stateChanged (JTabbedPane.java:222)
    at javax.swing.DefaultSingleSelectionModel.fireStateC hanged(DefaultSingleSelectionModel.java:116)
    at javax.swing.DefaultSingleSelectionModel.setSelecte dIndex(DefaultSingleSelectionModel.java:50)
    at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabb edPane.java:478)
    at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPa ne.java:464)
    at javax.swing.JTabbedPane.insertTab(JTabbedPane.java :595)
    at javax.swing.JTabbedPane.addTab(JTabbedPane.java:66 2)
    at JavaSound2.run(JavaSound2.java:148)
    at JavaSound2.<init>(JavaSound2.java:88)
    at JavaSoundApplet2.init(JavaSoundApplet2.java)
    at sun.applet.AppletPanel.run(AppletPanel.java:380)
    at jep.AppletFramePanel.run(AppletFramePanel.java:176 )
    at java.lang.Thread.run(Thread.java:613)
    java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.mmj)
    at java.security.AccessControlContext.checkPermission (AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(Acc essController.java:427)
    at java.lang.SecurityManager.checkPermission(Security Manager.java:532)
    at java.lang.SecurityManager.checkLink(SecurityManage r.java:818)
    at java.lang.Runtime.loadLibrary0(Runtime.java:816)
    at java.lang.System.loadLibrary(System.java:993)
    at de.humatic.mmj.MidiSystem.loadLibrary(MidiSystem.j ava:77)
    at de.humatic.mmj.MidiSystem.getDevices(MidiSystem.ja va:276)
    at de.humatic.mmj.spi.CoreMidiProvider.getDeviceInfo( CoreMidiProvider.java:37)
    at javax.sound.midi.MidiSystem.getFirstDevice(MidiSys tem.java:1321)
    at javax.sound.midi.MidiSystem.getFirstDevice(MidiSys tem.java:1380)
    at javax.sound.midi.MidiSystem.getFirstDevice(MidiSys tem.java:1345)
    at javax.sound.midi.MidiSystem.getDefaultDevice(MidiS ystem.java:1126)
    at javax.sound.midi.MidiSystem.getDefaultDeviceWrappe r(MidiSystem.java:1076)
    at javax.sound.midi.MidiSystem.getSynthesizer(MidiSys tem.java:307)
    at MidiSynth.open(MidiSynth.java:103)
    at JavaSound2.open(JavaSound2.java:108)
    at JavaSoundApplet2.start(JavaSoundApplet2.java)
    at sun.applet.AppletPanel.run(AppletPanel.java:420)
    at jep.AppletFramePanel.run(AppletFramePanel.java:176 )
    at java.lang.Thread.run(Thread.java:613)
    Exception in thread "AWT-EventQueue-12" java.lang.NullPointerException
    at MidiSynth$Key.on(MidiSynth.java:188)
    at MidiSynth$Piano$1.mouseMoved(MidiSynth.java:250)
    at java.awt.Component.processMouseMotionEvent(Compone nt.java:5628)
    at javax.swing.JComponent.processMouseMotionEvent(JCo mponent.java:3153)
    at java.awt.Component.processEvent(Component.java:535 2)
    at java.awt.Container.processEvent(Container.java:201 0)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4050)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2068)
    at java.awt.Component.dispatchEvent(Component.java:38 85)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4256)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3949)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3866)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2054)
    at java.awt.Component.dispatchEvent(Component.java:38 85)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 463)
    at jep.MySimpleEventQueue.dispatchEvent(MySimpleEvent Queue.java:59)
    at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:184)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:176)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:110)
    Exception in thread "AWT-EventQueue-12" java.lang.NullPointerException
    at MidiSynth$Key.on(MidiSynth.java:188)
    at MidiSynth$Piano$1.mouseMoved(MidiSynth.java:250)
    at java.awt.Component.processMouseMotionEvent(Compone nt.java:5628)
    at javax.swing.JComponent.processMouseMotionEvent(JCo mponent.java:3153)
    at java.awt.Component.processEvent(Component.java:535 2)
    at java.awt.Container.processEvent(Container.java:201 0)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4050)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2068)
    at java.awt.Component.dispatchEvent(Component.java:38 85)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4256)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3949)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3866)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2054)
    at java.awt.Component.dispatchEvent(Component.java:38 85)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 463)
    at jep.MySimpleEventQueue.dispatchEvent(MySimpleEvent Queue.java:59)
    at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:184)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:176)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:110)
    Exception in thread "AWT-EventQueue-12" java.lang.NullPointerException
    at MidiSynth$Key.on(MidiSynth.java:188)
    at MidiSynth$Piano$1.mouseMoved(MidiSynth.java:250)
    at

Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. PASCAL & JAVA? for senior members
    By willemjav in forum Forum Lobby
    Replies: 2
    Last Post: 07-13-2008, 12:11 PM
  2. Pascal Triangle help
    By Magic101 in forum New To Java
    Replies: 4
    Last Post: 05-01-2008, 08:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •