Page 1 of 1

DirectSound-Buffer manipulating

Posted: Sat Mar 05, 2005 7:34 pm
by Hroudtwolf
An good idea for the next pure basic would be ,DirectSound-Buffer manipulating commands.

Posted: Sat Mar 05, 2005 9:48 pm
by Joakim Christiansen
indeed, I want some sound buffers!
Maybe something like this:
LoadSound(#Sound, FileName$ [, Buffers])

Posted: Sat Mar 05, 2005 9:56 pm
by Hroudtwolf
I mean new commands to manipulate the soundbuffer directly.

Example:

result.l = GetInputSignal (mixer.l)
result.l = SetBaseFrequency (Sound.l); in percent
result.l = SetMiddleFrequency (Sound.l); in percent
result.l = SetHighFrequency (Sound.l); in percent

Posted: Sat Mar 05, 2005 10:56 pm
by traumatic
Hroudtwolf wrote: result.l = GetInputSignal (mixer.l)
result.l = SetBaseFrequency (Sound.l); in percent
result.l = SetMiddleFrequency (Sound.l); in percent
result.l = SetHighFrequency (Sound.l); in percent
Sorry, what are these commands supposed to do?

Posted: Sun Mar 06, 2005 12:44 am
by Hroudtwolf
traumatic wrote:
Hroudtwolf wrote: result.l = GetInputSignal (mixer.l)
result.l = SetBaseFrequency (Sound.l); in percent
result.l = SetMiddleFrequency (Sound.l); in percent
result.l = SetHighFrequency (Sound.l); in percent
Sorry, what are these commands supposed to do?
Just an example,of course ...

result.l = GetInputSignal (mixer.l) ; Get the actual samplevolume( For effekts like spectrum-analyzers)
result.l = SetBaseFrequency (Sound.l,percent.l); Set the base-frequency of your sound(for equalizers)
SetMiddleFrequency ,SetHighFrequency for nearly the same.But for the other frequency-spectrums.

Posted: Sun Mar 06, 2005 12:45 am
by Hroudtwolf
traumatic wrote: Sorry, what are these commands supposed to do?
Just an example,of course ...

result.l = GetInputSignal (mixer.l) ; Get the actual samplevolume( For effekts like spectrum-analyzers)
result.l = SetBaseFrequency (Sound.l,percent.l); Set the base-frequency of your sound(for equalizers)
SetMiddleFrequency ,SetHighFrequency for nearly the same.But for the other frequency-spectrums.

Posted: Sun Mar 06, 2005 7:28 am
by nco2k
IsSoundPlaying(#Sound) and OGG Stream would be more important.

c ya,
nco2k

Posted: Thu Mar 10, 2005 3:57 pm
by KarLKoX
Hroudtwolf>you can't do a spectrum analyzer only with the sound volume value, you ll have to FFT the signal and the fonction will then return you an array of linear (or not) values of the signal.
I don't understand the SetBaseFrequency function ?
For the Middle, High, Low frequencies, you can write a biquad filter or, better, a FIR filter with windowing or remez polynominal interpretation.
Remember that the LoadSound PB function return you a DIRECTSOUNDBUFFER(8 ?) pointer.