Walter Quad Effects (Tone, Compressor, Binson Echo, Reverb

I had to change the name from Binson 2019, since the plugin now can do so much more.
I have used ideas from Steves Multitap delay for the Binson echo , the Tone control part is Steves Desk-EQ-
The reverbs are Steves Reverb2 and the built in jcrev.
The Compressor is Chris’s Dynamic Compressor
All effects are more or less modified, with controls removed etc.
The plugin window needs to be resized for all controls to be visible.

If more than one track is selected and the value of “Track ID to process” is > 0, the plugin will apply effects only to the “Track ID to process”-track, but in Preview mode all selected tracks will be replayed.
Select a track or a part of it and use the little plugin “Get selected track id” to get the index of the selected track if you have many tracks to work with.
The Passthru-option turns off all effects so that the difference between dry and effects easily can be heard.
get-trackid.ny (430 Bytes)
walter-quad.ny (21.3 KB)

Which part doesn’t support stereo? Is it just the track selection?

I removed the right- and left-handling from the Roger Dannenberg reverb, but maybe it is more a matter of me not understanding how to handle the stereo array, and what happens when you remove it.

You call the mono reverb effect here:

(defun reverb (x time) 
  (multichan-expand #'reverb-mono x time))

MULTICHAN-EXPAND is a LISP macro (not to confused with Audacity’s Macro commands - they are unrelated).
What this macro does is to apply the function REVERB-MONO with the arguments X and TIME.
If either of the arguments is an array, then the macro applies the function to each element in the array, and returns an array.
(if both arguments are arrays, they must be the same length - that is, they must each have the same number of elements).

You call the reverb effect here:

(reverb sig time)

If SIG is a stereo track, then SIG is an array of 2 sounds, so MULTICHAN-EXPAND will apply the mono reverb to each sound, and returns an array of 2 sounds (a stereo sound).

Thanks! I will test with a stereo track and see if it crashes. I will also check my code and see i detail what was removed.

I tested a stereo track, all effects worked. Nice.

Check your “track selection” with a mix of mono and stereo tracks. Does that work?

I have a stereo track as track 25 , I can process both the mono tracks 24 and 26 and also the stereo track with all other tracks selected. Have you found any problems?

It “works”, but your code looks a bit peculiar.

(defun reverb-main (sig)
  (sum sig (reverb-part sig)))
  ;; 
 (if  (= (length (get '*selection* 'tracks)) 1)  ; only one track selected 
 (setq track-index selected-track)			; 
(setf track-index (get '*track* 'index)))	; The plug-in loops over all selected tracks

	
(case effects-order 
  (0
    *track*) ; passthru	
  (1							 
	(if ( = selected-track track-index)
    (scale-db mainvol  
	  (reverb-main (echo-main (do-compression (equalise *track*)))))
	   ""))
 (2 		
    (if ( = selected-track track-index)
    (scale-db mainvol  
	  (echo-main (reverb-main (do-compression (equalise *track*)))))
	   ""))
 (3		
    (if ( = selected-track track-index)
    (scale-db mainvol  
	  (echo-main (jcrev (do-compression (equalise *track*)) time reverb-vol)))
	   "")))

Looking at the “reverb-main” function, I originally read that as having the IF clause within the reverb-main function, but then realised that I had misread it due to the peculiar code layout. Written like this is better:

(defun reverb-main (sig)
  (sum sig (reverb-part sig)))


(if (= (length (get '*selection* 'tracks)) 1)  ; only one track selected 
    (setq track-index selected-track)
    (setf track-index (get '*track* 'index)))	; The plug-in loops over all selected tracks



Additional thoughts:

When applying a normal Nyquist effect (;type process), Audacity passes each track in turn to Nyquist, gets the result back, then passes the next track, and so on.

Also, for “pass-through”, rather than returning track, you could just return an empty string. In both cases the result is “no change to the track”, but for very long tracks you will notice that returning track is much slower (because Audacity has to read the audio data from track and write it to the track, whereas an empty string is treated as “do nothing” (a “no-op”).

A more concise way to write this would be:

(defun run-fx (option)
  (case option 
    (1 (scale-db mainvol  
          (reverb-main (echo-main (do-compression (equalise *track*))))))
    (2 (scale-db mainvol  
          (echo-main (reverb-main (do-compression (equalise *track*))))))
    (3 (scale-db mainvol  
          (echo-main (jcrev (do-compression (equalise *track*)) time reverb-vol))))
    (t "")))  ;pass-through


(if (or (= (length (get '*selection* 'tracks)) 1)  ; only one track selected
        (= selected-track (get '*track* 'index)))
    (run-fx effects-order)
    "")

which I think you will see is less code, and the intention is clearer.

Thanks Steve, nice! I will update my code tomorrow and also indent correctly (sorry). Tonight we saw “Once upon a time in Hollywood”, very good