Mercurial > hg > beaglert
comparison projects/d-box/FeedbackOscillator.h @ 108:3068421c0737 ultra-staging
Merged default into ultra-staging
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 18 Aug 2015 00:35:15 +0100 |
parents | be427da6fb9c |
children |
comparison
equal
deleted
inserted
replaced
54:d3f869b98147 | 108:3068421c0737 |
---|---|
5 * Author: Andrew McPherson | 5 * Author: Andrew McPherson |
6 */ | 6 */ |
7 | 7 |
8 #ifndef FEEDBACKOSCILLATOR_H | 8 #ifndef FEEDBACKOSCILLATOR_H |
9 #define FEEDBACKOSCILLATOR_H | 9 #define FEEDBACKOSCILLATOR_H |
10 | |
11 #include <stdint.h> | |
12 | 10 |
13 class FeedbackOscillator | 11 class FeedbackOscillator |
14 { | 12 { |
15 public: | 13 public: |
16 FeedbackOscillator(); | 14 FeedbackOscillator(); |
19 // Initialise the settings for the feedback oscillator | 17 // Initialise the settings for the feedback oscillator |
20 void initialise(int maxTableSize, float hpfCutoffFrequency, float matrixSampleRate); | 18 void initialise(int maxTableSize, float hpfCutoffFrequency, float matrixSampleRate); |
21 | 19 |
22 // Process one sample and store the output value | 20 // Process one sample and store the output value |
23 // Returns the length of table to interpolate; or 0 if nothing to process further | 21 // Returns the length of table to interpolate; or 0 if nothing to process further |
24 int process(uint16_t input, uint16_t *output); | 22 int process(float input, float *output); |
25 | 23 |
26 float *wavetable() { return wavetableRead; } | 24 float *wavetable() { return wavetableRead; } |
27 | 25 |
28 private: | 26 private: |
29 float coeffs[3]; // Coefficients of first-order high-pass filter | 27 float coeffs[3]; // Coefficients of first-order high-pass filter |