-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
SoundOfMind Aug 15, 2016 11:09 AM (in response to krishnamurthy)Please paste here the text of any errors you see in the system log when you run this command, thanks.
-DS
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
krishnamurthy Aug 16, 2016 6:00 AM (in response to SoundOfMind)@SoundOfMind, please find the error message below:
SoundFontDemo[12264:1028008] 18:23:16.475 ERROR: 93: BankEntry::LoadInstrument: Unable to find patch 7 bank 0x79/0
SoundFontDemo[12264:1028008] 18:23:16.477 ERROR: 486: DLS/SF2 bank load failed
SoundFontDemo[12264:1028008] 18:23:16.478 ERROR: AVAudioUnitSampler.mm:163: -[AVAudioUnitSampler loadSoundBankInstrumentAtURL:program:bankMSB:bankLSB:error:]: error -10851
Thanks and I would like to understand how to find the right values for program/bankLSB/bankMSB, given a SF2 file.
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
SoundOfMind Aug 17, 2016 1:15 PM (in response to krishnamurthy)It looks like you correctly passed 0x79 for the bank MSB (there is a constant, kAUSampler_DefaultMelodicBankMSB, for this, in the AU headers). BankLSB should be 0 unless you know you have a bank with instrument variations.
Unless your SF2 bank file is a complete GM-compatible bank (i.e., it has an instrument for every program number from 0 to 127), there is the possibility that you are requesting a program that does not exist in a (sparse) bank. Does this call to loadSoundBankInstrumentAtURL:program:bankMSB:bankLSB:error fail on this bank for ALL program numbers? How about other bank files?
-DS
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
krishnamurthy Aug 19, 2016 4:33 AM (in response to SoundOfMind)Keeping the BankLSB and BankMSB values constant, I ran the loadSoundBankInstrumentAtURL function in a loop to provide it values 0 to 127. In all the cases, the same error was observed.
So, may be even the bankLSB and MSB values could be wrong.
The SF2 file that I have is certainly a sparse bank, with only one instrument in it.
Would it help if I share the SF2 file itself for you to help suggest the right values for the program-number, bank LSB and bank MSB that will not lead to load-failure? Else, if I get a method to inspect these files and arrive at the right values myself, that'd be great too.
Kindly advise.
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
genedelisa Aug 22, 2016 5:25 AM (in response to krishnamurthy)Try your code with a valid Sound Font. That will tell you if the problem is your "ethnic sound font" or your code.
Try the Fluid Sound Font which I'm sure is valid.
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
SoundOfMind Aug 24, 2016 11:37 AM (in response to krishnamurthy)If your bank has only one instrument, it seems likely that it is at program 0.
Virtually none of these banks *actually* use the 0x78, 0x79 bank numbers that are exposed via the API -- these are the General MIDI Version 2 bank numbers. The code uses those values to interpret what it finds in the bank file, because there are many different numbering systems out there (and the loading system tries a few possibilities). If yours is really different, you will have to give it the exact MSB and LSB values to get it to load.
There used to be SF2 editors out there which would let you examine the bank numbers, etc. I don't know if they still exist.
You could also repeat your test, using program 0 and then walking through all the bank permutations (127*127, but hey, the computer does all the work).
-DS
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
krishnamurthy Aug 31, 2016 9:31 PM (in response to SoundOfMind)Thank you much. I had to open the sf2 file in an editor (I used Polyphony) and had to change the 'bank' number from 108 to 128 to get it to work with the Sampler AV Audio Unit. Issue resolved.
-
Re: AVAudioUnitSampler SF2 SoundBank Load Failure
SoundOfMind Sep 2, 2016 9:27 AM (in response to krishnamurthy)I am glad - but if you were to request the instruments from the original file using bank MSB 108 it should work, too.
-DS
-
-
-
-
-
-