Mercurial > hg > beaglert
comparison projects/d-box/FeedbackOscillator.h @ 50:be427da6fb9c newapi
Removed old testing code that stopped audio after 10 seconds; command line parameter updates; D-Box updates (not fully working yet)
author | andrewm |
---|---|
date | Sat, 30 May 2015 12:34:32 -0500 |
parents | 8a575ba3ab52 |
children |
comparison
equal
deleted
inserted
replaced
49:bb40e7e06b8c | 50:be427da6fb9c |
---|---|
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 |