2024-12-01 19:35:24 +00:00
|
|
|
//| Copyright: (C) 2020-2024 Kevin Larke <contact AT larke DOT org>
|
|
|
|
//| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
|
2024-07-07 17:36:15 +00:00
|
|
|
#ifndef cwWaveTableBank_h
|
|
|
|
#define cwWaveTableBank_h
|
|
|
|
|
2024-07-29 14:29:10 +00:00
|
|
|
|
|
|
|
namespace cw
|
|
|
|
{
|
|
|
|
namespace wt_bank
|
|
|
|
{
|
|
|
|
|
|
|
|
typedef handle<struct wt_bank_str> handle_t;
|
2024-07-31 21:15:10 +00:00
|
|
|
typedef dsp::sample_t sample_t;
|
|
|
|
typedef dsp::srate_t srate_t;
|
|
|
|
|
|
|
|
typedef dsp::wt_osc::wt_tid_t wt_tid_t;
|
|
|
|
typedef struct dsp::wt_osc::wt_str<sample_t,srate_t> wt_t;
|
|
|
|
typedef struct dsp::wt_seq_osc::wt_seq_str<sample_t,srate_t> wt_seq_t;
|
|
|
|
typedef struct dsp::multi_ch_wt_seq_osc::multi_ch_wt_seq_str<sample_t,srate_t> multi_ch_wt_seq_t;
|
2024-07-07 17:36:15 +00:00
|
|
|
|
2024-07-29 14:29:10 +00:00
|
|
|
|
2024-07-31 21:15:10 +00:00
|
|
|
rc_t create( handle_t& hRef, unsigned padSmpN, const char* instr_json_fname=nullptr );
|
2024-07-29 14:29:10 +00:00
|
|
|
rc_t destroy( handle_t& hRef );
|
|
|
|
|
|
|
|
void report( handle_t h );
|
|
|
|
|
|
|
|
rc_t load( handle_t h, const char* instr_json_fname );
|
|
|
|
|
|
|
|
unsigned instr_count( handle_t h );
|
|
|
|
|
|
|
|
unsigned instr_index( handle_t h, const char* instr_label );
|
2024-07-31 21:15:10 +00:00
|
|
|
|
|
|
|
// Return the actual measured velocities, not the interpolated velocities, for a given instr/pitch.
|
|
|
|
rc_t instr_pitch_velocities( handle_t h, unsigned instr_idx, unsigned pitch, unsigned* velA, unsigned velCnt, unsigned& velCnt_Ref );
|
2024-07-29 14:29:10 +00:00
|
|
|
|
2024-07-31 21:15:10 +00:00
|
|
|
rc_t get_wave_table( handle_t h, unsigned instr_idx, unsigned pitch, unsigned vel, multi_ch_wt_seq_t const* & mcs_Ref );
|
2024-07-29 14:29:10 +00:00
|
|
|
|
|
|
|
rc_t test( const test::test_args_t& args );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2024-07-07 17:36:15 +00:00
|
|
|
|
|
|
|
#endif
|