Results 1 to 3 of 3

Thread: Cannot find symbol!

  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Cannot find symbol!

    Hi all!
    I've got this code and when I run it I get a lot of 'cannot find symbol' errors!

    can anyone tell me why?

    Code:
    import javax.swing.*;
    import javax.sound.midi.*;
    import static javax.sound.midi.ShortMessage.*;
    
    public class MidiMessageMapper {
      
      public static void main (String [] args) {
        
        MidiDevice.Info [] InputDeviceList = MidiSystem.getMidiDeviceInfo ();
        midiInfo = OutputFilter.filterOutputDevices (midiInfo, true /* select */);
        
        InputDeviceList = filterInputDevices (InputDeviceList, true);
        MidiDevice.Info InputDeviceInfo =
        (MidiDevice.Info)
        JOptionPane.showInputDialog (
                                     null,
                                     "Select MIDI Device",
                                     "Program Name",
                                     JOptionPane.QUESTION_MESSAGE,
                                     null,
                                     InputDeviceList,
                                     null);
        System.out.println("Selected device = " + InputdeviceInfo);
        
        //if (InputDeviceInfo != null) {
          
          
          MidiDevice.Info [] OutputDeviceList = MidiSystem.getMidiDeviceInfo ();
          midiInfo = InputFilter.filterInputDevices (midiInfo, true /* select */);
          
          OutputDeviceList = filterOutputDevices (OutputDeviceList, true);
          MidiDevice.Info OutputDeviceInfo =
          (MidiDevice.Info)
          JOptionPane.showInputDialog (
                                       null,
                                       "Select MIDI Device",
                                       "Program Name",
                                       JOptionPane.QUESTION_MESSAGE,
                                       null,
                                       OutputDeviceList,
                                       null);
          System.out.println("Selected device = " + OutputdeviceInfo);
          
          MidiMapperFrame gui = new MidiMapperFrame ("Kieran's Midi Mapper");
          
         // if (OutputDeviceInfo != null) {
          
          if (InputDeviceInfo != null && OutputDeviceInfo != null);
          
          try { 
            MidiDevice InputDevice = MidiSystem.getMidiDevice(InputDeviceInfo);
            Inputdevice.open ();
            MidiDevice OutputDevice = MidiSystem.getMidiDevice(OutputDeviceInfo);
            Outputdevice.open ();
            
            MessageByteBuffer myBuffer = new MessageBuffer();
            MessageBufferReceiver myReceiver  = new MessageBufferReceiver (myBuffer);
            Transmitter transmitter = InputDevice.getTransmitter();
            transmitter.setReceiver(myReceiver);
            
            while (true) { 
              byte [] message = buffer.get ();
              if (message != null) 
                {
                  System.out.println (message[0]);
                }
              
              thread.yield();
            }
          }
          catch (MidiUnavailableException e) { 
            System.out.println ("Device not available"); 
          } 
          
        }
      }

  2. #2
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Cannot find symbol!

    Seeing at your code, I didn't find any problem with it. But then if you are saying that you are getting a lot of 'cannot find symbol' errors then can you provide us the exact error messages that you got, so that we can rectify and solve the problem appropriately.

  3. #3
    Join Date
    Mar 2010
    Posts
    2

    Re: Cannot find symbol!

    Line9
    > midiInfo = OutputFilter.filterOutputDevices (midiInfo, true /* select */);

    This has 3 'cannot find symbol' errors on it.

Similar Threads

  1. Error while compiling: javac= "cannot find symbol"
    By Harper 21 in forum Software Development
    Replies: 5
    Last Post: 07-01-2010, 08:58 AM
  2. Tick symbol
    By pratikag in forum Windows Software
    Replies: 3
    Last Post: 21-09-2009, 12:52 PM
  3. Error in Java file: Cannot find symbol
    By Jayden in forum Software Development
    Replies: 5
    Last Post: 02-09-2009, 08:48 AM
  4. Java 11 cannot find symbol
    By Wyvern in forum Software Development
    Replies: 3
    Last Post: 02-09-2009, 01:12 AM
  5. Where can i find Cents symbol in Word and Excel
    By Kamran in forum Windows Software
    Replies: 3
    Last Post: 16-05-2009, 11:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,511,656.02439 seconds with 17 queries