Re: 200+ sine oscillators on iOS
Re: 200+ sine oscillators on iOS
- Subject: Re: 200+ sine oscillators on iOS
- From: Brian Willoughby <email@hidden>
- Date: Sat, 26 May 2018 12:46:23 -0700
I was able to implement somewhere between 1422 and 1526 sinusoid oscillators on
macOS using a single callback in an AUGraph (I did not bother to determine the
exact upper limit to the voice count). The rest of the graph handled all of the
other audio processing that was needed apart from the raw oscillators and their
parameters.
I suspect that there is a lot of overhead when creating separate objects for
each oscillator. Rather can creating more, I think you would maximize your
voice count by having a single AudioBufferList where you handle the mixing of
your 200 oscillators with custom, optimized code. Of course, if you want to
play multiple notes then you’ll need multiple objects, but within a single note
that combines multiple oscillators you’ll want the efficiency of local code
optimization.
While it’s true that CoreAudio differs between iOS and macOS, I believe that
you’re dealing with the same issues of optimizing your code by reducing
overhead wherever possible. I have not tried my sinusoid synthesis under iOS
yet, so I cannot offer specific design suggestions.
By the way, one of my projects was emulating the Technos Acxel resynthesizer
hardware, which has 1024 oscillators in one of its models. Another project was
recreating the THX “deep note” and then experimenting with parameters like
increasing the number of oscillators to ridiculous extremes.
Brian Willoughby
> On May 26, 2018, at 12:20 PM, Shea Alterio <email@hidden> wrote:
>
> Hello everybody,
>
> I'm working on a software synthesizer for iOS. The goal is to emulate the
> behavior of a very old synthesizer which had something like 200 sine
> oscillators in it which were used to generate all sorts of different tones.
>
> I found this and used it as a jumping off point.
> https://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
> <https://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html>
>
> The problem i'm running into right now is i can get my oscillators to work
> when, and i can get them into their own buffer, but i'm running into problems
> trying to combine the buffers.
>
> Should i be trying to have one AudioBufferList with 200 members? That is how
> i am trying to do it right now, but maybe i want a lot of AudioBufferList and
> combine them later.
>
> Thanks,
> Shea
> _______________________________________________
> 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
_______________________________________________
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