 Hello and welcome to the show. It's me, JP. It's time for another episode of John Park's workshop right here in this workshop with me, John Park. And hello. Hello everyone over on YouTube. Hey, Johnny Bergdahl and Doc McGillicuddy, Taeth Gundry, David Dessa. Thanks for stopping by. I'm checking out the chat over there in, oh, these are dirty, over in YouTube, but you can also check out our Discord if you're somewhere that doesn't have a chat where we're hanging out, such as Twitch, looking at you, Twitch. Then head over to Discord. The Adafruit Discord is this right here. You go to adafruit.it slash Discord and you'll get an instant invite. You can join our server and then head over to the live broadcast chat channel. That's the one that you're looking at right there. So a bunch of other channels where you can get help with projects, discuss things, show pictures of your pets and so on and so forth, but the live broadcast chat, that's much better. Channel is where we are right now. So there we go. Shift that camera a little bit. I finished my fight with Lars, Todd. Where'd he go? Right here. That's spooky. But Hacey Grover, Iron Man, Lauren, Sandy Calloway, Todd Bot. Welcome. Thanks for stopping by over in our chat. Rich Sad stopped by to say that he had to go to an office meeting or something like that, some work thing. So maybe we'll see him later. Hey, Johnny Bergdahl. So what else is happening here? I will mention jobs.adafruit.com. That's a great place to go and have a look at some potential jobs, could be contract positions, could be full-time stuff, part-time stuff freelance. We also have this page right here, which is the available for hire. And if you can go there, you can check out. People have posted their resumes. If they're looking for work, you can go and find out about what they know, what they're looking to do, where they're at. And you can post your info as well for free. There's no cost to using our job board, so it's a good place to look for work. Let's see. What else is going on? I'm going to sip a water here. Doc McGillichuddy over in the YouTube asks, how much? I can't get a pie four for less than $150. Yeah, the reselling is terrible, but we are doing our best to release them and avoid having scalpers buy them by enforcing various things such as two-factor authentication and not allowing multiple purchases from the same address or very slightly shifted addresses and a bunch of other stuff we have going on. So if you do get one from Adafruit, know that you're getting it for the same price as always. And also check out, there's a learn guide I posted about that pie alert alarm that you can build. You don't need a pie to build it. You can use a TFT Feathering ESP32S2 and find out based on the rpilocator.com Twitter feed when something comes in stock at Adafruit or you can alter the code and check somewhere else, depending on where you are. All right, what else is happening? The show I do on Tuesdays, high SNK brand productions, nice to see you popping up. Hey, 2231 popping up over there in our YouTube. The show right there that I have on Tuesdays. That's it. JP's product pick of the week. It looked like that this week because that's the product. It was the QDPie ESP32S2. And what we do is a little show where I talk about the product pick, do some demos, get it half price, throw them in your cart. You don't need a coupon code. Just buy a bunch of them up to 10. And now I like to do a little recap. The show shows about 15, 20 minutes long, but here's a little quick one minute recap. Check it out. It is the QDPie ESP32S2. It's a Wi-Fi Dev board. It has 13 GPIO pins on it. It has native USB. It's a 240 megahertz single core Tensilica processor. It has 2.4 gigahertz Wi-Fi on there. And something I wanted to demo today is using this with Whippersnapper. So what I have is my QDPie and I've plugged into it a couple of different outboard sensor boards. You don't even need to code it in a traditional sense. What you can do is go here to this page. I can click on new component. And these are the components that have been already created as sort of almost a plug and play or drag and drop. So we can pick any of these sensors here. And now you've ate a fruit IO Whippersnapper to your QDPie to give you all the info you need. So now my temperature is at 28 centigrade and 124. It is the ESP32S2 QDPie Wi-Fi Dev board with Stema QT built in. Yeah it is. So let us know in the chats what you're using your QDPie ESP32S2 for. Some people had them already. A bunch of people bought them. Ordered them during that. So let us know what kind of projects you're up to with them. I saw a cool, I might do a little tip of the week type of thing with this coming up but it was a show and tell that Todd Bott did on our show and tell show last night. Showing how you can use some of the little displays on a QDPie because you can reassign all the pins pretty much however you want. So some of the little I squared C OLED screens have a particular pin out. You plug them in. It does not actually match what is supposed to be there but you can reassign pins all over the place on that board and make it work. So that was kind of a cool one. Just one use for those QDPie's. Alright next up let us do a Circuit Python Parsec. Alright let us do it. For the Circuit Python Parsec today I wanted to show how you could make a cool little randomized by color LED matrix using Circuit Python and just a little bit of code. So if you have a look here I've got a Circuit Playground Blue Fruit and I have our little Gizmo, little proto Gizmo there and I've attached this I squared C backpack for a bi-color matrix. So these are pairs of little or actually single bi-color LEDs under each square so it can do red and green or you can actually combine them and get yellow as well. I'm just doing red and green here or off and it just gives us this kind of nice little sci-fi readout type of look the computer is thinking. That's probably what's going on there. So if we look at the code here what I'm doing is I'm importing some libraries including time, board so I get pin definitions, random and from random I'm getting the random integer or random int and then the library for this actual display which is the HT16K33 backpack. I bring in the matrix 8 by 8 by 2 that's the bi-color and then I set up that display on I squared C as the matrix. I'm setting its brightness at 0.1 and then I'm defining a little list here of colors and you'll see here I've got LED red, LED green and LED off which I've actually placed in there twice just to sort of adjust the odds little little increased odds that I won't have an LED lit. Then I'm filling it with off at the beginning just to clear things out. I think it does that automatically but I added that in there. And here's what's going on in the main loop. We set a variable called x which is a random integer from 0 to 7 so that's going to be one of the horizontal positions. We set an integer for or rather we set a variable called y for a random integer 0 through 7 so that's going to be the vertical position and then we're setting a color variable which is based on grabbing one of those items in my list either red, green, off or the other off. Then we set the matrix. This is how we light up. We say matrix x, y so some position that was selected equals whatever this color is and then we sleep for a tiny little bit of time and repeat that and so we get all these really nice blinky random types of lights going on in here. And so that is how you can set some random lights on the bi-color LED matrix inside of CircuitPython. And that is your CircuitPython parsec. Alright so let's see what's next. I'm going to turn on the air in here because it's just got a bit stuffy in here and well that's not it. Wrong button. Hold on. Try that again. Gonna get a bunch of light in there but not any cooler air. It's still hot around here. There we go. Better button. So let's see. By the way I'll look into this later and let me know if anyone in the chat has run across this. I was... In fact let's show this. This is kind of a fun thing to take a look at. Let me go to this view. If we go back to our little bi-color matrix here let's just comment this section out and watch what happens if I tell it to be a fill of red. So all it's gonna do is start the board up, import the libraries, refresh things and then hey what the heck it sets everything to green and if I try green it sets everything to red. This seems to only happen with the fill command. If you use the matrix and let's set one of these positions on here. Oops. About four four equals LED green. Oh I gotta say matrix LED green. Sorry about that. And save there. So setting individual colors it's correct but I think something maybe in the library got swapped around so it doesn't actually obey your fill command. It grabs the opposite color. So I will go dig a little deeper into that make sure I'm using the latest versions of everything and I'll make a little bug report there and get that fixed. But it's funny I've never run into that because I don't think I've used that fill command or if I have I've used it for yellow which is a combination of both the red and the green being turned on and you can't tell. It works and you can't tell. So funny that huh? So all right. Let me know if anyone's ever run into that before. I don't know what if that's just unique to this 8x8 matrix. We have a lot of different driver or a lot of LED packages that we drive off of those matrix driver boards so I'm curious if anyone's seen that sort of thing before. All right so let's see next up we've got a really cool project that I wanted to start working on and show you here today. So this was based on a project I found online and I blogged about it the other day. Let me let me pull up the second the github page for this. Go to my browser and how about that view there. I'll scoot over to the side. So this is a use of the Neo Trellis the 8x8 Neo Trellis as a trigger sequencer and interface for pieces software that uses MIDI on the computer. So it's going to use USB MIDI to send commands about when to trigger essentially a drum sound or the gate or the trigger impulse of a drum on multiple different instruments or channels as this is called and it allows you to use multiple different patterns. So it's a really cool as you can see here a 64 step sequencer and you can modify I'll show a version that I'm working on that has some little 16-step three little 16-step drums available as well as some other controls and so this is similar to some other things that we've done before with the Neo Trellis either the 8x8 one or the Neo Trellis little M4 version that's self-contained but what's different here is the code that this is I think patchworkboy the code that patchworkboy wrote for this in Arduino works really well with the bi-directional MIDI messages that can be used to keep your device in sync with your software and so the reason this is important is that you can have if you look at this image right here you can see there is a little gizmo on screen here in this virtual module or synthesizer software that you've seen me show before called BCV rack there is one gizmo in there that is a 64 step sequencer and it has an interface that you can click on inside of the software it also lights up each step as it's playing so you sort of know where things are and often when you're doing these sorts of things with a sort of DIY MIDI solution you don't end up with feedback going in both directions so I'll show you what I'm talking about here and then we'll take a look at how it's done so I'm gonna bring up a couple of windows here and let me do a little bit of camera management so I will ultimately probably do a little guide that focuses on just this 8x8 grid here but I'll demo it using the really cool dual approach that patchworkboy created which is we have two separate gizmos here we have the Neotrelis M4 this one has an integrated microcontroller M4 microcontroller in the board and then this one is currently I've got a feather M4 in there you can't see it too well because I got it kind of dark so we can look at the LEDs let me just tweak that exposure just a little bit not too much though there we go yeah I'm gonna keep that pretty dark sorry so let me give you a demo of this and I may need to let me see I may need to set up an external speaker for you to hear this clearly let me see if I've got what I need right here stand by I'm gonna make a bunch of racket here well I so what I'm gonna do just to avoid audio echoes and things I'm gonna take a little amplifier here and I'm gonna plug it into I have a Thunderbolt audio output we should be able to play this without getting microphone echo e kinds of problems if we're if we're lucky sorry I forgot to set this up before but let me plug that into power and let me find a nice neat place to put that all right so let me let me see if that audio worked might have to tweak that a bit I'm going to tell this software so here I am over in VCV rack and one of the things I can do in here is tell it to play audio through my Thunderbolt interface okay and now I'm gonna use the two Neo trellises here to play this let me turn up the gain on the output here too okay so let me know over in the chat if you can hear a mix of me and this audio output enough to at least follow along but hopefully you can still hear me talking so I'll let that play for a second here and get this set up so sounds good okay thank you Andy Haley and I'm just checking the YouTube chat here everything good yeah okay so what's going on right now you're hearing mostly this bass or kick drum you can see the pattern that I'm playing there let me okay so here's a pattern that's gonna be easy to tell I'm gonna mute some other tracks though so we can actually I'll just solo that track okay so now what I can do if you if you take a look at this I'm gonna zoom up on this one module here this is this multi-seq it's a trigger sequencer 64 steps and it has multiple channels and multiple patterns in it so right now we're looking at a particular pattern if I go and pick a different pattern to both play and edit you'll see it's a sync between both the gizmo the new trellis and the module so I'm gonna go back to this third pattern and now I'm both editing and viewing that so now I can go in and let's lay in some extra steps by the way I think there's a little lag just AV wise between what you're seeing on my VCV rack virtual software versus what I see and they're both synced up perfectly in the real world between the new trellis and the the module in VCV rack so you'll notice as I add or remove steps on the new trellis they get added over on the VCV rack module but above right but I can also go over to VCV rack if for whatever reason I want to make some changes there and you'll see they're the changes are updated in real time right on the module on the or rather the actual new trellis which is fantastic so the cool thing is that the software for this in Arduino is essentially just looking for incoming MIDI messages on a particular channel that it uses to turn on and off neopixels so while usually we think of MIDI going from a controller out to a piece of hardware or software and then that MIDI note gets played in this case we have MIDI notes coming also in the other direction that say which thing to light up and which color so those MIDI messages are used be used not to make sounds at all but instead to just be control values for neopixel colors so you can see here if we switch among the different patterns and go to a blank pattern right here and now we can and by the way the developer patchwork boy did a great job on this said that there there is some bug between two of the modules in VCV rack that are causing us to often need to double tap the steps to get them to edit I think that might only be during live play that does not happen in this mixer mode so let's go back to a different pattern and there's a little special key combo we can use which puts the device into a wholly different mode and this is the mixer mode mixer and some controls if I scroll up here this might look familiar even if you're not super into audio but this might look familiar it looks like a mixing board that you see in a recording studio where you use these sliders or faders to adjust the levels on a guitar versus drums versus bass versus some vocals so that's what this is a virtual software representation of that and at the bottom of each of these channels these audio channels you can see there is a mute button and there's a solo button so right now the reason we're only here in that kick drum is because I'm soloing it if I take that solo off now you'll start to hear four different things we have a kick we have a snare we have a little hi-hat and we also have a little bass line thing I can mute now the kick is gone and so again we have I think these are bi-directional also so if I go and adjust them in software with my mouse yeah it works I'm clicking on things it turns green up in the software it also turns green over here in the actual device so you can imagine we get I think it's 16 channels of audio so this is a row of eight mutes and solos another row of eight mutes and solos here I forget what these do here down at the bottom we've got the pause or play we have reset jumps the sequence back to the first step and what I'm going to do I'm going to actually go to a more crowded sequence here so you can hear some of these effects these bottom triggers here actually send out a trigger to cause an effect to happen as if you swept a filter knob or did a stutter edit so the mute button goes really you know 18th notes six or a 16th notes so check this out I'll go go to a crowded pattern and let me go over here what you're going to see is a series of effects so when I hit this first effect you can see that that's sending this filter frequency shift for a cutoff second one same sort of thing different different direction it's coming from there's a cool stutter edit so it's sort of muting in time oh and these ones I just added these these require the bass to be heard what I'm going to do is switch to here I'm soloing that bass line and now if I hit one of these I'm just tweaking around with some of the parameters of that bass line let's see this one it's just jumping some octaves in a quantizer it's just noodling around with some pitch I think it was a FM frequency and put stop again and then head back over to our patterns here to go pattern editing so you can see I was just playing around with the bass line that's this that's this green line here so if we go back and play alright so this is the bass line you can see that happening and if you look over in the step editor you can see it also is in sync color wise so yellow is the hi-hats amber is the snare red is the kick and then green is that bass line so there's nothing in that pattern so we can go make it a brand new one or we can do it in software over here all right so let's go ahead and pause that and let's see if we've got any questions first of all oh sorry someone said that this little string it's a rubber band sorry it's a very dead rubber band this was swaying because of the air conditioning I'll get rid of that that would bother me too I am with you to a talkie I don't know what your name is there but yeah that was bugging me too thanks for pointing it out so let's take a look now at how this works so I'll maybe dig a little bit into this you know what no let me let me change change this scene here so I'm gonna open up a simplified patch that I just put somewhere there it is and let's see let's see if this works so I'm actually gonna I think there's an initialization that patchwork boy did in his patch that I didn't in mind so I'm gonna just power cycle my one trellis new trellis there and I'm not using the second one in this example so first of all let me see if I can get it working are you connected it looks like not oh there we go okay so let me connect up in software and then I'm gonna reconnect in hardware I'd also use the reset button but it's a little recessed so you need like a pan or something to click it huh you know it lost its looks like it lost its assignments that's okay I can show how those assignments work kind of from scratch then okay so so what's going on is here's a simplified scene if we just look at one of these so I'm using a little module here this little trigger sequencer modular module and what I want to do is make a connection between my neo trellis and these 16 pads from MIDI so what we can do is I'm gonna use a little module here that is for making assignments between various controls and MIDI notes so if I oh that's funny it's acting like it is though why is it not you know I'll do let me make a new scene oh look yeah that that reminded it of itself okay so let's reopen that huh all right I may I may have to build a thing from scratch then let's see yeah this one's acting like my connections are there but it doesn't like them all right let's see if we can do it from totally scratch let me see is this one yeah I'm gonna make that from so VCV rack has this sort of virtual module browser so I can go zoom out a bit I can go through here and look for stuff or I can also type in the names of things I'm looking for this MIDI cat and let's grab that trigger sequencer so okay so in the most basic form what I can do is say the device that I'm reading is this feather M4 and the device that it will send to is the feather M4 which is what's driving this module or neo trellis and then I can go and say I want to map a step here oh gosh it's really not working huh okay let me try a brand new scene then maybe something got corrupt in that patch I'm just gonna shift off to the side ignore those things oh you know what though let me do one thing which is if I tell it which audio interface I'm using sometimes that seems to fix everything so hold on just remember that it might not know okay so let's tell it my audio interface is this a that fixes everything I don't know why that is okay so I can also do this from scratch if you want to see it but you may not so here what we have is this MIDI cat and it has been trained that any of its buttons so there's 64 buttons there roughly that I've mapped I don't think I mapped everything if I right click on one and say locate indicate it's gonna jump over and show me and blink it says okay that button right there that is linked to whichever pad I just chose so if I go I don't think I have a neat way to clear these so let me just clear these 16 up here so if I go now and press my first button that was mapped over here it will turn on and off this button in the virtual module and see here it is lighting them all up now right now I don't have it sending any proper color info but I do have it sending either on or off so it's just remembering the color assignments that I gave this on on startup so on startup there was a rainbow pattern essentially given to it in code and now it's just reusing those so mine is not as sophisticated as that patch that patchwork boy did aptly name and so what I did was I I for this simpler example I just set up three of these little trigger sequencers so you can see them all light up there or not and it's bi-directional so I can go in and clear those out there's no just mass clear button that'd be cool so what this last one here is doing is allowing me to trigger some stuff in my systems or rather this patches clock which is gonna allow a sequencer clock to start playing it kind of tells everything how fast to go and I hooked that up I think here so you can hear now I've got I've got these three sequences playing they are synced with each other I don't I don't have the blocks I would need in there to show where we are with that little moving light that would actually the way I have this set up be a little bit tricky right now but what we can do is essentially start and stop that sequence because I'm again telling MIDI to go out press a button and in the case of these middies also writing back out and saying okay turn on a light and and the way you can tell that's not just something happening in code on the trellis is that when I press these buttons and software it's just that MIDI command that's heading back out this way to light things up so that is the sort of basics of that now let's take a look at the Arduino code for this which you can leave with those little lights on there which is running on the 8 by 8 is also separate code running on the little half-size one the 32 pixel one and I have not looked at this deeply enough to share a lot of insights but I'll just take you through a little bit of it where we're using essentially USB MIDI and a bunch of little tables or arrays of notes so these are going from note MIDI 24 up to 87 so that's what's always being sent from this out and then you can see here we have one of our Neo trellis multi trellis over I squared C set up so I have those different I can boost this exposure now I have those different for Neo trellis boards there each have a different address and I accidentally built this one with a non-standard we actually kind of a standard I squared C address setup that we put in our guides that should follow and I'm gonna rebuild this and do a nice little guide on this that'll follow the standard convention but essentially I've got jumpers there that I have soldered together to change my I squared C addresses that allows us to use the multiple boards there so here you can see it's setting up this multi trellis as a 4x4 and then there's some typical MIDI setup note on note off messages as well as a CC or control change message and then some callbacks for what to do when something gets pressed some of the Neo trellis setup here is using seesaw keypad as the little library for the seesaw built onto each of those to aggregate all the button presses and all the Neo pixel commands the stuff happens really fast because we're not sending all of that from the feather over to this many keys we're actually just sending messages over I squared C and then the onboard chip on those Neo trellises takes care of lighting things up and reading buttons which is great some color setup here and then in the main loop there is a trellis show which is just going to say light up pixels based on sort of a buffer of what pixel colors should be lit up and trellis read which is the hey did you pull on your little chips any buttons and find out something changed tell us about that and then there's a MIDI event packet receive so that's what's getting any info about okay some MIDI button got pushed over in the software side so let's send that that info back this way and interpret that into a color and then there's a bunch of different cases here used for different modes the mixer mode versus that sequencer mode and that's about as deep as I've gone into it but if you look in here you'll see some of the details of how how the color selection is working different cases for those lighting up rows lighting up the in time pixels which again is mostly controlled by MIDI messages happening over on I think the clock I think we get a message from the clock step as a MIDI message that's coming coming back this way and then we also got that nice little theater chase at the beginning that's what happens when you plug it in get that little checker board theater chase so if you're wondering I saw a question over in the chat what this is running on if you look at that right there is a 8x8 Neotrelis kit that has the feather M4 all the elastomer all the driver so that's a good one to get it's got kind of everything you need there however if you want to do it based on some parts you already have or build it around a different microcontroller board you can get this separate excuse me case here so this is the product ID 4372 and that's the excuse me laser cut acrylic case that you assemble it's got paper you peel off which is why a bunch of that looks yellow and actually the top of mine I didn't peel off that there's a little plastic coating on there too and then you'd want to get four of the driver boards which look like that those are the driver boards and four of these little elastomer keypads so that's essentially what's in the kit I don't know if there's a price break on the kit but if you wanted to do it with a different microcontroller different feather board kind of could be anything that has I squared C really but this code here is really ideally gonna run on the M4 what I'm gonna do is try to see if I can get it running on the RP 2040 feather which may be an issue because the MIDI USB that's being used right now doesn't compile for that at least based on my my preliminary tests but since the RP 2040s are so available and will continue to be available and see if we can make this make this all work on that instead of the the M4 so again if you're interested in actually running this particular I oh this battery is almost dead too so I'm gonna say goodbye because I don't know if I have any other there we go that's a little bit better battery power these are these are nickel cadmium I don't think this pack loves them as much as alkaline so hopefully we're not getting any issues with it but thanks for the for the warning over there yes so I will wrap it up though because I don't trust those batteries at all if you're interested in this project go check it out in the blog or in the chat and discord I dropped in a link there scroll up a bit there it is so go check that out super amazing work by Patrick boy thank you so much for sharing that I saw that over on one of the synth forums I'm on and was so excited to to see that he'd shared that and let me know if there was anything you missed when my mic died hopefully not I need a battery status thing I sure do I should just point a camera at my mic pack and put it in the corner of my monitor so I would see it that's gonna do it for today thanks everyone for stopping by afraid of fruit industries I'm John Park this has been John Park's workshop and don't forget to tune in tonight for a very special time a very special episode of ask an engineer it's usually on Wednesdays but this week it is on Thursday it'll be eight o'clock Eastern time all of your favorite lady Ada and Mr. Lady Ada news updates new products chip shortages new new new songs shenanigans time travel and more I'm sure thank you everyone and I will see you next time bye bye