DirectSound-Buffer manipulating
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
DirectSound-Buffer manipulating
An good idea for the next pure basic would be ,DirectSound-Buffer manipulating commands.
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Sorry, what are these commands supposed to do?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
Good programmers don't comment their code. It was hard to write, should be hard to read.
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Just an example,of course ...traumatic wrote:Sorry, what are these commands supposed to do?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
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.
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Just an example,of course ...traumatic wrote: Sorry, what are these commands supposed to do?
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.
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.
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.