• 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
Re: non real time bouncing and music events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non real time bouncing and music events


  • Subject: Re: non real time bouncing and music events
  • From: Bill Stewart <email@hidden>
  • Date: Sat, 18 May 2002 12:53:04 -0700

BTW - a couple of things I forgot to mention

The Generic Output will do the format conversions for you, so:
(1) Make sure you set the output property of the bus of the output unit
you're going to be pulling on - this can be in the format that you want the
data to for writing to the file
(BTW - You have the new AudioFile APIs in Jaguar - so you should be able to
use them to write the file out).

Bill

on 18/5/02 12:46 PM, Bill Stewart wrote:

> Yes you can
>
> Basically you have to start the sequence as you would normally.
>
> The difference is in how you interact with the graph...
>
> You'll need an output unit that is a generic based one (not a device based
> one) - this is a new audio unit (Generic Output) that is available in Jaguar
> (and there is a new set of classes already for this in the AudioUnit SDK if
> you want to make your own)
>
> When you start the sequence (MusicPlayerStart), this will turn around and
> start the graph, which will turn around and start your output unit.
>
> OK - so you should install a property listener on the generic output (which
> you've added to the graph of course - a gotcha! - if you had been using this
> graph with a device output unit, then you'll have to remove the device output
> unit first - then add the generic output and connect it up - an AUGraph can
> only have one output unit at a time)
>
> OK - so the property you listen for is the isRunning notification.
>
> That will fire when you start the graph.
>
> Then, in your notification you now know that the graph is ready to go. The
> generic output unit however, does nothing, so you have to do the work. But its
> simple...
>
> You call the generic output unit's RenderSlice call - supplying a buffer of
> data that you will get filled by the graph. You're also responsible of course,
> for mainting the validity of the time stamps - in this case the only valid
> field of the time stamp I would guess is the sample count (though you could
> supply a host time stamp as well, but as you're rendering in an offline
> situation, you probably don't want to do that).
>
> Each time your render slice returns you now should have a buffer of rendered
> audio - which you could then write out to disk. Then pull on it again
> (incrementing your sample count), until you have the data you need.
>
> Then when you're done, you call stop on the sequence (MusicPlayerStop) -
> you'll get the notification that you've been stopped, but of course you
> already know that!
>
> That should be it.
>
> This sounds like a good piece of sample code to write - so I'll endeavour to
> do that before we're finished with Jaguar (good way to test that this all
> works as we expect it to!)
>
> Bill
>
> on 18/5/02 11:21 AM, Jean-Alexis Montignies wrote:
>
>> I imagine it's possible to use a audio graph for processing audio to
>> save it to disk by pulling samples as fast as the graph can process them.
>>
>> The question is :
>> How can you feed a synth unit when you're not in real time?
>>
>> I don't see how to use a MusicSequence.
>>
>> Would it be possible to use an audio unit to pull music events? (The
>> role of the unit would be to send music event when asked to fill a
>> buffer)
>>
>> Jean-Alexis Montignies
>> Sen:te
>> _______________________________________________
>> 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
> __________________________________________________________________________
> "Thousands of years ago, cats were worshipped as gods. We have never forgotten
> this."
> __________________________________________________________________________
>


mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Thousands of years ago, cats were worshipped as gods. We have never
forgotten this."
__________________________________________________________________________
_______________________________________________
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.

References: 
 >Re: non real time bouncing and music events (From: Bill Stewart <email@hidden>)

  • Prev by Date: Re: non real time bouncing and music events
  • Next by Date: RE: Jaguar Audio changes
  • Previous by thread: Re: non real time bouncing and music events
  • Next by thread: RE: Jaguar Audio changes
  • Index(es):
    • Date
    • Thread