- wavetable using Waldorf Microwave "wave.bin" (16bit) is broken
- wavetable uses "wave2.bin" (8bit) Waveforms -
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
Waldorf MicroWave Wellenformen und WaveTables hinzugef�gt. WaveTable-Scan �ber PWM.
|
||||||
|
wave.bin: Original MicroWave Wellenformen m�ssen als Datei ("waves.bin", 16bit, Big-Endian) im Plugin-Verzeichnis vorliegen, damit Feature freigeschaltet wird.
|
||||||
|
wave2.bin: Original PPG EVU Wellenformen 8bit
|
||||||
File diff suppressed because one or more lines are too long
+10
-24
@@ -4,6 +4,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "synth_defs.h"
|
#include "synth_defs.h"
|
||||||
|
#include "synth_types.h"
|
||||||
#include "vector_utils.h"
|
#include "vector_utils.h"
|
||||||
#include "wavetable.h"
|
#include "wavetable.h"
|
||||||
|
|
||||||
@@ -60,7 +61,8 @@ const wt_descr_t _g_wt_descr[WT_NUM_WAVETABLES] =
|
|||||||
void WT_ModInit(wt_common_t *pCom)
|
void WT_ModInit(wt_common_t *pCom)
|
||||||
{
|
{
|
||||||
UINT32 i, j, k, offset, last_pos, distance;
|
UINT32 i, j, k, offset, last_pos, distance;
|
||||||
INT16 sample, wave[WT_WAVE_SIZE];
|
INT16 sample;
|
||||||
|
char wave[WT_WAVE_SIZE];
|
||||||
wt_descr_t const *pDesc;
|
wt_descr_t const *pDesc;
|
||||||
synth_float_t kmix;
|
synth_float_t kmix;
|
||||||
synth_float_t x, dx, wave_tri[WT_WAVE_SIZE], wave_sqr[WT_WAVE_SIZE], wave_saw[WT_WAVE_SIZE];
|
synth_float_t x, dx, wave_tri[WT_WAVE_SIZE], wave_sqr[WT_WAVE_SIZE], wave_saw[WT_WAVE_SIZE];
|
||||||
@@ -80,32 +82,16 @@ void WT_ModInit(wt_common_t *pCom)
|
|||||||
|
|
||||||
for (j=0; j < 64; j++)
|
for (j=0; j < 64; j++)
|
||||||
{
|
{
|
||||||
sample = ((INT16)pCom->wave_rawdata[128*i + 2*j + 0] << 8) + pCom->wave_rawdata[128*i + 2*j + 1];
|
sample = (INT16)(pCom->wave_rawdata[64*i + j]);
|
||||||
#if 0
|
wave[j] = sample - 127;
|
||||||
if (sample & 0x8000)
|
sample = (INT16)(pCom->wave_rawdata[64*i + 63 - j]);
|
||||||
{
|
wave[j + 64] = -(sample - 127);
|
||||||
sample = 0xFFFF - sample + 1;
|
|
||||||
}
|
|
||||||
wave[j] = sample;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible assembly 1
|
|
||||||
wave[64] = 0;
|
|
||||||
for (j=0; j < 63; j++)
|
|
||||||
{
|
|
||||||
wave[65+j] = -wave[63-j];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Possible assembly 2
|
|
||||||
// for (j=0; j < 64; j++)
|
|
||||||
// {
|
|
||||||
// wave[64+j] = -wave[63-j];
|
|
||||||
// }
|
|
||||||
|
|
||||||
for (j=0; j < WT_WAVE_SIZE; j++)
|
for (j=0; j < WT_WAVE_SIZE; j++)
|
||||||
{
|
{
|
||||||
pCom->waves[offset+i][j] = (synth_float_t)wave[j]/8192;
|
pCom->waves[offset+i][j] = (synth_float_t)wave[j]/256;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WAVE_EXPORT_FILE
|
#ifdef WAVE_EXPORT_FILE
|
||||||
@@ -117,7 +103,7 @@ void WT_ModInit(wt_common_t *pCom)
|
|||||||
pFile = fopen(filename, "wb");
|
pFile = fopen(filename, "wb");
|
||||||
if (pFile)
|
if (pFile)
|
||||||
{
|
{
|
||||||
fwrite(wave, 2, WT_WAVE_SIZE, pFile);
|
fwrite(wave, 1, WT_WAVE_SIZE, pFile);
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,7 +115,7 @@ void WT_ModInit(wt_common_t *pCom)
|
|||||||
|
|
||||||
for (i=0; i < 20; i++)
|
for (i=0; i < 20; i++)
|
||||||
{
|
{
|
||||||
fwrite(wave, 2, WT_WAVE_SIZE, pFileAll);
|
fwrite(wave, 1, WT_WAVE_SIZE, pFileAll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
#define WT_NUM_WAVETABLES 40
|
#define WT_NUM_WAVETABLES 40
|
||||||
#define WT_WAVETABLE_SIZE 64
|
#define WT_WAVETABLE_SIZE 64
|
||||||
|
|
||||||
|
// see
|
||||||
|
// https://jacajack.github.io/music/2019/12/10/PPG-EPROM.html
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Types
|
// Types
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user