Audio Effects Panel Discussion
S05:E43

Audio Effects Panel Discussion

Episode description

Cooper Dalrymple, Jeff Epler, Mark Komus, and Tod Kurt join the show to discuss the new audio effects available in CircuitPython.

00:00 Welcome

00:19 Mark’s inspiration for adding audio effects

1:46 Mark’s drum gist

4:23 The new audio effects available in CircuitPython

8:02 LFOs

10:30 Synthio vs Audio Effects

11:36 MP3 Bass and Treble Control

12:48 The RP2350

17:34 RP2350 vs RP2040

18:11 Audio on Espressif

19:50 Guitar pedals

26:59 Future projects

29:59 CircuitPython Karaoke

30:42 CircuitPython Audio Effects Tricks

32:38 Wrap-up

Download transcript (.srt)
0:00

Welcome to the CircuitPython Show. I'm your host, Paul Cutler.

0:04

This episode, I'm joined by Cooper Dalrymple, Jeff Epler, Mark Komus,

0:08

and Tod Kurt for a panel discussion on the new audio effects recently added to CircuitPython.

0:13

Welcome, everyone, to the show!

0:16

Hello! Hey, Paul.

0:18

Mark, back in September, you proposed adding audio effects to CircuitPython.

0:23

What inspired you to add the audio effects?

0:28

something on my mind for quite a while after the initial synthio release that Jeff had put out,

0:36

when I was trying to add drum effects in. And I found YouTube was a really good source of

0:44

seeing how other people use synths to make drum effects, other types of synth effects, pianos,

0:52

keyboards, basses, whatever.

0:54

But where I hit a stumbling block for most of them was that I couldn't add

1:01

things like reverb.

1:03

The filters were in and they work great, but like reverb, little echoes, little

1:08

things that would make it sound better.

1:10

So it was in the back of my head to do something with that.

1:15

And then I just had some time, was looking for something to work on.

1:19

So eventually that's how I ended up starting on it.

1:22

A little bit of a big thing to bite off, but you've been kind of working up to it, I think, over time with CircuitPython.

1:28

Yeah, I first started doing audio stuff with Audio Mixer, I believe, and bringing that to the RP2040 at the time.

1:42

Something else with Raspberry Pi, but I can't remember what it was for audio now.

1:47

I have a quick question for you, Mark.

1:48

You mentioned the drum sounds using synthio, generating those.

1:51

Did you put out a gist for that about a year or two ago?

1:56

- Yes I did.

1:56

- I think I might have copied some of that.

1:59

Stole your homework.

2:01

- Yeah, yeah, everyone has been using that.

2:02

- Yeah, yeah, you were like mixing three different voices

2:05

I think, the decays, it was really good.

2:08

- I found it in many different people's projects

2:10

and they're like, hey look, I made a little

2:11

CircuitPython drum machine and I'm like, hmm,

2:14

there's no samples here, how is he doing it?

2:16

- Yeah, I think I credit it to my,

2:19

I think I credit it in the source code.

2:21

But still, that was incredible.

2:23

That's really awesome to hear because that's what I was hoping with anything I

2:27

put out. And I've seen a couple of projects that had drum effects that I was

2:31

like, wait, that sounds like what I made, but I've never looked into it further

2:35

than that.

2:35

Wow.

2:36

I've seen that commonly on like older, older systems.

2:40

The sound of one voice is just kind of not as exciting as you'd like it to be.

2:45

And so you double up or triple up voices.

2:49

And I have to give credit to TodBot for that.

2:52

You were mixing multiple voices and detuning them slightly

2:57

to get a cooler sound.

2:59

And then when I started doing the drum effects,

3:01

I was like, hey, wait, that can work for this as well.

3:03

I can mix two or three or four voices

3:05

to get something that sounds more noise-like and not

3:10

a sine wave from synth-like.

3:12

Yeah.

3:12

When you made that, did you look at, I don't know,

3:15

like a TR-808 or something, some other analog drum machine

3:18

to see how they did it to build that sound?

3:21

Or were you just kind of playing it off?

3:23

I googled a bunch of YouTube videos of various people

3:27

making drum sounds on synths.

3:29

I can't even remember what videos they were at this point.

3:33

