Problem playing MIDI sounds

I was wondering if anyone knows what I'm doing wrong. The code below plays a sound when the instrument is in bank 0 (for instruments in the array with index < 128) but not for bank 1 (with index >= 128). I can loop through and print out all the instruments, but can't play them all.
Thanks for any help!
MidiChannel[]     midiChannels = synth.getChannels();
int nNoteNumber = 64; // 60 is Middle C
int instNum = 165;
int nVelocity = 100; // volume
//Works fine - prints 188 instruments
for (int j = 0; j < inst.length; j++)
     System.err.println("Instrument " + j + inst[j]);
synth.loadInstrument(inst[instNum]);
midiChannels[0].programChange(inst[instNum].getPatch().getBank(), inst[instNum].getPatch().getProgram());
// Only works when instNum < 128
midiChannels[0].noteOn(nNoteNumber, nVelocity);

Hi
I was having a similar problem. This method: MidiChannel.programChange(int bank).
Well, you would think that passing in the bank here would work, wouldn't you? I notice that that's what you have done.
But for some reason, in the sample code that comes with the API, I notice that they seem to pass in the instrument index in the array returned by getAvailableInstruments. I tried this and it worked.
hth

Similar Messages

  • Problem playing .mid file with QT Player on an external MIDI instrument

    Hello,
    I am trying to play a .mid file with QT Player (so I can play it from various softwares as Keynote) and send it out on an attached MIDI device (thru M-audio or Tascam interface). Unfortunatelly, I can only choose "QuickTime Instruments" from the pop-up menu in QT Advanced Preferences. I tried with several configs (G4, G5), several MIDI interfaces, and last flavor of both Panther and Tiger with QT 7.0.4. I configured MIDI setups normally and I can play on exernal instruments from Logic or other sequencers.
    Any idea why I cannot see my devices from QT directly ? Thanks,
    M

    Hello,
    I have tried with a Tascam US-428 with 10.3.9 and QT 6 (latest) and 7.0.4 hooked to a Akai S3000. I also tried on a G5 with a MOTU interface (all last software versions). At home, I have tried with my Ti550 running 10.3.9, QT 6 (latest) 7.0.1 and 7.0.4 and also with my Sawtooth (10.4.5, QT 7.0.4), both with a M-audio Uno interface hooked to a E-mu Proteus expander.
    All configurations behave the same. They are working fine with various sequencers (Logic, PT, some freewares) but interfaces never show up in the advanced preferences of QT.

  • Problems with MIDI, Sound, Etc.

    Hi all,
    Well, I have grown up on Macs and my dad has brought home everything from the Plus to the IIci to the Classic Colour when I was a kid 20 years go. Circumstances have forced me to move to PC, and I even had one in my home studio, but I recently had the chance to upgrade and was absolutely thrilled at the prospect of getting back into the Mac world after more than 10 years of absence. So, I got myself a Mac Mini 2.53 GHz (I only upgraded the hard drive to a 500 GB 7200-RPM model, as is common in the audio world), with a Focusrite Saffire 24 Pro DSP Firewire audio interface.
    Well, I am saddened to say that so far, I have been BITTERLY disappointed. Problems :
    1. This Mac is NOISY!!! I don't mean physical computer/fan/etc. noise. I mean static noise going through the interface. The interface is dead-silent during bootup until, at some point in the sequence (when looking at the Apple logo during bootup), the same static hiss and hum comes back that's been plaguing me for a few days. This noise seems to be matching my activities - it changes when I scroll, when I open a program, etc., for example. So, this is DEFINITELY sub-par;
    2. Snow Leopard simply refuses to acknowledge my Roland XV-5050's existence on USB. Ableton Live can find it in its list of "destinations" for MIDI data, but Audio Midi Setup simply refuses to even see it, precluding me from using Roland's very handy Editor. Again, unacceptable, given that I've never had this problem with PCs (although, Roland expressly does not support Vista with the XV-5050 USB drivers);
    3. There's something weird about the Mac (could also be Live, I suppose, but I never had this problem on PC) where my music applications do not see the Korg Legacy Cell VSTs that are installed, even though they are in the same folder as, say, Sylenth, which Live DOES see. (And they all end in .vst extensions.) What gives?
    I think that's it so far. I've got a very important gig coming up around Christmas time that I have to start getting ready for. I had anticipated virtually zero problems with the Mac, which is why I chose to upgrade, but the reality is definitely otherwise. Please, PLEASE don't make me buy the Dell Studio or something!!
    Thanks in advance for all the help!
    JS

    Korg Legacy and the XV are not critical to my workflow, just items I had invested on I would like to keep. I did not research compatibility with Snow Leopard vwery thoroughly for those two, but I certainly did with the interface, which IS critical. Focusrite has released brand-new drivers that are supposed to be compatible with Snow Leopard, as they loudly trumpet on their web site.
    And by and large, they do work - there's just that incessant noise. And THAT's an issue, and somehow I doubt it has to do with the interface as, like I mentioned, the noise only appears during the bootup sequence when, I assume, the Firewire drivers are loaded.
    Inputs?

  • Big problem applet-midi-au sound

    hello all,
    i have in my applet an String in rtttl Format (for mobile phones).
    how can i convert this string into the *.au Format.
    i have already an rtttl to midi converter (returns a byte array in midi format)
    in my applet, but can't play this byte array over javax.sound because the applet can get the system midi devices.
    Moreover it is not allowed to use a java plugin, i must use the internal java
    environment from the browers, and older browses have only java versions under 1.2
    In addition to that it is not allowed to post a midi file temporarily.
    So i must use the au Format.
    Has anybody an idea, how i should solve this problem, or a format description about
    au files etc....????????????????

    hi
    can u help me in converting midi sound file to rtttl sound file
    thanks
    Amit

  • MIDI - problems with output sound / sound card problem?

    Hi. Not sure if this is the right place to put this question, but anyway:
    I bought the notation program Sibelius 4, which allows you to write notation and play it back with MIDI. With it comes a software program (Kontakt Silver) that you can use to playback the MIDI.
    So, in choosing playback devices, I can choose between Kontakt Silver and "DLS Music Device", which was on the Mac from before, I'm guessing it's the sound card that comes with the PowerBook G4.
    The problem is that playback is a bit out of sync, and in addition it produces a strange "screeching" sound that's not supposed to be there. It sounds as if the sound produced is echoed and filtered. This is very annoying and makes Sibelius useless for me.
    The problem is the same if I choose to use Kontakt Silver as the playback device as if i choose DLS Music Device.
    I have 15 GB free space on the harddisk and between 150-300 MB free RAM when using Sibelius (the memory is 1 GB DDR SDRAM). A 1.67 GHz G4 processor. So I don't think my computer is the problem.
    All other sound is good on the Mac, I can play mp3s, wavs and aifs without problem. Sibelius is the only program I have that can play MIDI-files (I think).
    So what might be the problem? Is there a driver I can download, is my soundcard broken? I need help. Thanks.

    Korg Legacy and the XV are not critical to my workflow, just items I had invested on I would like to keep. I did not research compatibility with Snow Leopard vwery thoroughly for those two, but I certainly did with the interface, which IS critical. Focusrite has released brand-new drivers that are supposed to be compatible with Snow Leopard, as they loudly trumpet on their web site.
    And by and large, they do work - there's just that incessant noise. And THAT's an issue, and somehow I doubt it has to do with the interface as, like I mentioned, the noise only appears during the bootup sequence when, I assume, the Firewire drivers are loaded.
    Inputs?

  • Problem, trying to play many sound files

    hello,
    I did not find a specific answer to my question in most of the archives and so I am posting here.
    my problem is that I have to play a sound when mouse moves over an object and another sound when the same object is clicked.
    there are many such items on the screen and so it is expected that when the mouse entered from the mouse listener is fired, the sound must play.
    but what really happens is that when the mouse moves over the first object the sound plays all right. but there is no sound played when the mouse click happens.
    I have properly loaded the sound files and I am sure that the code is right.
    infact the major thing that has frustrated me is that if I move the mouse on an opject (an icon) the sound is properly played. and if I wait for a long time and then move the mouse on another icon the other sound is played as well. but if I move the mouse quickly from one object to another no sound is played for the second object. or if I click the mouse on an icon after a long holt even the click sound playes.
    what could be the problem. why is it that sound only play when the actions are done after long haults?
    is it an issue of java performance. should I try to do the sound playing stuff in different threads for each icon's mouse events?
    I also tried to stop the file on the mouse exit method to make sure that there is no sound left playing.
    this game is depending a lot on mouse movements with sounds and so I have to get the sounds playing at the same time mouse moves over the objects.
    I use the audioClip to load my sounds with the method in the applet class.
    I really don't know abt the latest java media api and will like to know if that is what I must use for my task or audioClip is ok with me.
    thanks
    Krishnakant.

    I dont know exactly, but I dont know if applets support various files at one time.
    Have your tried to do that with javax.media or with javax.sound.sampled?
    Or could your post the code?
    R. Hollenstein

  • Installation folder not found.  Kontaktplayer2 will terminate?  I can't play any of my midi sounds from Garageband.

    Kontaktplayer2 will terminate?  I can't play any of my midi sounds from Garageband what gives?  I downloaded all my midi plugin's to run my M-Audio midi controller, but the patches are gone from GarageBand.  I recently had all my files "Migrated" from my old Macbook to my new one and since I have my new Macbook (only a week old) I haven't been able to use the GarageBand patches.  Can anyone give me advice?

    Matt
    If you did a Restore operation using the current version of iPod Updater and you still get the same results, then you should take it back and get a new one.

  • Website play midi problem

    I maintain a website for a friend which has many midi files on it.
    Up to Quicktime 7.7.1 the QT browser plugin would handle playing them without any problem in Chrome and Firefox.
    Updating to QT v 7.7.4 stops this working - the browser says it need to install a plugin (QT) but doing this doesn't allow the files to be played.
    This is working on a PC, I have yet to investigate what happens on a Mac.
    Something seems to have changed in this latest version of QT - does anyone have any ideas?
    The website is www.mayhill.co.uk

    Thanks for your response.
    Interesting that you have found the same problem in QT v7.7.4
    Looked at your suggestion re Firefox, and using 7.7.1, I have that option, but not on another machine that is running 7.7.4 - same version of FF (22).
    This looks like a bug in QT, or maybe a change in relation to midi files. I can still play midi files in the player itself, the problem seems to be related to the browser plugin.
    If you try to play the files in IE you will get a slightly different page that used Windows Media Player, and that works OK, and hopefully will always work, but many people don't use IE, or even have it installed, eg on a Mac.
    Not sure where to go from here ...

  • What's the wave's number of iPhone 4S speakers? I need to know what's the number because my phone doesn't play any sounds, and I kind of knew what's the problem and sulotion!

    What's the wave's number of iPhone 4S speakers? I need to know what's the number because my phone doesn't play any sounds, and I kind of knew what's the problem and solution!
    What I mean by wave is like radio channels' waves! Ex. 104.1

    Your statement makes no sense.
    Have you tried basic troubleshooting from the User's Guide to rule out some setting in the device preventing the speaker from working?
    Is the mute switch on?
    Do other sounds work?
    Does it produce sound with headphones plugged in?

  • Is anyone having problems playing music on their iPhone? At times, particularly when you've got headphones in songs sound like a badly scratched CD, continually skipping in various sections of the song. Problem occured post-IOS 5 update.

    Is anyone having problems playing music on their iPhone? At times, particularly when you've got headphones in songs sound like a badly scratched CD, continually skipping in various sections of the song. Problem occured post-IOS 5 update.

    Is anyone having problems playing music on their iPhone? At times, particularly when you've got headphones in songs sound like a badly scratched CD, continually skipping in various sections of the song. Problem occured post-IOS 5 update.

  • Problem with playing a sound file.

    Hi,
    I simply want to play a sound by a button click. I imported
    <AVFoundation/AVAudioPlayer.h>. The code block is here:
    In .h file:
    #import <UIKit/UIKit.h>
    #import <AVFoundation/AVAudioPlayer.h>
    @interface PlaySoundViewController : UIViewController <AVAudioPlayerDelegate>
    in .m file:
    -(IBAction)btnPlay:(id)sender
        //Get the filename of the sound file:
        NSString *path = [[NSBundle mainBundle] pathForResource:@"REC001" ofType:@"MP3"];
        AVAudioPlayer* thePlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];//error here as it will compile if I commented it (and two line after) out.
        thePlayer.delegate = self;
        [thePlayer play];   
    Everything looks fine but it failed when I tried to run it. Looks like it cannot find my sound file "REC001.MP3". I put it in folder ".../PlaySound/Resource Files/SoundFiles/REC001.MP3", and "PlaySound" is my project name. However the path returned is ".../PlaySound/REC001.MP3". I guess this is why it cannot find the object. But it didn't work even I put the sound file under "PlaySound" directly. Anyone has a solution?
    Thanks.
    Regards,
    Taizhi

    Hi Mark,
    Thanks for the reply. Based on your instruction, I checked and I can see the sound files in Build Phases. The location is ".../PlaySound/SoundFiles/REC001.MP3". I don't know why it ignores folder "Resource Files". I guess that is the way it is as I also can see other images in different folders which are shown properly in the project.
    The detailed error message is here:
    Ld "/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpxz lqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator/PlaySound.app/PlaySound" normal i386
        cd "/Users/greatzhi2001/Desktop/iProjects/PlaySound"
        setenv MACOSX_DEPLOYMENT_TARGET 10.6
        setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3 .sdk -L/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpx zlqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator -F/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpx zlqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator "-F/Users/greatzhi2001/Desktop/iProjects/PlaySound" -filelist "/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpxz lqfodwbuqqjwjzcd/Build/Intermediates/PlaySound.build/Debug-iphonesimulator/PlayS ound.build/Objects-normal/i386/PlaySound.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpxz lqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator/PlaySound.app/PlaySound"
    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_AVAudioPlayer", referenced from:
          objc-class-ref in PlaySoundViewController.o
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    Is the framework AVFoundation I added wrong? Thanks.
    Regards,
    Taizhi

  • Can you use midi sounds when recording videos on Photobooth?

    Can you use midi sounds when recording videos on Photobooth?
    Basically, i like to record videos of me singing and playing guitar or keyboard, but to get a good sound for the keyboard I'd like to be able to record the audio using MIDI sounds...
    Ive got Logic, I've got M-Audio Fast Track Pro, into which i have my mic, guitar, and keyboard midi plaugged into. I can use it to record the mic and guitar on photobooth as they are audio inputs, however i can't use the midi sounds on the keyboard :/ I have tried having logic open with the desired MIDI sound selected whilst recording but it doesnt work...
    Is there ANY way this is possible?
    HELP PLEASE!
    Thanks!

    I Have just the same problem, if I shout very near the microphone i can just hear something, did you manage to solve the problem?

  • Mega pc 400 no midi sound & thermal solutios

    Hy guys!
    Yesterday i've discovered that my mega pc doesn't play midi file.
    I checked if the microsoft syntesizer is recognized and it's all ok.
    Suggestions??
    P.s. I had problem with the temperature of my Mega Pc: CPU about 70° !!!
    I've installed a fan on pci slot ---> 60 °C
    Bye

    i had the same problem ,try to install new nvidia drivers if it will not help-reinstall windows.i don`t know where is exactly the problem beacause system "thinks" that  everything works good=he plays midi but you hear no sound and i guess that you hear no windows sounds (like openinig/closing system).be careful with removing old nvidia drivers.read all the readme and repair stuff on the nvidia page.

  • How do I resolve Playback Error Message: "Problem syncing MIDI with audio."

    I recently bought the Nexus2 instrument. After backing up all my files last week, the Nexus content wasn't being read (it aparently got moved somehow), and I had to contact their support to resolve the problem. As soon as that problem got fixed, Logic quit playback altogether. Everytime I hit Play, I just get an error message that says "problem syncing MIDI and audio," and the the only sound coming out of the speakers is a high-pitched humming. How do I go about fixing this?
    thanks,
    Shane

    Check your Internet connection.

  • Problem with midi input in Mainstage

    Hi all,
    I have a keyboard connected to my mac via USB midi interface.
    When I'm trying to play midi instruments in Garage Band - it works very well, no significant latency and no other problems.
    But in Mainstage the situation with the midi input is different. When I press a key on my keyboard, it plays the sound, then stops responding to other midi commands for about 2-3 seconds. And then after I press another key, it plays it, and stops responding again.
    The "CPU" and "Memory" indicators at the top show a low load.
    All in all, it's just impossible to play a midi instrument in Mainstage.
    As the midi interface is working correctly in GarageBand and doesn't work well in Mainstage, I suspect that it's a Mainstage's software problem. But I haven't found anything like that on the Internet. Any ideas?
    Devices: Macbook Pro 13" (2011), M-Audio MidiSport Uno...
    Thanks!

    I can input Chinese in Firefox, but there are
    problems with the display of characters in input
    fields for searches, etc.
    Can you provide a specific example of a particular search box (url) and exactly what the "problem" is (TC or SC, characters involved, etc)? I would like to try and duplicate it. Perhaps the encoding in View > Text Encoding needs to be adjusted for that page for some reason (though normally that should affect all browsers).
    Since Apple has nothing to do with FireFox, you might want to report the issue to the people responsible for that program (mozilla.org I think), since it may be a bug they can fix.

Maybe you are looking for

  • ALV Layout set fields stored in Which table?

    HI All, I Developed ALV Report,and created Layout for that . I want to know where the all fields for particular layout set are stored?

  • How do I delete a corrupted audiobook file on my iTouch?

    I purchased and downloaded my second audiobook last weekend but after 4 hours into the first part, the audio stopped and then it skipped to part 2.  I could not find a way to redownload my purchase again for audiobooks.  I emailed support and they pu

  • Searching for function modul which insert adressdata bevor fm vendor_insert

    hello, i read many threads, but I find no solution. I want use the fm vendor_insert for a migration. But using the fm vendo_insert require an existing address entry. Is there any central fm which create the whole address. regards Kim Werner

  • Sharing iWeb Files

    A friend of mine lives out of the country and wants my help updating his site. We both work on MACs and have iWeb 9.0. I need to know how he can send me the files for the site for me to work on and then send them back and upload them to the site. I s

  • Master data-pp

    is it possible to change material type after creating material??. if so how