8000 Limit feedback range to 0.1 - 0.9 · FoamyGuy/circuitpython@e855e3e · GitHub
[go: up one dir, main page]

Skip to content

Commit e855e3e

Browse files
committed
Limit feedback range to 0.1 - 0.9
1 parent ba81c6b commit e855e3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

shared-bindings/audiofilters/Phaser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ MP_PROPERTY_GETSET(audiofilters_phaser_frequency_obj,
145145

146146

147147
//| feedback: synthio.BlockInput
148-
//| """The amount of which the incoming signal is fed back into the phasing filters from 0 to 1 where 0 is no feedback and 1 is full feedback."""
148+
//| """The amount of which the incoming signal is fed back into the phasing filters from 0.1 to 0.9."""
149149
static mp_obj_t audiofilters_phaser_obj_get_feedback(mp_obj_t self_in) {
150150
return common_hal_audiofilters_phaser_get_feedback(self_in);
151151
}

shared-module/audiofilters/Phaser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ audioio_get_buffer_result_t audiofilters_phaser_get_buffer(audiofilters_phaser_o
221221
// get the effect values we need from the BlockInput. These may change at run time so you need to do bounds checking if required
222222
shared_bindings_synthio_lfo_tick(self->base.sample_rate, n / self->base.channel_count);
223223
mp_float_t frequency = synthio_block_slot_get_limited(&self->frequency, MICROPY_FLOAT_CONST(0.0), self->nyquist);
224-
mp_float_t feedback = synthio_block_slot_get_limited(&self->feedback, MICROPY_FLOAT_CONST(0.0), MICROPY_FLOAT_CONST(1.0));
224+
mp_float_t feedback = synthio_block_slot_get_limited(&self->feedback, MICROPY_FLOAT_CONST(0.1), MICROPY_FLOAT_CONST(0.9));
225225
mp_float_t mix = synthio_block_slot_get_limited(&self->mix, MICROPY_FLOAT_CONST(0.0), MICROPY_FLOAT_CONST(1.0));
226226

227227
if (mix <= MICROPY_FLOAT_CONST(0.01)) { // if mix is zero pure sample only

0 commit comments

Comments
 (0)
0