And then had to adapt them for CircuitPython.

3:36

As I said, we didn't really have audio effects at the time

3:39

outside of basic filters and then multiple samples

3:42

at the same time.

3:44

So it ended up being sort of a hybrid of what I saw online

3:48

and what I was able to play with myself.

3:50

Yeah, adding adding the the delays, you mentioned having like voice detuning,

3:54

like having multiple voices where they're where they're detuned to make a fatter,

3:58

you know, more interesting sound.

3:59

But like you can get the same effect in a lot of ways

4:02

just by using a delay at much lower CPU cost.

4:06

And so for like if you're playing a chord, say.

4:09

And so I'm so happy that we have this audio effects and audio delays

4:14

packages now because it's kind of cruise control for cool.

4:17

You can make almost any sound sound a little bit better when you add a little bit of delay to it.

4:21

That's interesting.

4:23

For those that might not be aware of the new audio effects, what are some example effects that are now available in CircuitPython?

4:30

The first one I put in was an echo, which is really a delay.

4:34

I put it in because I didn't know what else to do to make sure things were working.

4:39

I don't have the knowledge that everyone else on this panel does about synths and musical knowledge.

4:46

But it's something that you can quickly and easily test.

4:50

I can play a note, I can wait half a second

4:52

and see if I've heard the note back to myself again.

4:55

So it became really good for debugging and troubleshooting

4:58

and learning to pick something simple where you're not

5:01

trying to troubleshoot your effect on top of figuring out

5:06

how to do effects to start with.

5:08

Yeah, I think I can touch on that a little bit as well,

5:10

if that's OK.

5:11

First of all, I'm the new kid on the block here.

5:14

I've only been contributing for about half a year or more

5:17

to CircuitPython.

5:18

Name's Cooper, I guess.

5:19

And I come from a musical background,

5:21

and a lot of guitar, piano, stuff like that.

5:24

And I think what a good place to base this selection of effects

5:28

that we eventually choose is in guitar effects.

5:31

I'm sure many of the listeners here

5:34

are familiar to some degree with effects pedals for guitars,

5:37

which are ubiquitous nowadays with guitar players

5:40

since the '60s with Jimi Hendrix and all that,

5:43

fuzzes, etc. I think some of our selection, it may be a little bit more utilitarian in

5:49

usage but kind of takes some of its, I guess, DNA from guitar pedals. So, the other effects

5:56

that we've developed beyond delay, which was a great start, of course, to set this up,

6:01

the whole pathway and how these effects are made. Since then, we have filter, I believe,

6:07

which is in a different module, audio filters.

6:10

And then recently just got merged is distortion,

6:14

which actually covers a couple of bases.

6:16

I think that filter one especially,

6:18

it's probably the easiest one.

6:20

I think it was easier than the echo effect to create

6:22

because it was using the biquad system

6:25

that you developed, Jeff, with synthio

6:27

and then hence the block biquad system, which is super cool.

6:32

But with that, you can build a multitude of effects,

6:36

things like wahs, EQs, just basic filters, low pass,

6:40

and stuff like that.

6:41

Yeah, totally.

6:42

Because one of the things that--

6:44

I don't know who it was that set up the initial audio

6:46

system for CircuitPython, but it kind of

6:49

was informed by how pedals work, and that they have

6:52

got an input and an output.

6:54

And if you want to hook things together,

6:56

you just hook the output of one to the input of the other,

6:58

and you keep going.

6:59

And that's how all the new audio delays and audio effects

7:02

have been set up as well.

7:03

So you can just start plugging things up

7:06

and see what they do.

7:07

And every module or every function has these knobs.

7:11

And Jumper made these cool LFO automated knob turning

7:15

functions that you can just plug into the various knobs

7:18

of the filter and the delay and all that kind of stuff.

7:20

So you can do the wahs and distortions and dynamic stuff.

7:23

It's really fun.

7:25

- Yeah, I mean, when I was creating synthio,

7:27

I did a lot of reading about synths.

7:30

I'm more of a music enjoyer.

7:32

I'm a little bit of a vocal musician,

7:34

but I don't know the instruments.

7:35

I don't know synths, and I got the opportunity to work on synthio.

7:40

And there was a lot of reading, and I learned about something like LFOs, and I would try

7:44

to create a structure that would allow it to be expanded and elaborated upon.

7:49

And I think in some respects I've succeeded, because now we have audio filters, and they're

7:54

reusing these other things like the LFOs that existed already in ways that repurpose them

8:00

and increase what they do.

8:03

And Tod, I don't know if you said what an LFO was.

8:06

What is an LFO?

8:08

LFO, it's from the Spanish LFO.

8:11

No, it's a low frequency oscillator in synthesizers for reasons back in the misty times, people

8:21

divided up oscillators into two kind of classes where there's oscillators that made noise

8:27

and there's oscillators that are really slow, basically at sort of human knob turning rates.

8:33

And so instead of you sitting there with your hand on the filter knob going "wob wob wob",

8:38

you can instead have a low frequency oscillator essentially turn that knob for you and do

8:42

the "wob wob wob" without you having to do it.

8:44

In practice, a lot of oscillators can be both, but for code reasons, like with SynthIO, there's

8:50

a nice efficiency you can do by having oscillators that are only updated at a lower rate.

8:57

You can save some CPU instead of having them be full audio rate oscillators.

9:02

So yeah, so we have in synthio, Jeff made real audio oscillators that can be arbitrary

9:07

waves and then we've got the low frequency oscillators that update, I think up to around

9:12

50 or 60 hertz.

9:13

I've never really tested what the upper range is on how fast they can go.

9:17

Well, it's 256 samples, isn't it?

9:20

So depending on your sample rate, I think it's faster than 50 times per second.

9:25

I have to do some calculation here.

9:29

The whole LFO system and the block input system work amazing.

9:35

Like that was one of the first things I ran into when I started the draft PR for audio

9:42

effects was people saying you need to add in this feature.

9:46

You need to let people change the delay and the mix level and everything based on these

9:54

LFOs.

9:56

And it was so simple to add in.

9:58

Yeah, a great example is that is within the audio mixer. We

10:03

recently added support for block input on the level. And one of

10:07

the one of the original, you know, audio effects, you know,

10:10

it's in like amps and stuff from like the 50s is tremolo, right,

10:13

which is where you just increase and decrease the volume, like

10:17

sweeping that knob. And now you can do that very easily using

10:20

synthio LFOs and stuff. So that's pretty cool.

10:23

That's cool. I'd not I'd not really noticed that in the PR.

10:25

That was in like the last two weeks, I think.

10:28

Oh, that's awesome.

10:30

The other bonus with a lot of this stuff

10:33

now being in Audio Mixer and all these audio effects

10:35

is we realized they don't have to be just for the synth.

10:40

The synth was what inspired me and what I think Cooper

10:45

and myself spent a lot of our time in.

10:47

But then we realized raw sample and WAV files

10:49

and any other audio files played through Circuit Python,

10:54

we can add these effects to.

10:55

So now you could have an MP3 playing.

10:58

And if you want to add an effect to it, you can.

11:01

You could put the filters on it.

11:03

You could put an echo for some reason.

11:05

I'm not sure why, but--

11:07

I'm looking forward to Halloween.

11:09

I have a feeling there's some spooky sounds

11:11

that could be put in there.

11:13

Definitely that.

11:15

Yeah, although just like an equalizer style

11:18

control over your MP3 playback is something people have

11:20

requested, and I think that's possible now.

11:22

I think we have the pieces, and somebody should put them

11:24

together and let us know if it works.

11:27

Paul, did you suggest that?

11:29

Because I hadn't actually thought about that until I saw that question.

11:32

That was actually a question that Tod Bott came up with was, could

11:36

we see someone adding bass and treble controls to MP3 playback like an 80s boombox?

11:42

If you hear me, Jeff, poking you in the future to clean up that PR there for,

11:48

was it shelf and everything?

11:50

I would love to get to that.

11:52

You know, I just have a lot of other priorities

11:55

in my work right now, and some of you have probably heard

11:57

I'm planning on stepping back from Adafruit this April,

12:01

gonna take a vacation and do some other stuff.

12:03

But, you know, when I'm back in the right kind of space

12:06

and not as much focused on Adafruit priorities

12:09

as stuff that feels cool to me,

12:11

I hope that's one of the things I'll come back and pick up.

12:13

But it may be a while, so you might also pick that up

12:16

and see if you can get it over the finish line.

12:17

'Cause I think-- - That'd be great.

12:19

- I think you could, I think you could do it.

12:21

It's mostly just edits onto the existing filter system, right?

12:24

So it was like I changed the way that stuff was calculated and that's all in.

12:29

And I think it may have been a matter of being out of space

12:32

on some of the boards when I added in all the other goodies.

12:36

And yeah, that's not the fun part.

12:38

The fun part is the coding, not making sure that it still works on

12:42

on a board that, you know, you wouldn't recommend to a person for a new project.

12:46

Yeah. Right. Yeah.

12:48

That's actually a great point about also why I got into this is the

12:53

RP-2350 came out and it had built-in floating point

12:59

and so much of what's involved in the effects

13:03

is floating point math. So when it was just like audio mixer

13:07

and playing an mp3 or playing the synth that was enough to play on most chip sets

13:13

but now we've got this chip with both space

13:17

RAM and storage wise, as well as the processing power to actually power this.

13:23

So now it's possible to put it through multiple effects at once.

13:27

I've tried five or ten at once and was able to play successfully.

13:32

It's not until you sort of get to a bit bigger than that where it starts to have

13:38

issues, but compared to what you could before, it's a lot more.

13:42

In that chain, did you happen to use the distortion overdrive effect?

13:48

I have not tried that one yet.

13:49

That's the one I'm really nervous about.

13:53

There's a lot of floating point going on.

13:55

It really is a game changer.

13:57

Uh, when I was working on synthio, I was very much thinking about the RP2040

14:03

kind of as the, as the target system.

14:06

Cause we were looking at making the RP2040 prop maker feather.

14:10

I think the product ended up being called.

14:12

And so that was a good reason to take time to look at synth.

14:15

And that didn't have the floating point unit.

14:17

So I was reading all this like 1990s.

14:20

Here's how we do all of the math for synthesizing

14:22

without using floating point, just using integers.

14:25

So there's a lot of code in there that

14:27

treats a 16-bit integer with a virtual decimal point

14:30

after the third bit and crazy stuff like that.

14:33

And now if we say, oh, well, we're

14:36

going to have a floating point unit, a lot of that stuff

14:38

becomes much simpler than I made it.

14:41

but we want to keep like the main part of synthio

14:43

still working on all the microcontrollers,

14:45

but it's really neat in these distortion,

14:49

which specific one was it that you're talking about?

14:52

Say the name again.

14:53

- The overdrive.

14:54

- The overdrive.

14:55

- For listeners, there's multiple modes

14:57

of the distortion effect, and that's one of them.

15:00

- Yeah, I remember I was reviewing this pull request.

15:03

Thank you for your patience waiting for me

15:04

to review that pull request.

15:06

And I'm like, it looks like you're calling a trig function

15:10

for every sample.

15:11

are you sure that's gonna work?

15:13

Because I was just in this mode of thinking

15:17

with 1990s constraints or with two years ago

15:20

microcontroller constraints, and we can do a lot more now.

15:23

And I'm glad that y'all kind of breached that frontier

15:27

and said, I'm gonna see what happens if I call exponent

15:30

or whatever that function was, trig, I don't know.

15:33

Every sample.

15:36

- I would love to use integer math for all of that,

15:38

But besides the bit crush effect,

15:42

and that one actually avoids all the floating point

15:44

and just use basic integer bit-wise functions.

15:48

Besides that, it is very difficult to do a distortion effect

15:53

without integer, or floating point math.

15:57

- Just because you need that larger range of values

15:59

than is convenient to represent.

16:01

- The functions themselves,

16:02

I think the only other way to do it

16:04

would be to use a lookup table of some sort.

16:07

then your space becomes your constraint,

16:09

which is always in demand.

16:12

Definitely.

16:13

Yeah, it's amazing how the things that we kind of got

16:17

for free in the analog world of like, oh, if you make

16:21

your recording to tape a little hot,

16:23

or if you turn up the gain too high on your guitar amp,

16:28

it distorts.

16:28

Something really interesting happens.

16:30

Yeah, it sounds cool.

16:31

It doesn't sound gross.

16:32

Whereas when you distort, over gain on a digital system,

16:36

it just clips and sounds harsh and terrible.

16:39

And when you try to model that really soft distortion that

16:42

happens in the analog realm, you start

16:45

calling exponential functions because it's

16:46

a really weird nonlinear output.

16:50

So yeah, trig function for sample.

16:54

Sorry.

16:55

Sorry, Jeff.

16:56

If it works, it's great.

16:58

It's just I'm telling you what my first reaction was.

17:01

No, totally, totally.

17:02

Yeah, I'm more in your realm because I

17:04

started doing synth stuff with Arduino 8-bit.

17:07

Yeah, you can't you can't.

17:08

Mozzie, am I right?

17:11

The other thing I noticed right away, too, is we went from 22

17:15

kilohertz on most of our samples to 48 kilohertz stereo, and it

17:20

was handling it and it was handling it with a fairly large

17:24

effect workload on top of that. And if you try that on an RP

17:29

2040, it'll do it a little bit, but not for very long.

17:33

So is it fair to say that you really do need an RP-2350 to make most of these effects work?

17:39

If you really want to take advantage of them, but if you want to use one or two, depending on the effect and depending on your sample rate, the 2040 will work.

17:50

and I haven't actually tried it on other microcontrollers either.

17:55

Right now, it's port limited to the Raspberry Pi family,

17:59

but in theory, I know

18:02

there is somebody who's working on getting audio for the Espressif family,

18:07

and I don't see why it wouldn't work on there either.

18:11

>> Yeah, that was an interesting development.

18:13

Somebody popped up on GitHub with a pull request and said,

18:16

"I added analog audio to ESP32,

18:19

and I think ESP32 S2.

18:21

And this is something that Limor had had me look at

18:24

like two years ago, and I looked around and I said,

18:27

I don't think I'm up to this.

18:29

I don't see how it would work.

18:31

And now that the code's written,

18:33

it looks really straightforward.

18:34

So it's just one of those things

18:36

where somebody else takes a look at it

18:37

and they had some piece of knowledge that I didn't have

18:40

or some piece of experience.

18:42

And now everybody's gonna be able to use this functionality

18:45

in CircuitPython and do audio on more boards.

18:47

So I'm really excited about that,

18:49

that little bit of functionality.

18:51

- The ESP32 also is a very, very nice chip set

18:54

for having native floating point, all that kind of stuff.

18:57

- I think it's plenty fast.

18:58

- I wanted to say that it had floating point,

19:00

but I wasn't sure.

19:00

So thanks for that confidence, Tod.

19:03

- I think right now, if anyone listening

19:05

wants to play with these things,

19:07

definitely RP2350 is kind of the most tested system

19:13

out there. (laughs)

19:16

some of the delays stuff to a custom build of our RP2040

19:20

'cause it's turned off for RP2040

19:22

just 'cause it doesn't always work.

19:24

And it does work, but man, I really wish

19:27

there was some sort of modular system for these core modules

19:31

so that we wouldn't have to go through that dance of like,

19:33

oh, I added this new function in the core

19:36

and now the CircuitPython build won't fit on a Trinky

19:40

or the CutiePy M0 or something.

19:44

I know that's impossible,

19:46

but it's something that I've been dreaming for years for CircuitPython.

19:50

So we were talking about guitar effects earlier.

19:53

Do you see the ability for someone to actually build a guitar pedal using these

19:58

audio effects?

19:59

Are you ready for this?

20:04

Here is a guitar pedal.

20:06

And this audio listeners, this is not going to make any sense.

20:10

I'll describe it in a second.

20:12

So, uh, it's beautiful.

20:14

And sorry to take over here.

20:16

No, no.

20:17

This is something which I actually I

20:19

didn't think I was going to do at

20:21

first. When I was first working

20:22

on these effects, I was really

20:24

thinking about synthesizers and I

20:25

have used it, the delay, especially

20:27

on some of my synthesizers.

20:29

But then as soon as I started

20:30

playing around with it, I was like,

20:31

wait a second, this would work

20:33

really well on a guitar pedal, you

20:34

know, and controls and like you're

20:36

not doing too much else in a guitar

20:38

pedal except for just processing

20:40

those effects and, you know, pulling

20:42

knobs and stuff.

20:43

And so I started doing the research, figuring out how to build them.

20:47

Of course, what I ended up building is definitely a prototype and I need some

20:50

revisions, but what I did is I took and it's actually an RP 2040 right now.

20:55

It's an RP 2040 zero, I believe, manufactured by WaveShare,

20:59

just because the form factor worked nice for this because they lost my RP 2350

21:05

zeros in shipment, which I'm really upset about.

21:07

But I know, I know.

21:10

But it's that combined with an audio codec, which once again, for listeners,

21:13

An audio codec is essentially an input/output/analog system

21:19

that your microcontroller can talk to

21:22

and manage those analog pathways

21:25

without having to use independent chips for input/output,

21:29

which is a lot more digital in a ways.

21:31

So what I really liked about this chip that I chose,

21:33

which is the WM8960, which I wrote a library for

21:37

for CircuitPython a couple months ago,

21:40

is that you can actually mix the analog input

21:43

with that output.

21:44

So for a lot of effects--

21:45

- Oh, so it can pass through what's coming in?

21:48

And, oh. - Yeah.

21:49

And it sounds pretty clean.

21:51

I actually designed this with a true bypass,

21:53

which if you're not familiar with,

21:55

it's pretty much, it just takes your guitar

21:57

totally out of the pedal

21:58

and just passes straight through to the amp.

22:00

I designed that with it thinking that there'd be noise,

22:03

digital interference and stuff,

22:04

but it actually sounds pretty clean,

22:05

so I think in a future revision,

22:06

I'll change that around to just rely on that codec.

22:10

But yeah, in that regard,

22:11

You can take that audio into the codec,

22:14

have those samples come in over I2S as an input,

22:18

and then process whatever you need for it,

22:20

and then output it back again on the same bus

22:22

over I2S into the codec, and then mix that process,

22:27

like say if you're doing a filter or something,

22:30

mix that with the original signal as you need

22:32

as the user decides, and then, it sounds really good.

22:36

I was actually very surprised.

22:38

I do have a confession to make,

22:40

Because right now CircuitPython does not support

22:42

bi-directional I2S input and output.

22:45

I've worked to add that support.

22:48

- Have you done sins to get this to work?

22:49

Did you sin?

22:50

(laughing)

22:51

You did something bad.

22:52

- Say that again.

22:53

- Have you committed sins to make this work?

22:55

- I have a sin, okay.

22:57

So I have a pending draft PR that adds bi-directional I2S,

23:02

but it's very shaky and I'm kind of,

23:07

I probably shouldn't use this language,

23:08

but I'm a bit in DMA hell with that right now,

23:12

where it's just, you're dropping buffers

23:15

and all this kind of stuff and it sounds bad.

23:17

It does work though, surprisingly.

23:19

So I would love for someone else

23:20

to help me on that at some point,

23:21

but what I ended up doing is actually,

23:24

my sin is I ended up going to Arduino.

23:28

And I've actually been working on the Arduino Pico library

23:32

to add that support in, which unfortunately was a lot,

23:36

well, I guess fortunately,

23:37

was a lot easier than to do in CircuitPython.

23:40

So I have this RP2040 running through that

23:43

and I'm building a library to manage the pedal

23:46

and have all these effects processed

23:49

and have a very simple interface for changing the audio.

23:53

So you pretty much, kind of like Mozzie,

23:54

it's actually very similar to Mozzie,

23:56

where you have a control loop and an audio loop

23:59

and you just separate your processing and it does it all.

24:02

Even utilizing both cores of the Pico, it's pretty cool.

24:05

And so I've been able to do distortion, delay, filters.

24:09

I stole your biquads, Jeff, I'm sorry.

24:11

No, you're absolutely welcome to them

24:13

because they're open source and that's one of the reasons.

24:16

And you know, I'm not judging.

24:19

I think it's great when you use the environment

24:21

that's good for you.

24:22

I mean, we're here to talk about CircuitPython,

24:24

but it's important to acknowledge

24:25

there are other environments out there

24:27

and they've got a lot of strengths

24:29

that we don't always have.

24:31

And maybe we'll get there by studying them

24:33

or maybe we won't and for something,

24:36

another environment will always be better.

24:37

But yeah, no shade for using Arduino, absolutely not.

24:42

- Yeah, it's also really good when you wanna think through

24:45

an algorithm that would have to be written in C

24:48

and like, oh, I'm gonna just like punk this out

24:50

either in Pico SDK or in Arduino or whatever,

24:52

see if it actually makes sense

24:54

before going through all the trouble

24:55

of making all the CircuitPython bindings

24:58

to the C code that's underneath.

25:00

So yeah, go Arduino to prototype with.

25:04

- However, I think CircuitPython,

25:06

if all that worked as I wanted it to work,

25:08

I think it would be a better platform in a lot of ways

25:11

because next thing you know,

25:12

you have to do the display management.

25:15

All the synth IO, 'cause one thing I would love to do

25:17

is be able to take a guitar and use a tuning process,

25:20

read what note you're playing,

25:22

and then play it through synth IO.

25:23

Like, that would be incredible,

25:25

but now that I'm on Arduino, I'm like,

25:26

oh, well now I have to figure out

25:27

how to get all the synthesis working,

25:29

or it'd be so much easier in CircuitPython.

25:31

Right. Yeah.

25:32

Just the once all that core code, that fast code that has to be written in C

25:36

is done, if you can bolt the parts together in CircuitPython

25:40

and express in a hopefully simple way, I want this thing up here

25:44

to control that thing down there.

25:45

I think that is where CircuitPython has a big advantage.

25:49

Oh, yeah, definitely.

25:50

Yeah, I've found that so much like when I was working on the drum effects,

25:55

I could iterate through there blazingly fast.

25:58

I was just in the REPL trying,

26:00

"Okay, let's try these three things."

26:02

No, "Okay, let's change the filter,

26:05

the low-pass filter, the high-pass filter."

26:09

It made it so much quicker.

26:12

Again, nothing against Arduino, I've used it a ton.

26:15

But if I had to build,

26:17

compile, upload, and test it for all those,

26:19

I'd still be working on those effects

26:21

if I hadn't just dropped them and given up.

26:24

>> Yeah, it's almost like a live coding environment

26:25

because you can be there on the REPL and actually

26:27

create a synthesizer just by typing in real time.

26:33

Yeah, it's amazingly fast and you can just play, you can record

26:38

something through MIDI tracks or just... I've had lots of test files which are

26:42

just a bunch of notes from some song that I put into test and then

26:47

listen to it right away and be like, "not quite right, I need to adjust this,

26:50

oh this is better." It becomes a really quick

26:54

iterative process to come up with what you want.

26:59

So Cooper's been working on a prototype for a guitar pedal.

27:02

Do any of you have any other projects in the back of your head

27:05

that you want to try with these effects now that they're available in CircuitPython?

27:10

Yeah, I mean, I've got a I've got a little what I've been calling

27:13

the PicoTouch synth that I've been sitting on for about a year,

27:17

and I think I'm going to make a custom build of CircuitPython

27:20

that includes some of the delay functions just to get fatter sound.

27:24

the ever infinite quest for like a fatter synth sound.

27:29

But that'll be in my Tindy store.

27:30

It was in my Tindy store for a while,

27:31

but I had to turn off my Tindy store

27:33

because of all the fires that have been happening around me.

27:35

(laughs)

27:38

- You mentioned custom build,

27:39

is that because it's on RP2040?

27:41

- Exactly that, yeah.

27:43

- Ah, okay.

27:44

- Yeah, 'cause the RP2350 doesn't do cap touch yet

27:46

because of the problem with their pins.

27:49

So, (laughs)

27:51

yeah, it has to be cap touch,

27:52

has to be RB2040 and thus has to be a custom build.

27:56

Yeah.

27:57

Well, and that being one thing I was looking at before I got

28:02

busy and unfortunately had to take some time away

28:04

from working on it was a chorus effect.

28:07

So not just the delay, which is really a delay,

28:10

but just a slightly different type.

28:13

So the chorus effect just, for those that are listening,

28:16

will break up a note and slightly delay it one two three four five whatever many times

28:24

but over a small time frame so you get all the waves instead of being in harmony together I guess

28:32

or lined up or slightly out of phase and just comes up with that richer fatter sound so that's

28:39

on my plate one of the things that I still want to work on and I mentioned earlier was one of the

28:46

things that I thought of with effects is a reverb sound.

28:51

Yes.

28:52

I think it'll just make things sound better. And I've I've

28:56

looked at the code. I vaguely know what I'm doing to put it

29:00

in. But it's just a matter of getting the time and patience to

29:03

put it in and get it working. That one, again, the 2350 really

29:10

shines because of the additional memory and storage because

29:15

Especially the memory on that one

29:18

If you need to record a hundred two hundred milliseconds of 48 kilohertz audio that starts eating a lot of RAM really fast

29:26

Yeah, so are you getting into PS RAM territory there or is that fitting in the 512?

29:32

K for the what you're thinking about I think it fits in the 512

29:37

I've had the audio delays up to a second and I think we kept them at a second on purpose

29:44

Otherwise you'll start running into RAM limitations.

29:49

I haven't tried it with PS RAM yet.

29:51

I don't think I've got a 2350 with PS RAM, but I can solve that problem easily enough.

29:56

Quicker than I can write reverbs.

29:58

[laughter]

30:00

Alright, so the reason why reverb will be important for a whole different class of people than us who want to make synthesizers and stuff,

30:09

Is it once we have the ability to do a guitar pedal like audio in then audio out?

30:16

Plus reverb plus circuit Python can already do displays and play mp3s

30:21

We can now make a circuit Python powered karaoke machine

30:30

Some time this year, yeah, I'm gonna I'm gonna try to sell John Parker in this idea once once all the pieces come together

30:38

That would be an amazing project to see

30:42

You know what I think is really important for us to work on

30:45

Soonish or some one of us. I know Tod you have your synth IO tricks

30:50

Repository, which I'm sure all of us have referred to at some point. I know I have

30:55

I think we are due for an audio effects tricks at some point

31:01

Because you mentioned the the chorus mark

31:03

I've actually been able to do that to a degree,

31:06

but probably needs some refinement.

31:08

And if we had some centralized repository of stuff

31:10

like that, examples people to use, I think that'd be great.

31:13

That's one thing that I wish I've had time to work on

31:17

is an intro guide for using audio effects,

31:21

because at this point, there isn't.

31:23

There is sample code that a bunch of us have put out there,

31:27

but there isn't actually a guide on doing it.

31:32

And the second is an intro guide on how to make your own audio effects.

31:35

Cooper, you've been amazing and I can't say this like this.

31:39

I was always hoping somebody would jump in and build on what I started.

31:44

And you've done a whole bunch more work that I couldn't have been off on my own.

31:48

And then between everyone here, it's great.

31:52

And the community is great to bounce ideas off of.

31:54

So you're not just working in that little silo by yourself, wondering if

31:59

anyone is paying attention to what you're doing.

32:01

Like even hearing from Tod tonight

32:02

that he's seen my drum effects all over the place.

32:05

That feels amazing to hear.

32:08

And this whole project has brought

32:11

in so many different people that I didn't expect

32:13

to hear from to start with.

32:15

I think CircuitPython, it's able to cater

32:18

to a lot of different groups of makers.

32:21

But I think, especially once we really

32:23

hash out this audio effects, get the live input working,

32:26

all that kind of stuff, I think it just

32:27

adds a whole other category of makers,

32:30

a whole other community to this project that can utilize these resources.

32:36

And that's just really cool.

32:37

You know?

32:38

Well, that's a great place to wrap it up.

32:39

I want to thank each of you for your time, Cooper, Mark, Tod, and Jeff.

32:44

I really appreciate you making time to come on the show.

32:47

Thanks so much.

32:48

Oh, thanks for having me.

32:49

Thanks for the invite.

32:50

And Cooper was good to meet you face to face.

32:53

I know.

32:53

Hey, anytime you want to hit me up, I'm I'm around.

32:55

All right.

32:56

Lovely to see y'all.

32:59

Thank you for listening to the CircuitPython Show.

33:01

A special thank you to Cooper, Jeff, Mark, and Tod

33:03

for joining the show and sharing their experience

33:05

in building the new audio effects in CircuitPython.

33:08

For show notes and transcripts,

33:10

visit www.circuitpythonshow.com.

33:13

Until next time, stay positive.