• 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
MIDI playback using DLS Synth AU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MIDI playback using DLS Synth AU


  • Subject: MIDI playback using DLS Synth AU
  • From: Brian Sheehan <email@hidden>
  • Date: Thu, 26 Jan 2006 10:53:32 +0000

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

  • Follow-Ups:
    • Re: MIDI playback using DLS Synth AU
      • From: Brian Sheehan <email@hidden>
  • Prev by Date: when to get MaximumFramesPerSlice property
  • Next by Date: Re: notifying the UI from the process
  • Previous by thread: Re: Bug in saving user presets [Solved]
  • Next by thread: Re: MIDI playback using DLS Synth AU
  • Index(es):
    • Date
    • Thread