acid mountain vocoder

Just finished work on me new nyquist vocoder called “acid mountain” and thought I’d post it here.
It’s basically just a derivation of the awesome “RFT-Vocoder” by David Sky and Edgar RFT, but
I did do a rewrite of it (it’s now a “mono” version). Basically the algorithms are the same and I just
had to use the dst (distance) code because that’s what I call “pricey” code. I apologize to all
as rewriting someone’s code is usually considered rude. Please don’t be angry, but this is only
my first vocoder and, as good literature on such subjects is rather sparse, it was nice to get some
good experiments out of the RFT.

Anyway, what I did was (as I said) make a mono version that was based on my favorite settings in
RFT, and then add controls to further “tweak” those settings. The result sounds a bit like 1970s
robot voices.

Vocoding is pretty fun, and I really enjoyed learning about the algorithms used to make a vocoder
and hope to now find some proper literature on the subject and create my own algorithms…although
experimentation always helps as well.
Audacity Version: 1.2.6
Specs: mono/44.1khz only – input: 7 seconds – output: 10 seconds
Platform: Windows
Acid Mountain-v01.0.NY (23.4 KB)
You can download instructions in a “Release Package” at:
http://www.5mlabz.pcriot.com/D3/PZ/D1/NQ/D1/VP/C1/P01/ACD/ACD.HTML

Oh yes. I got a bit bored whilst coding and decide to write Module 07 as a tribute to one of my favorite
movies, 1978’s “The Wiz”. A classic rework of “The Wizard of Oz” that still scares the crap out of me.
Anyway, Module 07 makes the triangle oscillation. As I was looking at the tri wave of “the RFT”, it
really reminded me of the Emerald City scene where they keep looking over these pyramids that change
color as they dance around singing. I thought, osc, “Wizard of Osc”, and everything followed from there…

Module 08, which I won’t list here, is a tribute to Pink Floyd’s “Dark Side of the Moon” which I call “Dark Vocoder”
as I believe that that album really plays best to “The Wiz” and NOT “The Wizard of Oz”, though you probably
want to throw in a few other non DSOTM tunes such as “Goodbye Blue Sky” and also I’m pretty sure the film
is not synchronous with the album tracks. Here’s one hint “On The Run” is about the witch One ; “Us and Them”
is about the brilliant Tin Man (Nippsy Russel) ; and “Brain Damage” is the Scarecrow’s theme.

So, here’s the code, hope you can dig it:

; LINE 001 REM ÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓŽÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓ
; LINE 002 REM »»»»»»»»»»»»»»»»»»»» THE WIZ ««««««««««««««««««««
; LINE 003 REM žžžžžžžžžžžžžžžžžžžžžžžžÖžžžžžžžžžžžžžžžžžžžžžžžž
; LINE 004 REM VARIABLES:
; LINE 005 REM žžžžžžžžžžžžžžžžžžžžžžžžÖžžžžžžžžžžžžžžžžžžžžžžžž
; LINE 006 REM 01: COZ = SAMPLE POINTS/HEIGHTS (LIST)
; LINE 007 REM 02:  DN = NEGATIVE 1.0 CONSTANT
; LINE 008 REM 03: EMR = SECOND POINT SAMPLE NUMBER
; LINE 009 REM 04: EVL = TRIANGLE WAVEFORM
; LINE 010 REM 05: FE# = HEIGHT OF POINT (1-3)
; LINE 011 REM 06: GEM = FIRST POINT SAMPLE NUMBER
; LINE 012 REM 07: GLD = FOURTH POINT IN TRIANGLE WAVE
; LINE 013 REM 08: GOL = FOURTH POINT SAMPLE NUMBER
; LINE 014 REM 09: GRN = SECOND POINT IN TRIANGLE WAVE
; LINE 015 REM 10: OZ# = ROUNDED TIME POINTS (1-4)
; LINE 016 REM 11: PNK = FIRST POINT IN TRIANGLE WAVE
; LINE 017 REM 12: PSC = PROCESS: STARTING CURSOR
; LINE 018 REM 13: PSR = PROCESS: SAMPLE RATE
; LINE 019 REM 14: PTL = PROCESS: TOTAL LENGTH
; LINE 020 REM 15: RBY = THIRD POINT SAMPLE NUMBER
; LINE 021 REM 16: RED = THIRD POINT IN TRIANGLE WAVE
; LINE 022 REM 17:  UP = POSITIVE 1.0 CONSTANT
; LINE 023 REM 18: WIZ = FINAL TRIANGLE WAVEFORM TRACK
; LINE 024 REM 19:  Z0 = 0.0 CONSTANT 
; LINE 025 REM žžžžžžžžžžžžžžžžžžžžžžžžÖžžžžžžžžžžžžžžžžžžžžžžžž
; LINE 026 REM 01: AOZ = OSCILLATOR ADJUSTMENT
; LINE 027 REM 02: ERR = ERROR MARKER
; LINE 028 REM 03: ITL = INPUT: TOTAL LENGTH
; LINE 029 REM 04: OZC = OSCILLATOR FREQUENCY
; LINE 030 REM 05: TRI = TRIANGLE MODULATOR LENGTH
; LINE 031 REM 06: ZAM = SAMPLE TIME UNIT
; LINE 032 REM žžžžžžžžžžžžžžžžžžžžžžžžÖžžžžžžžžžžžžžžžžžžžžžžžž
; LINE 033 REM ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤°°¹°¹°
; LINE 034 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (TAGBODY
; LINE 036 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (IF (STRING/= ERR "NE") (GO LINE-067))
; LINE 038 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ PSC 0.000000)
               (SETQ PSR 44100.000000)
               (SETQ PTL ITL)
