Re: Making aiff file from a Midi Sequence
Re: Making aiff file from a Midi Sequence
- Subject: Re: Making aiff file from a Midi Sequence
- From: William Stewart <email@hidden>
- Date: Mon, 1 Dec 2003 18:26:36 -0800
The MusicPlayerStart call has to be called - that is where all of the
scheduling information is calculated and managed.
However, once you've started the player, you can call AudioUnitRender
on the output unit of the player's graph yourself. Just make sure you
provide correct, incrementing AudioTimeStamps (ie. ONLY the sample
count is the valid field)... That way, you can render results to a
buffer that you write to a file (and really all that the AUHAL output
unit does is use the I/O cycle of the AudioDevice to call
AudioUnitRender on the Output AU)
(Of course, in this case you wouldn't use a device unit in your graph,
because that will start the I/O cycle of the device). Instead use the
Generic Output Unit - you are then responsible for driving it.
Does that make sense?
Bill
On 29/11/2003, at 12:21 PM, Robert Grant wrote:
Hi Craig,
I haven't played with the MusicPlayer stuff much - but it makes sense
that you have to start the sequencer. If you don't there won't be
anything pushing notes into the Music Devices and thus no sound will
be produced. Also the MusicPlayer is the one that knows when the
sequence has ended. Starting the MusicPlayer will also start the
output unit (if I remember correctly).
Hope that helps,
Robert.
On Nov 29, 2003, at 11:26 AM, Craig Bakalian wrote:
Hi,
I am designing a export to aiff in my midi sequencer. I have read
through DiskWriterAUGraph in the CoreAudio Examples. It is
intimidating. I am trying to simplify the DiskWriterAUGraph, and
convert it to Objective C mixed with C. I do understand much of it,
yet in order to simplify the processing, I have one question - Must
I give the MusicPlayer of a sequence a MusicPlayerStart() call to
drive the data out of an output unit to render it, or can I simply
call AudioUnitRender(,,,,,)? In the DiskWriterAUGraph example there
is a call to MusicPlayerStart(). I would rather pull the data out
of the output unit, instead of pushing it out with the MusicPlayer.
Craig Bakalian
www.eThinkingCap.com
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.