[
Hi.
I’ve found very interest The “Pulse Width” and “fade” control, I’ve tried add to this plugin the waveform option but really it leaves my hands, I don’t have the knowledge to complete the code.
this is what I managed to modify:
;nyquist plug-in
;version 1
;type process
;categories "http://lv2plug.in/ns/lv2core#ModulatorPlugin"
;name "IsoMod2..."
;action "Modulating..."
;info "Isochronic Modulator by Steve Daulton. GPL v.2nhttp://easyspacepro.comnn'Pulse Width' controls the length of each pulse.n'Fade Time' adjusts the fade in/out speed of the pulses.nThe modulation speed/depth transforms gradually fromnthe initial settings to the final settings.nnPlug-in provided as an audio processing effect.nThe author does not endorse or claim any relevancento the theory or practice of brainwave entertainment."
;control wave "Tremolo Shape" choice "sine,triangle,sawtooth,inverse sawtooth,square" 0
;control pw "Pulse Width [50%=Square]" real "%" 40 0 100
;control ft "Fade Time" real "%" 15 0 100
;control startf "Initial Modulation Frequency" real "Hz" 7 1 40
;control endf "Final Modulation Frequency" real "Hz" 2 1 40
;control starta "Initial Modulation Depth" int "%" 100 0 100
;control enda "Final Modulation Depth" int "%" 100 0 100
(setq pw (/ pw 100.0))
(setq ft (/ ft 400.0))
(setq ft (* ft (min pw (- 1 pw)) 2))
; set tremolo *waveform*
(setq *waveform* (cond
((= wave 0) ; sine
*sine-table*)
((= wave 1) ; triangle
*tri-table*)
((= wave 2) ; sawtooth
(abs-env (list (pwl 0 -1 .995 1 1 -1 1) (hz-to-step 1.0) t)))
((= wave 3) ; inverse sawtooth
(abs-env (list (pwl 0 1 .995 -1 1 1 1) (hz-to-step 1.0) t)))
(t ; square
(abs-env (list (pwl ft 1 (- pw ft) 1 (+ pw ft) -1 (- 1 ft) -1 1 0)(hz-to-step 1.0) t))) ;; doesn't work
;; Function to generate sweep tone
(defun sweep (sf ef)
(mult 0.5 (sum 1.0 (fmlfo (pwlv sf 1.0 ef) *waveform*))))
(let* ((starta (/ starta 100.0))
(enda (/ enda 100.0))
(wet (pwlv starta 1 enda))
(dry (sum 1 (mult wet -1))))
(mult s (sum dry (mult wet (sweep startf endf)))))
Help me with sinewave form please.
Attached example for sine wave.
thank you.
]