wtpp/src/wtpp.cpp

38 lines
705 B
C++

#include <array>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <string>
#include <type_traits>
#include <math.h>
#include "wave.h"
#include "wavetable.h"
static const uint32_t DEFAULT_SAMPLE_RATE = 44100; // 44.1 kHz sampling rate
static const uint8_t DEFAULT_BIT_DEPTH = 12;
/*! Logs a message
@param message The string to be logged
*/
static void log(std::string message)
{
std::cout << "wtpp: " << message << '\n';
}
int main()
{
// Generate wavetables
log("Generating wavetables");
// Generate sine wave cycle object
Wave sin_wave = gen_sin();
log(std::to_string(sin_wave.id()));
log("Printing head of sine table");
sin_wave.print_head();
return 0;
}