• 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: A couple of questions about hosting aumu-type audio units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of questions about hosting aumu-type audio units


  • Subject: Re: A couple of questions about hosting aumu-type audio units
  • From: Sean Lamont <email@hidden>
  • Date: Thu, 01 Sep 2011 16:49:48 -0700

This basically worked. It turns out that a program change to some au synths generates the following error:

trying to load preset 4 of bank 0 which only has 0 presets

Which is curious since, as it was stated, you couldn't use an external controller. I need to hook up my other keyboard (main one doesn't have bank change) and see if the soft synth responds.

Failing that, I can probably do it with full AU hosting, which brings me to my next question!

3) Does anyone have a version of CocoaAUHost that compiles under xcode 4.1?

-Sean


On Thu, Sep 1, 2011 at 2:59 PM, Paul Davis <email@hidden> wrote:
On Thu, Sep 1, 2011 at 5:52 PM, Sean Lamont <email@hidden> wrote:
>
>
> On Thu, Sep 1, 2011 at 1:03 PM, David Hicks <email@hidden> wrote:
>>
>> I can answer the question about Program Change, at least for the DLS
>> Synth. I have borrowed some code here from PlaySoftMIDI. Take a look at that
>> sample to see what precedes the code below.
>> I have added the second call to MusicDeviceMIDIEvent, which sends Patch 72
>> to the default MIDI channel.
>> require_noerr (result = AUGraphInitialize (graph), home);
>> //set our bank
>> require_noerr (result = MusicDeviceMIDIEvent(synthUnit,
>> kMidiMessage_ControlChange << 4 | midiChannelInUse,
>> kMidiMessage_BankMSBControl, 0,
>> 0/*sample offset*/), home);
>> require_noerr (result =
>> MusicDeviceMIDIEvent(synthUnit,  kMidiMessage_ControlChange << 4 |
>> midiChannelInUse,
>> kMidiMessage_BankMSBControl, 0,
>> 0/*sample offset*/), home);
>> // This code isn't in the project, and works to send a Program Change
>> require_noerr (result =
>> MusicDeviceMIDIEvent(synthUnit, kMidiMessage_ProgramChange << 4 |
>> midiChannelInUse,
>> 72, 0,
>> 0), home);
>> Note that on most software synths today you change sounds using their UIs,
>> not using MIDI Program changes. This requires either showing the CocoaView
>> or the GenericView for the AU. Good sample code is in the CocoaAUHost
>> project.
>> HTH,
>> David
>
> Thanks. I'll look at that.
>
> There has to be some  way to change sounds using both the UI and some kind
> of program change event, otherwise there would be no way to establish in
> Logic or GB the persistency of a patch, and you'd have to do it in the UI on
> load. Which you don't. :)

that's not so. the plugin is responsible for saving its entire state
(as a property list) when requested, which will include current
patch/bank settings. restoring the state of the plugin from its saved
state doesn't involve sending it MIDI data at all.

OTOH, yes there has to be some way to change sounds by sending it a
PC/BC message because otherwise an external controller could not work.

 _______________________________________________
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: 
 >A couple of questions about hosting aumu-type audio units (From: David Hicks <email@hidden>)
 >Re: A couple of questions about hosting aumu-type audio units (From: Sean Lamont <email@hidden>)
 >Re: A couple of questions about hosting aumu-type audio units (From: Paul Davis <email@hidden>)

  • Prev by Date: Re: A couple of questions about hosting aumu-type audio units
  • Next by Date: Common Causes of fatal errors during AU Validation?
  • Previous by thread: Re: A couple of questions about hosting aumu-type audio units
  • Next by thread: Common Causes of fatal errors during AU Validation?
  • Index(es):
    • Date
    • Thread