Files
libpasada/pasada-lib/include/pd_signal.h

27 lines
904 B
C
Raw Normal View History

2026-03-04 15:34:46 +01:00
//
// Created by david on 04.03.2026.
//
#ifndef PASADASUPERPROJECT_SIGNAL_H
#define PASADASUPERPROJECT_SIGNAL_H
#include <vector>
namespace pd_signal {
2026-03-04 16:27:00 +01:00
/** `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);
2026-03-04 15:34:46 +01:00
/**
* Evaluate at points x the function given by the samples fp[xp[n]].
* Returned in y.
*/
2026-03-04 16:27:00 +01:00
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);
2026-03-04 15:34:46 +01:00
}
#endif //PASADASUPERPROJECT_SIGNAL_H