would it proper to use getWavdata, and then use a normal routine for reversing an array as a long?
Like this maybe?
Public Sub Reverse(ByRef lParams() As Long)
Dim i As Long Dim tmp As Long For i = 0 To UBound(lParams) / 2 - 1 tmp = lParams(i) lParams(i) = lParams(UBound(lParams) - i) lParams(UBound(lParams) - i) = tmp Next i
Also is there any information on how to start coding a DSP for fmod?
Reversing the array would mean the audio would be played in reverse.
Inverting is done on a per-sample basis. Say that each sample is in the range of -1.0 to +1.0, then all you need to do is something like:
[code:ax9ji5fx]For i = 0 To nbSamples
samples(i) = -samples(i)
- Adion answered 10 years ago
I don’t think it would be negative volume, but negative panning.
I’m trying to figure out how to approach this, I’m not a math major. I guess what I’m trying to figure out is how to take a wav turn it into an array of numbers per sample, then reverse the order of the array so it’s upside down.
at least thats what I’m thinking after looking at a wave editor and seeing how the wav display changes from inverting the phase. It looks as if the waveform is upside down.
I feel that is in already in FMOD since it does 3d sound, and phase inversion sounds like stuff is behind you when your using stereo speakers (also the base for dobly prologic, ie: 3d sound from 2 track audio). Is there a way to trick FMOD into doing this for me, without having to figure out all this math.
The easiest way to generate a prologic signal is to call System::setSpeakerMode(FMOD_SPEAKERMODE_PROLOGIC).
Negative volume is a concept that doesn’t really have a physical meaning. It is how to invert the phase of digital signal.
Prologic signals are driven by phase inversions using negative volumes. When the two channels are completely out of phase (left volume = negative right volume), the sound will be played evenly from the two rear speakers. You can pan across the the rear speakers by reducing the volume of one channel to shift the sound to the other side. For example, left volume = 0.8 right volume = -0.6 will play from the rear channels, slightly panned to the left.
good, hopefully this works. I need the inverted signal to control the feedback coils in the cutterhead. The main drive coils have the positive signal, while the feedback coils have the inverted or negative signal, in a push/pull configuration. 😉
Beware, a phase-matrix "pro-logic" signal is not at all the same as a truly inverted stereo signal. If I were mastering a vinyl disc, I would not want anything in the chain that had to do with prologic unless I actually intended to use it.
It would be much more accurate to write custom dsp or to read fmod’s output and generate your own inversion.
- jcobb answered 10 years ago
Please login first to submit.