Re: Thunderbolt port audio programmability
Re: Thunderbolt port audio programmability
- Subject: Re: Thunderbolt port audio programmability
- From: Carl Hoefs via Cocoa-dev <email@hidden>
- Date: Fri, 20 Mar 2020 19:59:47 -0700
Thanks for all the helpful insights and links.
At this point, I'm using Audio Units in my iOS test app. I can generate signals
of specific type, frequency and amplitude. That was the easy part...
However, a hard requirement is that the app must generate what amounts to
'DC-offset' signals (fully offset from the X-axis). Specifically, for a set
period of time, the signal needs to be offset fully above the X-axis (a fully
'positive' signal), and then for a set period of time be offset fully below the
X-axis (fully 'negative'). This cyclic pattern repeats indefinitely. (Yes,
strictly speaking, these aren't 'audio' signals any longer; they're actually
biological stem-cell stimulation signals.)
I generate the AU waveform data according to:
sample = (sin(theta) * amplitude/2) + amplitude/2; // e.g., sine wave offset
positive
sample = (sin(theta) * amplitude/2) - amplitude/2; // e.g., sine wave offset
negative
...and I've verified that this results in the correct offset values in the AU
buffer. But when the AU subsystem renders this data, it ignores the offset and
generates a "corrected" X-axis-centered audio signal anyway, which is useless
for my purpose.
Is this sort of thing possible to do with Audio Units? AVFoundation?
-Carl
> On Mar 17, 2020, at 10:19 PM, Jens Alfke <email@hidden> wrote:
>
> If you want to make more than sine waves, there are a bunch of open source
> audio libraries/programs for generating arbitrarily fancy waveforms — CSound,
> Pure Data, Max, Supercollider... These are usually used for music synthesis,
> but most of them let you do general purpose DSP type stuff. And of course
> they handle the audio output too.
>
> https://en.wikipedia.org/wiki/Comparison_of_audio_synthesis_environments
> <https://en.wikipedia.org/wiki/Comparison_of_audio_synthesis_environments>
>
> —Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden