• 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: 200+ sine oscillators on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 200+ sine oscillators on iOS


  • Subject: Re: 200+ sine oscillators on iOS
  • From: Brian Willoughby <email@hidden>
  • Date: Mon, 28 May 2018 20:28:01 -0700

> On May 27, 2018, at 1:08 PM, Paul Davis <email@hidden> wrote:
>> On Sun, May 27, 2018 at 3:53 PM, Albin Stigö <email@hidden> wrote:
>>> An oscillator based on a lookup table would work well. You only need one
>>> table per wave type and then maintain separate pointers into the table for
>>> each oscillator.
>
> ​on most modern architectures, it is less costly to do the math to generate a
> sine than it is to do memory-based lookup.​ wavetables for sine waves are a
> mid-90s idea.

Paul is right. Lookup tables add distortion, unless you have a table for every
possible frequency and you don’t allow pitch bends. The various methods for
changing the pitch of a lookup table waveform all add distortion of one kind or
another.

In contrast, a state variable filter with unity feedback can create a perfect
sine wave that it ideal for the given sample rate and pitch, including
frequencies with periods that are fractional sample lengths.

I benchmarked the SVF implementation with a 64-bit FFT and found the distortion
to be very, very low - and quite comparable to the sin() function that has more
overhead.

Brian Willoughby

p.s. I’m curious what Apple is using for their sin() function and where to
expect the distortion to appear. The reason I’m curious is that I would like to
make sure that my benchmark is showing any distortion that might be there.

 _______________________________________________
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: 200+ sine oscillators on iOS
      • From: Ross Bencina <email@hidden>
    • Re: 200+ sine oscillators on iOS
      • From: Paul Davis <email@hidden>
References: 
 >Re: 200+ sine oscillators on iOS (From: Ian Kemmish <email@hidden>)
 >Re: 200+ sine oscillators on iOS (From: Albin Stigö <email@hidden>)
 >Re: 200+ sine oscillators on iOS (From: Paul Davis <email@hidden>)

  • Prev by Date: Re: AUv3 registration issues
  • Next by Date: Re: 200+ sine oscillators on iOS
  • Previous by thread: Re: 200+ sine oscillators on iOS
  • Next by thread: Re: 200+ sine oscillators on iOS
  • Index(es):
    • Date
    • Thread