feat: pd_signal: resample, linspace
This commit is contained in:
@@ -8,11 +8,20 @@
|
||||
#include <vector>
|
||||
|
||||
namespace pd_signal {
|
||||
/** `num` evenly spaced numbers over interval [start,stop] */
|
||||
void linspace(std::vector<double>& data, double start, double stop, int num);
|
||||
/** `num` evenly spaced numbers over interval [start,stop] with endpoint=true or [start,stop) with endpoint=false */
|
||||
void linspace(std::vector<double>& data, double start, double stop, int num, bool endpoint);
|
||||
|
||||
/**
|
||||
* Evaluate at points x the function given by the samples fp[xp[n]].
|
||||
* Returned in y.
|
||||
*/
|
||||
void interp(std::vector<double>& x, std::vector<double>& xp, std::vector<double>& fp, std::vector<double>& y);
|
||||
void interp(std::vector<double>& y, std::vector<double>& x, std::vector<double>& xp, std::vector<double>& fp);
|
||||
|
||||
/** resample to BEAT_LEN */
|
||||
void resample(std::vector<double> &out, std::vector<double> x, int beat_len);
|
||||
|
||||
}
|
||||
|
||||
#endif //PASADASUPERPROJECT_SIGNAL_H
|
||||
Reference in New Issue
Block a user