Re: Using soft synth device with AUGraph
Re: Using soft synth device with AUGraph
- Subject: Re: Using soft synth device with AUGraph
- From: Douglas Scott <email@hidden>
- Date: Thu, 10 Jun 2010 18:25:35 -0700
Well for a start, -2005 is "bad component". Have you been able to access this soft synth via other tools? Does it show up in the menu for AULab? That might be worth trying but offhand I do not know if it would. I have not looked at your sample code yet, but it would be worth you figuring out if this synth component even installed correctly before you chase problems in your code.
-Doug Scott
On Jun 2, 2010, at 2:38 AM, Per Bull Holmen wrote:
> Hi
>
> I have been trying to make a program which can play MIDI notes on available soft synth devices. My code works with Apple's DLS soft synth, but it doesn't work with another soft synth, "Crystal" from Green Oak Software. I tried to e-mail them, but they said I should ask for help in this group. I have made a simple test case where the error occurs. It is a slightly modified version of Apple's example code, named "PlaySoftMIDI". I've kept the changes to a minimum, to let the program iterate over available soft synth devices, rather than hardcoding Apple's device. To do this, I've made a few simple changes:
>
> 1) CreateAUGraph() now takes two extra parameters: manufacturer and subType.
> 2) main() contents from apple's code, which creates the AUGraph and plays an octave, is moved into a separate function PlayOctave(), which takes two parameters, manufacturer and subType.
> 3) The main() function now iterates over available Audio Units of type kAudioUnitType_MusicDevice, and calls PlayOctave(), with parameters found using GetComponentInfo().
> 4) Removed a few unnecessary parts, like custom bank path, midi control change events and CAShow().
>
> I have posted the code here (main.cpp), and indicated all changes to Apple's code, plus highlighted where the error occurs:
>
> http://www.pastebin.org/300955
>
> (my e-mail service destroys indentation, so I can't include it in the e-mail)
>
> It works perfectly with AppleDLSSynth, but CreateAUGraph fails when called with the parameters manufacturer = 'GOSW' and subType = 'AtFr', which is the Crystal soft synth audio unit. The function that fails is AUGraphOpen, which fails with error code -2005.
>
> Per
> _______________________________________________
> 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