• 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
Advice request - virtual instrument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Advice request - virtual instrument


  • Subject: Advice request - virtual instrument
  • From: Lloyd Ollmann <email@hidden>
  • Date: Sun, 25 Mar 2007 11:50:02 -0700

I need to create a virtual instrument with it's own custom GUI.

The instrument needs to capture incoming MIDI events, to be processed internally. and generate its own content for output into the audio stream.

After having read the documentation I'm thinking I need to subclass AUMonotimbralInstrumentBase with a subclass of SynthNote as an aggregate member.

Overridding the default implementation of 'AUMonotimbralInstrumentBase::HandleMidiEvent' I can capture the required MIDI events for internal handling, and override 'SynthNote::Render' for rendering my audio data based on the captured MIDI events.

Next can a subclass of 'AUCarbonViewBase' be used with a subclass of 'AUMonotimbralInstrumentBase' to build a custom GUI.

I've been using the SinSynth sample project as a starting point in understanding how to proceed and in my testing I've added a subclass of AUCarbonViewBase to the SinSynth project -

	class SinSynthEditor : public AUCarbonViewBase {
	public:
		SinSynthEditor( AudioUnitCarbonView aucv );
		virtual ~SinSynthEditor();

		virtual OSStatus CreateUI( Float32 inXOffset, Float32 inYOffset );
	};

Implementing the constructor, destructor and stubbing the "CreateUI" method.

The SinSynth.exp file has the additional entry -

	_SinSynthEditorEntry


And in the SinSynth.r I've added -

	#define RES_ID		kAudioUnitResID_SinSynthEditor
	#define COMP_TYPE	kAudioUnitCarbonViewComponentType
	#define COMP_SUBTYPE	kSinSynthSubtype
	#define COMP_MANUF	'Acme'
	#define VERSION		kSinSynthVersion
	#define NAME		"Acme: SinSynth Editor"
	#define DESCRIPTION	"SinSynth AudioUnit Editor"
	#define ENTRY_POINT	"SinSynthEditorEntry"

	#include "AUResources.r"


Everything compiles, links and a copy of the SinSynth.component is copied to ~/Library/Audio/Plug-Ins/Components


Using 'AU Lab.app' as a component host I am able to set breakpoints in any of the original SinSynth sources and follow the flow of things using the debugger but I can not get the debugger to stop at the break-point of the overridden "CreateUI" method of my added "SinSynthEditor" class.

So, can a custom UI be added to the SinSynth example as I've attempted?

Am I going down the wrong path in thinking a subclass of AUMonotimbralInstrumentBase should be used as the basis of my virtual instrument with custom GUI.

Thanks

_______________________________________________
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


  • Prev by Date: accessing input format of an audiounit in a graph
  • Next by Date: Re: Getting name of AudioUnit host
  • Previous by thread: Re: accessing input format of an audiounit in a graph
  • Next by thread: Problem in SCAudioFillBuffer/OpenADefaultComponent
  • Index(es):
    • Date
    • Thread