• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Preset converter???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preset converter???


  • Subject: Re: Preset converter???
  • From: Howard Moon <email@hidden>
  • Date: Mon, 15 Nov 2004 14:51:13 -0800

Ok, thanks!  That should be enough info to get me going.

-Howard

On Nov 15, 2004, at 2:41 PM, Urs Heckmann wrote:

Hi,

the <data> section isn't generated by Logic or any host, it's written out by AUElement::SaveState() (in AUScopeElement.cpp) in the plugin itself. And I must correct myself, it's not just an array of floats, but an array of pairs of ParameterID and Value which is obviously preceeded by a twin UInt32 for Scope/Element (both should be 0).

The way to go would be something like

- load the .fxp and get pointer to float values and its filename

- create a CFMutableDictionaryRef (see AUBase::SaveState() in AUBase.cpp for reference)

- fill in the required fields for your plugin (type, subtype, manufacturerid, apiversion )

- add presetname key for .fxp filename

- create a CFMutableDataRef add the 2 zeros for GlobalScope / Element 0 (please verify this step from AUBase.cpp, I'm not entirely sure, cause it's 11:30 pm after a hard day and I'm not too good friend with C++ stdlib)

- for each parameter in the .fxp, add an UInt32 for ParameterID and a float for its value to the CFMutableDataRef

- add the CFMutableDataRef to the CFMutableDictionaryRef

- create a Plist / XML file from the CFMutableDictionaryRef and save as .aupreset

For further reference, everything needed is in AUBase::SaveState(). You could rip this off and use it as your factory.

For finally saving .aupresets to harddrive, there has been some excellent example code by Marc Poirier at destroyfx.org CVS Repository ("AudioUnitUtilities" or something).

If you want to be sure, you can "patch" AUBase::SaveState() and write out everything added to the dictionary into the Console, for instance to see if the Elements of other Scopes than Global do also generate parameter data, which I doubt.

Bill?

Cheers,

;)  Urs

Am 15.11.2004 um 22:28 schrieb Howard Moon:

Thanks, Urs. I was hoping to avoid the development time to write a translator, but if I have to, I have to. Do you know where I can find the AUPreset format sepcification? I've been looking around in my Developer doc's for a while now, as well as the ADC site, but I just can't seem to find how the contents of the <data/> section of that xml file is spec'd (as written out by Logic 7, at least).

Thanks,
	Howard



_______________________________________________ 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
References: 
 >Preset converter??? (From: Howard Moon <email@hidden>)
 >Re: Preset converter??? (From: Urs Heckmann <email@hidden>)
 >Re: Preset converter??? (From: Howard Moon <email@hidden>)
 >Re: Preset converter??? (From: Urs Heckmann <email@hidden>)

  • Prev by Date: Re: Preset converter???
  • Next by Date: Re: A modest proposal
  • Previous by thread: Re: Preset converter???
  • Next by thread: Re: Preset converter???
  • Index(es):
    • Date
    • Thread