Changes in src/synth/wavetable.c [a7e766b:c21acb9]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/synth/wavetable.c
ra7e766b rc21acb9 43 43 aubio_wavetable_t *new_aubio_wavetable(uint_t samplerate, uint_t blocksize) 44 44 { 45 uint_t i = 0; 45 46 aubio_wavetable_t *s = AUBIO_NEW(aubio_wavetable_t); 46 47 if ((sint_t)samplerate <= 0) { … … 48 49 goto beach; 49 50 } 50 uint_t i = 0;51 51 s->samplerate = samplerate; 52 52 s->blocksize = blocksize; … … 115 115 for (j = 0; j < output->length; j++) { 116 116 smpl_t inc = aubio_parameter_get_next_value( s->freq ); 117 smpl_t amp = aubio_parameter_get_next_value ( s->amp ); 117 118 inc *= (smpl_t)(s->wavetable_length) / (smpl_t) (s->samplerate); 118 119 pos += inc; … … 120 121 pos -= s->wavetable_length; 121 122 } 122 smpl_t amp = aubio_parameter_get_next_value ( s->amp );123 123 for (i = 0; i < output->height; i++) { 124 124 output->data[i][j] = amp * interp_2(s->wavetable, pos);
Note: See TracChangeset
for help on using the changeset viewer.