-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds test for embedding of wav files
- Loading branch information
Showing
9 changed files
with
426 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
/* Code automatically generated by Vult https://github.com/modlfo/vult */ | ||
#include "wav_file.h" | ||
|
||
int Wav_file_ext_wave_samples(){return 600;} | ||
|
||
fix16_t Wav_file_ext_wave(int channel, int index){ | ||
if(channel == 0){ return fix_get(fix_wrap_array(Wav_file_ext_wave_chan_0),(index % 600)); } | ||
return 0x0 /* 0.000000 */; | ||
} | ||
|
||
void Wav_file__ctx_type_2_init(Wav_file__ctx_type_2 &_output_){ | ||
Wav_file__ctx_type_2 _ctx; | ||
_ctx.i = 0; | ||
_output_ = _ctx; | ||
return ; | ||
} | ||
|
||
void Wav_file_index_init(Wav_file__ctx_type_2 &_output_){ | ||
Wav_file__ctx_type_2_init(_output_); | ||
return ; | ||
} | ||
|
||
int Wav_file_index(Wav_file__ctx_type_2 &_ctx){ | ||
_ctx.i = ((_ctx.i + 1) % Wav_file_ext_wave_samples()); | ||
return _ctx.i; | ||
} | ||
|
||
void Wav_file__ctx_type_3_init(Wav_file__ctx_type_3 &_output_){ | ||
Wav_file__ctx_type_3 _ctx; | ||
Wav_file__ctx_type_2_init(_ctx._inst2); | ||
_output_ = _ctx; | ||
return ; | ||
} | ||
|
||
void Wav_file_osc_wave_init(Wav_file__ctx_type_3 &_output_){ | ||
Wav_file__ctx_type_3_init(_output_); | ||
return ; | ||
} | ||
|
||
fix16_t Wav_file_osc_wave(Wav_file__ctx_type_3 &_ctx, fix16_t cv){ | ||
return Wav_file_ext_wave(0,Wav_file_index(_ctx._inst2)); | ||
} | ||
|
||
void Wav_file__ctx_type_4_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4 _ctx; | ||
Wav_file__ctx_type_3_init(_ctx._inst4); | ||
_output_ = _ctx; | ||
return ; | ||
} | ||
|
||
void Wav_file_process_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
fix16_t Wav_file_process(Wav_file__ctx_type_4 &_ctx, fix16_t cv){ | ||
return Wav_file_osc_wave(_ctx._inst4,cv); | ||
} | ||
|
||
void Wav_file_noteOn_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_noteOn(Wav_file__ctx_type_4 &_ctx, int note, int velocity, int channel){ | ||
} | ||
|
||
void Wav_file_noteOff_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_noteOff(Wav_file__ctx_type_4 &_ctx, int note, int channel){ | ||
} | ||
|
||
void Wav_file_controlChange_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_controlChange(Wav_file__ctx_type_4 &_ctx, int control, int value, int channel){ | ||
} | ||
|
||
void Wav_file_default_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_default(Wav_file__ctx_type_4 &_ctx){ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
/* Code automatically generated by Vult https://github.com/modlfo/vult */ | ||
#include "wav_file.h" | ||
|
||
int Wav_file_ext_wave_samples(){return 600;} | ||
|
||
float Wav_file_ext_wave(int channel, int index){ | ||
if(channel == 0){ return float_get(float_wrap_array(Wav_file_ext_wave_chan_0),(index % 600)); } | ||
return 0.000000f; | ||
} | ||
|
||
void Wav_file__ctx_type_2_init(Wav_file__ctx_type_2 &_output_){ | ||
Wav_file__ctx_type_2 _ctx; | ||
_ctx.i = 0; | ||
_output_ = _ctx; | ||
return ; | ||
} | ||
|
||
void Wav_file_index_init(Wav_file__ctx_type_2 &_output_){ | ||
Wav_file__ctx_type_2_init(_output_); | ||
return ; | ||
} | ||
|
||
int Wav_file_index(Wav_file__ctx_type_2 &_ctx){ | ||
_ctx.i = ((_ctx.i + 1) % Wav_file_ext_wave_samples()); | ||
return _ctx.i; | ||
} | ||
|
||
void Wav_file__ctx_type_3_init(Wav_file__ctx_type_3 &_output_){ | ||
Wav_file__ctx_type_3 _ctx; | ||
Wav_file__ctx_type_2_init(_ctx._inst2); | ||
_output_ = _ctx; | ||
return ; | ||
} | ||
|
||
void Wav_file_osc_wave_init(Wav_file__ctx_type_3 &_output_){ | ||
Wav_file__ctx_type_3_init(_output_); | ||
return ; | ||
} | ||
|
||
float Wav_file_osc_wave(Wav_file__ctx_type_3 &_ctx, float cv){ | ||
return Wav_file_ext_wave(0,Wav_file_index(_ctx._inst2)); | ||
} | ||
|
||
void Wav_file__ctx_type_4_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4 _ctx; | ||
Wav_file__ctx_type_3_init(_ctx._inst4); | ||
_output_ = _ctx; | ||
return ; | ||
} | ||
|
||
void Wav_file_process_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
float Wav_file_process(Wav_file__ctx_type_4 &_ctx, float cv){ | ||
return Wav_file_osc_wave(_ctx._inst4,cv); | ||
} | ||
|
||
void Wav_file_noteOn_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_noteOn(Wav_file__ctx_type_4 &_ctx, int note, int velocity, int channel){ | ||
} | ||
|
||
void Wav_file_noteOff_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_noteOff(Wav_file__ctx_type_4 &_ctx, int note, int channel){ | ||
} | ||
|
||
void Wav_file_controlChange_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_controlChange(Wav_file__ctx_type_4 &_ctx, int control, int value, int channel){ | ||
} | ||
|
||
void Wav_file_default_init(Wav_file__ctx_type_4 &_output_){ | ||
Wav_file__ctx_type_4_init(_output_); | ||
return ; | ||
} | ||
|
||
void Wav_file_default(Wav_file__ctx_type_4 &_ctx){ | ||
} | ||
|
||
|
Oops, something went wrong.