Home away from home
Joined: 2006/11/20 16:26 Last Login
: Today 19:43
From Norway
Group:
Registered Users
|
@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.
|