Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
60 user(s) are online (37 user(s) are browsing Forums)

Members: 1
Guests: 59

Raziel, more...

Support us!

Recent OS4 Files
OS4Depot.net






Real-time audio effects using AHI?
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1069
Did anybody ever tried to create some guitar (or mic) effects using AHI? I'm just wondering what are the latencies and expectations here.

Edit: to clarify, something like this:

1) Record input
2) Process the sound real-time with minimal latency
3) Playback / output to file


Edited by Capehill on 2020/2/12 18:08:58
   Report Go to top

Re: Real-time audio effects using AHI?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2793
@Capehill

AHI is low level API, it does not do any effects.

There is always some buffering, as you need to have next sample slice ready by the time you done with previews sample slice.

CD Quality, 44100 Hrz,

This means, you have 44100 recorded amplitudes. In 1 sec, etch amplitude is 16bit (2 bytes), and you have 2 channels (left and right), 2*2*44100 = 176400 bytes = 172KB/s.
(or 86Kbytes in 500ms, or 43Kbytes in 250ms, the slices it’s up to you.)

So as long as you have 172KB ready by 1 sec you are fine, if you use more then 1 sec, then your sound effect is too heavy.

So generating a wave form is simple SIN(f), if you need more than one frequency you need to apply to ground frequency, you need to change frequency over time, and amplitude of the frequency. You probably want the frequency’s and amplitudes to transition smoothly so you need some kind curve formula, and you most like put multiple frequency on top of each other to create sound you like, of cause you amplitude, they should follow the DB scale. So, it should correct. The more complex the make the more time you need to generate the sound and the closer you get the 172KB in 1sec limit. To not get glitches in sound make sure never get close to 1sec, but have 172KB ready by maybe 500ms or something like that.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: Real-time audio effects using AHI?
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1069
@LiveForIt

I know the basics using AHI device API. I just haven't been able to find any real-time guitar effect (Aminet) so I have been wondering is there some technical obstacle. Maybe it's been the general lack of CPU power (68K)? Or just interest.

I guess I will study the AHI function API and see what is the result.

   Report Go to top

Re: Real-time audio effects using AHI?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2793

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: Real-time audio effects using AHI?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2793
@Capehill

Maybe it's been the general lack of CPU power (68K)?

I think noice and boom shoot effect in AMOS is software synth, but I'm not 100% sure. So I think some simple sound effects should not need any CPU power.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: Real-time audio effects using AHI?
Quite a regular
Joined:
2013/10/17 16:21
From Hungary
Posts: 632
@Capehill
It's probably because real-time audio effects can be quite CPU intensive. I'd look at the AHI library API, and more specifically AHI_SetEffect.
http://www.lysator.liu.se/ahi/v4-site ... oc/ahi.html#AHI_SetEffect

_________________
I see the jimmies have been rustled.
   Report Go to top

Re: Real-time audio effects using AHI?
Just can't stay away
Joined:
2008/1/6 17:56
From Pennsylvania, USA
Posts: 1342
@Capehill
You could check out "audioevolution" at OS4Depot. It's primarily a mixer but the PDF docs have a "real-time" section. I've never used it but it might be worth a look.

_________________
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

   Report Go to top





[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project