Mercurial > hg > soniczoomios
view frequencer.h @ 24:a4908ad8c78e
Top and bottom toolbars. Intro page.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 01 Feb 2013 11:16:56 +0000 |
parents | 7541aeaebcdc |
children |
line wrap: on
line source
// // frequencer.h // oscSenderExample // // Created by Robert Tubb on 27/11/2012. // // This is a C++ version of freqMaster.js max script #ifndef __oscSenderExample__frequencer__ #define __oscSenderExample__frequencer__ #include <iostream> #include "ofMain.h" #include "math.h" class Frequencer{ private: vector<double> timePoints; vector<double> freqMag; vector<double> freqPhase; int N; void dft(); void idft(); public: Frequencer(); void clear(); void timeEdit(int n, double value); void timeEdit(vector<double> allValues); void freqMagEdit(int k, double mag); vector<double> freqMagEdit(vector<int> indexes, vector<double> values); void freqPhaseEdit(int k, double phase); vector<double> freqPhaseEdit(vector<int> indexes, vector<double> values); double getPoint(int idx); //int getPoint(int idx); // rounded }; #endif /* defined(__oscSenderExample__frequencer__) */