export waves to uild folder
This commit is contained in:
@@ -4,12 +4,10 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "synth_defs.h"
|
#include "synth_defs.h"
|
||||||
#include "blit.h"
|
|
||||||
#include "vco.h"
|
|
||||||
#include "vector_utils.h"
|
#include "vector_utils.h"
|
||||||
#include "wavetable.h"
|
#include "wavetable.h"
|
||||||
|
|
||||||
//#define WAVE_EXPORT_FILE
|
#define WAVE_EXPORT_FILE
|
||||||
|
|
||||||
extern const wt_descr_t _g_wt_descr[WT_NUM_WAVETABLES];
|
extern const wt_descr_t _g_wt_descr[WT_NUM_WAVETABLES];
|
||||||
#if 0
|
#if 0
|
||||||
@@ -70,7 +68,7 @@ void WT_ModInit(wt_common_t *pCom)
|
|||||||
FILE *pFileAll = NULL;
|
FILE *pFileAll = NULL;
|
||||||
|
|
||||||
#ifdef WAVE_EXPORT_FILE
|
#ifdef WAVE_EXPORT_FILE
|
||||||
pFileAll = fopen("C:\\Users\\jens\\JaySynth\\wave_sweep.pcm", "wb");
|
pFileAll = fopen("build/wave_sweep.bin", "wb");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create waves from 16-bit raw data
|
// Create waves from 16-bit raw data
|
||||||
@@ -83,7 +81,13 @@ 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[128*i + 2*j + 0] << 8) + pCom->wave_rawdata[128*i + 2*j + 1];
|
||||||
|
#if 0
|
||||||
|
if (sample & 0x8000)
|
||||||
|
{
|
||||||
|
sample = 0xFFFF - sample + 1;
|
||||||
|
}
|
||||||
wave[j] = sample;
|
wave[j] = sample;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible assembly 1
|
// Possible assembly 1
|
||||||
@@ -109,7 +113,7 @@ void WT_ModInit(wt_common_t *pCom)
|
|||||||
FILE *pFile = NULL;
|
FILE *pFile = NULL;
|
||||||
char filename[128] = {0};
|
char filename[128] = {0};
|
||||||
|
|
||||||
sprintf(filename, "C:\\Users\\jens\\JaySynth\\wave_%03d.pcm", offset+i);
|
sprintf(filename, "build/wave_%03d.bin", offset+i);
|
||||||
pFile = fopen(filename, "wb");
|
pFile = fopen(filename, "wb");
|
||||||
if (pFile)
|
if (pFile)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user