Mercurial > hg > beaglert
comparison projects/d-box/FeedbackOscillator.h @ 67:472e892c6e41
Merge newapi into default
author | Andrew McPherson <a.mcpherson@qmul.ac.uk> |
---|---|
date | Fri, 17 Jul 2015 15:28:18 +0100 |
parents | be427da6fb9c |
children |
comparison
equal
deleted
inserted
replaced
21:0d80ff9e2227 | 67:472e892c6e41 |
---|---|
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 |