forked from clone45/EquationComposer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModuleBitReducer.h
48 lines (42 loc) · 1.12 KB
/
ModuleBitReducer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* +----------------------+
* | ModuleBitReducer |
* |----------------------|
* > audio_input |
* > bit_input |
* | output >
* +----------------------+
*
*/
// =============================================================================
//
// ModuleBitReducer is an audio effect for reducing the number of bits used
// to represent the audio information, which results in a low-fi, crunchy,
// digital distortion.
//
// Example usage:
//
// ModuleWavetableOsc *wavetable_osc = new ModuleWavetableOsc();
// ModuleBitReducer *bit_reducer = new ModuleBitReducer();
//
// wavetable_osc->wavetable_input = inputs->mod;
// wavetable_osc->frequency_input = inputs->sr;
//
// bit_reducer->audio_input = wavetable_osc;
// bit_reducer->bit_input = inputs->param1;
//
// this->last_module = bit_reducer;
#ifndef ModuleBitReducer_h
#define ModuleBitReducer_h
#include "Arduino.h"
#include "Module.h"
class ModuleBitReducer : public Module
{
public:
ModuleBitReducer();
uint16_t compute();
// Inputs
Module *audio_input;
Module *bit_input;
};
#endif