• 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: Applying a low-pass cutoff inside an AU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applying a low-pass cutoff inside an AU


  • Subject: Re: Applying a low-pass cutoff inside an AU
  • From: Richard Dobson <email@hidden>
  • Date: Mon, 14 Sep 2009 20:09:05 +0100

Darren Baptiste wrote:
Since the iPhone does not allow custom AU units to be created, to get
custom effects I need to add my DSP code into the processing body of an existing unit.


The code below was taken from a custom AU I developed (really just modified the Tremolo tutorial) and tested on my Mac. It's a simple low-pass filter. I've added it to a Multichannel Mixer AU (inside an AUGraph). However, when the code is actually running, the output is a horrible-sounding mess. I can tell that (approximately) the right frequencies are being impacted, but not cleanly. Hmmmpf ... not a very good description, I know.

Can anyone suggest what I should look at to improving this? (well, making it actually work :)


The musicdsp code assumes a command-line program (simple sequential execution). You need to move all the filter initialization code outside the callback into wherever you initialize everything else. Only coefficient ~updates~ and the filter loop itself should be in the callback. At present you are in effect re-initializing the filter each time the callback is called; which is guaranteed not to work as intended.


You need to create your filter object at startup (and more generally, reinitialize it any time the audio is restarted), and pass a pointer to it into the callback (i.e. as part of your DJmixer class), so that the filter state is preserved between calls.


Richard Dobson


_______________________________________________ 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
References: 
 >Applying a low-pass cutoff inside an AU (From: Darren Baptiste <email@hidden>)

  • Prev by Date: Re: memory use / embedding concerns
  • Next by Date: Re: Applying a low-pass cutoff inside an AU
  • Previous by thread: Applying a low-pass cutoff inside an AU
  • Next by thread: Re: Applying a low-pass cutoff inside an AU
  • Index(es):
    • Date
    • Thread