25
25
//| def __init__(
26
26
//| self,
27
27
//| max_delay_ms: int = 500,
28
- //| delay_ms: BlockInput = 250.0,
29
- //| decay: BlockInput = 0.7,
30
- //| mix: BlockInput = 0.5,
28
+ //| delay_ms: synthio. BlockInput = 250.0,
29
+ //| decay: synthio. BlockInput = 0.7,
30
+ //| mix: synthio. BlockInput = 0.5,
31
31
//| buffer_size: int = 512,
32
32
//| sample_rate: int = 8000,
33
33
//| bits_per_sample: int = 16,
34
34
//| samples_signed: bool = True,
35
35
//| channel_count: int = 1,
36
36
//| ) -> None:
37
- //| """Create a Echo effect that echos an audio sample every set number of milliseconds.
37
+ //| """Create a Echo effect where you hear the original sample play back, at a lesser volume after
38
+ //| a set number of millisecond delay. The delay timing of the echo can be changed at runtime
39
+ //| with the delay_ms parameter but the delay can never exceed the max_delay_ms parameter. The
40
+ //| maximum delay you can set is limited by available memory.
38
41
//|
39
- //| :param int max_delay_ms: The maximum delay the echo can be
40
- //| :param BlockInput delay_ms: The current echo delay
41
- //| :param BlockInput decay: The rate the echo fades. 0.0 = instant; 1.0 = never.
42
- //| :param BlockInput mix: The mix as a ratio of the sample (0.0) to the effect (1.0).
42
+ //| Each time the echo plays back the volume is reduced by the decay setting (echo * decay).
43
+ //|
44
+ //| The mix parameter allows you to change how much of the unchanged sample passes through to
45
+ //| the output to how much of the effect audio you hear as the output.
46
+ //|
47
+ //| :param int max_delay_ms: The maximum time the echo can be in milliseconds
48
+ //| :param synthio.BlockInput delay_ms: The current time of the echo delay in milliseconds. Must be less the max_delay_ms
49
+ //| :param synthio.BlockInput decay: The rate the echo fades. 0.0 = instant; 1.0 = never.
50
+ //| :param synthio.BlockInput mix: The mix as a ratio of the sample (0.0) to the effect (1.0).
43
51
//| :param int buffer_size: The total size in bytes of each of the two playback buffers to use
44
52
//| :param int sample_rate: The sample rate to be used
45
53
//| :param int channel_count: The number of channels the source samples contain. 1 = mono; 2 = stereo.
@@ -132,7 +140,7 @@ static mp_obj_t audiodelays_echo_obj___exit__(size_t n_args, const mp_obj_t *arg
132
140
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (audiodelays_echo___exit___obj , 4 , 4 , audiodelays_echo_obj___exit__ ) ;
133
141
134
142
135
- //| delay_ms: BlockInput
143
+ //| delay_ms: synthio. BlockInput
136
144
//| """Delay of the echo in milliseconds. (read-only)"""
137
145
//|
138
146
static mp_obj_t audiodelays_echo_obj_get_delay_ms (mp_obj_t self_in ) {
@@ -162,7 +170,7 @@ MP_PROPERTY_GETSET(audiodelays_echo_delay_ms_obj,
162
170
(mp_obj_t )& audiodelays_echo_get_delay_ms_obj ,
163
171
(mp_obj_t )& audiodelays_echo_set_delay_ms_obj );
164
172
165
- //| decay: BlockInput
173
+ //| decay: synthio. BlockInput
166
174
//| """The rate the echo decays between 0 and 1 where 1 is forever and 0 is no echo."""
167
175
static mp_obj_t audiodelays_echo_obj_get_decay (mp_obj_t self_in ) {
168
176
return common_hal_audiodelays_echo_get_decay (self_in );
@@ -188,7 +196,7 @@ MP_PROPERTY_GETSET(audiodelays_echo_decay_obj,
188
196
(mp_obj_t )& audiodelays_echo_get_decay_obj ,
189
197
(mp_obj_t )& audiodelays_echo_set_decay_obj );
190
198
191
- //| mix: BlockInput
199
+ //| mix: synthio. BlockInput
192
200
//| """The rate the echo mix between 0 and 1 where 0 is only sample and 1 is all effect."""
193
201
static mp_obj_t audiodelays_echo_obj_get_mix (mp_obj_t self_in ) {
194
202
return common_hal_audiodelays_echo_get_mix (self_in );
0 commit comments