Further improvements to bandlimited waves

This commit is contained in:
Vesa
2014-04-09 13:03:34 +03:00
parent 7b0d829cc4
commit d5fa2568ed
2 changed files with 52 additions and 30 deletions

View File

@@ -34,9 +34,9 @@ void BandLimitedWave::generateWaves()
int i;
// saw wave - BLSaw
for( i = 1; i <= MAXLEN; i++ )
for( i = 0; i <= MAXTBL; i++ )
{
const int len = 1 << i;
const int len = TLENS[i];
//const double om = 1.0 / len;
double max = 0.0;
@@ -65,9 +65,9 @@ void BandLimitedWave::generateWaves()
}
// square wave - BLSquare
for( i = 1; i <= MAXLEN; i++ )
for( i = 0; i <= MAXTBL; i++ )
{
const int len = 1 << i;
const int len = TLENS[i];
//const double om = 1.0 / len;
double max = 0.0;
@@ -97,9 +97,9 @@ void BandLimitedWave::generateWaves()
// triangle wave - BLTriangle
for( i = 1; i <= MAXLEN; i++ )
for( i = 0; i <= MAXTBL; i++ )
{
const int len = 1 << i;
const int len = TLENS[i];
//const double om = 1.0 / len;
double max = 0.0;
@@ -131,9 +131,9 @@ void BandLimitedWave::generateWaves()
// moog saw wave - BLMoog
// basically, just add in triangle + 270-phase saw
for( i = 1; i <= MAXLEN; i++ )
for( i = 0; i <= MAXTBL; i++ )
{
const int len = 1 << i;
const int len = TLENS[i];
for( int ph = 0; ph < len; ph++ )
{