Re: MIDI playback using DLS Synth AU
Re: MIDI playback using DLS Synth AU
- Subject: Re: MIDI playback using DLS Synth AU
- From: Brian Sheehan <email@hidden>
- Date: Thu, 26 Jan 2006 18:05:20 +0000
I figured out what was wrong below, the MIDI file for playback wasn't
being opened because I didn't call FSMakeFSSpec() correctly. It works
now.
Brian
On 1/26/06, Brian Sheehan <email@hidden> wrote:
> Hi all,
>
> I'm new to coreaudio, so please bear with me.
>
> I'm trying playback a MIDI file on Apple's DLS Synth Audio Unit. I've
> constructed an Audio Unit Graph containing the DLS Synth AU and the
> Default Output AU like this:
>
> NewAUGraph(&graph); //No Error handling!!
>
> makeDescription(&synthDesc, kAudioUnitType_MusicDevice,
> kAudioUnitSubType_DLSSynth);
> makeDescription(&outputDesc, kAudioUnitType_Output,
> kAudioUnitSubType_DefaultOutput);
>
> AUGraphNewNode(graph, &synthDesc, 0, NULL, &synthNode);
> AUGraphNewNode(graph, &outputDesc, 0, NULL, &outputNode);
>
> AUGraphConnectNodeInput(graph, synthNode, 0, outputNode, 0);
>
> AUGraphOpen(graph);
> AUGraphInitialize(graph);
>
> I then constructed a MusicSequence from a MIDI file on disk:
>
> FSSpec midiFile;
> FSMakeFSSpec(0,0,"/Users/brians/Desktop/downloads/Together_Forever.mid",
> &midiFile);
>
> NewMusicSequence(&midiSequence);
> MusicSequenceLoadSMF(midiSequence, &midiFile);
>
> Next I assigned this MusicSequence to a MusicPlayer, and assigned the
> previously created AUGraph to the MusicSequence:
>
> NewMusicPlayer(&player);
> MusicPlayerSetSequence(player, midiSequence);
> MusicSequenceSetAUGraph(midiSequence, graph);
>
> I had hoped that subsequently calling MusicPlayerStart(player) would
> magically play the midi file using the DLS Synth AU, but nothing seems
> to happen. I know I could be barking up the wrong tree in terms of my
> use of the API, so all help is appreciated!
>
> thanks,
>
> Brian
>
_______________________________________________
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