1 00:00:00,001 --> 00:00:03,940 Welcome to the CircuitPython Show. I'm your host, Paul Cutler. 2 00:00:04,660 --> 00:00:07,920 This episode, I'm joined by Cooper Dalrymple, Jeff Epler, Mark Komus, 3 00:00:08,100 --> 00:00:12,000 and Tod Kurt for a panel discussion on the new audio effects recently added to CircuitPython. 4 00:00:13,360 --> 00:00:15,140 Welcome, everyone, to the show! 5 00:00:16,200 --> 00:00:17,580 Hello! Hey, Paul. 6 00:00:18,740 --> 00:00:23,280 Mark, back in September, you proposed adding audio effects to CircuitPython. 7 00:00:23,780 --> 00:00:26,360 What inspired you to add the audio effects? 8 00:00:28,000 --> 00:00:35,560 something on my mind for quite a while after the initial synthio release that Jeff had put out, 9 00:00:36,380 --> 00:00:44,560 when I was trying to add drum effects in. And I found YouTube was a really good source of 10 00:00:44,860 --> 00:00:52,580 seeing how other people use synths to make drum effects, other types of synth effects, pianos, 11 00:00:52,580 --> 00:00:53,760 keyboards, basses, whatever. 12 00:00:54,440 --> 00:01:01,660 But where I hit a stumbling block for most of them was that I couldn't add 13 00:01:01,860 --> 00:01:02,940 things like reverb. 14 00:01:03,540 --> 00:01:08,060 The filters were in and they work great, but like reverb, little echoes, little 15 00:01:08,140 --> 00:01:09,760 things that would make it sound better. 16 00:01:10,860 --> 00:01:14,760 So it was in the back of my head to do something with that. 17 00:01:15,680 --> 00:01:19,060 And then I just had some time, was looking for something to work on. 18 00:01:19,400 --> 00:01:21,440 So eventually that's how I ended up starting on it. 19 00:01:22,140 --> 00:01:27,600 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. 20 00:01:28,480 --> 00:01:40,940 Yeah, I first started doing audio stuff with Audio Mixer, I believe, and bringing that to the RP2040 at the time. 21 00:01:42,260 --> 00:01:45,800 Something else with Raspberry Pi, but I can't remember what it was for audio now. 22 00:01:47,020 --> 00:01:48,040 I have a quick question for you, Mark. 23 00:01:48,360 --> 00:01:51,680 You mentioned the drum sounds using synthio, generating those. 24 00:01:51,700 --> 00:01:55,440 Did you put out a gist for that about a year or two ago? 25 00:01:56,140 --> 00:01:56,680 - Yes I did. 26 00:01:56,960 --> 00:01:58,480 - I think I might have copied some of that. 27 00:01:59,180 --> 00:02:00,420 Stole your homework. 28 00:02:01,080 --> 00:02:02,540 - Yeah, yeah, everyone has been using that. 29 00:02:02,960 --> 00:02:05,200 - Yeah, yeah, you were like mixing three different voices 30 00:02:05,400 --> 00:02:07,880 I think, the decays, it was really good. 31 00:02:08,560 --> 00:02:10,619 - I found it in many different people's projects 32 00:02:10,679 --> 00:02:11,820 and they're like, hey look, I made a little 33 00:02:11,940 --> 00:02:13,900 CircuitPython drum machine and I'm like, hmm, 34 00:02:14,300 --> 00:02:15,900 there's no samples here, how is he doing it? 35 00:02:16,460 --> 00:02:18,620 - Yeah, I think I credit it to my, 36 00:02:19,800 --> 00:02:21,760 I think I credit it in the source code. 37 00:02:21,880 --> 00:02:23,200 But still, that was incredible. 38 00:02:23,720 --> 00:02:27,040 That's really awesome to hear because that's what I was hoping with anything I 39 00:02:27,120 --> 00:02:31,020 put out. And I've seen a couple of projects that had drum effects that I was 40 00:02:31,100 --> 00:02:35,020 like, wait, that sounds like what I made, but I've never looked into it further 41 00:02:35,180 --> 00:02:35,660 than that. 42 00:02:35,820 --> 00:02:35,960 Wow. 43 00:02:36,940 --> 00:02:40,660 I've seen that commonly on like older, older systems. 44 00:02:40,880 --> 00:02:45,860 The sound of one voice is just kind of not as exciting as you'd like it to be. 45 00:02:45,900 --> 00:02:48,360 And so you double up or triple up voices. 46 00:02:49,720 --> 00:02:51,980 And I have to give credit to TodBot for that. 47 00:02:52,780 --> 00:02:56,940 You were mixing multiple voices and detuning them slightly 48 00:02:57,060 --> 00:02:58,340 to get a cooler sound. 49 00:02:59,060 --> 00:03:01,040 And then when I started doing the drum effects, 50 00:03:01,180 --> 00:03:03,520 I was like, hey, wait, that can work for this as well. 51 00:03:03,580 --> 00:03:05,600 I can mix two or three or four voices 52 00:03:05,760 --> 00:03:09,840 to get something that sounds more noise-like and not 53 00:03:10,640 --> 00:03:12,120 a sine wave from synth-like. 54 00:03:12,320 --> 00:03:12,580 Yeah. 55 00:03:12,980 --> 00:03:15,240 When you made that, did you look at, I don't know, 56 00:03:15,300 --> 00:03:18,639 like a TR-808 or something, some other analog drum machine 57 00:03:18,640 --> 00:03:21,060 to see how they did it to build that sound? 58 00:03:21,180 --> 00:03:22,520 Or were you just kind of playing it off? 59 00:03:23,400 --> 00:03:26,980 I googled a bunch of YouTube videos of various people 60 00:03:27,260 --> 00:03:29,000 making drum sounds on synths. 61 00:03:29,180 --> 00:03:32,500 I can't even remember what videos they were at this point. 62 00:03:33,000 --> 00:03:35,220 And then had to adapt them for CircuitPython. 63 00:03:36,160 --> 00:03:38,920 As I said, we didn't really have audio effects at the time 64 00:03:39,160 --> 00:03:42,800 outside of basic filters and then multiple samples 65 00:03:42,880 --> 00:03:43,760 at the same time. 66 00:03:44,720 --> 00:03:47,999 So it ended up being sort of a hybrid of what I saw online 67 00:03:48,000 --> 00:03:49,440 and what I was able to play with myself. 68 00:03:50,300 --> 00:03:54,140 Yeah, adding adding the the delays, you mentioned having like voice detuning, 69 00:03:54,540 --> 00:03:58,100 like having multiple voices where they're where they're detuned to make a fatter, 70 00:03:58,520 --> 00:03:59,320 you know, more interesting sound. 71 00:03:59,860 --> 00:04:01,980 But like you can get the same effect in a lot of ways 72 00:04:02,200 --> 00:04:05,860 just by using a delay at much lower CPU cost. 73 00:04:06,320 --> 00:04:09,080 And so for like if you're playing a chord, say. 74 00:04:09,620 --> 00:04:14,140 And so I'm so happy that we have this audio effects and audio delays 75 00:04:14,640 --> 00:04:17,560 packages now because it's kind of cruise control for cool. 76 00:04:17,600 --> 00:04:20,940 You can make almost any sound sound a little bit better when you add a little bit of delay to it. 77 00:04:21,859 --> 00:04:22,360 That's interesting. 78 00:04:23,100 --> 00:04:28,740 For those that might not be aware of the new audio effects, what are some example effects that are now available in CircuitPython? 79 00:04:30,120 --> 00:04:33,820 The first one I put in was an echo, which is really a delay. 80 00:04:34,760 --> 00:04:38,880 I put it in because I didn't know what else to do to make sure things were working. 81 00:04:39,680 --> 00:04:45,860 I don't have the knowledge that everyone else on this panel does about synths and musical knowledge. 82 00:04:46,720 --> 00:04:50,560 But it's something that you can quickly and easily test. 83 00:04:50,700 --> 00:04:52,840 I can play a note, I can wait half a second 84 00:04:52,940 --> 00:04:55,320 and see if I've heard the note back to myself again. 85 00:04:55,740 --> 00:04:58,560 So it became really good for debugging and troubleshooting 86 00:04:58,720 --> 00:05:00,860 and learning to pick something simple where you're not 87 00:05:01,120 --> 00:05:06,220 trying to troubleshoot your effect on top of figuring out 88 00:05:06,280 --> 00:05:07,940 how to do effects to start with. 89 00:05:08,580 --> 00:05:10,400 Yeah, I think I can touch on that a little bit as well, 90 00:05:10,740 --> 00:05:11,220 if that's OK. 91 00:05:11,900 --> 00:05:14,140 First of all, I'm the new kid on the block here. 92 00:05:14,200 --> 00:05:16,880 I've only been contributing for about half a year or more 93 00:05:17,520 --> 00:05:18,140 to CircuitPython. 94 00:05:18,460 --> 00:05:19,440 Name's Cooper, I guess. 95 00:05:19,820 --> 00:05:21,460 And I come from a musical background, 96 00:05:21,820 --> 00:05:24,400 and a lot of guitar, piano, stuff like that. 97 00:05:24,480 --> 00:05:28,380 And I think what a good place to base this selection of effects 98 00:05:28,440 --> 00:05:31,380 that we eventually choose is in guitar effects. 99 00:05:31,740 --> 00:05:33,820 I'm sure many of the listeners here 100 00:05:34,160 --> 00:05:37,400 are familiar to some degree with effects pedals for guitars, 101 00:05:37,520 --> 00:05:40,340 which are ubiquitous nowadays with guitar players 102 00:05:40,740 --> 00:05:43,200 since the '60s with Jimi Hendrix and all that, 103 00:05:43,240 --> 00:05:49,440 fuzzes, etc. I think some of our selection, it may be a little bit more utilitarian in 104 00:05:49,760 --> 00:05:56,520 usage but kind of takes some of its, I guess, DNA from guitar pedals. So, the other effects 105 00:05:56,560 --> 00:06:01,240 that we've developed beyond delay, which was a great start, of course, to set this up, 106 00:06:01,340 --> 00:06:06,600 the whole pathway and how these effects are made. Since then, we have filter, I believe, 107 00:06:07,400 --> 00:06:09,740 which is in a different module, audio filters. 108 00:06:10,420 --> 00:06:13,820 And then recently just got merged is distortion, 109 00:06:14,220 --> 00:06:16,080 which actually covers a couple of bases. 110 00:06:16,720 --> 00:06:18,120 I think that filter one especially, 111 00:06:18,240 --> 00:06:20,260 it's probably the easiest one. 112 00:06:20,300 --> 00:06:22,320 I think it was easier than the echo effect to create 113 00:06:22,780 --> 00:06:25,000 because it was using the biquad system 114 00:06:25,440 --> 00:06:27,080 that you developed, Jeff, with synthio 115 00:06:27,700 --> 00:06:31,600 and then hence the block biquad system, which is super cool. 116 00:06:32,420 --> 00:06:36,340 But with that, you can build a multitude of effects, 117 00:06:36,520 --> 00:06:40,600 things like wahs, EQs, just basic filters, low pass, 118 00:06:40,720 --> 00:06:41,380 and stuff like that. 119 00:06:41,960 --> 00:06:42,520 Yeah, totally. 120 00:06:42,620 --> 00:06:44,160 Because one of the things that-- 121 00:06:44,160 --> 00:06:46,720 I don't know who it was that set up the initial audio 122 00:06:46,960 --> 00:06:49,340 system for CircuitPython, but it kind of 123 00:06:49,640 --> 00:06:52,160 was informed by how pedals work, and that they have 124 00:06:52,240 --> 00:06:53,620 got an input and an output. 125 00:06:54,100 --> 00:06:56,280 And if you want to hook things together, 126 00:06:56,420 --> 00:06:58,440 you just hook the output of one to the input of the other, 127 00:06:58,500 --> 00:06:59,140 and you keep going. 128 00:06:59,280 --> 00:07:02,440 And that's how all the new audio delays and audio effects 129 00:07:02,480 --> 00:07:03,600 have been set up as well. 130 00:07:03,740 --> 00:07:05,999 So you can just start plugging things up 131 00:07:06,000 --> 00:07:07,160 and see what they do. 132 00:07:07,320 --> 00:07:10,940 And every module or every function has these knobs. 133 00:07:11,440 --> 00:07:15,620 And Jumper made these cool LFO automated knob turning 134 00:07:15,940 --> 00:07:18,580 functions that you can just plug into the various knobs 135 00:07:18,640 --> 00:07:20,540 of the filter and the delay and all that kind of stuff. 136 00:07:20,580 --> 00:07:23,920 So you can do the wahs and distortions and dynamic stuff. 137 00:07:23,980 --> 00:07:24,520 It's really fun. 138 00:07:25,200 --> 00:07:27,620 - Yeah, I mean, when I was creating synthio, 139 00:07:27,980 --> 00:07:30,260 I did a lot of reading about synths. 140 00:07:30,340 --> 00:07:32,240 I'm more of a music enjoyer. 141 00:07:32,420 --> 00:07:33,620 I'm a little bit of a vocal musician, 142 00:07:34,380 --> 00:07:35,400 but I don't know the instruments. 143 00:07:35,600 --> 00:07:39,420 I don't know synths, and I got the opportunity to work on synthio. 144 00:07:40,400 --> 00:07:44,880 And there was a lot of reading, and I learned about something like LFOs, and I would try 145 00:07:44,960 --> 00:07:49,620 to create a structure that would allow it to be expanded and elaborated upon. 146 00:07:49,980 --> 00:07:54,760 And I think in some respects I've succeeded, because now we have audio filters, and they're 147 00:07:54,780 --> 00:08:00,860 reusing these other things like the LFOs that existed already in ways that repurpose them 148 00:08:00,900 --> 00:08:03,200 and increase what they do. 149 00:08:03,560 --> 00:08:06,160 And Tod, I don't know if you said what an LFO was. 150 00:08:06,820 --> 00:08:07,620 What is an LFO? 151 00:08:08,760 --> 00:08:11,600 LFO, it's from the Spanish LFO. 152 00:08:11,900 --> 00:08:21,580 No, it's a low frequency oscillator in synthesizers for reasons back in the misty times, people 153 00:08:21,660 --> 00:08:27,600 divided up oscillators into two kind of classes where there's oscillators that made noise 154 00:08:27,740 --> 00:08:32,880 and there's oscillators that are really slow, basically at sort of human knob turning rates. 155 00:08:33,380 --> 00:08:38,120 And so instead of you sitting there with your hand on the filter knob going "wob wob wob", 156 00:08:38,219 --> 00:08:42,240 you can instead have a low frequency oscillator essentially turn that knob for you and do 157 00:08:42,300 --> 00:08:44,280 the "wob wob wob" without you having to do it. 158 00:08:44,440 --> 00:08:50,660 In practice, a lot of oscillators can be both, but for code reasons, like with SynthIO, there's 159 00:08:50,700 --> 00:08:57,320 a nice efficiency you can do by having oscillators that are only updated at a lower rate. 160 00:08:57,640 --> 00:09:01,460 You can save some CPU instead of having them be full audio rate oscillators. 161 00:09:02,360 --> 00:09:07,460 So yeah, so we have in synthio, Jeff made real audio oscillators that can be arbitrary 162 00:09:07,820 --> 00:09:11,940 waves and then we've got the low frequency oscillators that update, I think up to around 163 00:09:12,060 --> 00:09:12,860 50 or 60 hertz. 164 00:09:13,700 --> 00:09:17,420 I've never really tested what the upper range is on how fast they can go. 165 00:09:17,940 --> 00:09:20,380 Well, it's 256 samples, isn't it? 166 00:09:20,540 --> 00:09:25,640 So depending on your sample rate, I think it's faster than 50 times per second. 167 00:09:25,780 --> 00:09:28,040 I have to do some calculation here. 168 00:09:29,880 --> 00:09:34,880 The whole LFO system and the block input system work amazing. 169 00:09:35,140 --> 00:09:42,320 Like that was one of the first things I ran into when I started the draft PR for audio 170 00:09:42,440 --> 00:09:46,500 effects was people saying you need to add in this feature. 171 00:09:46,620 --> 00:09:54,600 You need to let people change the delay and the mix level and everything based on these 172 00:09:54,660 --> 00:09:55,540 LFOs. 173 00:09:56,220 --> 00:09:58,060 And it was so simple to add in. 174 00:09:58,640 --> 00:10:02,840 Yeah, a great example is that is within the audio mixer. We 175 00:10:03,120 --> 00:10:07,280 recently added support for block input on the level. And one of 176 00:10:07,280 --> 00:10:10,300 the one of the original, you know, audio effects, you know, 177 00:10:10,320 --> 00:10:13,760 it's in like amps and stuff from like the 50s is tremolo, right, 178 00:10:13,840 --> 00:10:17,040 which is where you just increase and decrease the volume, like 179 00:10:17,120 --> 00:10:20,680 sweeping that knob. And now you can do that very easily using 180 00:10:20,920 --> 00:10:23,200 synthio LFOs and stuff. So that's pretty cool. 181 00:10:23,640 --> 00:10:25,780 That's cool. I'd not I'd not really noticed that in the PR. 182 00:10:25,820 --> 00:10:27,740 That was in like the last two weeks, I think. 183 00:10:28,240 --> 00:10:28,960 Oh, that's awesome. 184 00:10:30,420 --> 00:10:33,160 The other bonus with a lot of this stuff 185 00:10:33,280 --> 00:10:35,840 now being in Audio Mixer and all these audio effects 186 00:10:35,920 --> 00:10:40,140 is we realized they don't have to be just for the synth. 187 00:10:40,820 --> 00:10:44,920 The synth was what inspired me and what I think Cooper 188 00:10:45,000 --> 00:10:46,580 and myself spent a lot of our time in. 189 00:10:47,260 --> 00:10:49,760 But then we realized raw sample and WAV files 190 00:10:49,960 --> 00:10:53,280 and any other audio files played through Circuit Python, 191 00:10:54,120 --> 00:10:55,540 we can add these effects to. 192 00:10:55,700 --> 00:10:57,500 So now you could have an MP3 playing. 193 00:10:58,180 --> 00:11:01,060 And if you want to add an effect to it, you can. 194 00:11:01,280 --> 00:11:03,140 You could put the filters on it. 195 00:11:03,560 --> 00:11:05,040 You could put an echo for some reason. 196 00:11:05,200 --> 00:11:06,960 I'm not sure why, but-- 197 00:11:07,320 --> 00:11:08,880 I'm looking forward to Halloween. 198 00:11:09,320 --> 00:11:11,580 I have a feeling there's some spooky sounds 199 00:11:11,620 --> 00:11:12,800 that could be put in there. 200 00:11:13,900 --> 00:11:14,600 Definitely that. 201 00:11:15,940 --> 00:11:18,220 Yeah, although just like an equalizer style 202 00:11:18,500 --> 00:11:20,740 control over your MP3 playback is something people have 203 00:11:20,860 --> 00:11:22,340 requested, and I think that's possible now. 204 00:11:22,400 --> 00:11:24,659 I think we have the pieces, and somebody should put them 205 00:11:24,660 --> 00:11:26,100 together and let us know if it works. 206 00:11:27,060 --> 00:11:28,860 Paul, did you suggest that? 207 00:11:29,000 --> 00:11:31,860 Because I hadn't actually thought about that until I saw that question. 208 00:11:32,620 --> 00:11:36,780 That was actually a question that Tod Bott came up with was, could 209 00:11:36,860 --> 00:11:41,720 we see someone adding bass and treble controls to MP3 playback like an 80s boombox? 210 00:11:42,740 --> 00:11:48,480 If you hear me, Jeff, poking you in the future to clean up that PR there for, 211 00:11:48,940 --> 00:11:50,100 was it shelf and everything? 212 00:11:50,920 --> 00:11:52,120 I would love to get to that. 213 00:11:52,540 --> 00:11:55,220 You know, I just have a lot of other priorities 214 00:11:55,420 --> 00:11:57,860 in my work right now, and some of you have probably heard 215 00:11:57,900 --> 00:12:00,800 I'm planning on stepping back from Adafruit this April, 216 00:12:01,340 --> 00:12:03,100 gonna take a vacation and do some other stuff. 217 00:12:03,700 --> 00:12:06,260 But, you know, when I'm back in the right kind of space 218 00:12:06,420 --> 00:12:08,740 and not as much focused on Adafruit priorities 219 00:12:09,060 --> 00:12:10,620 as stuff that feels cool to me, 220 00:12:11,000 --> 00:12:13,640 I hope that's one of the things I'll come back and pick up. 221 00:12:13,740 --> 00:12:16,480 But it may be a while, so you might also pick that up 222 00:12:16,520 --> 00:12:17,860 and see if you can get it over the finish line. 223 00:12:17,920 --> 00:12:19,200 'Cause I think-- - That'd be great. 224 00:12:19,440 --> 00:12:20,900 - I think you could, I think you could do it. 225 00:12:21,740 --> 00:12:24,400 It's mostly just edits onto the existing filter system, right? 226 00:12:24,900 --> 00:12:29,360 So it was like I changed the way that stuff was calculated and that's all in. 227 00:12:29,440 --> 00:12:32,620 And I think it may have been a matter of being out of space 228 00:12:32,700 --> 00:12:35,500 on some of the boards when I added in all the other goodies. 229 00:12:36,180 --> 00:12:38,460 And yeah, that's not the fun part. 230 00:12:38,540 --> 00:12:42,460 The fun part is the coding, not making sure that it still works on 231 00:12:42,760 --> 00:12:46,380 on a board that, you know, you wouldn't recommend to a person for a new project. 232 00:12:46,900 --> 00:12:48,060 Yeah. Right. Yeah. 233 00:12:48,140 --> 00:12:52,660 That's actually a great point about also why I got into this is the 234 00:12:53,780 --> 00:12:58,620 RP-2350 came out and it had built-in floating point 235 00:12:59,700 --> 00:13:03,040 and so much of what's involved in the effects 236 00:13:03,360 --> 00:13:07,440 is floating point math. So when it was just like audio mixer 237 00:13:07,880 --> 00:13:13,500 and playing an mp3 or playing the synth that was enough to play on most chip sets 238 00:13:13,640 --> 00:13:17,259 but now we've got this chip with both space 239 00:13:17,260 --> 00:13:23,240 RAM and storage wise, as well as the processing power to actually power this. 240 00:13:23,280 --> 00:13:27,680 So now it's possible to put it through multiple effects at once. 241 00:13:27,780 --> 00:13:31,940 I've tried five or ten at once and was able to play successfully. 242 00:13:32,780 --> 00:13:37,840 It's not until you sort of get to a bit bigger than that where it starts to have 243 00:13:38,000 --> 00:13:42,160 issues, but compared to what you could before, it's a lot more. 244 00:13:42,980 --> 00:13:47,520 In that chain, did you happen to use the distortion overdrive effect? 245 00:13:48,420 --> 00:13:49,920 I have not tried that one yet. 246 00:13:49,960 --> 00:13:51,800 That's the one I'm really nervous about. 247 00:13:53,860 --> 00:13:55,260 There's a lot of floating point going on. 248 00:13:55,300 --> 00:13:56,560 It really is a game changer. 249 00:13:57,220 --> 00:14:02,300 Uh, when I was working on synthio, I was very much thinking about the RP2040 250 00:14:03,040 --> 00:14:05,700 kind of as the, as the target system. 251 00:14:06,260 --> 00:14:10,260 Cause we were looking at making the RP2040 prop maker feather. 252 00:14:10,420 --> 00:14:11,920 I think the product ended up being called. 253 00:14:12,500 --> 00:14:15,440 And so that was a good reason to take time to look at synth. 254 00:14:15,500 --> 00:14:16,940 And that didn't have the floating point unit. 255 00:14:17,200 --> 00:14:19,540 So I was reading all this like 1990s. 256 00:14:20,000 --> 00:14:22,300 Here's how we do all of the math for synthesizing 257 00:14:22,480 --> 00:14:24,300 without using floating point, just using integers. 258 00:14:25,140 --> 00:14:26,420 So there's a lot of code in there that 259 00:14:27,000 --> 00:14:30,200 treats a 16-bit integer with a virtual decimal point 260 00:14:30,360 --> 00:14:33,040 after the third bit and crazy stuff like that. 261 00:14:33,520 --> 00:14:36,280 And now if we say, oh, well, we're 262 00:14:36,360 --> 00:14:38,660 going to have a floating point unit, a lot of that stuff 263 00:14:38,840 --> 00:14:41,080 becomes much simpler than I made it. 264 00:14:41,540 --> 00:14:43,800 but we want to keep like the main part of synthio 265 00:14:43,840 --> 00:14:45,460 still working on all the microcontrollers, 266 00:14:45,560 --> 00:14:49,080 but it's really neat in these distortion, 267 00:14:49,680 --> 00:14:51,520 which specific one was it that you're talking about? 268 00:14:52,300 --> 00:14:52,860 Say the name again. 269 00:14:53,480 --> 00:14:54,180 - The overdrive. 270 00:14:54,440 --> 00:14:55,120 - The overdrive. 271 00:14:55,860 --> 00:14:57,360 - For listeners, there's multiple modes 272 00:14:57,660 --> 00:15:00,180 of the distortion effect, and that's one of them. 273 00:15:00,240 --> 00:15:02,940 - Yeah, I remember I was reviewing this pull request. 274 00:15:03,020 --> 00:15:04,660 Thank you for your patience waiting for me 275 00:15:04,840 --> 00:15:06,040 to review that pull request. 276 00:15:06,740 --> 00:15:09,960 And I'm like, it looks like you're calling a trig function 277 00:15:10,340 --> 00:15:11,300 for every sample. 278 00:15:11,400 --> 00:15:12,700 are you sure that's gonna work? 279 00:15:13,820 --> 00:15:17,480 Because I was just in this mode of thinking 280 00:15:17,580 --> 00:15:20,740 with 1990s constraints or with two years ago 281 00:15:20,820 --> 00:15:23,720 microcontroller constraints, and we can do a lot more now. 282 00:15:23,880 --> 00:15:27,240 And I'm glad that y'all kind of breached that frontier 283 00:15:27,340 --> 00:15:30,160 and said, I'm gonna see what happens if I call exponent 284 00:15:30,480 --> 00:15:33,420 or whatever that function was, trig, I don't know. 285 00:15:33,880 --> 00:15:35,100 Every sample. 286 00:15:36,080 --> 00:15:38,660 - I would love to use integer math for all of that, 287 00:15:38,800 --> 00:15:42,080 But besides the bit crush effect, 288 00:15:42,160 --> 00:15:44,300 and that one actually avoids all the floating point 289 00:15:44,400 --> 00:15:48,040 and just use basic integer bit-wise functions. 290 00:15:48,580 --> 00:15:52,840 Besides that, it is very difficult to do a distortion effect 291 00:15:53,340 --> 00:15:55,940 without integer, or floating point math. 292 00:15:57,180 --> 00:15:59,340 - Just because you need that larger range of values 293 00:15:59,460 --> 00:16:01,260 than is convenient to represent. 294 00:16:01,400 --> 00:16:02,680 - The functions themselves, 295 00:16:02,820 --> 00:16:04,060 I think the only other way to do it 296 00:16:04,160 --> 00:16:06,320 would be to use a lookup table of some sort. 297 00:16:07,680 --> 00:16:09,380 then your space becomes your constraint, 298 00:16:09,800 --> 00:16:11,240 which is always in demand. 299 00:16:12,480 --> 00:16:12,640 Definitely. 300 00:16:13,500 --> 00:16:17,440 Yeah, it's amazing how the things that we kind of got 301 00:16:17,540 --> 00:16:20,960 for free in the analog world of like, oh, if you make 302 00:16:21,020 --> 00:16:23,820 your recording to tape a little hot, 303 00:16:23,900 --> 00:16:27,480 or if you turn up the gain too high on your guitar amp, 304 00:16:28,000 --> 00:16:28,200 it distorts. 305 00:16:28,200 --> 00:16:29,540 Something really interesting happens. 306 00:16:30,380 --> 00:16:31,500 Yeah, it sounds cool. 307 00:16:31,600 --> 00:16:32,760 It doesn't sound gross. 308 00:16:32,920 --> 00:16:36,620 Whereas when you distort, over gain on a digital system, 309 00:16:36,720 --> 00:16:39,180 it just clips and sounds harsh and terrible. 310 00:16:39,740 --> 00:16:42,620 And when you try to model that really soft distortion that 311 00:16:42,800 --> 00:16:45,060 happens in the analog realm, you start 312 00:16:45,120 --> 00:16:46,820 calling exponential functions because it's 313 00:16:46,940 --> 00:16:48,700 a really weird nonlinear output. 314 00:16:50,599 --> 00:16:53,200 So yeah, trig function for sample. 315 00:16:54,580 --> 00:16:55,240 Sorry. 316 00:16:55,400 --> 00:16:55,800 Sorry, Jeff. 317 00:16:56,900 --> 00:16:58,020 If it works, it's great. 318 00:16:58,280 --> 00:17:00,540 It's just I'm telling you what my first reaction was. 319 00:17:01,020 --> 00:17:02,000 No, totally, totally. 320 00:17:02,500 --> 00:17:04,239 Yeah, I'm more in your realm because I 321 00:17:04,240 --> 00:17:06,280 started doing synth stuff with Arduino 8-bit. 322 00:17:07,140 --> 00:17:08,560 Yeah, you can't you can't. 323 00:17:08,560 --> 00:17:09,480 Mozzie, am I right? 324 00:17:11,959 --> 00:17:15,060 The other thing I noticed right away, too, is we went from 22 325 00:17:15,520 --> 00:17:20,040 kilohertz on most of our samples to 48 kilohertz stereo, and it 326 00:17:20,079 --> 00:17:23,900 was handling it and it was handling it with a fairly large 327 00:17:24,459 --> 00:17:29,520 effect workload on top of that. And if you try that on an RP 328 00:17:29,640 --> 00:17:33,400 2040, it'll do it a little bit, but not for very long. 329 00:17:33,520 --> 00:17:38,860 So is it fair to say that you really do need an RP-2350 to make most of these effects work? 330 00:17:39,960 --> 00:17:50,760 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. 331 00:17:50,760 --> 00:17:54,740 and I haven't actually tried it on other microcontrollers either. 332 00:17:55,860 --> 00:17:59,520 Right now, it's port limited to the Raspberry Pi family, 333 00:17:59,700 --> 00:18:02,560 but in theory, I know 334 00:18:02,700 --> 00:18:06,620 there is somebody who's working on getting audio for the Espressif family, 335 00:18:07,420 --> 00:18:10,200 and I don't see why it wouldn't work on there either. 336 00:18:11,640 --> 00:18:13,420 >> Yeah, that was an interesting development. 337 00:18:13,740 --> 00:18:16,280 Somebody popped up on GitHub with a pull request and said, 338 00:18:16,400 --> 00:18:19,120 "I added analog audio to ESP32, 339 00:18:19,320 --> 00:18:21,180 and I think ESP32 S2. 340 00:18:21,900 --> 00:18:24,800 And this is something that Limor had had me look at 341 00:18:24,920 --> 00:18:27,600 like two years ago, and I looked around and I said, 342 00:18:27,660 --> 00:18:29,060 I don't think I'm up to this. 343 00:18:29,380 --> 00:18:31,140 I don't see how it would work. 344 00:18:31,620 --> 00:18:32,980 And now that the code's written, 345 00:18:33,060 --> 00:18:34,060 it looks really straightforward. 346 00:18:34,400 --> 00:18:36,300 So it's just one of those things 347 00:18:36,380 --> 00:18:37,740 where somebody else takes a look at it 348 00:18:37,860 --> 00:18:40,820 and they had some piece of knowledge that I didn't have 349 00:18:40,900 --> 00:18:42,480 or some piece of experience. 350 00:18:42,760 --> 00:18:45,020 And now everybody's gonna be able to use this functionality 351 00:18:45,140 --> 00:18:47,460 in CircuitPython and do audio on more boards. 352 00:18:47,520 --> 00:18:48,940 So I'm really excited about that, 353 00:18:49,680 --> 00:18:50,740 that little bit of functionality. 354 00:18:51,280 --> 00:18:54,260 - The ESP32 also is a very, very nice chip set 355 00:18:54,420 --> 00:18:56,620 for having native floating point, all that kind of stuff. 356 00:18:57,560 --> 00:18:58,440 - I think it's plenty fast. 357 00:18:58,620 --> 00:19:00,100 - I wanted to say that it had floating point, 358 00:19:00,180 --> 00:19:00,800 but I wasn't sure. 359 00:19:00,920 --> 00:19:03,020 So thanks for that confidence, Tod. 360 00:19:03,800 --> 00:19:05,720 - I think right now, if anyone listening 361 00:19:05,880 --> 00:19:07,220 wants to play with these things, 362 00:19:07,700 --> 00:19:13,140 definitely RP2350 is kind of the most tested system 363 00:19:13,340 --> 00:19:16,920 out there. (laughs) 364 00:19:16,920 --> 00:19:20,460 some of the delays stuff to a custom build of our RP2040 365 00:19:20,540 --> 00:19:22,100 'cause it's turned off for RP2040 366 00:19:22,620 --> 00:19:24,320 just 'cause it doesn't always work. 367 00:19:24,760 --> 00:19:27,100 And it does work, but man, I really wish 368 00:19:27,200 --> 00:19:31,720 there was some sort of modular system for these core modules 369 00:19:31,820 --> 00:19:33,860 so that we wouldn't have to go through that dance of like, 370 00:19:33,980 --> 00:19:35,900 oh, I added this new function in the core 371 00:19:36,360 --> 00:19:40,560 and now the CircuitPython build won't fit on a Trinky 372 00:19:40,680 --> 00:19:43,800 or the CutiePy M0 or something. 373 00:19:44,740 --> 00:19:46,020 I know that's impossible, 374 00:19:46,120 --> 00:19:48,520 but it's something that I've been dreaming for years for CircuitPython. 375 00:19:50,540 --> 00:19:52,900 So we were talking about guitar effects earlier. 376 00:19:53,480 --> 00:19:58,160 Do you see the ability for someone to actually build a guitar pedal using these 377 00:19:58,300 --> 00:19:58,900 audio effects? 378 00:19:59,700 --> 00:20:00,660 Are you ready for this? 379 00:20:04,120 --> 00:20:05,680 Here is a guitar pedal. 380 00:20:06,800 --> 00:20:09,800 And this audio listeners, this is not going to make any sense. 381 00:20:10,860 --> 00:20:12,340 I'll describe it in a second. 382 00:20:12,960 --> 00:20:14,240 So, uh, it's beautiful. 383 00:20:14,320 --> 00:20:16,060 And sorry to take over here. 384 00:20:16,400 --> 00:20:16,920 No, no. 385 00:20:17,920 --> 00:20:19,540 This is something which I actually I 386 00:20:19,640 --> 00:20:20,960 didn't think I was going to do at 387 00:20:21,160 --> 00:20:22,820 first. When I was first working 388 00:20:22,900 --> 00:20:23,940 on these effects, I was really 389 00:20:24,080 --> 00:20:25,140 thinking about synthesizers and I 390 00:20:25,240 --> 00:20:26,880 have used it, the delay, especially 391 00:20:27,000 --> 00:20:28,640 on some of my synthesizers. 392 00:20:29,100 --> 00:20:30,580 But then as soon as I started 393 00:20:30,680 --> 00:20:31,520 playing around with it, I was like, 394 00:20:31,640 --> 00:20:33,260 wait a second, this would work 395 00:20:33,540 --> 00:20:34,820 really well on a guitar pedal, you 396 00:20:34,840 --> 00:20:36,820 know, and controls and like you're 397 00:20:36,860 --> 00:20:38,660 not doing too much else in a guitar 398 00:20:38,680 --> 00:20:40,280 pedal except for just processing 399 00:20:40,500 --> 00:20:42,300 those effects and, you know, pulling 400 00:20:42,380 --> 00:20:43,300 knobs and stuff. 401 00:20:43,720 --> 00:20:46,860 And so I started doing the research, figuring out how to build them. 402 00:20:47,400 --> 00:20:50,180 Of course, what I ended up building is definitely a prototype and I need some 403 00:20:50,340 --> 00:20:55,640 revisions, but what I did is I took and it's actually an RP 2040 right now. 404 00:20:55,840 --> 00:20:58,780 It's an RP 2040 zero, I believe, manufactured by WaveShare, 405 00:20:59,380 --> 00:21:04,660 just because the form factor worked nice for this because they lost my RP 2350 406 00:21:05,120 --> 00:21:07,320 zeros in shipment, which I'm really upset about. 407 00:21:07,860 --> 00:21:09,380 But I know, I know. 408 00:21:10,020 --> 00:21:13,500 But it's that combined with an audio codec, which once again, for listeners, 409 00:21:13,680 --> 00:21:18,660 An audio codec is essentially an input/output/analog system 410 00:21:19,440 --> 00:21:21,620 that your microcontroller can talk to 411 00:21:22,060 --> 00:21:23,940 and manage those analog pathways 412 00:21:25,040 --> 00:21:28,800 without having to use independent chips for input/output, 413 00:21:29,120 --> 00:21:31,300 which is a lot more digital in a ways. 414 00:21:31,640 --> 00:21:33,740 So what I really liked about this chip that I chose, 415 00:21:33,920 --> 00:21:37,520 which is the WM8960, which I wrote a library for 416 00:21:37,700 --> 00:21:39,780 for CircuitPython a couple months ago, 417 00:21:40,340 --> 00:21:43,139 is that you can actually mix the analog input 418 00:21:43,140 --> 00:21:44,000 with that output. 419 00:21:44,500 --> 00:21:45,480 So for a lot of effects-- 420 00:21:45,500 --> 00:21:47,480 - Oh, so it can pass through what's coming in? 421 00:21:48,020 --> 00:21:48,700 And, oh. - Yeah. 422 00:21:49,580 --> 00:21:50,920 And it sounds pretty clean. 423 00:21:51,220 --> 00:21:53,420 I actually designed this with a true bypass, 424 00:21:53,720 --> 00:21:55,120 which if you're not familiar with, 425 00:21:55,540 --> 00:21:57,100 it's pretty much, it just takes your guitar 426 00:21:57,260 --> 00:21:58,380 totally out of the pedal 427 00:21:58,480 --> 00:22:00,160 and just passes straight through to the amp. 428 00:22:00,740 --> 00:22:02,800 I designed that with it thinking that there'd be noise, 429 00:22:03,040 --> 00:22:04,000 digital interference and stuff, 430 00:22:04,280 --> 00:22:05,320 but it actually sounds pretty clean, 431 00:22:05,500 --> 00:22:06,640 so I think in a future revision, 432 00:22:06,800 --> 00:22:09,820 I'll change that around to just rely on that codec. 433 00:22:10,320 --> 00:22:11,160 But yeah, in that regard, 434 00:22:11,700 --> 00:22:13,600 You can take that audio into the codec, 435 00:22:14,140 --> 00:22:17,560 have those samples come in over I2S as an input, 436 00:22:18,160 --> 00:22:20,320 and then process whatever you need for it, 437 00:22:20,340 --> 00:22:22,580 and then output it back again on the same bus 438 00:22:22,880 --> 00:22:27,200 over I2S into the codec, and then mix that process, 439 00:22:27,220 --> 00:22:29,200 like say if you're doing a filter or something, 440 00:22:30,060 --> 00:22:32,560 mix that with the original signal as you need 441 00:22:32,700 --> 00:22:36,340 as the user decides, and then, it sounds really good. 442 00:22:36,560 --> 00:22:37,740 I was actually very surprised. 443 00:22:38,100 --> 00:22:40,020 I do have a confession to make, 444 00:22:40,280 --> 00:22:42,220 Because right now CircuitPython does not support 445 00:22:42,780 --> 00:22:44,940 bi-directional I2S input and output. 446 00:22:45,940 --> 00:22:47,440 I've worked to add that support. 447 00:22:48,340 --> 00:22:49,220 - Have you done sins to get this to work? 448 00:22:49,620 --> 00:22:50,460 Did you sin? 449 00:22:50,620 --> 00:22:51,920 (laughing) 450 00:22:51,920 --> 00:22:52,480 You did something bad. 451 00:22:52,500 --> 00:22:53,040 - Say that again. 452 00:22:53,900 --> 00:22:55,560 - Have you committed sins to make this work? 453 00:22:55,960 --> 00:22:56,820 - I have a sin, okay. 454 00:22:57,300 --> 00:23:02,060 So I have a pending draft PR that adds bi-directional I2S, 455 00:23:02,280 --> 00:23:06,300 but it's very shaky and I'm kind of, 456 00:23:07,100 --> 00:23:08,340 I probably shouldn't use this language, 457 00:23:08,600 --> 00:23:11,820 but I'm a bit in DMA hell with that right now, 458 00:23:12,440 --> 00:23:15,200 where it's just, you're dropping buffers 459 00:23:15,260 --> 00:23:16,540 and all this kind of stuff and it sounds bad. 460 00:23:17,080 --> 00:23:18,800 It does work though, surprisingly. 461 00:23:19,020 --> 00:23:20,140 So I would love for someone else 462 00:23:20,200 --> 00:23:21,480 to help me on that at some point, 463 00:23:21,660 --> 00:23:24,100 but what I ended up doing is actually, 464 00:23:24,620 --> 00:23:26,740 my sin is I ended up going to Arduino. 465 00:23:28,180 --> 00:23:32,740 And I've actually been working on the Arduino Pico library 466 00:23:32,880 --> 00:23:36,060 to add that support in, which unfortunately was a lot, 467 00:23:36,200 --> 00:23:37,020 well, I guess fortunately, 468 00:23:37,300 --> 00:23:39,680 was a lot easier than to do in CircuitPython. 469 00:23:40,180 --> 00:23:43,700 So I have this RP2040 running through that 470 00:23:43,880 --> 00:23:46,600 and I'm building a library to manage the pedal 471 00:23:46,760 --> 00:23:49,000 and have all these effects processed 472 00:23:49,080 --> 00:23:53,100 and have a very simple interface for changing the audio. 473 00:23:53,240 --> 00:23:54,600 So you pretty much, kind of like Mozzie, 474 00:23:54,620 --> 00:23:56,060 it's actually very similar to Mozzie, 475 00:23:56,460 --> 00:23:59,580 where you have a control loop and an audio loop 476 00:23:59,760 --> 00:24:02,000 and you just separate your processing and it does it all. 477 00:24:02,600 --> 00:24:05,120 Even utilizing both cores of the Pico, it's pretty cool. 478 00:24:05,500 --> 00:24:08,660 And so I've been able to do distortion, delay, filters. 479 00:24:09,180 --> 00:24:10,700 I stole your biquads, Jeff, I'm sorry. 480 00:24:11,180 --> 00:24:13,040 No, you're absolutely welcome to them 481 00:24:13,240 --> 00:24:16,400 because they're open source and that's one of the reasons. 482 00:24:16,920 --> 00:24:18,760 And you know, I'm not judging. 483 00:24:19,480 --> 00:24:21,080 I think it's great when you use the environment 484 00:24:21,240 --> 00:24:21,880 that's good for you. 485 00:24:22,000 --> 00:24:23,640 I mean, we're here to talk about CircuitPython, 486 00:24:24,200 --> 00:24:25,160 but it's important to acknowledge 487 00:24:25,200 --> 00:24:27,200 there are other environments out there 488 00:24:27,240 --> 00:24:28,600 and they've got a lot of strengths 489 00:24:29,280 --> 00:24:31,320 that we don't always have. 490 00:24:31,340 --> 00:24:33,059 And maybe we'll get there by studying them 491 00:24:33,060 --> 00:24:35,620 or maybe we won't and for something, 492 00:24:36,260 --> 00:24:37,580 another environment will always be better. 493 00:24:37,800 --> 00:24:41,600 But yeah, no shade for using Arduino, absolutely not. 494 00:24:42,360 --> 00:24:45,500 - Yeah, it's also really good when you wanna think through 495 00:24:45,580 --> 00:24:47,800 an algorithm that would have to be written in C 496 00:24:48,320 --> 00:24:50,040 and like, oh, I'm gonna just like punk this out 497 00:24:50,160 --> 00:24:52,220 either in Pico SDK or in Arduino or whatever, 498 00:24:52,780 --> 00:24:54,540 see if it actually makes sense 499 00:24:54,760 --> 00:24:55,720 before going through all the trouble 500 00:24:55,840 --> 00:24:58,420 of making all the CircuitPython bindings 501 00:24:58,500 --> 00:24:59,560 to the C code that's underneath. 502 00:25:00,460 --> 00:25:03,400 So yeah, go Arduino to prototype with. 503 00:25:04,220 --> 00:25:05,740 - However, I think CircuitPython, 504 00:25:06,480 --> 00:25:08,880 if all that worked as I wanted it to work, 505 00:25:08,960 --> 00:25:10,920 I think it would be a better platform in a lot of ways 506 00:25:11,040 --> 00:25:12,380 because next thing you know, 507 00:25:12,460 --> 00:25:13,980 you have to do the display management. 508 00:25:15,120 --> 00:25:17,320 All the synth IO, 'cause one thing I would love to do 509 00:25:17,380 --> 00:25:20,720 is be able to take a guitar and use a tuning process, 510 00:25:20,900 --> 00:25:22,140 read what note you're playing, 511 00:25:22,500 --> 00:25:23,560 and then play it through synth IO. 512 00:25:23,960 --> 00:25:24,800 Like, that would be incredible, 513 00:25:25,320 --> 00:25:26,680 but now that I'm on Arduino, I'm like, 514 00:25:26,820 --> 00:25:27,760 oh, well now I have to figure out 515 00:25:27,840 --> 00:25:29,500 how to get all the synthesis working, 516 00:25:29,620 --> 00:25:31,620 or it'd be so much easier in CircuitPython. 517 00:25:31,680 --> 00:25:32,200 Right. Yeah. 518 00:25:32,340 --> 00:25:36,480 Just the once all that core code, that fast code that has to be written in C 519 00:25:36,600 --> 00:25:40,000 is done, if you can bolt the parts together in CircuitPython 520 00:25:40,540 --> 00:25:44,040 and express in a hopefully simple way, I want this thing up here 521 00:25:44,100 --> 00:25:45,220 to control that thing down there. 522 00:25:45,260 --> 00:25:48,980 I think that is where CircuitPython has a big advantage. 523 00:25:49,880 --> 00:25:50,580 Oh, yeah, definitely. 524 00:25:50,920 --> 00:25:54,700 Yeah, I've found that so much like when I was working on the drum effects, 525 00:25:55,100 --> 00:25:58,360 I could iterate through there blazingly fast. 526 00:25:58,380 --> 00:26:00,500 I was just in the REPL trying, 527 00:26:00,760 --> 00:26:02,500 "Okay, let's try these three things." 528 00:26:02,500 --> 00:26:05,120 No, "Okay, let's change the filter, 529 00:26:05,240 --> 00:26:08,580 the low-pass filter, the high-pass filter." 530 00:26:09,500 --> 00:26:11,300 It made it so much quicker. 531 00:26:12,580 --> 00:26:15,080 Again, nothing against Arduino, I've used it a ton. 532 00:26:15,240 --> 00:26:17,180 But if I had to build, 533 00:26:17,400 --> 00:26:19,500 compile, upload, and test it for all those, 534 00:26:19,620 --> 00:26:21,100 I'd still be working on those effects 535 00:26:21,560 --> 00:26:23,420 if I hadn't just dropped them and given up. 536 00:26:24,080 --> 00:26:25,600 >> Yeah, it's almost like a live coding environment 537 00:26:25,780 --> 00:26:27,379 because you can be there on the REPL and actually 538 00:26:27,380 --> 00:26:31,320 create a synthesizer just by typing in real time. 539 00:26:33,020 --> 00:26:37,100 Yeah, it's amazingly fast and you can just play, you can record 540 00:26:38,060 --> 00:26:42,420 something through MIDI tracks or just... I've had lots of test files which are 541 00:26:42,440 --> 00:26:47,120 just a bunch of notes from some song that I put into test and then 542 00:26:47,400 --> 00:26:50,760 listen to it right away and be like, "not quite right, I need to adjust this, 543 00:26:50,980 --> 00:26:54,499 oh this is better." It becomes a really quick 544 00:26:54,500 --> 00:26:57,860 iterative process to come up with what you want. 545 00:26:59,480 --> 00:27:01,920 So Cooper's been working on a prototype for a guitar pedal. 546 00:27:02,520 --> 00:27:05,160 Do any of you have any other projects in the back of your head 547 00:27:05,240 --> 00:27:08,620 that you want to try with these effects now that they're available in CircuitPython? 548 00:27:10,140 --> 00:27:13,300 Yeah, I mean, I've got a I've got a little what I've been calling 549 00:27:13,400 --> 00:27:16,760 the PicoTouch synth that I've been sitting on for about a year, 550 00:27:17,240 --> 00:27:19,900 and I think I'm going to make a custom build of CircuitPython 551 00:27:20,060 --> 00:27:24,360 that includes some of the delay functions just to get fatter sound. 552 00:27:24,420 --> 00:27:28,240 the ever infinite quest for like a fatter synth sound. 553 00:27:29,760 --> 00:27:30,680 But that'll be in my Tindy store. 554 00:27:30,720 --> 00:27:31,740 It was in my Tindy store for a while, 555 00:27:31,800 --> 00:27:33,380 but I had to turn off my Tindy store 556 00:27:33,540 --> 00:27:35,820 because of all the fires that have been happening around me. 557 00:27:35,940 --> 00:27:37,100 (laughs) 558 00:27:38,320 --> 00:27:39,680 - You mentioned custom build, 559 00:27:39,800 --> 00:27:41,320 is that because it's on RP2040? 560 00:27:41,800 --> 00:27:42,800 - Exactly that, yeah. 561 00:27:43,060 --> 00:27:43,360 - Ah, okay. 562 00:27:44,180 --> 00:27:46,900 - Yeah, 'cause the RP2350 doesn't do cap touch yet 563 00:27:46,980 --> 00:27:49,080 because of the problem with their pins. 564 00:27:49,680 --> 00:27:50,620 So, (laughs) 565 00:27:51,340 --> 00:27:52,460 yeah, it has to be cap touch, 566 00:27:52,480 --> 00:27:55,800 has to be RB2040 and thus has to be a custom build. 567 00:27:56,580 --> 00:27:56,720 Yeah. 568 00:27:57,660 --> 00:28:02,080 Well, and that being one thing I was looking at before I got 569 00:28:02,280 --> 00:28:04,620 busy and unfortunately had to take some time away 570 00:28:04,740 --> 00:28:06,960 from working on it was a chorus effect. 571 00:28:07,960 --> 00:28:10,520 So not just the delay, which is really a delay, 572 00:28:10,700 --> 00:28:13,160 but just a slightly different type. 573 00:28:13,300 --> 00:28:16,180 So the chorus effect just, for those that are listening, 574 00:28:16,320 --> 00:28:24,200 will break up a note and slightly delay it one two three four five whatever many times 575 00:28:24,980 --> 00:28:31,980 but over a small time frame so you get all the waves instead of being in harmony together I guess 576 00:28:32,140 --> 00:28:39,900 or lined up or slightly out of phase and just comes up with that richer fatter sound so that's 577 00:28:39,980 --> 00:28:46,300 on my plate one of the things that I still want to work on and I mentioned earlier was one of the 578 00:28:46,300 --> 00:28:50,480 things that I thought of with effects is a reverb sound. 579 00:28:51,360 --> 00:28:51,580 Yes. 580 00:28:52,700 --> 00:28:55,900 I think it'll just make things sound better. And I've I've 581 00:28:56,000 --> 00:29:00,480 looked at the code. I vaguely know what I'm doing to put it 582 00:29:00,600 --> 00:29:03,560 in. But it's just a matter of getting the time and patience to 583 00:29:03,620 --> 00:29:09,180 put it in and get it working. That one, again, the 2350 really 584 00:29:10,020 --> 00:29:14,860 shines because of the additional memory and storage because 585 00:29:15,180 --> 00:29:16,860 Especially the memory on that one 586 00:29:18,360 --> 00:29:25,560 If you need to record a hundred two hundred milliseconds of 48 kilohertz audio that starts eating a lot of RAM really fast 587 00:29:26,220 --> 00:29:31,420 Yeah, so are you getting into PS RAM territory there or is that fitting in the 512? 588 00:29:32,480 --> 00:29:37,240 K for the what you're thinking about I think it fits in the 512 589 00:29:37,660 --> 00:29:44,080 I've had the audio delays up to a second and I think we kept them at a second on purpose 590 00:29:44,580 --> 00:29:48,500 Otherwise you'll start running into RAM limitations. 591 00:29:49,720 --> 00:29:51,460 I haven't tried it with PS RAM yet. 592 00:29:51,740 --> 00:29:56,560 I don't think I've got a 2350 with PS RAM, but I can solve that problem easily enough. 593 00:29:56,720 --> 00:29:58,120 Quicker than I can write reverbs. 594 00:29:58,640 --> 00:29:59,680 [laughter] 595 00:30:00,540 --> 00:30:09,740 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, 596 00:30:09,740 --> 00:30:16,100 Is it once we have the ability to do a guitar pedal like audio in then audio out? 597 00:30:16,600 --> 00:30:21,060 Plus reverb plus circuit Python can already do displays and play mp3s 598 00:30:21,580 --> 00:30:24,540 We can now make a circuit Python powered karaoke machine 599 00:30:30,860 --> 00:30:36,500 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 600 00:30:38,180 --> 00:30:40,900 That would be an amazing project to see 601 00:30:42,840 --> 00:30:44,960 You know what I think is really important for us to work on 602 00:30:45,700 --> 00:30:50,320 Soonish or some one of us. I know Tod you have your synth IO tricks 603 00:30:50,900 --> 00:30:55,040 Repository, which I'm sure all of us have referred to at some point. I know I have 604 00:30:55,680 --> 00:31:00,520 I think we are due for an audio effects tricks at some point 605 00:31:01,300 --> 00:31:03,220 Because you mentioned the the chorus mark 606 00:31:03,220 --> 00:31:06,240 I've actually been able to do that to a degree, 607 00:31:06,400 --> 00:31:07,920 but probably needs some refinement. 608 00:31:08,180 --> 00:31:10,300 And if we had some centralized repository of stuff 609 00:31:10,380 --> 00:31:12,960 like that, examples people to use, I think that'd be great. 610 00:31:13,420 --> 00:31:17,080 That's one thing that I wish I've had time to work on 611 00:31:17,320 --> 00:31:21,060 is an intro guide for using audio effects, 612 00:31:21,500 --> 00:31:23,240 because at this point, there isn't. 613 00:31:23,340 --> 00:31:26,860 There is sample code that a bunch of us have put out there, 614 00:31:27,940 --> 00:31:31,320 but there isn't actually a guide on doing it. 615 00:31:32,400 --> 00:31:35,680 And the second is an intro guide on how to make your own audio effects. 616 00:31:35,800 --> 00:31:39,040 Cooper, you've been amazing and I can't say this like this. 617 00:31:39,240 --> 00:31:42,880 I was always hoping somebody would jump in and build on what I started. 618 00:31:44,360 --> 00:31:48,840 And you've done a whole bunch more work that I couldn't have been off on my own. 619 00:31:48,980 --> 00:31:51,960 And then between everyone here, it's great. 620 00:31:52,060 --> 00:31:54,580 And the community is great to bounce ideas off of. 621 00:31:54,640 --> 00:31:58,560 So you're not just working in that little silo by yourself, wondering if 622 00:31:59,440 --> 00:32:01,320 anyone is paying attention to what you're doing. 623 00:32:01,360 --> 00:32:02,760 Like even hearing from Tod tonight 624 00:32:02,840 --> 00:32:05,500 that he's seen my drum effects all over the place. 625 00:32:05,580 --> 00:32:07,640 That feels amazing to hear. 626 00:32:08,120 --> 00:32:10,920 And this whole project has brought 627 00:32:11,020 --> 00:32:13,000 in so many different people that I didn't expect 628 00:32:13,100 --> 00:32:14,500 to hear from to start with. 629 00:32:15,120 --> 00:32:18,500 I think CircuitPython, it's able to cater 630 00:32:18,640 --> 00:32:20,400 to a lot of different groups of makers. 631 00:32:21,100 --> 00:32:23,040 But I think, especially once we really 632 00:32:23,300 --> 00:32:26,140 hash out this audio effects, get the live input working, 633 00:32:26,260 --> 00:32:27,820 all that kind of stuff, I think it just 634 00:32:27,980 --> 00:32:30,120 adds a whole other category of makers, 635 00:32:30,340 --> 00:32:34,700 a whole other community to this project that can utilize these resources. 636 00:32:36,100 --> 00:32:37,100 And that's just really cool. 637 00:32:37,340 --> 00:32:37,540 You know? 638 00:32:38,180 --> 00:32:39,800 Well, that's a great place to wrap it up. 639 00:32:39,840 --> 00:32:44,160 I want to thank each of you for your time, Cooper, Mark, Tod, and Jeff. 640 00:32:44,600 --> 00:32:46,500 I really appreciate you making time to come on the show. 641 00:32:47,540 --> 00:32:47,980 Thanks so much. 642 00:32:48,340 --> 00:32:49,120 Oh, thanks for having me. 643 00:32:49,360 --> 00:32:50,200 Thanks for the invite. 644 00:32:50,960 --> 00:32:52,800 And Cooper was good to meet you face to face. 645 00:32:53,080 --> 00:32:53,360 I know. 646 00:32:53,460 --> 00:32:55,520 Hey, anytime you want to hit me up, I'm I'm around. 647 00:32:55,680 --> 00:32:56,000 All right. 648 00:32:56,960 --> 00:32:57,820 Lovely to see y'all. 649 00:32:59,260 --> 00:33:01,160 Thank you for listening to the CircuitPython Show. 650 00:33:01,560 --> 00:33:03,700 A special thank you to Cooper, Jeff, Mark, and Tod 651 00:33:03,780 --> 00:33:05,860 for joining the show and sharing their experience 652 00:33:05,900 --> 00:33:08,040 in building the new audio effects in CircuitPython. 653 00:33:08,860 --> 00:33:10,340 For show notes and transcripts, 654 00:33:10,520 --> 00:33:12,980 visit www.circuitpythonshow.com. 655 00:33:13,700 --> 00:33:15,360 Until next time, stay positive.