-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWavePoly.h
More file actions
28 lines (22 loc) · 804 Bytes
/
WavePoly.h
File metadata and controls
28 lines (22 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
/*
MINI VIRTUAL ANALOG SYNTHESIZER
Copyright 2014 Kenneth D. Miller III
Poly-Noise Wave
*/
class OscillatorConfig;
class OscillatorState;
// precomputed linear feedback shift register output
extern char poly4[(1 << 4) - 1];
extern char poly5[(1 << 5) - 1];
extern char period93[93];
extern char poly9[(1 << 9) - 1];
extern char poly17[(1 << 17) - 1];
// precomputed wave tables for poly5-clocked waveforms
extern char pulsepoly5[ARRAY_SIZE(poly5) * 2];
extern char poly4poly5[ARRAY_SIZE(poly5) * ARRAY_SIZE(poly4)];
extern char poly17poly5[ARRAY_SIZE(poly5) * ARRAY_SIZE(poly17)];
// initialize polynomial noise tables
extern void InitPoly();
// poly waveform
extern float OscillatorPoly(OscillatorConfig const &config, OscillatorState &state, float step);