All right, hello everyone. Happy Friday. Let's see here looks like I've got sound from the microphones at least into OBS or hopefully good on that front Let me shuffle a couple of these windows around. Also. I see the discord chat's a bit too wide, isn't it? Let's fix that before we go anywhere say There seems good Okay That looks better All right, so hello everyone My name is Tim. I go by foam a guy on get up and discord. This is the deep dive program This is a weekly live stream program where we are working on circuit python code of various Levels sometimes we're working on circuit python the core itself the actual c code that makes circuit python Do what it does sometimes we're working on libraries sometimes we're working on projects Sometimes we're working on examples or documentation or infrastructure All kinds of different stuff But the common thread amongst all of it is that it is all towards this circuit python project So if you are brand new to the stream if you haven't watched this before if you're catching the vaude of this in the future And you haven't seen it before Circuit python if you don't know what that is that's a version of python that runs on tiny computers called microcontrollers In this case there is a raspberry pi pico w right here this green little chipboard here And this is essentially a microcontroller and even more specifically this big main chip there in the center Is the microcontroller and that is essentially just a computer inside of their relatively small Computer, you know compared to like a desktop or a cell phone or something like that In terms of specs, but still you know essentially a computer nonetheless We are writing python code that runs on that computer In order to interact with various hardware peripherals in this case as you can probably tell I've got the microcontroller hooked up to this midi Sequencer device and then I actually have another microcontroller right here. This one's a ate a fruit pie portal So this is another one of those tiny computers that run circuit python and once I jump into it We'll be trying to use these two things together But before I do that let me finish the introduction So that's who I am and what circuit python is if you want to learn more about circuit python Um, I would encourage you to check out a few places one of them is circuit python.org This is the main website for the project. Um, the other one would be discord, which is linked down below me Up down that way actually a da fru.it slash discord Um, if you join us there on the discord, that's also the chat Which is right below me on the stream there the live broadcast chat is where we're at during the live stream right now But we also have other channels on the discord like circuit python dev channel help with circuit python channel and other Channels even beyond circuit python So head over there if you are interested in learning more if you have circuit python device If you're having trouble or you want to know how to do something with it Or whatever right or you just want to get started joining the community helping people out Learning how to contribute learning how to to code circuit python and that sort of stuff Check out the the discord and get involved over there Um, circuit python is an open source project It is all developed out in the open on github and discord like I mentioned before all the coordination Occurs through discord and all the code itself is actually open sourced in github Um, this company right here though adafruit. This is their website adafruit.com This company is the one Providing the financial backing for circuit python. These are the this is the company Who's paying the folks who work on the project full-time they're paying some other folks like me who works on the project part-time These are the folks who are making circuit python a reality by paying all the developers who work on it So thank you very much, of course to adafruit And then if you want to help support the project one of the ways you could do that is just by purchasing hardware for Adafruit so head over to adafruit.com Get yourself some fun toys and uh, you can play with those and help out circuit python all at once Um, now let me catch up on the chat and then we'll talk about what i'm gonna do This evening. So let's close this one and i'm gonna have to Arrange these just a tad some more so that I can actually see the chat Okay Oh, uh, there we are Okay, uh, how's it going? Uh, gordy g. Thank you appreciate the heads up on the sound there Uh, davo desa. How's it going over there on youtube? Happy friday to both of you DJ devon, how's it going? I'm glad that you're here The device, uh, which we'll be working on tonight is a device that was designed by dj devon who's in the chat here So thank you again to dj devon for offering to send me one of these And that's what i'll be playing with here in a little bit once we get into it Um, biata. How's it going today is friday? Yep. Uh, happy friday to biata I assume maybe that's the same biata who's usually over on youtube perhaps Maybe joining us over on discord this evening or perhaps a different one either way. Uh, happy to have you Uh, love the factory. How's it going? Hello from colorado? Uh, yep. Um, let's see dj devon We even have a 3d printing pc to bind. Yep. Uh, so yeah, even outside of programming There's also pcb development in design like the routing for the the pcbs and stuff like this Um, as well as 3d printing and some other Channels as well. So it's not specific to just circuit python the the discord. There's lots of great stuff there If you have any interests, uh, sort of in the maker universe, then you'll probably find something you're interested in over there Okay, how's it going david smith over on youtube? So what I am going to work on tonight is uh, the other day I got this soldered up and then Um, I streamed for just a little bit working on the initial, um Kind of software working on some initial software that would send Uh midi events through the usb back to my computer so that I could start playing some music with this thing So, uh, if you're interested in like the very beginnings of that There is a vod for that over on my own channel if you want to check out the beginning Of what i'm going to continue on with tonight. I will say though, we're not necessarily going to just Pick up where we left off. I'm actually going to be working on a different portion of this Uh that I did not mess with on the stream before And so, uh, what you might notice here is that I have a pi portal Into my pi portal. I have plugged this four pin Stemma the the big stemma not the stemma qt, but the big one connector These are running over to the gpio pin header on the sequencer So I actually have the pi portal hooked up to a couple of the pins on the sequencer, which ultimately means it's actually You know, it's ultimately hooked up to this Pico here Let's city is doing A synthy project with those led buttons too nice. Yeah, these buttons are super sweet for uh for synth or sequencer type thing Where you want like an on-off Um easily controllable from the buttons. They're super cool for that Uh and lis is always making all sorts of great stuff. So I thank you for uh mentioning that I'll have to keep my eye out for that because I'm sure it'll be awesome. Um, so From what I understand some of these, uh MIDI sequencers, they had a display Mine did not come with the display, which is totally cool because this actually gives us the opportunity to figure out How do we add a display to this thing? um And what I have come up with is I think going to be a pretty nice way Which is that uh instead of hooking up the display directly to this pico You know connecting the spy bus or connecting i2c ports or whatever connecting the display directly to this instead of that What if we just have this Whole other microcontroller here, right? This is its own whole microcontroller its own tiny computer all to itself. Oops, uh Maybe that sound is actually coming through. Let me Double check obs does that sound coming through? Yeah, it looks like it should be right uh folks hearing that Let me know if it's too loud or too quiet I did not actually mean to turn that on but that'll give you a preview Of what the actual sequencer sounds like Hit me up in one of the chats if that's too loud or too quiet and I can tweak it further Um, but my thought was why don't we offload the entire display to a secondary device? So I have a pi portal here. It's actually just connected via uart I have the ground connected and I have tx rx connected Uh, which are actually sda sel but we can use them like tx rx and they're just connected to pin zero and one on the pico So I have a uart connection going back and forth and then what we'll do is the sequencer We'll just continually send data to the pi portal The pi portal will just continually receive that data and then update the display each time new data comes in So the pico will send information over to the pi portal. The pi portal will display that information on the screen But beyond that they don't have any interconnection So like the pi portal can't control the music The pico doesn't control the display directly It just sends a data blob that the pi portal knows how to parse and put onto the the display there. It's fine. Thank you Appreciate the heads up there fairly loud I will say I can turn it down just a scotch But the other thing I would say is maybe If my voice is loud you could try the volume on your end as well Or if there's a huge difference between my voice and the sequencer then I can drop the sequencer a bit as well It could be a little quieter. Okay, let me do chunk it down Right inside. Yes, we also I have a couple other places where I can play with the volume And we won't use the same exact tone every time. So some of the tones are Louder quieter and stuff like that. So just let me know though as I do go out So I will say like I don't normally stream Audio focused stuff like this. Um, so I am kind of new with that getting it all fed in and everything Just let me know as I go Throughout the stream tonight. If ever I play anything that is too loud Or if I get too quiet or whatever don't hesitate to just poke me in the chat there and let me know that It's too loud or too quiet. I can try to get it adjusted Um, so let me catch up here. She's doing a quantizer called the midi melody maker nice Which is basically a sequencer that you plug in To plug into her urex stuff. Uh, this one is midi only Nice fairly loud. So let me catch up over on discord as well Sounds good electronic music can can never be too loud. Nice suffering from an off by one error earlier this week See, I know nothing about midi except how to push buttons and make beeps bleep bloops my first ever creating a midi controller Yeah, first time ever. Yeah I am even newer than you the only midi I've ever really messed with is just the code on this Which is barely anything I've done so far I can still hear me over the music like my dials at 11, but I'm also deaf in one ear surprise Tonight also first room with him. How's it going paul escape? Um, yep, and happy almost new year to everyone. I'll second that sentiment as well So thanks for tuning in paul's case. Happy to happy to have you um so I'm just gonna jump straight in. Um, I will turn on the pie portal. So the only thing I really have going so far is I've got the version of the midi software pretty much where we left it on the last time that I streamed Although I did tweak a few more things actually off stream I was playing with some of the other D pad buttons to make those do a few more things Um, but that's really the only change from the last time that I did show The version of software on stream And then the only thing besides that I will say that is also new is sending data through the uart So let's get the pie portal hooked up. So right now the pie portal is actually on a different program This is just another thing I was doing earlier today So we have the uh pico is on circuit pie and then uh The pie portal should then be on circuit pie one I'm gonna copy. Whoops. I'm gonna copy that and paste a copy of it called the code. This is um Label x offset test I'll have a pr for that coming soon, but it's neither here nor there not related to this thing Um, I should have I think code. Is it you are reading or something? You are read Okay, so I'm specifically working on the UI for this midi sequencer to send it over to the pie portal But one of the things I wanted to try to like Illustrate with this particular stream is this idea of like offloading your display to a secondary microcontroller This is a much more general idea That could be applied to lots of projects beyond this right It doesn't have to just be midi or sequencers or anything related to this this idea of like hooking up via uart or whatever to communicate between two microcontrollers and have one Handle all the display stuff and have the other one handle all of the you know actual stuff the project does Um, this is a more general idea that I'm hoping to kind of show and just highlight as a possibility out there for folks Um, so right now the only code that's on the pie portal is just hooking up the uart again using sda and scl Because those are the two pins that are in that little stem of connector Um hooking up the uart trying to read data from it Inside of a loop if we actually found some data then print the length of it print the data itself And then in my case, I'm also Uh turning the data into a bytes i o and then doing message pack unpack on The bytes object, which is this is basically just a way that compresses data into bytes Uh Tinkering tech is new with midi too. Nice. We'll we'll be learning all together. Are you Uh starting up a new boy band tim. I should I should but I am not It so, you know, I had the thought to myself the other day I would be tickled to death I would be thrilled if I could get this thing working well enough and have uh enough luck with my Uh musical ability, which I will say is probably fairly slight But if I had enough luck to put together a jingle for this stream I would be thrilled with that So that might be our kind of goal is like get it working well enough and then come up with a little jingle Um that I could play during the stream like for the intro or something like that I thought would be a nice a nice idea Um So right now we're pretty much just reading data that comes in we we print it out We try to unpack it and we print it and that's pretty much it In the sequencer side of things I have a new task called update display So for folks that are new and didn't catch the previous one the way this code works is a it's an async Script so there's lots of different tasks and then each task It's added into this gather function here, which is what ends up calling them Uh to happen over and over I now have this one update display if we go inside of there It's basically building a dictionary object And then packing it into a bytes bytes i o object with message pack so that you know, it's kind of message pack. It's kind of like json, but It packs it into an object a really dense object of bytes rather than json, which is much more like human legible and not necessarily optimized for least amount of disk space whereas message pack it really tries to It's not it's not like compression. It's not zipping it, but it's you know cutting out white spaces It's compressing it down to bytes. It's giving you a byte representation So essentially we're able to just take an object send it through the uart Port so we're just writing it there. We write a new line So the other side can read it one line at a time And then that's all this one does update display just does that and it does Sleep this code down here was an attempt at some other stuff We might get back to that if we need to but for now we're going to start with just this one So update display this will run every one point or you know 0.125 seconds It will create this object which contains a couple of the values from our state object It will pack them up Into bytes and it will write them across the uart so theoretically So this is the output from the pico side We see our bytes getting written over and over again here on the pico side if I Connect up the pi portal side We should see those same bytes coming in over here as well Yeah, so we see our bytes coming across and then if I if I slow it down or stop it here for just a minute We can see the unpacked version of this object. So right now what our object has is a list of um Numbers which actually these numbers represent notes Um, and then it also has a selected index, which is also a number in this case. It's negative one Let me rerun this again real fast and then while this is running. Let me, uh, turn on one of the Sequencer indexes Ah, right, sorry, that's my bad Yeah, here, let me uh, let me change the default on that before we go much farther I was experimenting with a stop mode That's not an official term, but I was experimenting with a Mode that changes the way the note off behavior works Um, where did I put the? Send off here actually so, uh, we'll just default that to true actually for now Okay There's my terminal so far over here Okay, so this is our pi portal. This is what we're receiving the sequencer is running again. I'll turn on one Thing we can hear it buzz there. I'll turn it off after well. Here's what I'll do is I'll stop this Stop that and then I'll turn it off. So we don't have to keep listening to it for now But what we see here is in this list We now have one of these items is now 60 instead of zero The item that it is is, you know index zero one two three four five And that's because it was the fifth, you know fifth index button This this list here represents all these 16 buttons here the number represents which note it's gonna play Uh, that's for the display gnarly. Yeah. Oh, uh, let me sorry. Let me catch up on the chat here Really cool. You figured out how to use a built-in display from the titano.  It's it won't know, you know, it won't handle any of the real stuff But it'll get a data blob which has only what it needs to be able to populate the display and update it My amp is set at nine to ten system. Value is at 75 Oh, let me catch up what you did the other day with lms was perfect exploring vst as part of the process. Yeah lms does seem pretty cool. I I actually did learn a little bit more about it. I learned how to do somebody had asked about Um, recording different channels essentially like record one instrument with one sequence and then a different instrument with a different sequence I do think I figured out how to do that Uh, so one of these days we'll have to actually use the authoring tool for a bit more of what it can do Uh, I noticed my camera here died. So let me uh reset and focused here There's no midi library. Is there no midi library you can plug it into? I guess you don't need one of the Yes, no, I did. Yep. That's great. That's that's right. I didn't get one of the 1306s, but that's totally fine I'm not worried about it. I'm actually excited for this opportunity to Uh, make this sort of two-part Thing here, right? Like this is an idea I've had in mind for a while trying to figure out how to use a pi portal as a sort of dumb display for another project So um, it actually works out pretty perfectly I think Is there no midi library? I mean, there is the midi. There's aida fruit midi, right? There's um Aida fruit midi this right here, which has got midi stuff for us to send note on and note off through the usb port um But i'm not sure if that's if you mean that or something different um So on the pi portal side, let's start out over there And I think the first thing we want to do is uh, I want to just make a representation of the sequence Um, the most basic version. Let's just have on off and then eventually what we'll try to do is have The actual notes as well since each note can be different But let's start with just the on off that way. We'll essentially have another Output of these leds being on or not. We'll have it on the pi portal display We have a little bit of stuff we need to set up in order to do that. So we can go display i o Let's make a main group main group equals group display i o dot group That would be the presets which is part of the program change Resets which part of the program change Of program change Sure, what you mean? Sorry Group so we'll have a group we'll say display equals board display Which is controlled via status byte um That is by you must be talking about something in the midi protocol. I'm thinking I don't actually know too much about it Is there a display? Maybe there's like a display portion of the midi protocol. I'm not using that if that does exist I am using my own sort of just built-in object and sent it you are I'm not sending the actual midi data over to the pi portal We're sending meta information about the sequence and the other stuff basically state information from the sequencer main group We'll show the main group display Show Should we use root group? That's the new way, right? So this should not do anything different except for the fact that we won't see it on the pi portal display anymore It'll take over the display with a blank group So I want to make 16 Things right 16 things one to represent each item in the sequence um We want to just run 16 across it feels awfully wide to run 16 across. I think maybe we'll do Two rows of eight even though it's one row of buttons. I think we'll have the visualization be two rows Um Yeah, two rows of eight. I think I'll make them just to start with I'm going to make them vector i o rectangles Or circles maybe even circles So I'm going to make it in two rows. So I'm going to go for row in range two Or call in range Eight Make a circle Which I don't know how to do off the top of my head. I don't know the syntax off the top of my head I know how to do it, but I don't know the exact code Probably could get close or honestly we could use the dock strings, but we're there now So circle equals vector i o circle. It takes a pixel shader. It takes a radius It takes an x y So shader Uh, let's say Palettes equals palettes How many colors? Uh Let's just go with two for now White we probably don't want white though Should it just be brighter? Let's start with just brighter maybe but not quite white This might need to go darker still We have a palette and then we're gonna go so inside this loop.  Palette Radius we want real small radius is only maybe like six or something. Maybe that's even too much We'll see x y Um, so x is gonna be Col Times I don't know if that's right y Is gonna be a row times Let's do 14 Let's add that to our list of circles Let's also add it to our main group Let's see if we have a bunch of circles drawn now. Yes, okay. We do they are very tiny They are very very very very very very tiny also the Bunch of them are halfway off the display Um Midi for Arduino Extend the midi packet pretty well Yeah, I'll have to check it out another time. I'm not super Like right right now. I'm interested in this portion of it the midi sequencer telling the Display what to show at this point. I'm happy sending the most basic midi packet Um of all because I don't I don't know how to handle it all on this side either yet So I kind of got to learn both sides all at once So I'll be sticking for now with the the very very basic packets just um, we're essentially just sending note on note off Of a particular note and we're not doing much else yet no pitch bends or Control changes or any of this kind of stuff. I don't really know what a lot of these things do truthfully yet I will check out this video though because this video looks like it's probably going to be telling me that exact kind of stuff Uh main groups, so we'll append that and then we'll make these bigger should we I mean we made as well Just start kind of parameterizing this right. Um, let's say Let's say uh note circle R is We go bigger than we have now and so we go quite a bit bigger truthfully for the radius we could say maybe try 10 Probably still go even bigger honestly, but This way we can change it in the up there though and then So the call here we want, um It's gonna be our I think we should add some padding too though, right? I think we should add some padding So let's go column times note We add the padding before It doesn't matter does it I think it matters Plus, um, let's say maybe like six six pixels in between Is that what that does Not really Notes, uh, oh, but that's uh radius. So it would actually we want times two Times two That's better and then uh instead of 14. We would actually do Basically like the same thing honestly. So why don't we also make a padding? Um note circle Call it margin We can go bigger honestly, uh Or with 16 maybe Your row times 16 or note circle margin Oh 16 though Wait, no, we don't want we want, um No, it should be it should be no. Yeah, that's not right. We want we want, um We want note Radius times two plus Plus the margin And then for the mar if we use the margin here, we should have equal margins We can still go bigger and we're still halfway off the display as well. So we'll have to do that Uh, we'll have to change it over voice changes. Let's see protocol changed. Oh really changed in 2014 to include three four 3.3 volts The spec doesn't have to be zero and five volts anymore. Interesting didn't know that Uh, was to answer the question in the last video. Ah, okay, if you can change the instrument You have to do it via midi protocol And use the instrument in lms or whatever DAW which is audio workshop or something digital audio Uh, the actual instrument is hosted virtually by the pc not the midi controller I see Inventional defaults by channel Yeah, the way I found was you could do I could do like one full I could record I think they call it a track inside of lms Maybe what I could be wrong to But I could record one track and then I could actually record it as midi, uh, or record it as audio And then keep it in its own track and then like let it play back and go and work on a whole another track Where the sequencer is no longer involved, but that recorded track still plays back from my computer I did manage to figure that That uh out how to do that I didn't make anything particularly interesting with it, but I did figure out how to do it. Do we want to move The x y of these further or do we want to just put them into a group? And that way we can move them all together I think we put them into a group so that we can move them all together, right? They're probably still gonna have to get bigger as well um Which uh, which index which color index? index What's the default doesn't say Should it be zero? Let's feel awfully bright. I don't know if that actually got darker. Maybe it's drawing the ddd one Oh, no, that's definitely much darker that time. Okay So which uh, you could switch between voices through MIDI messages as well. Okay Is this I'll have to uh short read What does that mean? I don't know what that means short read We must have like saved it while it was in the middle of reading the uart or something like that, I guess Voices are notes, but also when talking about synthesizers usually referred to monophonic or polyphonic voices in a sense. I got you Yeah, I'll have to look into the Uh protocol more. I'm sure they're like I like said before. I'm I'm sure I'm just barely scratching the surface I'm sure there's like gonna be all kinds of cool stuff that we can still do as far as like having the controller kind of uh Tell the host pc to change Instruments for us We want to be putting this into the notes group for now And then when we're done with all of that we'll add notes group to main group and notes group dot x This is a where I wish that group had a uh a width Wish that group would calculate its width for you Um All right, so basically this is This is a big old formula Where we're gonna divide by We're gonna minus We're gonna go display dot width over two minus Essentially the width of notes group over two, but we don't just have the width of notes group. We're gonna have to calculate it Which is eight Times the radius times two because it's diameter plus The margin But We need the edge. Hopefully There we go. We got back to green No BS No, definitely hiccuped on my side Should be back now though Oh, I just realized I've had the uh YouTube check covered up for a minute. There we go. Now I can see it Okay, uh, where are we at here? So catch this short read error I'm pretty doesn't really matter do that just so if we catch that in the future it will uh Cause us to crash All right, well so much for being centered still Let's group width why Let me catch up might be In this case and a voice channel controller message Community difference things don't remember which is which the last time I looked That's less than intuitive So making music I usually Only know voices being something associated with mono or poly VSTs actually have the word voices labeled in the synth so for actual physical polyphonic Like the old cork synths Any moments to remember the apple puts all the controls on the other side makes them only one. Yeah I'm five millimeters What are we actually All right, we're spamming Probably you're gonna have to turn that off actually, huh? Okay, end it up with 448 two three four five six seven eight But what's our display width? I guess it's 480 so why is our x so it should be um It could be 240 minus 224 which is like something positive 16 How do we not get 16 16 okay I think the problem is that these circles Are placed by their center point Which means that the left half of the circles on the left and the top half of the circles on the top are actually Halfway outside of the group Which is probably part part of why groups don't have a way to give you their width Is because they don't actually contain the things right their width can be bigger than Their width doesn't make sense. But is how it is. So We actually want here to scooch this. I think let's do all of this. Hey, whoa, whoa, whoa Let's do all of this and then just scooch it by the radius plus radius Same thing for the y Kicker vst was playing with the other day would be molly phonic on a phonic only one note Which is the kick drum a polyphonic kick drum would make no sense Yeah, I did I had the kick drum for a minute and then we had a couple of other synths. Okay now. I think it is Honestly still not actually centered but Now I guess it's I mean it's close enough. It's definitely close enough. I'm guessing the reason is uh Either we're off by one because of the margins somehow And then we're off by one like times eight because we're multiplying by eight Or I don't know. That's my best guess actually one of these is wrong one of these wrong This should not be here. Should it is different way. That's obvious I don't know. I feel like we're still too far the left, but honestly, I'm not gonna mess with it any further What I'm gonna do is just go x Uh plus a little bit Plus like we're gonna do y also notes group y Equals, uh, let's just go down a bit like uh 10 maybe that looks pretty good. Okay, so now let's say we want um Let's say we want white circles or or lighter circles. We want the other color of circle ddddd Whenever That one in the sequence is on So We Are gonna do what we are going to When we receive our packet here when we Unpack it uh data object equals this Print it and then we're gonna say for note in data object notes if note Technically, this is kind of implied, but i'm gonna write it out. Anyway, if it's not zero Uh Then we're gonna go find our circle inside of sequence circles Oh, we need uh i i enumerate sequence circles i dot Color index equals one if the note is not zero then set that to one else if it is zero Set that to zero We could check if it's already zero. I don't know if it matters Oh That's interesting Two of them are on already. Is it just me or does that not make any sense? Why do we have two nuns? Do they they go to none?  We need them to go back to zero Yeah, when I started writing this I actually started writing it with these being none instead of zero I ended up changing it to zero Technically zero is probably not actually the best choice because I think zero is technically a note if I understand correctly Maybe some of the folks that do know the internals of midi Will know that I know 60 the number 60 is middle c The number zero I guess is like low low low Something right? I assume it's something down there um In my case though, I'm cheating and I'm using zero to indicate don't play anything I will just never be able to play that super low G or whatever is way down there on zero if it is actually a thing Uh, so right now though our problem is that the code is setting it back to none instead of Zero that's probably gonna be inside read buttons Poggle at where does notes change? notes right there zero There we go, but now we're showing off and on Let's also try to show the sequence. I have no idea if this part is gonna work or not um So we'll see but what I'm gonna try to do is We just oh we have one still We have one still on Why is that I wonder? So I think it's because we don't change the selection when we turn a thing off Uh, goodness gracious with this stuff They're supposed to send a note off or all off message rather than note zero. Yeah, no, so I am sending note off Yeah, sorry when I say that I'm sending well when I say zero I'm using Negative five Okay, let's not worry about negative five that is super weird. I don't know what's up with that We'll figure that out later Well, when I say though that I'm sending that I'm using zero to indicate No, no, I'm not sending zero. I'm just using that in my data objects to indicate that We do send a note off. I have actually two slightly different behaviors with note off Um, because I found one worked better for certain kinds of instruments. I will call them loosely um But when we go to play the note we send a note on right there Uh, we wait for a little bit of time and then if send off is true Which right now it is true then we send our note off right there and we send note off of the same note that we played So if we sent note number 60 middle c here for excuse me, uh, right here rather We sent number 60 middle c right there to play on Then we will send the same thing here note off with a 60. Uh, and then zero this I think did come from the Example code. I'm less sure what the second number there the zero does but yeah So I think that when we I think that when we turn off a Item, I don't know the right terms. Does anybody know is there a term for these things? Are they They're not really notes, right? Especially when they're off, but anyway, I'll call them an item in the sequence just for You know a need to refer to it, but um When we turn off an item in the sequence by pressing the button If it was the thing that was selected, which is the one that's That's blinking like that So we have this idea of selection built in right now the yellow one right here is selected If I press this Turn this a little bit Now the blue one is selected and if I press this again the rotary And now I turn this I can change the selected note So that's how we get different notes. Um values or whatever But what the problem is is that when we click to turn this off we don't change the selection So this one was selected and I turned it off But technically the way it's supposed to be is that you're not really supposed to be allowed to have A thing selected if it's not turned on. So what we need to do is when we When we turn off a item in the sequence we need to move the selection to Somewhere else to the next one that is on however we define next And for me, I think I'm just going to do a increment for that Steps, thank you steps. Okay step in the sequence. Yeah, I like that. Thank you for that As step sequencers. Yeah, I've totally heard that as well You can change the amount of steps in a measure as well, but it's down the road stuff steps Okay, so we have steps. We have the the step buttons We have our step leds and then we have our step representations on the display over here So Let me think though window. Where do we do this? We so we want to say I mean right here. We're turning the value of the led pinned off I mean, I it doesn't really matter when we do it. I don't think right. We just need to go if Uh, what index are we on though? E number E number Okay So we need to go um If state dot selected index is equal to I forgot the name of the function. There's a function that will index the chip and index We want the vice versa that we want chip and index to index Chip and index to index mcp number Key number That's going to get our index. So if the If the button that was pressed is the step that is currently the selected step then Increment the selected one past that state What I don't know is what it will do if there's only one. It might not work if there's only one I'm actually going to do it with two because I think that's the easier test first Okay, so the light turned on Which is not what we wanted but the rest of the logic was fine and then as Once we passed that in the sequence again once we passed that step in the sequence again, then it was fixed Let's try it with the one here No, it keeps blinking I think what we need is in here we need this um break So we need to say if we make it to here. No, no, no Because we're always going to make it to here because we're going to break out of there. So once we make it to here if checked Is greater than or equal to 16 Then just put selected index as negative one Which is uh, how we indicate That nothing is selected We basically need the same thing here If we don't find an eligible step, then just make nothing selected anymore Yeah, light on but then as soon as we cycle past it, we're okay selected index is still showing four Oh, maybe we do maybe we need to do it. We need to do it after we change Notes, actually. Yeah, because if we haven't changed notes yet, then Like that's what it's keying off of so we actually need to wait until after toggle latch You might as well do it after we set the value as well, right? There we go. That's actually turned off now as well Interestingly, this one turned on Maybe it's just 50 50. Maybe it depends like What state it was in when you pressed it because it is blinking really fast Let me try it one more time. I wonder if it's always just that the last one stays on Do we get setting led to false there or Let's turn off this spam This is inside update display Actually, don't need to seek if we don't print Well, if we don't read an led to false Getting led to false, but it definitely is true So the blink must have set it back to true right afterwards Okay, here we should say if nothing is selected then just Turn everything off right now. All we do is sleep It essentially means do nothing. We should turn all the leds off Feels kind of wasteful because like only one of them could be on We don't know which one because The actual index is already the new index. So we'd have to keep track of the old one as well We wanted to be able to just turn the old one off, but I think that's fine. I think we just loop And them all off I do wish so it is tough. We don't have an easy like Can I I guess we could just loop range? So we just loop range, I guess, yeah We're eye and range 16 led pins per chip See, yeah, it's gonna be like Let's go Ship I wish I could hang out a bit longer got to turn in Now thanks to him. Good night. All yeah, take it easy. Dave. Odessa. I hope you have a nice night Thanks for tuning in for what you could definitely appreciate it And yeah, happy happy new year I doubt probably won't get a chance to see you again before the new year, but happy new year and I hope Hope everything goes goes well for you Chip num index equals that's the chip And index no other way around index to chip and index the index is I That's gonna give us back those things Then we go chip num index Dot value Out should turn them all off It's interesting that the That this one turns off There we go. That one turns off now as well. Okay. Now. I think we have the behavior. We oh That not count as a press. Okay. It must have just not counted as a press You turn that off and now that's selected Turn that off and now nothing is selected So and I think the display has been working right, hasn't it when we have these turned on We're getting the associated step circles here on our display to light up to white So that's pretty good I would like to show The one that is selected On the display How do I want to show it? So I want to draw a box around it, but I know that that's going to be actually a bit challenging But I might just do it that way Usually you're only modifying one step at a time modifying multiple steps at the same time sounds useful But not part of the basics Feature set of the sequencer. That's a really neat idea. I'm all for Yeah modifying multiple would be interesting the way I have it now It's definitely like only modifying one step at a time Like you have one step is the selected step and then you're able to modify that one step it would be interesting if you could do multiples as well though somehow that would be pretty interesting It might be you know, it would be kind of cool as if you could do like If you could modify all the ones that are on currently by going up or down and like And and and they keep their they keep where they're at. So like if you have, you know, a BC and you go up by one, then you end up with b c d You know, like it they'll they'll keep their distance relative to each other But it might be cool if you could take the whole thing up or down One note or even one octave or something It would be kind of cool Or if you had some kind of multi select mode I guess you could have like maybe you press a different button and that takes you to multi select mode Where now you press buttons to select more things rather than pressing buttons To turn them on and off That could be a one way to do it as well All right, let's try to Show the one that is selected I think we'll use a box and I'll draw it behind the circles and we'll have to Move its x y coordinates To the right spot Based on what is selected which will be kind of tough, but we'll We'll make it happen That's what we're all about here is getting the tough stuff done On the old deep dives. So let's make a rectangle. We're gonna have to import vector i o rectangle Rectangle, I'm gonna probably need this page as well Like Rectangle so this one has width height x y Palate pretty straightforward. So we're gonna we only need to make one of these Actually Actually Yeah, why don't we So my first inclination was to make one of these and then just change the x y coordinates to whichever one is currently selected and that's Definitely the most efficient thing to do But If we actually made one square for every circle And then hid all but one Usually we would get the same effect, but we wouldn't have to worry about recalculating x and y I actually kind of like the sound of This is definitely the the the lesser efficient of the two things But that's we kind of have some leeway by virtue of the pi portal is only the display The pi portal doesn't have to use ram for anything to do with midi or note playing or any of that stuff Um, so we can actually I'm thinking we can probably get by on The lesser efficient of a couple of options Just due to the fact that we're not actually asking the pi portal to do that much Okay, let's go black What color first selected? I uh We don't we do we need two colors? I don't we don't really need two colors Just try that for now.  I want more. That's not what I want. I want, uh more like this Darkish teal see what that gives us let me catch up here Usually the VST will handle the octave plus one or minus one in the GUI of the instrument Oh, that could be as well. Yeah, I think you could control that on the computer side Some sense and sequencers have a physical button for octave shifts Also, uh All the six millimeter buttons I put in there were for making features dedicated to something other than having only one encoder Six million buttons I put in there were for making features dedicated to something other than Having only one encoder to do everything. I have a specific idea for them, but I figure they come in handy. Yes orange always Answers orange we could do orange orange does seem more um Kind of appropriate for Audio selection, I feel like lots of stuff does highlight orange when it's selected. Will this be orange? Be orange-ish, maybe we'll see um Palate we're gonna use the other palette selected palette With height x y so with height they're easy Let's just do the Diameter of the circle plus a little bit maybe times two plus Maybe like two pixels on either side so four total height Same thing Actually pretty close to the same x as The circle, but just different We're not going to Plus this I don't think and then we want to We probably shouldn't say sequence circles. Oh Well, yeah, no, that's fine. Actually notes group. Let's call this steps group Steps group We actually want to append the rectangle Before the circle that way It's beneath it And we actually also want to Let's leave it like that for now. I think we still need to scoot by two pixels Basically half of the four that we left ourselves here. Okay, so right now. They're all orange They all have recs behind them, but what we'll do is we'll actually go rect hidden Equals true which turns them all back off Then when we receive our packet here We will go if data Selected index selected index Is greater than uh, zero greater greater than equal to zero Then go rect angles Select What did I call them sequence rects? I no, uh, selected index Dot hidden goes false sequence rects And I cannot find reference hidden believe in you. I think you'll find it. Oh, it didn't change Yeah, we got to turn all the rest of them off. I guess we're just gonna loop them You're like we should uh Not hide it if it's the one that is selected because we're just gonna show it like Split second later, and I think it's gonna blink So if it's not the selected index then set it to hidden true So this will turn off all the ones that are no longer selected If the one that is selected is already on then it will keep it on The next line right here though if it's not on it will turn it on And by turn it on I mean make it not hidden which means it will become visible So one thing is my selection is broken it used to select the Step that you most recently turned on But it's not doing that anymore Why is that we must have broken that with our new code to deselect Right this uh, yes. Yes. Yes. Yes. Yes. Yes. Okay. This needs to not do this. This should only be This should only be We should only do this if uh Get latch if this comes to false new latch state if not New latch state Then we do this Because we only want this to happen if we turned the thing off not when we turned it on We not save this. Why does this have? selected index minus one Must have logic errored Probably should handle a key error in case we don't actually receive the right data, but That's what that later Here we go now the one that we select the one that we turn on Most recently it becomes the selected one Good crash over here though Int isn't subscriptable 77 um I think we need to generally speaking validate the object we got I think what happened is because I ran it like Because I saved the pi portal while this was running I think the pi portal woke up and only caught The very like tail end of the message Therefore it it essentially didn't receive a valid data object And then it crashed when it tried to access stuff from that object So I think we should generally speaking validate our object here And only take action if it looks like an actual valid object that came from the sequencer Because if If the communication got interrupted at all, which this is just a plain old UART line like there could be interference You could be mistimed. You could just get garbled data We should probably handle that more gracefully. So let's go if a data object is If is instance data object Let's go dict an area. Well, let's say if it is a dictionary Let's actually make it a function like validate object validate data object the object return True So we're gonna check if it's a dictionary We're gonna check if it has the notes list And we're gonna check if it has the selected index if it's a So we'll say if not return false notes in Not in data object keys return false or selected index not in data object keys and false If it's not a dictionary or if it's missing either of those two things then return false one more thing we could check is if not is instance data object notes list Return false Otherwise if we get past all that stuff then return true Then here we go if validate data object data objects My early attempts, uh, I was using enumerate and was having issues like this I can see now I should have been validating the enumerations to beginner Errors see to a beginner errors are kind of the validator. Yes That is true Yeah, I know that it's broken once you see it Oh I did not We can see our selection moving and I can also if I Move it around like that. I can uh move the selection as well So we're able to see our selection. We're able to move our selection I think the next thing that would be cool is to have the notes coming through um Which means we're basically gonna be making a label for each one of these Back to here. We're gonna go sequence I have no idea if I'm running close on ram or not either. So we might run out of ram Then we may have to go back and Do a little bit of efficiency boosting in a few places, but we'll see sequence labels Hidden so we're going to be making a label label equals Good map label Let's just call it label Say Terminal IO font text empty Yeah, let's just leave it like that for now worth that Importantly, we do want to splay text Because I was working on a modified version of label earlier today. We want to make sure that we get the real one label is this and now I think what we do is we just use anchor point and we anchor point it to the exact same Point as the x y of the circle and that should center it inside the circle I believe anchor point 0.5 0.5 and then anchored position That's going to be the same point as the circle And in this case Like the exact same point. I believe oh, wow, that's awesome. Yeah, thank you. Appreciate that It's coming together I'm glad this is working out as well as I thought to be honest with you This is the first time I've ever used you are between two microcontrollers for this purpose of Kind of making one of them into a terminal for the other so we Created labels But that's all we did we should add them still we'll put it We'll put it After the circle so we go step screw pinned label uh Yeah, and then down here when we're looping this stuff And we're looping notes right here If note is not zero sequence labels sequence labels shouldn't that be labels? oops labels We also didn't append to that. Let's do that Theoretically, we don't really we we might be able to get away without needing these lists We could technically just be using the groups. Honestly, we could make one group for each of these and then The group essentially is a list. So like I have keys. I don't know why All right, so labels is inside of here labels is inside of here We're gonna look up the label as I That text equals Note I don't know if it's gonna be too big too small crash Int object has no find. I think that's because we need to call string on it Right now note is a number and it doesn't like to set numbers into text. It really wants to have strings we should Probably internally check for number and handle it though, maybe Okay, so the the text is white. Let's make the text black so that we can actually see it Oh interesting it stays there actually Yeah, I guess that does make sense because So we would want this Let's make the color black also color Can't do that. It needs to be Either hex or tuple I think Oh, one of the neat things about MIDI controller or sequencer specifically is it doesn't actually play audio files from the pico Only MIDI packets that would take a blotter amp. Yeah, that's true. That's that's definitely really nice is the actual thing that we are The the the meat of the data is just that So it's not very big is it I don't even know how big a MIDI packet is but it's like a couple of bytes if that It's not it's very very small much smaller than like a waveform sample or something Would take up in memory for sure. So Um and I mean the nice thing about that is it makes it so your instrument is whatever instrument you want, right? Like if you're playing wave samples, then you're playing Whatever the actual sound you have is but Here we're outputting MIDI, which means the computer gets to decide what the instrument is, right? It can be bells. It can be drums. It can be guitars. It can be pianos. It can be You know anything and everything synth that can be voiced like, you know, you can talk into the microphone and then like autotune From the notes or whatever It can do so many different things Oh, somehow we broke it. How did I manage to break it? So the uh, the selected was broken and Interesting, I think it might just be behind. I think it might actually just be behind. You know what I'm gonna do is uh I'm gonna stop printing because I think that actually printing Might be taking up a fair amount of time We can always turn it back on if we are troubleshooting the actual data There we are behind three Mississippi four Mississippi five Mississippi six Mississippi seven Mississippi eight Mississippi Hmm We're going too slow for some reason I guess, um Yeah, I mean, it's probably the thing that we added most recently, right? Um Let's do a little bit better here as well if The text is not already empty Then do this Does changing the index here have a penalty? I bet you this is it honestly I think setting the text is actually fairly costly In terms of time we're still We are still slow a little bit actually other idea Only refresh the display If we got a valid object and we changed something You can't see the number in there A little bit too small But there it is it is showing the number in there and it is accurate It's just it's behind It's not quite as extreme as it was although it is actually looking like it now Like we slow down over time. I wonder three bytes for midi Yeah, entire studio of instruments at your fingertips um So I think that Somehow we need to speed this up a bit um Could that be making us behind by that much? I wouldn't think this is start time Of course, this puts the prints back, which I think artificially Influences this so yeah, so our problem is that this is taking 0.15 seconds 0.15 seconds, but On our sender side We are actually sending at 0.125 We're sending faster than the receiver side can handle Which means we're going to be constantly Getting further and further behind And this 0.001 Is like almost nothing of this That's probably not going to matter So we need to figure out which things take the most time And ideally try to not do them unless we absolutely have to Which I suppose we pretty much have to like Measure before we know Of course the print the thing here is like we can't We have like observer problem by printing. We're actually going to be affecting this I think I don't think we can like measure it in a way where we can actually see it without also affecting it So I mean for one thing we should We're looping over 1 to 16 twice we could get rid of One of these loops I think Specifically chose uh 125 because it's 120 beats a minute. Yeah, that's the other thing too. Yeah 120 0.125 is hard-coded Um as the speed we may eventually have a tempo thing as well So we might make it to where you can actually set the tempo although worth noting circuit python Doesn't guarantee you like real-time stuff, right? So it's not going to be like Down to the atomic clock or whatever So unpack takes hardly anything validate takes hardly anything first loop still Hardly anything honestly we Interesting is it well, I mean at this point. I suppose the refresh then is the Can't really do much about that actually You know, yeah Kind of has to read. I mean I guess what we could be doing is like Not refreshing unless the data changed. I suppose there is that Which that might actually help actually that could that could get it to the point where we can The ones where we actually have to modify the screen are we're too slow, but Of course, I also had hoped ultimately to show the currently playing step Which in that case we would need to update the display every frame Because the current step will always change I don't know another thing we could try ultimately. This is the pi portal titano Uh pi portal regular might be a better choice because it's a smaller display with fewer pixels, which means it can refresh faster So we might want to switch to a smaller display in order to speed up the refreshing So because we essentially we're gonna want it Like we're gonna want to be able to handle one frame on the pi portal At least as fast as we're sending it from the sequencer ideally even faster Honestly, what would be nice is if the pi portal could probably handle One frame of data and update the display at like half the speed That the sequencer is sending it that way we still have plenty of like head room Before we start slowing down and getting behind I don't know if we'll make it to there, but that would be like I think ideal. Okay, so let's let this run a second and then Stop it Yeah, unfortunately Like literally all of our time is inside the refresh And I don't think we get any better if we Have auto refresh on we In this case it seems like This time we got an iteration without a refresh and therefore it was much faster The majority of them though it looks like Well, maybe I shouldn't say the majority But at least a couple of the ones that I saw. Yeah, like this one The refresh actually happened before the unpack So I think auto refresh is probably not the answer. I think we want to control the refreshing Be the ss. Oh, I don't worry about it worry about it Yeah, no, I I appreciate what you have given me so far. I'm more than happy to play with Other other displays even if this one doesn't end up working We can try the regular pi portal if that doesn't end up working. I have smaller displays still as well I we'll make we'll make something work No, I'm not worried about it at all I did if you mean the orange and some orange keycaps if you mean these ones I did get those. I just haven't put them on Those things Oh, those aren't orange though. So I'm not sure actually what you mean Maybe you mean orange. Maybe you mean like different ones of these Stem reports, uh, there was I think I have I have to look back through the pack. There might have been a stem report I just remembered you said something about the stem report not working.  I probably I probably can't make it focus um When I use this pico though, I don't have a valid connection On itc when I use this pico. I just get like a missing Pull-up resistor and I think what happened is I'm not used to soldering on the underside Uh on the underside with the pins I'm more used to using regular headers where you would solder on the top And then the pins would stick out the bottom and I think on a couple of my pins I got solder part way up the pin And I think it makes it not make a great connection inside of the headers Uh over there So I did unfortunately I think I did uh Maybe not wreck the pico pico certainly, but it's unusable in this project at least and that's that's just on me I think I to be honest with you. I don't know I'm trying to think back. I don't know that I think this might have been the first stacking header that I tried to solder And it looks all right. It just uh, I think I got a little bit of uh extra boogers there A little further down the pin Which then made it not connect to the uh the header. Sorry. That was a bit of a tangent, wasn't it? Um, that was all mostly we started with whether I got these things Yeah, I will put these these ones on there as well too. I just haven't gotten around to that part yet Orange. Oh, okay steps. Okay for these ones. I see The tr 808 nice Put some flux on the pin heat up the pin Oh, interesting shotter should slide down. I'll have to find the flux Sounds about Be out of said it sounds about like what I've been experiencing so far with the display update Not sure what I Not sure how long ago that was in the chat. I just saw it. So I'm not sure what I said before that um so If we're gonna have any chance to make this work this way We need to not refresh the display If it didn't change Let's keep the old data object old object or previous Whoops. Whoops. Whoops. Whoops previous Preve preve object none At the end of this loop we go Preve object equals data object Ah, you can't just compare dictionaries though And you and you Maybe you can am I thinking javascript? Okay, you can compare dictionaries So if the data object is the same as the previous one, then we know we don't need to update Update the display because if nothing changed inside the data object, then there's no There's nothing that should have to change on the display I think that we probably won't be able to show the current one in the sequence at least not in the way I was originally imagining doing it Because that would cause us to have to refresh every frame But we should still be able to do it this way. I think So we just say refresh is here. Let's put these back And then let's go if data object is not equal to old now previous data object Then we do all of this Do we need to after refresh? We don't really, right? Because we have in the loop catch up here I've had plenty of practice. There's more. There's like 350 solder joints.  Yeah, when I was going through it, I was like Devin is a trooper for doing more than one of these honestly because I was going through it It took me a I mean not like all day or anything, but it took me a good chunk out of the middle of the day there But I'm not I'm not I'm like a slow soldered. I'm relatively unpracticed or really what it is is I speed up over time like the first probably like 10 solder joints that I made Took A lot of time and then after that I kind of sped up a little bit sped up a little bit sped up a little bit By the last couple solder joints. I was like just zooming right along I just don't solder with enough regularity to keep my speed though I kind of always have to have the training wheels slow me down when I first sit down and do it again It was fun though, honestly, I will say Uh, good job on just putting the kit together like I actually found it to be an enjoyable thing To put together you had everything parted out perfectly. Um I didn't have any trouble with like missing pieces or or Any kinds of issues really I put everything in Uh, the the pico was the one thing like I was talking about before once I swapped to a different pico though like Smooth sailing everything was hundred percent good So good job on the kit by my by my estimation I was actually impressed. You got all the leds and switches started up correctly. Yeah the ground I will see Yeah, yeah, yeah, that is definitely true. That is 100 true. I forgot about that I remember in your instructions. It says that the ground plane or whatever I do I definitely did uh, I definitely know what you were talking about when I read that I was trying to Kind of trying to imagine what it was going to be like, but yeah when I was doing it I definitely really really really noticed what you're talking about where some of those pins I guess all the ground ones They take forever to heat up some of them and you really have to just Let it go or else it doesn't Connect to the board it like you could melt solder and it will get onto the pin But if it's not touching the board, then it doesn't doesn't help you Um, I did I did see that as well. Yeah How do they like How do people get around that do they like subdivide the ground plane or something because I feel like I mean ground planes are kind of always massive. Aren't they isn't that part of the Just what a ground plane is One of the nice things about the board is uh, there's so many if you arrest either you're not by the end. Yeah No, yeah, yeah the uh, oh zero ohm resistors Oh interesting Zero ohm resistors makes the solder not do that And electricity is fascinating the more you learn the more the more I learn the more I realize I don't know I guess stands to reason but Okay, we're looking pretty real time actually to be honest with you that looks pretty good That's looking pretty good. I think that might just be good enough like If you're literally staring at the screen while you push the button Like looking at the exact place where you know, it's about to light up or not this one stayed on for a second I don't know what that was about, but that light stayed on You might need to double check the logic in there again. I thought we were turning those off, but You might have a situation where it can actually stay on Until it was until the next cycle then it turned off That's looking pretty good. I mean we're still we are still technically Actually, this still seems slow Are those only when we changed we should basically we should be having some iterations that are much faster I feel like we broke something here Because we're already at 0.13 by the time we get done with unpack even we shouldn't be that am I looking at the old bit Or did I turn auto refresh? Our refresh is false We have before refresh And it didn't print this time. So we did not refresh So I don't get why this is so much time And then the other thing is I don't get if this is over 0.125 then we should be slowing down It shouldn't feel This close to real time But I mean like even the rotary encoder like I could it's it doesn't focus you all can't see it the number that's in there I can just watch that change real smoothly as I turn the encoder garbage collect How come we were so much slower before I mean faster before Turn this off for now Provides a hole so that the path to ground isn't Directly to the board. It'll go through the resistor trace Next time which will allow it to switch the which will allow the switch pins to heat up. No problem And the hard one will be the other side of the resistor. So just moving the heat heat up point Rather it be resisted than overheating something on the inside of the switch. I see Is you're literally heating up the entire ground plane. Yeah Okay. Well, I mean sounds like you gotta Got the approach for next time nailed down at least you got the lessons learned Got another one where the lights stayed on but I mean Turning all right, it's like already there, but where does the time Come from why Is this was in the like point zero zero zero Well two zeros at least That was like the neighborhood it was in before right like Why are we suddenly in the point one five neighborhood now? Am I crazy? We were we were much faster, right? And it's still the second half of the question is if No matter why it's going that slow if it is actually going that slow, why is it able to stay Hot up to the sequencer now I am Extraordinarily confused I don't know why it's taken as long as it is and then I don't know why if it is actually taken that long why it's Doesn't feel like it is When it's actually running and we're looking at the display like earlier. We had multiple seconds of time delay between When we took an action on the sequencer and when that action was represented on the display and now I mean, it's not literally instant. There is a delay, but it's like Very fast And I do not understand That at all if this is true It should not be as snappy I mean, I guess we're not off by that far Not off by that far point one two five versus point one four four But I mean, isn't that the same as what we were seeing? I don't like the same as what we were seeing We're using thermal reliefs the x thing Inulirine is tiny thermal relief barely visible Malik can definitely say thermal relief didn't do its job Its primary job is to help the grand pin Get it faster I Don't Understand that at all So Just take stock of what we just witnessed Make sure i'm not missing something so The way it's written right now We refresh every iteration as long as validate data was true Long as we got validate data We're going to be calling refresh Is basically every iteration almost maybe not every single one forever and ever and ever But almost every iteration And so now all of these are back to the point zero zero neighborhood Right, but this is super weird because like what we changed was display refresh Which is down here, which is after this has already occurred But that one change has now caused it so that after bites i o after unpack These are now back to the point zero zero neighborhood But these occur before the code we changed How can the code we changed have had any effect on What these numbers come out as I don't know that's weird I guess this is like I mean this could be doing stuff in the background, I suppose from circuit pythons perspective Somehow that's taking up extra time, but yeah, I don't understand that at all that That doesn't make sense to me so and that makes it pretty much impossible for me to See and this is right back to the slow one Like it's several seconds Before it updates so it's almost a full cycle through the sequence This one's more than a full cycle It took like two full cycles before that updated Okay, I don't know. I don't know that is bizarre the numbers the math does not add up correctly In my head at least but this is definitely better Despite what the numbers say this this feels better on the screen Just watching the screen feels pretty much live So i'm pretty happy with that This does make it to where I can't really like I can't really like hypothesize about Things to do to try to improve it like really all I could do at this point is just guess and check because every every hypothesis that I Hypothesy every hypothesis every hypothesis I could come up with would Run counter to the actual measurements that we're seeing like I wouldn't even I don't know what's happening. So I couldn't even begin to like Make a guess about what to change to change it to do something different if I don't understand What it's doing or how it's doing it, but it does seem better. I am pretty happy with it I do think I'll try the pie portal Because I am curious to try the smaller display to see if maybe we can even get our iteration under point 125 Because I do think it would be ideal if on the pie portal side Our iteration loop could be under point 125 since that's what our sequencer is going to be sending If we can go faster than that that means we should always be ahead of time, right? We should never be slowing down So that's a good goal to aim for so I'm curious to try a different display the the pie portal regular potentially even something smaller, you know esp 32 feather tft something like that like the display is much smaller. It might be harder to represent everything The text would certainly be kind of kind of difficult at that size, but You know we have that to experiment with as well if it turns out that the pie portal Is too many pixels for us. The other thing I guess we could do is maybe use scale or something I don't know if that will make it be fresh faster or what but Let me catch up here on the old chat See here Ground pin that okay So enlarge the annular ring for the next revision because soldering iron barely fits on the ring And pin at the same time. Hey, by the way DJ Devin and and if you don't know the answer If you don't have an answer or if you just need me to ask you another time That's cool as well But I'm curious and I happen to be thinking of it now and since I know you're here and you're talking about the next revision Do you have plans to offer this device? Or the kits or anything for sale to the community because I might know Somebody who's interested in purchasing one If that is eventually offered for sale like next revision or whenever you get to a point where you Are comfortable doing that if that's on the table. I think I have somebody who's interested in one Yeah Fast iterations. I'm a hundred percent with you there Honestly, I have no idea fair enough Uh true some drum and bass can get up to 170 German drum and bass base 270 so that'd be even faster So yeah, we'd need to we'd need to get a ways under point 125 to be able to handle that I guess Is something I occasionally do, okay Yeah, we'll have to speed up too and I also don't know anything on the sequencer side. I have no idea how Long it takes it to send the MIDI data Like the actual midi's note off note on type stuff We'll take some amount of time, but I have no idea how much these things here So at some point we might have to be careful like maybe the sequencer itself might slow down to the point Where it might not be able to keep up with that bpm But it totally depends on what all it's doing We could also I think there's probably ways to back off some of this stuff like the blinking Blink selected. I think these could use different values for delay here, which could actually affect How quick some of the other stuff runs as well potentially but Do you have enough for more kits? Maybe missing a few things here and there. I gotcha Well, if it if it does become something you're interested in doing Um to sell at least one of them hit me up. I may Said I may have somebody who's interested in I have a total of 20 boards nice Thanks. We had quite a few yet a nice nice medium-sized run there made of the boards Okay, I think I'm gonna call it a night for this evening I got kind of the basics of what we were working on hammered out kind of essentially just proved this out as a proof of concept And we solved the the refresh rate problem You know like I've been saying I don't really understand why it's behaving the way it's behaving so While we did make it better. I can't say as though I have a full grasp on it, but What I have done at least has proved out the the concept here This definitely can work as a way to to display some stuff for the sequencer Um, we know You know, we might need to try out some different stuff to speed it up so that we can actually update the display quick enough Um, but generally speaking the the concept seems sound. So I'm pretty happy with it Um, I will continue working on this a couple of more things. I would like to have it do If we can I'd like to have it show the current step I think that one might be kind of hard though because we are We would essentially have to refresh every Every iteration which would put us right back to where we were when it was slowing down So I don't think we'll be able to do that at least not on this display um But some other things that I do think would be cool To show are some ancillary information like which modes you're in so like If you press this, uh knob it changes which mode you're in But right now I'm selecting between the steps By turning the knob and if I press it again Then I go to note selection where I'm actually changing the value of the note. So now the middle one is higher Um Outputting that mode on the display would be nice Uh, there's also a send off send off mode Which is what controls the note off behavior right now. That's on this button Um, it'd be nice to show that on the display as well A couple other things that aren't specifically tied to the display that I am still interested in doing is using The rest of these buttons a bit more. I think I have up down Uh, I think up and down will do this Like up and down on the d-pad will change the note as well whichever note is selected It'll move that up and down same way the wheel does if you're in note selection mode I don't think the center button does anything yet. I don't think the left button does anything yet But it'd be nice to get those hooked up Um I don't know can it know if there's anything plugged in over here It might be nice to show up on this side if it actually has like actively made a connection or something It might not know about it through the usb. So In the way that I'm using it. We might not be able to but Uh, if we figure out the different instruments and stuff like once I learn more about the midi packet I feel like I'm slowly just turning further and further to the left here Straighten that out a bit Once I do learn about the midi packet if we get different instruments figured out from the sequencer's perspective Where this thing if it can tell the computer like hey You know this step is instrument a and this step over here is actually instrument b or whatever If we can do that then that'll be another thing to output here. Maybe we have different colors or something on the circles, but So all sorts of all sorts of different stuff we could be doing here Um, but anyway, thank you for watching, uh, everybody. I hope everyone does have a good Rest of your Friday evening and a happy new year like I mentioned earlier probably won't be Seeing folks again before the new year. So I hope everyone has a fantastic start to your new years Let me I'll catch up on the chat here before I go, but Uh, we'll wrap it up there confidence Let's see my confidence in it being 100 ready was overestimated Yeah, well, I think you did a good job. Uh, it would be something for my son ky Put up a disco. Oh nice got the disco in the basement if anyone's interested feel free to DM See how many we can get with the next batch Uh website The github is yeah, which dj might have already answered this the github is the the only website I know of Not sure if I'm comfortable selling him. Yeah, that's totally cool as well prep for the big giveaway for Christmas Yeah Have a good night. Yep. Thanks gordy g happy new year to all just the github. Yep. He did say the github Uh, thanks paul's k. Thanks for watching. Happy new year to you as well I think midi uses note on for connection That's maybe something in the protocol packet tons of fun. Just tuned in Ah cut cut the cut the end of us on you there puppy You can check out the vod if you're interested though We we're playing around with the display and the sequencer There is also a prior vod if you're interested in the actual midi stuff. So That's gonna do it for me. Thanks again everybody. Like I said, I appreciate everyone watching I do hope everyone has a wonderful rest of your friday evening And a great start to this next new year I will be back tomorrow morning on my own channel 10 a.m central time if you want to watch Me work on some more circuit python stuff. That's the next time. I'll be back Um, but otherwise I will catch you next time whenever that may be. Thanks everyone