Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Advice request - virtual instrument



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:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.