Re: Addin instrument data to caf files
Re: Addin instrument data to caf files
- Subject: Re: Addin instrument data to caf files
- From: Dave Fernandes <email@hidden>
- Date: Wed, 09 May 2012 11:57:30 -0400
Hi Neil,
The AudioFileSetUserData API allows you to create a custom chunk in a caf file. It works with some, but not all, other audio file types as well.
Dave
On 2012-05-09, at 5:02 AM, Neil Wallace wrote:
> I ended up breaking out a hex editor and having a go at this myself – Initially I thought I could use AudioFileWriteBytes to write the header info before writing out the sample data however this resulted in the bytes I was writing ending up in the ‘data’ chunk.
>
> In the hex editor I noticed that all my caf files produced by afconvert had a bunch of empty space in the ‘free’ chunk so I ended up just reading the file, finding the ‘free’ chunk, adding an ‘inst’ chunk and reducing the size of the ‘free ‘chunk accordingly.
>
> I have no idea if this is the correct way to go about this? (for instance is it guaranteed that the ‘free’ chunk has enough room for all the other chunks?)
>
> Neil
>
> From: coreaudio-api-bounces+nwallace=email@hidden [mailto:coreaudio-api-bounces+nwallace=email@hidden] On Behalf Of Neil Wallace
> Sent: 08 May 2012 11:21
> To: email@hidden
> Subject: Addin instrument data to caf files
>
> I currently load my samples into an AUSampler using an .aupreset file, however I would prefer to just load caf files with appropriate metadata relating to key range etc – the docs say this should be possible:
>
> Each audio file should have been edited appropriately to contain instrument data (for example key range, velocity range, root key)
>
> However I can’t see anywhere that tells me how exactly I add this metadata – can anyone point me in the right direction?
>
> Cheers
>
> Neil
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden