Skip to content

Commit 57fa43a

Browse files
authored
Merge pull request #9640 from gamblor21/audio_effects
Add Audio effects
2 parents e5608da + 064c2d8 commit 57fa43a

File tree

13 files changed

+1049
-20
lines changed

13 files changed

+1049
-20
lines changed

locale/circuitpython.pot

+3-15
Original file line numberDiff line numberDiff line change
@@ -1965,20 +1965,8 @@ msgstr ""
19651965
msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30"
19661966
msgstr ""
19671967

1968-
#: shared-module/audiomixer/MixerVoice.c
1969-
msgid "The sample's bits_per_sample does not match the mixer's"
1970-
msgstr ""
1971-
1972-
#: shared-module/audiomixer/MixerVoice.c
1973-
msgid "The sample's channel count does not match the mixer's"
1974-
msgstr ""
1975-
1976-
#: shared-module/audiomixer/MixerVoice.c
1977-
msgid "The sample's sample rate does not match the mixer's"
1978-
msgstr ""
1979-
1980-
#: shared-module/audiomixer/MixerVoice.c
1981-
msgid "The sample's signedness does not match the mixer's"
1968+
#: shared-module/audiodelays/Echo.c shared-module/audiomixer/MixerVoice.c
1969+
msgid "The sample's %q does not match"
19821970
msgstr ""
19831971

19841972
#: supervisor/shared/safe_mode.c
@@ -2511,7 +2499,7 @@ msgstr ""
25112499
msgid "bits must be 32 or less"
25122500
msgstr ""
25132501

2514-
#: shared-bindings/audiomixer/Mixer.c
2502+
#: shared-bindings/audiodelays/Echo.c shared-bindings/audiomixer/Mixer.c
25152503
msgid "bits_per_sample must be 8 or 16"
25162504
msgstr ""
25172505

ports/raspberrypi/mpconfigport.mk

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CIRCUITPY_PWMIO ?= 1
2121
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_DISPLAYIO)
2222
CIRCUITPY_ROTARYIO ?= 1
2323
CIRCUITPY_ROTARYIO_SOFTENCODER = 1
24-
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
24+
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 24
2525
CIRCUITPY_USB_HOST ?= 1
2626
CIRCUITPY_USB_VIDEO ?= 1
2727

@@ -64,6 +64,9 @@ CIRCUITPY_PICODVI ?= 1
6464
# Our generic touchio uses a pull down and RP2350 A2 hardware doesn't work correctly.
6565
# So, turn touchio off because it doesn't work.
6666
CIRCUITPY_TOUCHIO = 0
67+
68+
# Audio effects
69+
CIRCUITPY_AUDIOEFFECTS ?= 1
6770
endif
6871

6972
INTERNAL_LIBM = 1

py/circuitpy_defns.mk

+5
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ endif
131131
ifeq ($(CIRCUITPY_AUDIOCORE),1)
132132
SRC_PATTERNS += audiocore/%
133133
endif
134+
ifeq ($(CIRCUITPY_AUDIODELAYS),1)
135+
SRC_PATTERNS += audiodelays/%
136+
endif
134137
ifeq ($(CIRCUITPY_AUDIOMIXER),1)
135138
SRC_PATTERNS += audiomixer/%
136139
endif
@@ -617,6 +620,8 @@ SRC_SHARED_MODULE_ALL = \
617620
audiocore/RawSample.c \
618621
audiocore/WaveFile.c \
619622
audiocore/__init__.c \
623+
audiodelays/Echo.c \
624+
audiodelays/__init__.c \
620625
audioio/__init__.c \
621626
audiomixer/Mixer.c \
622627
audiomixer/MixerVoice.c \

py/circuitpy_mpconfig.mk

+4
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ CFLAGS += -DCIRCUITPY_AUDIOCORE_DEBUG=$(CIRCUITPY_AUDIOCORE_DEBUG)
141141
CIRCUITPY_AUDIOMP3 ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_AUDIOCORE))
142142
CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3)
143143

144+
CIRCUITPY_AUDIOEFFECTS ?= 0
145+
CIRCUITPY_AUDIODELAYS ?= $(CIRCUITPY_AUDIOEFFECTS)
146+
CFLAGS += -DCIRCUITPY_AUDIODELAYS=$(CIRCUITPY_AUDIODELAYS)
147+
144148
CIRCUITPY_AURORA_EPAPER ?= 0
145149
CFLAGS += -DCIRCUITPY_AURORA_EPAPER=$(CIRCUITPY_AURORA_EPAPER)
146150

0 commit comments

Comments
 (0)