Mercurial > hg > jslab
view examples/sound/sampled/modulate.scm @ 5:b67a33c44de7
Remove some crap, etc
author | samer |
---|---|
date | Fri, 05 Apr 2019 21:34:25 +0100 |
parents | bf79fb79ee13 |
children |
line wrap: on
line source
;;; Modulate noise or sine wave with short-term energy of input audio signal (load "audio.scm") (load "lineout.scm") (load "synthesis.scm") (put "regulated" #f) ; main loop will not be regulated, run as fast as possible. (tasks) ; creates regulator and main loop Task (define N 256) ; frame size for audio input, output, and hop size (lineout (default-linesnk) (gen->vector N (Product. ; generate N sample vector as product of two ; (NormalisedGaussian.) ; signal generators: (oscillator 0.5) ; a sinusoidal oscillator at 0.5 radians/sample (FunctionOfGenerator. (Sqrt.) ; and the square root of (filter-gen ; a filtered signal (fir-filter (VVector. "coeffs" 32)) ; filter is fir with 32 taps (filter-gen (EnergyOperator.) ; signal is energy (Wavetable. (linein (default-linesrc) N N)))))))) ; of audio in (expose) ; shows GUI (set "editor.plotter.type" 4) ; vector editors like bar chart rather than line (exec (viewable "coeffs") "plotter editor")