; LINE 042 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ UP (SND-CONST  1.0 PSC PSR PTL))
               (SETQ DN (SND-CONST -1.0 PSC PSR PTL))
               (SETQ Z0 (SND-CONST 0 PSC PSR PTL))
; LINE 046 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ PNK 0.000000) : (SETQ FE1 0.0)
               (SETQ GRN 0.000023) : (SETQ FE2 1.0)
               (SETQ RED 0.000045) : (SETQ FE3 0.0)
               (SETQ GLD TRI)
; LINE 051 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ OZ1 (+ PNK 0.000013))
               (SETQ OZ2 (+ GRN 0.000013))
               (SETQ OZ3 (+ RED 0.000013))
               (SETQ OZ4 (+ GLD 0.000013))
; LINE 056 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ GEM (TRUNCATE (/ OZ1 ZAM)))
               (SETQ EMR (TRUNCATE (/ OZ2 ZAM)))
               (SETQ RBY (TRUNCATE (/ OZ3 ZAM)))
               (SETQ GOL (TRUNCATE (/ OZ4 ZAM)))
; LINE 061 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ COZ (LIST GEM FE1 EMR FE2 RBY FE3 GOL))
               (SETQ EVL (SND-PWL PSC PSR COZ))
; LINE 064 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
               (SETQ WIZ (SND-OSC EVL AOZ PSR OZC PSC PTL 0.0))
; LINE 066 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
  LINE-067     )
; LINE 068 REM €€€€€€€€€€€€€€€€€€€€€€€ÖŽÖ€€€€€€€€€€€€€€€€€€€€€€€
; LINE 069 REM ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤°°¹°¹°
; LINE 070 REM ÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓŽÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓÒÓ
; LINE 071 REM =====>
; LINE 072 REM =====>

…pretty ain’t it. :question: You’ve got to be seen in green.

I apologize to all as rewriting someone’s code is usually considered rude.

Don’t worry about that, I also learned Nyquist by re-writing plugins of others.

Problem: Audacity_1.3.13 refuses to load your plugin because there are lots of unreadable characters, so I can’t test your plugin.

If I look at the code listing from above on my computer (Debian Linux) I see:

; LINE 001 REM <unreadable-characters>
; LINE 002 REM <unreadable-characters> THE WIZ <unreadable-characters>
; LINE 003 REM <unreadable-characters>
; LINE 004 REM VARIABLES:
; LINE 005 REM <unreadable-characters>

Nyquist can only read ASCII characters from ASCII 0 to 127 (as documented in the XLISP appendix of the Nyquist manual), everything else causes problems. Also Audacity_1.2.6 contains a very old Nyquist version (from 2005 or even older). If you want to test your plugins it’s strongly recommended to use the newest Audacity_1.3.x-beta version.

I hope to now find some proper literature on the subject and create my own algorithms

Unfortunately there is not much literature about this. Vocoders were used in the 1930s as a very early form of data reduction in telephony, then later on during WorldWar2 in a few data-scrambling machines. Vocoding in telephony had been given up because the effort to encode and decode the signal was too expensive and didn’t pay off, and there is no (officially available) documentation about the data-scrambling machines of WorldWar2, but I think they just simply switched the vocoder channels during transmission.

The best pages about speech machines I know are:

There is a FFT-based vocoder described in:

And there is an “Easy Vocoder” using built-in generators instead of an additional audio track:

Fell free to rewrite all plugins to your own versions.