Noise.hpp (1018B)
1 #pragma once 2 3 #include "bogaudio.hpp" 4 #include "dsp/noise.hpp" 5 #include "poly_channels.hpp" 6 7 using namespace bogaudio::dsp; 8 9 extern Model* modelNoise; 10 11 namespace bogaudio { 12 13 struct Noise : PolyChannelsModule { 14 enum ParamsIds { 15 NUM_PARAMS 16 }; 17 18 enum InputsIds { 19 ABS_INPUT, 20 NUM_INPUTS 21 }; 22 23 enum OutputsIds { 24 WHITE_OUTPUT, 25 PINK_OUTPUT, 26 RED_OUTPUT, 27 GAUSS_OUTPUT, 28 ABS_OUTPUT, 29 BLUE_OUTPUT, 30 NUM_OUTPUTS 31 }; 32 33 BlueNoiseGenerator _blue; 34 WhiteNoiseGenerator _white; 35 PinkNoiseGenerator _pink; 36 RedNoiseGenerator _red; 37 GaussianNoiseGenerator _gauss; 38 39 Noise() { 40 config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); 41 42 configInput(ABS_INPUT, "Absolute value"); 43 44 configOutput(WHITE_OUTPUT, "White noise"); 45 configOutput(PINK_OUTPUT, "Pink noise"); 46 configOutput(RED_OUTPUT, "Red noise"); 47 configOutput(GAUSS_OUTPUT, "Gaussian noise"); 48 configOutput(ABS_OUTPUT, "Absolute value"); 49 configOutput(BLUE_OUTPUT, "Blue noise"); 50 } 51 52 void processAll(const ProcessArgs& args) override; 53 }; 54 55 } // namespace bogaudio