 say, huh? Hey, welcome to my show. It is time for John Park's workshop. We're here right here in the workshop. What's new? What's going on? We've got some funny Lars pictures over there in our discord. Thanks Andy Calloway for that. Very topical. Love the humongous crowns. Bigger, bigger, better. Let's see what's happening here. I had to run out and grab two batteries for the the mic pack. It just suddenly was displaying one bar. It only has three bars, so you never know quite how far we're left, but I swap it out and use those somewhere else so that audio doesn't die during the show. So yeah, first of all, thank you for stopping by these people right here. If you want to join in all of this, do it. You can jump on to adafruit.it slash discord. Join our discord server and look for the live broadcast chat channel. And there's plenty of other channels too. If you want some help with circuit python or 3d printing or your project, there's some different channels for that. There's a channel for pet photos. There's a channel for make code. There's all sorts of channels there. You can join them, but this one is the live broadcast chat channel. So look for that one if you join in. And let's see. I'll also say, hey, thank you for stopping by over in our YouTube chat. Dave Odessa and Johnny Bergdahl. Nice to see you over there. Welcome, welcome. If you are somewhere else such as Twitch, I'm not checking that stream. Hey, Connor, MacArthur. Nice to see you over in YouTube as well. But if you want to, you can jump into the discord right there if you're somewhere where the chat seems to not be happening. Other things that are going on. I'm very excited to say I have updated the operating system on this computer and I have updated the version of my streaming software and things knock wood. I don't want to curse it, but things seem to be a little better. Things are faster for me to interact with and set up the show. So that is nice because I was having some issues there that I think we may have conquered just with some updating. Isn't that nice? So, yeah, what am I on? I'm on Ventura on the Mac. It doesn't even tell me. What do I have to click here? More info. 13.3.1. That's what I'm on and I'm now using version 15. something or other of Wirecast. I was on 14. So it's a whole version release, which is great. All right. What's going on? Well, we've got a CircuitPython Parsec. I've got a recap of the product pick of the week. I have a coupon code for you if you want to go buy some stuff. I've got an update and some planning on my computer perfection synthesizer project that I want to show and some stuff that's going on that Jepler has been working on inside of Synth.io. That's very exciting. Some cool stuff I can demo and some stuff coming up in some versions that are in the works right now. And I also wanted to do a demo of some of these synthesizer concepts using a commercial demo, a commercial synthesizer, that is, synth that I already had, that I realized demo stuff pretty well because of the little graphic display it has. And I can show some concepts both in our envelopes that we've been talking about as well as modulation because we have some modulation options coming up in Synth.io, which is very exciting. So I'll talk about what that is and what we can hope to see coming up in Synth.io as well. Some neat features that are Game Boy inspired that Jepler has been looking into. So a lot of neat stuff with Synth.io. I can't believe we're really getting a fully functional synthesizer right inside of Circuit Python. It's mind-blowing and very exciting. So let's see. First of all of those things that I mentioned, let me jump to this one right here, which is our coupon code today. Head to Adafruit, this place right here. There it is. Go right there. Head on over to Adafruit.com. You can click on products. You can click on view all new products. You can look at some featured products. You can browse through the categories or you can just search for stuff. But whatever way you go, if you want to get 10% off on the order, let's say you want one of those, the tough relay from Digital Loggers. It's a wildly over-engineered relay. I wouldn't say over-engineered. It's engineered for a job, which is for doing some reliable tough job right there. Go get one of those and you'll get 10% off no matter what it is. If it's a thing that you can stick in the cart and have mailed to you, you will get 10% off by using this code. And also by that I mean to say you can't use this on software or gift certificates or subscriptions. But physical stuff, like let's say you want that parts bundle for the introduction to breadboarding by Jen Fox. Well, you won't pay $39.95. You'll pay $39.95 minus $3.99 roughly. So throw the stuff in your cart. This coupon is good until the end of the day today, east coast time, east coast US time. Put that right there. Modulate into the coupon code field on your way out and it will subtract the 10% from your order. Also by the way, if you just go to Adafruit.com slash free, you'll see that we have some other offers going on here. If your order is $99 or more, you're going to get a free perma-proto half-size breadboard. That's that really cool breadboard looking proto board that you can solder to has the same internal connections as a breadboard that you're used to. $149 or more, you're going to get a free KB2040. That's the keyboard back in black. It was pink for a while. Now we have the matte black one in the store. I think those just dropped yesterday. They were sold out, but a bundle of them just went into the store. You can get one for free if your order is $199 or more. You'll also get the free perma-proto breadboard. If your order is $200 or more, you're going to get free ground shipping in the continental United States of America as well as the KB2040 and the perma-proto. Those all stack. Don't forget to use the coupon code modulate to get yourself 10% off today. Let's see. What else is going on? So questions people ask during the show. Let's see. Dave Odessa says, no 1080p yet. Yes, I'm taking it in baby steps. I wanted to change nothing about my settings. Just switch to the new OS and the new software. Then in a few weeks, I may try to go up to the 1080p. I've got consistent good, again, knock wood, upload speed, about 20 megabits per second, which is great and should be plenty to stream 1080p. Who knows what the rest of the whole pipeline of restream.io and things like that going to the different, one second pause the video feedback of myself knocking myself on the head that was distracting. Who knows what also happened through the rest of the pipeline of things there to the different places that we're streaming, but I will give it a try and that'll certainly make the text nice and crispy there. So Evil Dave of Canada asks, trying to expand the split ortho keyboard project to create eight by 32 ortho linear. Oh, wow. That's cool. Check that out. If anyone is interested in taking a look at that idea there and seeing if they can come up with any any issues with that, that's pretty cool. So giant lots and lots of I square C keyboard matrix drivers there. Very cool. All right. What else have we got? So on Tuesdays, I've got that show right there. That is the JP's product pick of the week show. And on it, I like to grab something from our store, do a bit of a demonstration, give you a humongous discount. So that was 50% off yesterday on that one right there, which is the matrix portal. And I used it to make a nice little GIF animation player. So here's a little one minute recap of that. Hey, there we go. That's my product pick of the week. This week it is the matrix portal. We've now got GIF support. So this is the first time I've used GIF IO on the matrix portal with the matrix display. The nice thing is this display just basically shows up in display. So look at that right there. There is one of our panels with the matrix portal right there. I've got it dark at the moment, so you can see the colors a little better. Running a little animated GIF. This is a, I don't know, I think something like a 40-something frame GIF. So it's not tiny, but it plays back great. It plays back really nice and fast. Look at those great colors. Built a little Lego frame for it. And around the back, you can see there is my matrix portal plugged in. Got bunches of different kinds of, from little wee little 32 by 32 ones. This is 32 by 64. Right, there is my product pick of the week this week. It is the matrix portal. Yes, it is. Someone did the math over on YouTube. It's Gordy G says that would be a 253 percent keyboard. Thank you for doing the math. I appreciate that. All right. Next thing up I've got is a circuit python parsec. So let's check this out. Okay. Let me get my code window here. For the circuit python parsec today, I wanted to show you how you can control an LCD character display from circuit python. So in this case, I am using our new iSquare C backpack that's running the mcp-23008 driver for these types of LCD displays. And if you take a look at the demo here, you can see I am writing a message line and then a second one. I've got a little blinking cursor. Then I blank the screen. I throw up a new message and then I scroll that off to the side and repeat. And there are other things you can do, but these are pretty typical things you want to do on an LCD display. So if you take a look at the code, you can see first of all, I'm importing this library, Adafruit character LCD and the iSquare C version of that. Then I am setting up iSquare C on my QT Pi that I have running over here. You can see that right there. So that's plugged into the backpack on the back of this display here. Then I initialize the LCD class as LCD and that's character LCD, character LCD on iSquare C. I tell it the iSquare C bus that it's on. And then the dimensions width and height in this case, it's a 16 character horizontally and two lines vertically. Then I am turning on the backlight on this so that we can see it. And then in the main loop of this, I'm just running sort of three little snippets of code. First I am clearing the screen and then moving the cursor to the top left and that's what this LCD home does. Then by simply saying LCD.message and throw in a message in quotes, it will print that up to the display. And then I'm pausing for a second. Then I am turning on the cursor and the blinking block above the cursor here with LCD.cursor is true and LCD.blink is true. And then I'm setting my cursor position to zero horizontally, but one vertically. So that's the second line down. Then I'm again using message to print this little love note from Lars. And then I'm waiting three seconds. Then finally I clear the display again. I move the cursor back to home. Then LCD cursor and blink get set to false. Turn this off. And then I'm creating a variable called scroll message, which has this two line message here. You can see I'm using a carriage return there slash n. Then I take the message and print that using scroll message variable. And then after it's up there for two seconds, I am using this LCD.move left command. And I'm giving it a certain timing to make its little horizontal moves, which is what sweeps it off to the side. Blank that and then start all over again. And so that is how you can use an LCD character display inside of Circuit Python. That's your Circuit Python Parsec. All right, there we are. I love those little displays. I'll show you actually since I didn't second ago. I'll show you the back of that there. Lift this camera up so you can see. This is actually a nice little display stand that we make, but I had to modify it since I used some standoffs for my backpack there. Let me adjust that exposure and brighten things up a little bit. That's the long way there we go. So if you solder that board directly to your display, you can use this as designed by Philby. I just sort of scored and snapped off a section of this so I could fit it in this orientation here. And then we have a little I square C stem of QT port right there plugged into a little QT pi. Love these displays. A lot of fun to work with those. All right. So let's see what is next. Any questions in the chat? Let's see. We've got DJ Devon 3 is excited about some of the features that Jeff has been adding to SimPhi. Oh, very cool. Yeah, LCD library has some cool functions in it. I had done some custom. You can I think do eight custom characters. So you can give it a sort of a bit map of pixels within each of those little letters. I think it's something like 36 by 18 or something. I forget how many. So you can make a little custom up to eight of those and then you can throw those in. So it could be a heart could be, you know, a different looking font for a few letters, that sort of thing. Yeah, very quick and easy as C Grover says to get those up and running, which is great. All right, so let's see. Next up, let's jump over to the workbench. We'll talk about this design for the board that's going in the computer perfection synth that I'm building. So I've been, let me try to fix this camera zoom. Let's see if this is a working remote. Yeah, that's a little better. And I'll turn on this light here while I'm at it. So if you remember this guy, this is the computer perfection game toy thing. And it has the original motherboard mounted right to this plastic faceplate here. So the switches and two button stems poke through here. And then these plastic actuators press the little metal contact buttons that are on the motherboard. So part of what I've been piece of insulation part of what I've been doing is I removed the IC, the original four bit microcontroller, and have been plugging breadboard wires into there to use these buttons and switches on my Metro M7. Metro M7 is running Circuit Python and the SynthIO code. And then I'm also running a little I square C amplifier to one of these little speakers here. So one of the things as I'm progressing with this that I've got to do is get all that mess out of the way because it needs to get mounted back into, sorry for that, needs to get mounted back into there. So what I'm thinking of doing it was nice and convenient to use that sort of dip socket that was there. But I really don't have a lot of clearance. So either I could do some very short right angle headers in here. Or what I'm thinking of doing is actually desoldering and using these pads from the backside. So desoldering this socket and then soldering in my wiring so that there's plenty of space underneath. That's down in there is where that Metro is going to fit. I think the speaker is going to probably be down here at the bottom. Get a little resonance from the table that it's on. So that is my plan. If you have ideas of alternative methods for that, let me know. But if you take a close look at this, we've got not a lot of clearance here. I believe the top of these switch housings here is where the board is. So that's the only things that protrude except for these two little buttons, stem extenders, which I can't remember where those are now. I'm going to have to find those. So that's the space I have to work with. I could do maybe some right angle header pins and then run the wiring. I think we have space off the side so I could run wires off the sides or top and bottom there to get down to the micro control underneath. So let me know if you have thoughts on that. But I think this is going to probably just feed a USB cable here so you can still code it and give it power, possibly integrate a battery into it. Maybe not. It might not really be necessary. But that should be the only thing really that's coming out of it. So that's where that is. Now what I've been doing on this coding wise is adding a ADSR envelope functionality based on some of the work that Jepler has been doing that I've been testing. I'll get that focused back there. And before I demo that, this is just a very simple demo that I have here. What I want to do was go back over to the computer there and show you a demonstration of some of these things on a commercial synth. So I have done some, a couple of weeks ago I did a bit of a look at some envelopes using VCV Rack. But I think this might be a clearer demo that I've got planned here. So let me come over here and I'm going to adjust some exposure and focus settings here. That should work pretty well. Let's see. I'm going to turn this on. Now I know it might be hard to read this text. You won't really need to. And mostly what I want you to see is the, there'll be some little graphs on there. We're going to look at the shape of some curves. And I want to post a little me that is somewhere else. This might be a better spot for this because I want to see, I want you to see the corner there. Okay. So I'm going to set up some, oh, that's interesting actually before I do that. Sorry, distraction. Cedar Grove Maker posted a really interesting looking ribbon cable to dip switch or dip socket device there. Oh, that could be really interesting to run some silicon ribbon cables off of there. Very interesting. Thank you for that. All right, that could be the answer right there. I love that. Okay. Back to this. So update. Not there. Okay. And I'm just going to get the white balance back to normal. Okay. So I'm going to turn on a, I'm going to turn on a mic channel that is listening to the speaker. So I can hear the speaker and I've got a little cabinet mic and that's mixed in there. So let me know, can you hear both me and that audio pretty well? So I'll give this a second because it won't do any good if I'm trying to explain things and one of these two is too loud. So give me a, give me a shout. I know C Grover who's got a great ear for these things was volunteered to help me get some of those levels. So let me know if that's audible. Nice mix and balance of both mics. Okay, great. And I can adjust those if we need to as we go. I'm going to change things as we go. Okay. So first of all, what I'm going to do, okay, we'll get a moderate octave to play that in. And this is a nice little synthesizer from Arturia. It's called the Micro Freak. You can see the little name on there. It's got one of these sort of Buchla style capacitive touch keyboards, which is pretty snazzy. And it's a digital synth with, I believe it's got, does it have analog filters? I think this is an analog, yeah, so it's right there. But it's mostly a digital synth that can be a whole lot of different things. It's got a really cool arpeggiator and sequencer in there. But the thing that I care about showing you is we have a pretty nice envelope that we can use for volume. And this is this thing that we talked about before. So the basics of envelope we can show on here. We can also see a graph of the envelope as we adjust things here. So you can see as I'm twiddling knobs around, you can see some nice envelopes, nice graphs of the envelope or of the curve there. We're also going to look at using a modulation source, a low frequency oscillator as a modulator, and be able to pick what we're modulating. So the main thing we're talking about with envelopes is essentially a sound going on and off, a sound when we press a key being audible and then no longer being audible. So these are sometimes called attenuators, volume attenuators, voltage controlled amplifier is a term. You'll hear it's not really an amplifier, but it's attenuating the level of the sound that we hear from nothing to full sound and using shapes of curves in between. So to demonstrate this is a really sort of square shaped envelope here. When I press it, it goes to full volume, stays there while I hold it. And when I release it, it drops immediately. So you can see by that shape how that happens. What I'm going to do is I'm going to increase the attack time. So now you can hear a soft intro, it sustains at whatever level and then it immediately dies when I let go. So this is a soft attack, you can see by that curve there. I can exaggerate this a lot here. This is the full attack that should take 10 seconds to get to full volume, but it still dies immediately. So that's what the attack portion of this curve is. Now let's look at the sustain level. So I'm going to go back to a very sharp attack and now when I adjust my sustain level, you can see the level that it actually holds at is way way low. Fairly hear it. Turn that level up just a little. That's 100%. So that's going to hold full. Now that doesn't seem all that useful until you start to do things like adjust the decay and release. So in a lot of synthesizers, these are four separate parameters. So the attack, the decay, the sustain and the release. This synth unfortunately ties together the decay and the release. So I can't demonstrate you those separately, but I think it's okay because what you'll see here is if I give it a nice sort of moderate decay, you can see it pings up at the top of the attack to full volume and then it's going to die down a little bit while I'm holding it. It's going to die down a little bit to whatever my sustain level is. Then it's going to hold it at that sustain level forever and ever and ever until I release. And that's one of the confusing things about these envelopes is that three of them are timing things and one of them is a level thing. So attack is a timing thing. Decay is a timing thing and release is a timing thing. Sustain is a volume level thing. So here you're going to hear it starts off loud, but then it drops down and make this a little shorter and I'm going to exaggerate it. So you can hear we get that punchy attack and this is really helpful when we're doing things like emulating the way real instruments that get struck work because there is a real loud impact at first and then maybe that note sustains until you dampen a string or mute it somehow or just let it die out on its own. So that's why we have this sustain that isn't always just full bore. It's also a way of sort of adjusting the volume of what you're playing. And this will work by the way parafonically if I'm playing chords as well. So bing and then down. And now what I'm going to do going back to single notes is really focus on the decay and the release. So if I keep my sustain at the top level decay doesn't really matter. But the release is what's going to give us a nice soft fading away of the sound. And that only happens when I release. So you can see here I'm holding this key and now I released and we get a really slow tail as I release that. And that is because we have a long release time. So I'm going to make this a little more moderate. And all of those have that nice little soft decay. So that is attack, decay and sustain and release. These just happen to be decay and release are tied to each other on this particular synth. This is one of the exciting things that Jepler has added to our synth IO. So what I'm going to do is I'm going to jump over here and demonstrate what this sounds like with the sustain, sorry, with the ADSR envelope that's on here and some nice, I think nice moderate settings that I have it set to. I don't think right now I've got this set up to change those. So we're just going to hear it with a nice moderate release. It is something that we can change. We can change it pretty dynamically. We can just adjust it all at once. And I'm going to show you that in code. But right now let me just jump over here and show you the sound of this with some nice decay and release going on. So let me find USB C cable that is plugged into a hub that is off. I think it is off. Why are you off? Now this is not plugged into, oh let me switch out this view here. There we go. This is not plugged into a nice big monitor with a mic in front of it. So it's going to be nowhere near as loud of a sound. It's just coming out of this little speaker here. What I'll do is I'll try to hold that up near my lavalier mic. All right, that's it right there. Check it out. Here's the contacts. So these are where we're going to get pressed by these plastic actuator buttons. Okay, so I have a nice little sort of second long-ish tail on there. And another thing that I did is I added a, it's hard to use it in the current configuration of this, but I added a momentary button that when you press this set button that'll be here. While that's held all your notes hold. So I'm just going to hold that down. It's hard to get your finger in there with a tip of a closed pen cap. But now you can see I can hold notes with essentially a sustain pedal. If you're familiar with a sustain pedal on a piano or on a keyboard, that's what this is. So I hold this little sustain pedal down. I don't have to hold these notes on my own. I can just build up a nice little sound. Now the way I have it working, it just releases all notes when I let go. So I don't have any sort of select turn off just one note on its own. That might be interesting or possible with rearticulating a key or something like that. And now I can't remember. Do I have this one doing anything? I don't. Okay. So the other thing that I have set up on here, which is just an aside, but I'm going to show you the code involved with this in a moment. So we've got this nice release, this nice envelope, ADSR envelope on here, an amazing work on this Jepler. Thank you so much. Also thank you to Todd Kurt who's been testing this stuff a lot. The other thing that we have is the ability to play different waveforms. And I think we'll actually be able to play different waveforms on a per note basis, which is pretty wild. What I have set up right now is one of these toggle switches here will switch the mix so you can blend multiple waveforms. So I've got this really high harmonic content wave or I've got this more moderate wave. And I can't remember. Do I have this one doing anything? No, I think that one was doing hold before and I took that away because I realized hold made more sense there. So I've essentially got free for use in designing this one momentary switch here and one toggle switch here. This toggle switch I can't use because it's a complicated matrix of these guys and I'm not reading it the way the original chip was like scanning those like a matrix. I'm not doing that. I'm keeping things simple. So I won't be using that one there unless I cut the traces and use it for something else. But so far this is essentially a non-destructive edit that I'm doing on on this circuit board. So I might leave try to leave things intact. So that is our envelope as it is here. Let me know. I couldn't see the chat so I just want to know could you even hear that since that is kind of a small speaker there. Awesome synthesizer plus tiny speaker equals sad panda noises. Yeah, that one may may be a little small for demoing with a lav mic pinned to my chest. So sorry about that. So one of the other things that we have actually there's sort of a whole class of things that we have coming which are all going to fall under this topic of modulation. So again coming back to this nice rich sounding synth here. If we want to give our sounds some interesting characteristics make them a little less static. Right now you can see if I press a key it's this sort of simple sound and it's the same all the time. If I hold a note it's not really alive. It's not changing much. We can do things like a pitch shift. And so there are some upcoming frequency sweep options that Jeppler is basing on some old Game Boy sound architecture which I haven't tried them yet. So I'm not sure what they're going to sound like exactly but probably something like this. Right, so this is a pitch shift bar here that is just taking the root frequency that I'm playing with a key and it is smoothly articulating that up or down. Thank you, see Grover, I'm going to turn that. That mic is a little hot. Okay, so that's a pitch shift with a typical pitch bend wheel or in this case pitch bend strip very similar to a whammy bar on a guitar. It just kind of universally brings up the sound. And that'll work on multiple notes at once. And I demonstrate this partly because I'm so excited about the fact that the synthio stuff is also paraphonic or polyphonic. So those are similar to what our pitch sweeps will be. But the pitch sweeps are a little more targeted and you'll definitely recognize them from Game Boy and NES style sounds where we can get really, really quick uniform sweeps. So the other way to make these notes interesting is with modulation. So what is modulation? Modulation means we can take the existing sound and the parameters and we can control those parameters with a separate waveform. So if I wanted to adjust the waveform that we're listening to right now, if you look here, I'm gonna... So I'm picking different types of waveforms. This is a wavetable, which is similar to what we're doing on the synthio. So that's me selecting different waveforms. So I'm gonna pick one I like. Okay, we'll take that one. It's pretty straightforward, smooth sounding, doesn't have a lot of high spiky harmonics. And then we can tweak how that waveform sounds with another set of parameters. And so while you're playing, you could do that, right, play one hand and twiddle a knob with the other. But that gets tiresome pretty quickly. So the idea of modulation is to take some parameter that we want to twiddle, like this this timbre knob here, and use another wave or some other thing to adjust it. So what I'm going to do is I'm going to use this little modulation matrix up here, and I'm gonna pick the low frequency oscillator. So these rows here are all adjustable with this low frequency oscillator. And I'm gonna say, okay, let's adjust that timbre knob with a low frequency oscillator. So that is tying this little thing here, which is this low frequency oscillator, to the timbre knob. And so what I'm gonna do is I'm gonna crank this up. So it has a big effect on it. And then I'm gonna adjust this low frequency oscillator so you can see what it is. So this is a waveform that is moving pretty slowly, way slower than audible rate waveform, but it's basically the same. It's an oscillating waveform. You can think of it as voltage going up and below zero. And I can adjust that rate. I can also adjust things like the shape of the modulation. But let's just use this sine wave for now. And let's listen to this. Okay, so that's as if I were twiddling that timbre knob from zero to 100% at this consistent rate of about two hertz. So you can hear a big difference as I adjust how fast that modulation works. So it can be something that's just flowing freely as I play. We can also sync that to when I'm playing notes. So if I adjust this LFO and say, okay, you come in when a note gets played, I'm gonna sync this. Now you can hear that is a a satisfying multiple or fraction of the rate that I'm playing at. And it retriggers at the beginning of each note. And again, this stuff works in polyphony or parafonic. Okay, so that is one example of taking this low frequency oscillator and modulating something with it. So what I'm modulating right now is this sort of wave, the characteristic of the waveform. If we want to, however, we can go and do something like the volume. So I'm going to go over to the set this to zero here. I wish this thing had an easier way of zeroing. There we go. No, you go away. I need to go to zero. It can go negative. So if you crank it too far, you waste overshoot zero. So let me bring that back. Overshot, come up. Okay, so what I'm going to do is say now I want the LFO to go to some let's do some assignable knob that just doesn't happen to be a preset in this matrix. So I'm going to say, okay, I want to assign you to the sustain level. So I just wiggle sustain. Now it knows, okay, that modulating frequency of this low frequency oscillator is going to take the sustain level up and down. So let me give it a hundred percent. Whoops. Okay, I'm doing something that I don't know why I'm not going to get a, oh, let me turn off the paraphernalia first. Let me slow this rate. Okay, starting full and it's not getting to zero. Why not? Let's go negative. You're adjusting sustain, right? Why is cutoff on? Hold on, that could be what I'm hearing too. You can see why I like patch cables on real synths. All right, I don't know why that's happening. What it should be doing or what I'm expecting and I'm doing something wrong is to apply my oscillations just to the sustain level so that we go down to zero. What I'm going to do just to test things is change that shape of my oscillator. So it's not a sine wave, but it's actually a square wave. So it'll have full on. Okay, let's try a different wave. Let me try a different wave type. Yeah, it's kind of doing it. You can hear it dropping in and out, but it's also playing some other thing, which I don't know why. Sorry about that bad demo. But there you can see we're taking LFO and applying it to something other than that wave tamper. I will be daring enough to try one other attempted demo of this. So let me turn that off and I'm going to now apply it to pitch, which is similar to a vibrato or a tremolo. I can't remember which one, vibrato. So we're going to take the pitch off of its center and move a little bit above and a little bit below, and this is what a vibrato is. So by adjusting my LFO on the pitch in this little modulation matrix, I can. Okay, so I'm using the square wave. So it's bringing it up and down. If we leave it that way, but adjust its rate, and we can adjust the depth of it or how much modulation it gives us, or a lot. Okay, and so it almost sounds like I'm just pressing two notes, right? Because it's essentially the same thing. And if it's tuned properly, it will just sound like you're hitting actual notes on the keyboard, but with one hand. So I'm going to take this back to a, let's do a triangle wave. And now you can see we're hearing those intermediate notes. See Grover used the word portamento before. So we get this sort of portamento or glissando or glide effect as we move from one note to another, just because the shape of that modulation. Okay, so if I make that very minor, it's just a little sort of detuning effect. It's not, doesn't sound like we're hitting multiple notes, which is a little nicer. So oh, Todd said the matrix mod was being covered by my hand. Hopefully you could see that. But that was me mostly just adjusting this knob to say what, what do I use my modulations for? One cool thing is that you can adjust multiple things with one modulation source, you may have multiple modulation sources. But if we want to take that same LFO that's adjusting the pitch a little bit, let me let's make that bigger again, make it a little more obvious. I'm slowing it down. We can now take that very same one and adjust something like how about the cutoff frequency for a filter. So this is normally what what me adjusting by hand on a on a filter will sound like. This is a low pass filter. It essentially hacks off with a nice little rounded curve, but it hacks off high end frequencies. So again, if I don't want to do that by hand and I want that to be synced up with this same modulation source, then I can go and take that same LFO and apply it to the cutoff frequency. So I had to tell the knob start at zero because this happens to take it up positive. And what I'll do is I'm going to take the pitch modulations out of here and I'm going to start with some amount of, I don't want it cutting down to nothing. So this is ways you can design some really interesting sounds and effects that are part of your main sound source. And I'm not using any effects that don't have a reverb plugged in. I don't have a delay or anything like that. But these, I think, are all possible. That's kind of why I wanted to show these today. And I want to show this to Jeff as well, because as he's designing some of these building blocks of synth IO, these are the reasons these things exist. And these are the reasons we want to be able to do them. So Jeff recently allowed the frequency to be kind of freely changed. And if we create a low frequency oscillator or some other thing, if we are able to take the envelopes and apply those to our pitch, then we can do some interesting effects where when you press a note, it might go jump a pitch a little bit and then sink back down. That, in fact, I'll try to demo that real quick. That's kind of cool. So what I'm going to do, I'm just going to initialize, I've just removed everything I did by not saving and initializing a new patch just by moving this knob. Super dangerous. Save frequently, because if you make a whole bunch of stuff on here and touch that knob, it's all gone. Maybe there's an undo, but I don't know. Okay, we're back to kind of a standard sound here. Great, I love it. Has a nice little envelope on there. And what I want to do is take the envelope that I'm using to adjust the, use that curve that I'm using to adjust the amplitude of this or the or the amplification of that. I want to take that and apply that to something else. So one way we can do this, I think kind of the easiest way to do that is actually use the second envelope. So a really nice feature of this synth is it has a second full envelope that can be used for a lot of things and it can be used in some interesting ways. So right now it's, you can see it looks somewhat similar to the other envelope. It's kind of different, but it has some similar look to it. It's not applied to anything right now. It exists, but we need to say how do I use that thing. And that in fact is the very first thing in this modulation matrix. So I'm going to just go into the pitch. So this, they call it the cycling envelope, but I'm just using it as a regular old second envelope. I'm going to say, Hey, let's take that and let's modulate the pitch with the shape of this envelope. Okay. So the pitch is kind of doing this slow, steep climb like an airplane here. And when I let go, it kind of drops quickly. So that is all of these same sorts of concepts. So what I'll do is I'm going to make it jump pretty quickly and then back down. So it's overshooting, it's landing on the sustain. If I drop the sustain lower, now it's kind of finding its way to a halfway point. And then when I let go, that fall section happens similar to release. So if I make that slow, so it's reached that sustain of pitch and that braw, tailed off. I'm going to make the fall even slower. And I got to turn my sustain up on the actual, or rather my release up on the actual amplitude envelope so that we can still hear it. I'll give this even lower, even longer envelope for the amplitude. And I'm going to give it a, I'll leave the cycling envelope alone. Really slow drop. So that's kind of more of an effect than something you'd play. But if you tighten this stuff up, you can do some weird stuff. Let me drop the decay here. So less of an effect now and more of just kind of like a playful little thing that happens at the top of a note. Right. And again, it works parafonically. That sounds terrible. I don't know if those track well with each other. Actually, that sounds pretty bad. We'll stick with mono. So that is both the envelope stuff and the modulation stuff I want to show. And now what I want to do is I just want to get this out of the way, turn this off, and I'll turn off the mic input there. I'm going to unplug this. And let me bring the Metro M7 back over and show you what some of those concepts look like in code. I don't have modulation stuff happening. So I'm just going to show you the envelope code the way it exists now. The nice thing is if you familiarize yourself with some of this stuff from the sort of traditional synthesizer world, it should be knowledge that you can use in the Synth.io world as well because we're modeling a lot of it on how that works. Okay, so okay, so you can hear there. I've got a focus real quick like that. I've got, let me open that food from there. Actually, you know what? I'm going to, yeah, I'm going to just straight open that. Synth, the sublime text likes to just disappear if I close one window, the whole thing leaves. Good, okay, so there's the code that I'm running on here right now. A bunch of commented out stuff. This is a big work in progress. But the key thing going on here is I've got, where is it? I've lost the envelope stuff. Hold on, I haven't looked at that part of it in a few days. So you can see I'm using Synth.io. I'm setting up the buttons that I'm pressing and the switches. I have a list of notes and these are actually starting off life as MIDI notes. Internally they've been turned into frequencies and now we can play with those directly. We've got our sample rate, sample size. Okay, so the waveforms we're using. Okay, here's the amplitude envelope. So we can adjust attack time, decay time, the release time, and then that attack level, which I didn't have that on my synth there. The assumption was attack goes to one and that's what I'm leaving it at. And then the sustain level. So this drops down just a little bit. So here's, I'm going to drop the, actually I'm going to raise the attack time. Let's put this up here to 0.4. So it eases up into it. Let me make, let me exaggerate that. Let's do one. And now I'm going to drop the release time to a really low number and have it shut off pretty quickly, a tenth of a second, except I didn't save. Okay, so now we have that slower attack time sustains almost at where it attacked to and then drops right off. So you can play around with these right now. I just have them as a sort of static thing I'm putting at the setup. But the idea is that we should be able to modulate those. We should be able to adjust those with knobs, et cetera. So that is really exciting because if you imagine the sort of default sound we would get otherwise would be more like this. Let's go to zeros on some of those. I don't think it'll yell at me. Let's see. Right, way more harsh, way more bleepy, way more like a toy since it just instantly goes to full and instantly drops off. Probably I think that's just because real instruments, real instruments in nature, things that we experience will either have typically a slower attack and a quick release or vice versa. Think about like a piano or read instrument versus a drum, something you hit, brass stuff, you'll have these different characteristics of the attack time or the decay or release time that all factor into it. So we'll give it a nice reasonable set of these parameters. I'm going to give it a spikier difference between the full, actually, did this work? Let's see. This shouldn't work, but it's possible that it might get louder if we set this low. This is a weird parameter. Usually this isn't exposed in a lot of the sense that I deal with, give it a lower attack level than the sustain. So I'm going to say let's attack pretty quickly. Let's take a while to decay so we can hear that get louder. Release time, I don't care. Something like 0.4. So you can see here my attack is lower than my sustain level, so it should get louder over the course of this decay time. I'm not sure if it works because I don't hear a difference. Let me give it a whole second and let's make this pretty quiet at the beginning. Should have gotten louder by now, it's not. Yeah, I don't know if that works. It shouldn't. We don't need that. We don't need a bizarro, super bizarro ADSR function there, so I'm okay without that. Reload that. Let me put the release back to something nice and long. That was with the other waveform in there. All right, so you can see partly I wanted to show it on something with knobs and a display just because it takes time to save code and adjust things, and it's a lot faster to have hands-on controls for that. Let me know if you have thoughts or questions in the chat before I wrap up here. Oh, thank you. Todd Bot put some gist, little github gist code examples that are excellent in the chat. So if you head over to our discord right there, you'll see there's some links there you can check out. Yeah, Andy Callaway, it sounds like almost like it's being paid backwards. Having that slow attack almost sounds like when you reverse normal instruments on a record because they will usually decay off or rather release off at the tail. So it definitely has a sort of backwards sound to it, which is cool. And I think, yeah, I think that's going to do it. So before I go, I'll remind you this is all running on, I'm using this one right here, not that one. Let me go to M7. That right there, the Metro M7, it is brand new. So we're finding interesting bugs and quirks with it as we go, but it's a lot of fun to be working with such a powerful chip. I believe most of this code currently is also running well on RP2040. Correct me if I'm wrong, I think Todd, you've been running it on an RP2040 cutie pie or feather or something. But that's the one I'm running it on. If you want to pick one of these up, go do it, but don't forget to save 10% because that's the coupon code today. If you want to save some money, go to the Adafruit Store, throw some stuff in your cart, throw that modulate coupon code modulate modulate into your cart into the coupon code slot 10% off automatically. And you'll also get freebies at the different amounts 99, 149, and 200. We'll get you the Promo Proto, the KB2040, and free ground shipping in the continental United States with UPS. I think that's going to do it. So I'm going to start trying to implement some of the new stuff. Jeff just gave me a special working cut because right now some of the latest S3 builds of Circuit Python have gone a little weird on the M7. So it's all bleeding edge, which is a lot of fun. And I'm going to try out some of the sweep, kind of pitch sweep stuff and other things like that. So I think that's going to do it for today. Thanks everyone for stopping by. We'll be back tomorrow with a deep dive with Tim, I believe we should have what me doing another product pick of the week on Tuesday. We'll have 3D hangouts on Wednesday, show and tell, ask an engineer, Wednesdays are wild, and then this show happens again next Thursday. So have a great weekend if I don't see you, probably won't. All right. Thanks everyone for Adafruit Industries. I'm John Park, this has been John Park's Workshop.