Loading EXS24 Instruments Fails

Is anyone else having issues loading EXS24 instruments?

Once upon a time, it worked as the documentation suggested (https://developer.apple.com/library/mac/technotes/tn2283/_index.html#//apple_ref/doc/uid/DTS40011217-CH1-TNTAG7)...now I keep getting 'Failed to locate sample' errors. It always tries (and fails) to load the sample at the absolute path.


My paths are correct according to the documentation, and it's even failing loading the file from the original absolute path. As far as I can tell, this quit working when I switched from ios 8.2 -> 8.3

I filed a bug report in June of 2015, and two versions of ios have come out since then.


Is anyone else having this issue?

Accepted Reply

Thank you for the bug report number, I passed this on to Core Audio engineering and here's the reply going by the description in the bug. Note that the bug will likely be assigned back to you shortly.


The problem is that this path *(User name has been modified by me):

file:///Users/eljeffe/Music/Logic/deep1/Samples/midines-ios-test/'


…does not include any of the “magic path segments” described in the Tech Note:

"/Sounds/"

"/Sampler Files/"

"/Apple Loops/"

"/EXS Factory Samples/"

"/SoundFont Samples/"

Without one of these as part of the path to the sample(s), the system cannot convert the “/Users/“-based path into one that it can use to locate the samples inside your bundle.

Next, your samples will need to be placed in a subdirectory of your bundle which matches the “magic path segment”. So, for example, if you changed your sample URL to...

‘file:///Users/eljeffe/Music/Logic/deep1/Sounds/midines-ios-test/'
                                         ^^^^^^


...then you could install your sample files into your bundle directory in a subdirectory “./Sounds/midines-ios-test/“, and the system would map the above URL into this local one.

Replies

Do you have the bug number?


Also, if you haven't seen the following thread please check it out https://forums.developer.apple.com/thread/7647

"Thanks for the reply:

Bug # 21241844


Yes I have seen that other thread.


My sample file I am trying was located on my computer at /Users/Music/Logic/mySong/Sampler Instruments/myEXS24.exs

and the samples were at /Users/myName/Music/Logic/mySong/Samples/myInstrument/sample.wav


I have tried these things (dragging and dropping into xcode, and using 'create folder references'):

AppBundle/mySong/Samples/myInstrument/sample.wav

AppBundle/Samples/myInstrument/sample.wav

AppBundle/myInstrument/sample.wav


...and none of those work. Error is:

ERROR:

[0x3b938000] 372: Failed to locate sample 'sample.wav -- file:///Users/myName/Music/Logic/mySong/Samples/myInstrument/'


I've also found out, the bug only happens on the device...in the simulator, it works fine.

...and further testing - it always references the absolute path to the file...maybe I am misunderstanding the Technical Note, because the example provided is for "

/Library/Application Support/Logic/EXS Factory Samples/10 Legacy Instruments/02 Guitars/Steel String Acoustic 2/"
...and my sampler file is not a built-in logic instrument, so my path doesn't match any of that.

Thank you for the bug report number, I passed this on to Core Audio engineering and here's the reply going by the description in the bug. Note that the bug will likely be assigned back to you shortly.


The problem is that this path *(User name has been modified by me):

file:///Users/eljeffe/Music/Logic/deep1/Samples/midines-ios-test/'


…does not include any of the “magic path segments” described in the Tech Note:

"/Sounds/"

"/Sampler Files/"

"/Apple Loops/"

"/EXS Factory Samples/"

"/SoundFont Samples/"

Without one of these as part of the path to the sample(s), the system cannot convert the “/Users/“-based path into one that it can use to locate the samples inside your bundle.

Next, your samples will need to be placed in a subdirectory of your bundle which matches the “magic path segment”. So, for example, if you changed your sample URL to...

‘file:///Users/eljeffe/Music/Logic/deep1/Sounds/midines-ios-test/'
                                         ^^^^^^


...then you could install your sample files into your bundle directory in a subdirectory “./Sounds/midines-ios-test/“, and the system would map the above URL into this local one.

Thanks for checking...

I don't think this is a solution, though.

I thought it might be the case, so I originally tried using an EXS Factory Sample....no luck.

I have tried again, using a sample in a Sounds/InstrumentName folder....no luck.


EDIT:
Ok - I have been able to get it work by using a sound in the EXS Facotry Samples folder (and subfolders)...now let's see if any of those other paths match up.


EDIT2:

Seems to have done the trick.

So you just have to be really careful about the origins of your sample files. They need to originate from a folder listed above - and then the directory structure has to match, as the tech doc says.


But to clarify - this does not work for every sample / instrument. The samples themselves have to come from a particular folder.


Thanks

Hello,


In my app the EXS24 samples are located in an AUv3 App Extension so the instrument can be loaded within the app extension in another host app.

Currently I get error -43 (kAudio_FileNotFoundError) when loading the .exs sample from within the app extension in my own app.

I guess this is because the sample files are not located at the main bundle but at the app extension bundle instead.

Samples are located within "SoundFont Samples" folder in the app extension bundle.


I don't see any way how to make the sampler look within the app extension bundle. Any hints on this?