Vocoder not cooperating

This section is now closed.
Forum rules
Audacity 1.2.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
Locked
darkgob
Posts: 3
Joined: Tue Dec 01, 2009 4:41 pm
Operating System: Please select

Vocoder not cooperating

Post by darkgob » Tue Dec 01, 2009 4:50 pm

I've looked through the steps for using the vocoder plugin in other posts here, and I think I'm doing it right, but all I get is a signal with either tiny amplitude or super-high amplitude and frequency. I figure something must be set wrong since the directions I've read aren't exactly rocket surgery.

What I'm doing:
0. Source file is a mono track (for the sake of completeness - generated by a text-to-speech engine)
1. Tracks -> Add New -> Audio Track
2. Generate -> Noise (default settings)
3. Select original track, Make Stereo Track
4. Effect -> Plugins -> Vocoder (default settings)
5. The result:
Image

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Vocoder not cooperating

Post by steve » Tue Dec 01, 2009 10:22 pm

That's confusing - you can't do "Tracks -> Add New -> Audio Track" in Audacity 1.2

Tried it here on Audacity 1.3.10 and it 's working fine.

Could you give more detail - version of Audacity (see "help > About Audacity") and all the settings at each step. Ideally, could you also upload a short sample of the original track (in the same format as the original file) somewhere on the Internet and post a link (I use the free service at sendspace.com).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

darkgob
Posts: 3
Joined: Tue Dec 01, 2009 4:41 pm
Operating System: Please select

Re: Vocoder not cooperating

Post by darkgob » Wed Dec 02, 2009 3:18 am

It's actually version 1.3.7, which now that I look at it is apparently beta, even though it's the only version available in the Ubuntu repos and it's not marked as a beta. That's a little perturbing.

But that doesn't seem to matter because I have actually managed to get the vocoder to work with another file, an MP3 ripped from a CD. Still not able to get it working on files generated via text-to-speech though (I've tried several). Here's one of them: http://www.sendspace.com/file/tk7b4n

darkgob
Posts: 3
Joined: Tue Dec 01, 2009 4:41 pm
Operating System: Please select

Re: Vocoder not cooperating

Post by darkgob » Wed Dec 02, 2009 3:35 pm

Okay I actually figured out what was wrong. As you can see in the image I posted the rate of the source file is 22050 Hz, apparently (and I'm not sure why this is but I'm sure someone smarter than I knows) a rate of 44100 Hz is necessary for the vocoder to work right.

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Vocoder not cooperating

Post by steve » Wed Dec 02, 2009 10:34 pm

Well you learn something new every day ;)
There should really be a warning about that. The problem is that the Vocoder is attempting to process sounds in the 20Hz to 20kHz range, but sample rates below 44100 do not go as high as 20kHz because the highest audio frequency possible is a little under half the sample rate (which is the Nyquist frequency).

The code can be adapted quite easily to work with 22050 sample rates, but it's probably just as easy to convert the files to 44100.

If you want to modify the code, find the file "vocoder.ny" in your Audacity plug-ins folder. Open the file in a text editor (such as notepad) then find the line:

Code: Select all

(setf octaves (/ (log 1000.0) (log 2.0)))
and change it to

Code: Select all

(setf octaves (/ (log 500.0) (log 2.0)))
and save the file.

The down side of doing this is that you will loose some "fidelity" when using the vocoder on audio tracks with frequencies above 10kHz.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked