Skip to content

Commit 6e7baea

Browse files
authored
Merge pull request #10052 from relic-se/audioeffects_pitch_shift
Pitch shift audio effect
2 parents 4795e54 + 94a234f commit 6e7baea

File tree

20 files changed

+710
-70
lines changed

20 files changed

+710
-70
lines changed

ports/unix/variants/coverage/mpconfigvariant.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ SRC_BITMAP := \
3434
shared-bindings/audiocore/RawSample.c \
3535
shared-bindings/audiocore/WaveFile.c \
3636
shared-bindings/audiodelays/Echo.c \
37+
shared-bindings/audiodelays/PitchShift.c \
3738
shared-bindings/audiodelays/__init__.c \
3839
shared-bindings/audiofilters/Distortion.c \
3940
shared-bindings/audiofilters/Filter.c \
@@ -77,6 +78,7 @@ SRC_BITMAP := \
7778
shared-module/audiocore/RawSample.c \
7879
shared-module/audiocore/WaveFile.c \
7980
shared-module/audiodelays/Echo.c \
81+
shared-module/audiodelays/PitchShift.c \
8082
shared-module/audiodelays/__init__.c \
8183
shared-module/audiofilters/Distortion.c \
8284
shared-module/audiofilters/Filter.c \

py/circuitpy_defns.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ SRC_SHARED_MODULE_ALL = \
629629
audiocore/WaveFile.c \
630630
audiocore/__init__.c \
631631
audiodelays/Echo.c \
632+
audiodelays/PitchShift.c \
632633
audiodelays/__init__.c \
633634
audiofilters/Distortion.c \
634635
audiofilters/Filter.c \

shared-bindings/audiocore/RawSample.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,3 @@ void common_hal_audioio_rawsample_construct(audioio_rawsample_obj_t *self,
1515
uint8_t channel_count, uint32_t sample_rate, bool single_buffer);
1616

1717
void common_hal_audioio_rawsample_deinit(audioio_rawsample_obj_t *self);
18-
bool common_hal_audioio_rawsample_deinited(audioio_rawsample_obj_t *self);
19-
uint32_t common_hal_audioio_rawsample_get_sample_rate(audioio_rawsample_obj_t *self);
20-
uint8_t common_hal_audioio_rawsample_get_bits_per_sample(audioio_rawsample_obj_t *self);
21-
uint8_t common_hal_audioio_rawsample_get_channel_count(audioio_rawsample_obj_t *self);
22-
void common_hal_audioio_rawsample_set_sample_rate(audioio_rawsample_obj_t *self, uint32_t sample_rate);

shared-bindings/audiocore/WaveFile.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,3 @@ void common_hal_audioio_wavefile_construct(audioio_wavefile_obj_t *self,
1717
pyb_file_obj_t *file, uint8_t *buffer, size_t buffer_size);
1818

1919
void common_hal_audioio_wavefile_deinit(audioio_wavefile_obj_t *self);
20-
bool common_hal_audioio_wavefile_deinited(audioio_wavefile_obj_t *self);
21-
uint32_t common_hal_audioio_wavefile_get_sample_rate(audioio_wavefile_obj_t *self);
22-
void common_hal_audioio_wavefile_set_sample_rate(audioio_wavefile_obj_t *self, uint32_t sample_rate);
23-
uint8_t common_hal_audioio_wavefile_get_bits_per_sample(audioio_wavefile_obj_t *self);
24-
uint8_t common_hal_audioio_wavefile_get_channel_count(audioio_wavefile_obj_t *self);

shared-bindings/audiodelays/Echo.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ void common_hal_audiodelays_echo_construct(audiodelays_echo_obj_t *self, uint32_
1616
uint8_t channel_count, uint32_t sample_rate, bool freq_shift);
1717

1818
void common_hal_audiodelays_echo_deinit(audiodelays_echo_obj_t *self);
19-
bool common_hal_audiodelays_echo_deinited(audiodelays_echo_obj_t *self);
20-
21-
uint32_t common_hal_audiodelays_echo_get_sample_rate(audiodelays_echo_obj_t *self);
22-
uint8_t common_hal_audiodelays_echo_get_channel_count(audiodelays_echo_obj_t *self);
23-
uint8_t common_hal_audiodelays_echo_get_bits_per_sample(audiodelays_echo_obj_t *self);
2419

2520
mp_obj_t common_hal_audiodelays_echo_get_delay_ms(audiodelays_echo_obj_t *self);
2621
void common_hal_audiodelays_echo_set_delay_ms(audiodelays_echo_obj_t *self, mp_obj_t delay_ms);
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2025 Cooper Dalrymple
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include <stdint.h>
8+
9+
#include "shared-bindings/audiodelays/PitchShift.h"
10+
#include "shared-bindings/audiocore/__init__.h"
11+
#include "shared-module/audiodelays/PitchShift.h"
12+
13+
#include "shared/runtime/context_manager_helpers.h"
14+
#include "py/binary.h"
15+
#include "py/objproperty.h"
16+
#include "py/runtime.h"
17+
#include "shared-bindings/util.h"
18+
#include "shared-module/synthio/block.h"
19+
20+
//| class PitchShift:
21+
//| """A pitch shift effect"""
22+
//|
23+
//| def __init__(
24+
//| self,
25+
//| semitones: synthio.BlockInput = 0.0,
26+
//| mix: synthio.BlockInput = 1.0,
27+
//| window: int = 1024,
28+
//| overlap: int = 128,
29+
//| buffer_size: int = 512,
30+
//| sample_rate: int = 8000,
31+
//| bits_per_sample: int = 16,
32+
//| samples_signed: bool = True,
33+
//| channel_count: int = 1,
34+
//| ) -> None:
35+
//| """Create a pitch shift effect where the original sample play back is altered to change the
36+
//| the perceived pitch by a factor of semi-tones (1/12th of an octave). This effect will cause
37+
//| a slight delay in the output depending on the size of the window and overlap buffers.
38+
//|
39+
//| The mix parameter allows you to change how much of the unchanged sample passes through to
40+
//| the output to how much of the effect audio you hear as the output.
41+
//|
42+
//| :param synthio.BlockInput semitones: The amount of pitch shifting in semitones (1/12th of an octave)
43+
//| :param synthio.BlockInput mix: The mix as a ratio of the sample (0.0) to the effect (1.0)
44+
//| :param int window: The total size in bytes of the window buffer used alter the playback pitch
45+
//| :param int overlap: The total size in bytes of the overlap buffer used to prevent popping in the output. If set as 0, no overlap will be used.
46+
//| :param int buffer_size: The total size in bytes of each of the two playback buffers to use
47+
//| :param int sample_rate: The sample rate to be used
48+
//| :param int channel_count: The number of channels the source samples contain. 1 = mono; 2 = stereo.
49+
//| :param int bits_per_sample: The bits per sample of the effect
50+
//| :param bool samples_signed: Effect is signed (True) or unsigned (False)
51+
//|
52+
//| Shifting the pitch of a synth by 5 semitones::
53+
//|
54+
//| import time
55+
//| import board
56+
//| import audiobusio
57+
//| import synthio
58+
//| import audiodelays
59+
//|
60+
//| audio = audiobusio.I2SOut(bit_clock=board.GP0, word_select=board.GP1, data=board.GP2)
61+
//| synth = synthio.Synthesizer(channel_count=1, sample_rate=44100)
62+
//| pitch_shift = audiodelays.PitchShift(semitones=5.0, mix=0.5, window=2048, overlap=256, buffer_size=1024, channel_count=1, sample_rate=44100)
63+
//| pitch_shift.play(synth)
64+
//| audio.play(pitch_shift)
65+
//|
66+
//| while True:
67+
//| for notenum in (60, 64, 67, 71):
68+
//| synth.press(notenum)
69+
//| time.sleep(0.25)
70+
//| synth.release_all()"""
71+
//| ...
72+
//|
73+
static mp_obj_t audiodelays_pitch_shift_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
74+
enum { ARG_semitones, ARG_mix, ARG_window, ARG_overlap, ARG_buffer_size, ARG_sample_rate, ARG_bits_per_sample, ARG_samples_signed, ARG_channel_count, };
75+
static const mp_arg_t allowed_args[] = {
76+
{ MP_QSTR_semitones, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0)} },
77+
{ MP_QSTR_mix, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1)} },
78+
{ MP_QSTR_window, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1024} },
79+
{ MP_QSTR_overlap, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 128} },
80+
{ MP_QSTR_buffer_size, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 512} },
81+
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 8000} },
82+
{ MP_QSTR_bits_per_sample, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 16} },
83+
{ MP_QSTR_samples_signed, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
84+
{ MP_QSTR_channel_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1 } },
85+
};
86+
87+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
88+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
89+
90+
mp_int_t channel_count = mp_arg_validate_int_range(args[ARG_channel_count].u_int, 1, 2, MP_QSTR_channel_count);
91+
mp_int_t sample_rate = mp_arg_validate_int_min(args[ARG_sample_rate].u_int, 1, MP_QSTR_sample_rate);
92+
mp_int_t bits_per_sample = args[ARG_bits_per_sample].u_int;
93+
if (bits_per_sample != 8 && bits_per_sample != 16) {
94+
mp_raise_ValueError(MP_ERROR_TEXT("bits_per_sample must be 8 or 16"));
95+
}
96+
97+
audiodelays_pitch_shift_obj_t *self = mp_obj_malloc(audiodelays_pitch_shift_obj_t, &audiodelays_pitch_shift_type);
98+
common_hal_audiodelays_pitch_shift_construct(self, args[ARG_semitones].u_obj, args[ARG_mix].u_obj, args[ARG_window].u_int, args[ARG_overlap].u_int, args[ARG_buffer_size].u_int, bits_per_sample, args[ARG_samples_signed].u_bool, channel_count, sample_rate);
99+
100+
return MP_OBJ_FROM_PTR(self);
101+
}
102+
103+
104+
//| def deinit(self) -> None:
105+
//| """Deinitialises the PitchShift."""
106+
//| ...
107+
//|
108+
static mp_obj_t audiodelays_pitch_shift_deinit(mp_obj_t self_in) {
109+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(self_in);
110+
common_hal_audiodelays_pitch_shift_deinit(self);
111+
return mp_const_none;
112+
}
113+
static MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_pitch_shift_deinit_obj, audiodelays_pitch_shift_deinit);
114+
115+
static void check_for_deinit(audiodelays_pitch_shift_obj_t *self) {
116+
audiosample_check_for_deinit(&self->base);
117+
}
118+
119+
120+
//| def __enter__(self) -> PitchShift:
121+
//| """No-op used by Context Managers."""
122+
//| ...
123+
//|
124+
// Provided by context manager helper.
125+
126+
//| def __exit__(self) -> None:
127+
//| """Automatically deinitializes when exiting a context. See
128+
//| :ref:`lifetime-and-contextmanagers` for more info."""
129+
//| ...
130+
//|
131+
static mp_obj_t audiodelays_pitch_shift_obj___exit__(size_t n_args, const mp_obj_t *args) {
132+
(void)n_args;
133+
common_hal_audiodelays_pitch_shift_deinit(args[0]);
134+
return mp_const_none;
135+
}
136+
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiodelays_pitch_shift___exit___obj, 4, 4, audiodelays_pitch_shift_obj___exit__);
137+
138+
139+
//| semitones: synthio.BlockInput
140+
//| """The amount of pitch shifting in semitones (1/12th of an octave)."""
141+
//|
142+
static mp_obj_t audiodelays_pitch_shift_obj_get_semitones(mp_obj_t self_in) {
143+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(self_in);
144+
return common_hal_audiodelays_pitch_shift_get_semitones(self);
145+
}
146+
MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_pitch_shift_get_semitones_obj, audiodelays_pitch_shift_obj_get_semitones);
147+
148+
static mp_obj_t audiodelays_pitch_shift_obj_set_semitones(mp_obj_t self_in, mp_obj_t semitones_in) {
149+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(self_in);
150+
common_hal_audiodelays_pitch_shift_set_semitones(self, semitones_in);
151+
return mp_const_none;
152+
}
153+
MP_DEFINE_CONST_FUN_OBJ_2(audiodelays_pitch_shift_set_semitones_obj, audiodelays_pitch_shift_obj_set_semitones);
154+
155+
MP_PROPERTY_GETSET(audiodelays_pitch_shift_semitones_obj,
156+
(mp_obj_t)&audiodelays_pitch_shift_get_semitones_obj,
157+
(mp_obj_t)&audiodelays_pitch_shift_set_semitones_obj);
158+
159+
160+
//| mix: synthio.BlockInput
161+
//| """The output mix between 0 and 1 where 0 is only sample and 1 is all effect."""
162+
static mp_obj_t audiodelays_pitch_shift_obj_get_mix(mp_obj_t self_in) {
163+
return common_hal_audiodelays_pitch_shift_get_mix(self_in);
164+
}
165+
MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_pitch_shift_get_mix_obj, audiodelays_pitch_shift_obj_get_mix);
166+
167+
static mp_obj_t audiodelays_pitch_shift_obj_set_mix(mp_obj_t self_in, mp_obj_t mix_in) {
168+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(self_in);
169+
common_hal_audiodelays_pitch_shift_set_mix(self, mix_in);
170+
return mp_const_none;
171+
}
172+
MP_DEFINE_CONST_FUN_OBJ_2(audiodelays_pitch_shift_set_mix_obj, audiodelays_pitch_shift_obj_set_mix);
173+
174+
MP_PROPERTY_GETSET(audiodelays_pitch_shift_mix_obj,
175+
(mp_obj_t)&audiodelays_pitch_shift_get_mix_obj,
176+
(mp_obj_t)&audiodelays_pitch_shift_set_mix_obj);
177+
178+
179+
//| playing: bool
180+
//| """True when the effect is playing a sample. (read-only)"""
181+
//|
182+
static mp_obj_t audiodelays_pitch_shift_obj_get_playing(mp_obj_t self_in) {
183+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(self_in);
184+
check_for_deinit(self);
185+
return mp_obj_new_bool(common_hal_audiodelays_pitch_shift_get_playing(self));
186+
}
187+
MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_pitch_shift_get_playing_obj, audiodelays_pitch_shift_obj_get_playing);
188+
189+
MP_PROPERTY_GETTER(audiodelays_pitch_shift_playing_obj,
190+
(mp_obj_t)&audiodelays_pitch_shift_get_playing_obj);
191+
192+
193+
//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None:
194+
//| """Plays the sample once when loop=False and continuously when loop=True.
195+
//| Does not block. Use `playing` to block.
196+
//|
197+
//| The sample must match the encoding settings given in the constructor."""
198+
//| ...
199+
//|
200+
static mp_obj_t audiodelays_pitch_shift_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
201+
enum { ARG_sample, ARG_loop };
202+
static const mp_arg_t allowed_args[] = {
203+
{ MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
204+
{ MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
205+
};
206+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
207+
check_for_deinit(self);
208+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
209+
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
210+
211+
mp_obj_t sample = args[ARG_sample].u_obj;
212+
common_hal_audiodelays_pitch_shift_play(self, sample, args[ARG_loop].u_bool);
213+
214+
return mp_const_none;
215+
}
216+
MP_DEFINE_CONST_FUN_OBJ_KW(audiodelays_pitch_shift_play_obj, 1, audiodelays_pitch_shift_obj_play);
217+
218+
219+
//| def stop(self) -> None:
220+
//| """Stops playback of the sample."""
221+
//| ...
222+
//|
223+
//|
224+
static mp_obj_t audiodelays_pitch_shift_obj_stop(mp_obj_t self_in) {
225+
audiodelays_pitch_shift_obj_t *self = MP_OBJ_TO_PTR(self_in);
226+
common_hal_audiodelays_pitch_shift_stop(self);
227+
return mp_const_none;
228+
}
229+
MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_pitch_shift_stop_obj, audiodelays_pitch_shift_obj_stop);
230+
231+
232+
static const mp_rom_map_elem_t audiodelays_pitch_shift_locals_dict_table[] = {
233+
// Methods
234+
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&audiodelays_pitch_shift_deinit_obj) },
235+
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
236+
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&audiodelays_pitch_shift___exit___obj) },
237+
{ MP_ROM_QSTR(MP_QSTR_play), MP_ROM_PTR(&audiodelays_pitch_shift_play_obj) },
238+
{ MP_ROM_QSTR(MP_QSTR_stop), MP_ROM_PTR(&audiodelays_pitch_shift_stop_obj) },
239+
240+
// Properties
241+
{ MP_ROM_QSTR(MP_QSTR_playing), MP_ROM_PTR(&audiodelays_pitch_shift_playing_obj) },
242+
{ MP_ROM_QSTR(MP_QSTR_semitones), MP_ROM_PTR(&audiodelays_pitch_shift_semitones_obj) },
243+
{ MP_ROM_QSTR(MP_QSTR_mix), MP_ROM_PTR(&audiodelays_pitch_shift_mix_obj) },
244+
AUDIOSAMPLE_FIELDS,
245+
};
246+
static MP_DEFINE_CONST_DICT(audiodelays_pitch_shift_locals_dict, audiodelays_pitch_shift_locals_dict_table);
247+
248+
static const audiosample_p_t audiodelays_pitch_shift_proto = {
249+
MP_PROTO_IMPLEMENT(MP_QSTR_protocol_audiosample)
250+
.reset_buffer = (audiosample_reset_buffer_fun)audiodelays_pitch_shift_reset_buffer,
251+
.get_buffer = (audiosample_get_buffer_fun)audiodelays_pitch_shift_get_buffer,
252+
};
253+
254+
MP_DEFINE_CONST_OBJ_TYPE(
255+
audiodelays_pitch_shift_type,
256+
MP_QSTR_PitchShift,
257+
MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS,
258+
make_new, audiodelays_pitch_shift_make_new,
259+
locals_dict, &audiodelays_pitch_shift_locals_dict,
260+
protocol, &audiodelays_pitch_shift_proto
261+
);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2025 Cooper Dalrymple
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#pragma once
8+
9+
#include "shared-module/audiodelays/PitchShift.h"
10+
11+
extern const mp_obj_type_t audiodelays_pitch_shift_type;
12+
13+
void common_hal_audiodelays_pitch_shift_construct(audiodelays_pitch_shift_obj_t *self,
14+
mp_obj_t semitones, mp_obj_t mix, uint32_t window, uint32_t overlap,
15+
uint32_t buffer_size, uint8_t bits_per_sample, bool samples_signed,
16+
uint8_t channel_count, uint32_t sample_rate);
17+
18+
void common_hal_audiodelays_pitch_shift_deinit(audiodelays_pitch_shift_obj_t *self);
19+
20+
mp_obj_t common_hal_audiodelays_pitch_shift_get_semitones(audiodelays_pitch_shift_obj_t *self);
21+
void common_hal_audiodelays_pitch_shift_set_semitones(audiodelays_pitch_shift_obj_t *self, mp_obj_t semitones);
22+
23+
mp_obj_t common_hal_audiodelays_pitch_shift_get_mix(audiodelays_pitch_shift_obj_t *self);
24+
void common_hal_audiodelays_pitch_shift_set_mix(audiodelays_pitch_shift_obj_t *self, mp_obj_t arg);
25+
26+
bool common_hal_audiodelays_pitch_shift_get_playing(audiodelays_pitch_shift_obj_t *self);
27+
void common_hal_audiodelays_pitch_shift_play(audiodelays_pitch_shift_obj_t *self, mp_obj_t sample, bool loop);
28+
void common_hal_audiodelays_pitch_shift_stop(audiodelays_pitch_shift_obj_t *self);

shared-bindings/audiodelays/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "shared-bindings/audiodelays/__init__.h"
1313
#include "shared-bindings/audiodelays/Echo.h"
14+
#include "shared-bindings/audiodelays/PitchShift.h"
1415

1516
//| """Support for audio delay effects
1617
//|
@@ -21,6 +22,7 @@
2122
static const mp_rom_map_elem_t audiodelays_module_globals_table[] = {
2223
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audiodelays) },
2324
{ MP_ROM_QSTR(MP_QSTR_Echo), MP_ROM_PTR(&audiodelays_echo_type) },
25+
{ MP_ROM_QSTR(MP_QSTR_PitchShift), MP_ROM_PTR(&audiodelays_pitch_shift_type) },
2426
};
2527

2628
static MP_DEFINE_CONST_DICT(audiodelays_module_globals, audiodelays_module_globals_table);

shared-bindings/audiofilters/Distortion.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ void common_hal_audiofilters_distortion_construct(audiofilters_distortion_obj_t
1818
uint8_t channel_count, uint32_t sample_rate);
1919

2020
void common_hal_audiofilters_distortion_deinit(audiofilters_distortion_obj_t *self);
21-
bool common_hal_audiofilters_distortion_deinited(audiofilters_distortion_obj_t *self);
22-
23-
uint32_t common_hal_audiofilters_distortion_get_sample_rate(audiofilters_distortion_obj_t *self);
24-
uint8_t common_hal_audiofilters_distortion_get_channel_count(audiofilters_distortion_obj_t *self);
25-
uint8_t common_hal_audiofilters_distortion_get_bits_per_sample(audiofilters_distortion_obj_t *self);
2621

2722
mp_obj_t common_hal_audiofilters_distortion_get_drive(audiofilters_distortion_obj_t *self);
2823
void common_hal_audiofilters_distortion_set_drive(audiofilters_distortion_obj_t *self, mp_obj_t arg);

shared-bindings/audiofilters/Filter.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ void common_hal_audiofilters_filter_construct(audiofilters_filter_obj_t *self,
1616
uint8_t channel_count, uint32_t sample_rate);
1717

1818
void common_hal_audiofilters_filter_deinit(audiofilters_filter_obj_t *self);
19-
bool common_hal_audiofilters_filter_deinited(audiofilters_filter_obj_t *self);
20-
21-
uint32_t common_hal_audiofilters_filter_get_sample_rate(audiofilters_filter_obj_t *self);
22-
uint8_t common_hal_audiofilters_filter_get_channel_count(audiofilters_filter_obj_t *self);
23-
uint8_t common_hal_audiofilters_filter_get_bits_per_sample(audiofilters_filter_obj_t *self);
2419

2520
mp_obj_t common_hal_audiofilters_filter_get_filter(audiofilters_filter_obj_t *self);
2621
void common_hal_audiofilters_filter_set_filter(audiofilters_filter_obj_t *self, mp_obj_t arg);

0 commit comments

Comments
 (0)