Monday, April 22, 2013

About Using AUPreset file to make virtual instruments within Xcode - pay attention to the sound file's name

First, there is existing materials about AUPreset, how to generate it and how to use it within xcode, which I don't bother to introduce here. Please see
and the related links provided there.

What I want to mention here is the outcome of my nearly 3 hours of debugging. I tried to use some files with name "F#2.caf", "G#2.caf" as my instrument sound. I put them into the "Sounds" folder, make an .aupreset file and point the file references to the right place with exactly those file names "F#2" "G#2". But it turns out that when I download this into my device, the instrument just won't work! Then I change the name to be "FF2.caf", "GG2.caf", it works. (Took me a long time to realize I should make this change)

Then I double check the working .aupreset file Trombone.aupreset, and found that although it uses some files called "1a#.caf", "2a#.caf", it references those as "1a%23.caf", "2a%23.caf". Oh! That's the problem. (It really took me a long time to discover the problem.)

I'm not sure whether there are any other file name constraints when doing aupreset. I can only suggest that following the convention of "Trombone.aupreset" is the best practice.

If you are reading this, you might be facing a similar problem. Try it!

(Plus: recently I also found that the "space" character" is not allowed in aupreset's file reference part.)


Google Translate:


在这里我要提的是我近3个小时的调试结果。我试图用一些文件名称“F#2.caf”,“G#2.caf的”我的乐器声音。我把它们放到“声音”文件夹,使。aupreset文件和文件指向到正确的地方,正是这些文件名“F#2”,“G#2”。但事实证明,当我下载到我的设备,仪器就无法正常工作!然后,我将名称更改为“FF2.caf”,“GG2.caf”,它的工作原理。 (我花了很长时间才意识到,我应该做这种改变)

然后,我双检查工作。aupreset的文件Trombone.aupreset的,并发现,虽然它使用的一些文件名为“1A#CAF”,“2A#咖啡馆”,它引用作为“1A%23.caf的”,“2A %23.caf“。哦!这就是问题。 (这真的花了我很长一段时间来发现问题。)





No comments:

Post a Comment