DSPRelated.com
Forums

Re: Re: How do I "flip" the frequencies of a sound file? What I mean is...

Started by Jeff Brower December 16, 2009
Possimpable-
> Well I have Audacity and Goldwave, and I haven't found such a feature to apply these equations

The equation is simple:

y[n] = x1[n]*(-1)^n

1) Make a .wav file that contains the sequence 1, -1, 1, -1..., with length equal to your sound .wav file.

2) Multiply them together.
> so instead of being getting condescension for my questions I'd rather have a little assistance.

I would rather that you didn't cut text and waste time, even though I asked. Maybe someone else can help you from this point.

-Jeff

-------- Original Message --------
Subject: Re: [audiodsp] How do I "flip" the frequencies of a sound file? What I mean is...
Date: Wed, 16 Dec 2009 15:44:29 -0600 (CST)
From: "Jeff Brower"
To: "Possimpable"
CC: a...

Possimpable-

> Okay, but am I supposed to know what program to plug this
> equation into? I already know the concept, I'm asking about
> the execution.

You're kidding me, right? That equation is so simple you can use any number of audio editing programs to do it.
CoolEdit, Audacity, Goldwave...or technical computing software like MATLAB, LabVIEW, Hypersignal...

> I insisted on using the logarithmic axis
> because I use the graphic inversion of the spectrogram for
> the resynthesis process. Linear would screw everything up.

What I think you're saying is that you want perform the frequency flip in a partial log coordinate domain; i.e. it
would be easier or more intuitive for you to visualize. In that case a) your "flip center" frequency wouldn't be
Fs/2, and b) you would not be doing a linear rotation. You may want to search for more sophisticated methods. For
example, this link has MATLAB programs that allow you to choose the rotation frequency (search for "spectral
rotation"):

http://www.phon.ucl.ac.uk/resource/software.php

Possibly you could modify the MATLAB programs to handle log frequency axis.

-Jeff

PS. Please reply to the group so that others may benefit from the dialog.

PPS. Please don't cut text from your (and my) previous post. It costs time to go back and pull up the previous post
(copy below).
--------------- Original Message --------------
Subject: Re: [audiodsp] How do I "flip" the frequencies of a sound file? What I mean is...
From: "Jeff Brower"
Date: Wed, December 16, 2009 1:11 pm
To: "possimpable"
Cc: a...
-----------

Possimpable-

> I want to take a sound file, and geometrically flip every frequency around, say, A (440Hz). So A# becomes Ab, B
becomes G, C becomes Gb... To basically flip the frequency scale (f' = 440?/f). It's a similar concept to
voice-inversion-scrambling. The only way I know how to approximate this effect is by producing a spectrogram (with a
logarithmic frequency axis), vertically flipping the spectrogram, and resynthesizing it into sound with something
like ARSS or
> AudioPaint. Is there a better way? And if not, what program can I use to generate high resolution spectrograms
(large image files), so I can produce better results with my current process?

The following difference equation will "spectrally invert" a signal:

y[n] = x1[n]*(-1)^n

So that's a time domain method, as opposed to what you describe. I have posted a plot here:

http://www.signalogic.com/images/spectral_inversion.jpg

showing a speech signal processed this way. You mentioned a log freq axis, I don't know why that would matter -- it's
just a function of the display type that you use.

-Jeff