 episode of John Park's workshop. You are right here with me in the workshop. Thank you so much for stopping by today. We have people over in our chat that I'd love to say hi to. Thanks for stopping by in our YouTube chat, BladeWire, Dave Odessa, Johnny Bergdahl. Welcome one and all. And then, of course, everyone over in our Discord chat. If you're not... Oh, that's not the Discord chat. Let me fix that right now. If you're not aware of it, we've got a Discord chat over at adafruit.it slash discord. And if you jump in there, you can head over to the live broadcast chat channel and hang out during a show or check one of the many other channels anytime during the day. I think there's something like 30,000 members of our Discord, which is tremendous. And okay, I'm going to have to actually re-add this. Hold on. This thing decided to go kaput. If you're wondering where the chat is and you are somewhere else like, let's say, Twitch or Facebook, and it doesn't seem like anyone's around, that is, because I don't look at all those chats. I try to keep it mostly in one place, so the Discord is a good bet. All right, here we go. There's the Discord drop down. There you are. There it is. Hey, let me slide that over to the side. That's the Discord right there. Go check that out. Let me finish shooping it up there. Oh, yeah. So you can see our channels there listed on the left. I have not practiced my Swedish since the last time. I haven't been back to Ikea. I don't know where else to practice Swedish in Los Angeles. Probably there's somewhere. All right, so that was a long way to say check out our Discord, but at least now I've got it up on the screen there. So hello to Thin Man, C Grover, Johnny Bergdahl, Andy Calaway, Jin Hendrickson, and more some nice. Hello, welcome. Let me grab a sip of water here. Try to stay hydrated. Can see nothing. Oh, that's because I never hit this button. Thank you. I added it to my preview monitor and never shot it over to the actual output. Thank you for the heads up. Thank you. Charles Bernerford also caught that. Appreciate that. Give that a second and that'll show up. Anytime I add windows and things mid-broadcast, I need to remember to manually shoot them over to the output. But there it is now. Okay, so what have we got going on today? We have a packed show, a bunch of cool stuff I want to do, including I have a coupon code for you to get some savings at the Adafruit store. I've got a product pick of the week recap. I've got Circuit Python Parsec for you in the continuing series of the Circuit Playground library stuff. I have a little tool tip that I want to give, tool recommendation. And then I've got continuing work on our ambient machine project, including I'd like to show you how I'm going to create some of the looping ambient sounds that will be played on it. So those will be samples. We'll talk a little bit about sample stuff. I may actually do a combination of samples and synthesized sounds using Synth.io. And I'll also talk about some issues that I was running into. I'll give you some examples of the issues I was running into and why I'm now considering smaller samples plus synth stuff. Todd, no, not ambient machine. We need to get hype. Come on. All right. The discount for you, the coupon code today, is that right there? Looper. If you want to get 10% off in the store, head right here to the store. There's an example product. But if you go to products and then over new products, view all, you can find some cool new stuff here or go to products categories, click shop categories, view all and look for some stuff. Is this record still available? Look at that, $2.99. I don't know if discounts apply to that on sale stuff. Do they? They may. You can't lose. If I keep clicking on this, someone's gonna buy it. I wonder how many we have left in stock. Cool vinyl pressing there of the Bartlebeats album frequency. I love those songs. But anyway, go pick some stuff, throw it in your cart and then on the way out, there'll be a little coupon code field. Type that in right there. Looper. And that will get you 10% off. It's good until midnight East Coast United States time today. And then it will turn into a pumpkin and go away. But that coupon code is good for the day. So no hurry, no rush. But if you think of some stuff or if you see me talking about some things here on the show today and you go, oh yeah, that actually reminds me. I want some parts to build an ambient machine. Then maybe go do that and get yourself 10% off today. All right. So next up, I've got this show that happens on Tuesdays. It's the product pick of the week show. On it I pick a new thing and show you how it works and give you a big huge discount. That was the new one this week. A hot one, a really cool one. We sold a bunch of these and I'm excited to see the kinds of projects people do. And when I do one of these, I also like to make a little one minute version that you can enjoy later. So here it is. It is the prop maker feather RP 2040. This is an all in one solution. So this is the micro controller right there. You can see it's the RP 2040. And this then has the onboard accelerometer. It has a neopixel driver. It has the I2S amplifier. We have an input for a button. And one of the things you'll notice is that we now have built onto here a really nice neat set of screw terminals. No soldering required. This has the prop maker feather wired to it. I have a servo speaker and I have a neopixel strand and all of that is just screwed right in and sweeping of the servo here. Rainbow neopixels running here. And then I have a button, some plug in wiring that will allow me to adjust color of the neopixels. It is the prop maker feather RP 2040. Yes, it was. A cool one right there. So let's see. What else? You know what? Without any further ado, let's jump into this week's, how do you say circuit python parsec? Okay, we're looking good. I think we have it. Let's do this. For the circuit python parsec today, I wanted to show you how you can use the light sensor inside of the circuit playground library. Circuit playground library makes it really easy to use your circuit playground blue fruit or your circuit playground express with really high level commands. In this case, I want to use the little onboard light sensor. And what you can see here is if I take a flashlight and shine this at my, uh oh, did it, did it break? Let's, let me, let me, let's see. Let's see what's broken. If it's the connection, there we go. That looks like it's working. Okay. So what was I saying? Oh, let me bring up, I got two code windows here. All right. So what I'm going to do is take my little flashlight here and shine it at the little light sensor that's built onto the circuit playground. And you can see as I increase and decrease the amount of light hitting that, we can plot that value right here in the moob plotter. If I open up the serial output, you can see we have these units. They're not any particular unit. They're not lux or nits or anything like that. But they are, I think zero to 320 is the range of the type of light sensing that we output using this library and circuit python. It's an analog read internally. I think it, it varies in Arduino versus like a circuit python with the ranges that you'll see. But you can see here, I'm just simply measuring that and outputting a value and then plotting it to the graph. Now, if you take a look at my code, the way this works, the simple demo works, really all I've got to do is import from Adafruit circuit playground. I'm importing CP, that's the circuit playground library. And that means I have access to everything on board, including CP dot light. That's all you need to do. If you ask for the value of CP dot light, it returns that value. Now, if I want to do something a little bit snazier here, what I'm going to do is take that value and turn it into a sort of light meter using neopixels. So you can see here, we've got one neopixel lit up. If I take my flashlight and shine it at the circuit playground, blue fruit, we're getting a little meter there. I'm going to turn this to a less bright setting on my flashlight. That helps for you to see those. You can see that those neopixels are lighting up based on the read. And in this case, it's the same thing. I'm just simply getting that CP dot light value, but I'm turning it into a remapped value that can tell the neopixels zero, one, two, three, four, five, six, seven, eight and nine, whether or not they're going to light up. And then depending on that peak value, we go ahead and set those in this case to a red at 40, zero, zero. And then when they're not at that value, we set them back down to zero so that they kind of erase as we go backwards. And so that is how you can use the circuit playground library circuit. Yes, that is how you can use the circuit playground library inside of circuit Python to read the onboard light sensor. And that is your circuit Python Parsec. I am always amazed about getting through saying circuit playground and circuit Python so many times in a row without my mind breaking. It's not easy. All right, so let's see. Next up, let's do a little bit of a tool tip. And in this case, it's a it's a gear recommendation. The other day I was talking to our good friend Steve Denke Otto, okay, you're on, he goes by many names. You'll see him in the chat sometimes. Steve is a among other things, a synthesizer builder. He creates various cool sound computers and synthesizers and MIDI things. And he was wondering about the threading on his device, which I put away. I don't have it right here right now. But there are some parts. They're actually the quarter inch jacks. So for this type of quarter inch plug, there are four of them on the back of Steve's shield XL product. And he was wondering about what the thread pitch is. And so he said, do you have a gizmo for that? Because you can get out some calipers and measure the distance between a couple of threads, particularly for the threads per inch. But there's also another way of looking at thread that's thread pitch, which is sort of a relationship to the to the type of screw or bolt that you're measuring. So I've got a gizmo. Let me go over to the bench cam here. And I don't need to use this very often. But when I do, it is definitely the right tool for the job. So let's switch, switch that upper camera there. Sorry about that. To that one there. There we go. So this thing is called a 28 blade, 456 and 0.5 to six millimeter screw pitch gauge. And that's what it looks like right there. It is a multi tool type of gauge similar to a feeler gauge. If you've got one of those if you run across those. And this has both a metric and an imperial units to it there. Steve's turned out to be 20 pitch. So sorry, I don't have it here for a demo. I can grab some other other screw. It was where to go that one right there. And so you can see what you do is just simply press that up against a threading that you're trying to determine. And you can see which one fits best. That's probably your threading. So here's a an example on this screw. If I try that, I don't know how close I can get. Sorry, that's about as close as I can get there. I don't know if I can get the closest I can focus right about there. So basically you're looking for space. So this is not 20, not 28 might be 32. And then what I'll do depending on the screw is go and check both the imperial and the metric side. So that's it. Now you can also find sometimes in hardware stores, especially for larger bolts and fittings for plumbing and gas and air fittings, they'll have a little board that you can screw your bolt or screw or fitting into if you're unsure. And you just kind of find the one that it fits into right. There are also whole gauges for diameter. But these are really nice because they're really specific to different pitches of thread that you have. And I got this one at a specialty store. You can probably get them online. I got it at essentially a bolt and screw and bolt and related tools type of store. Made in USA by I have no idea whom. There's no name on the little package anymore here if there ever was one. But that number might show up with something if that's a part number there. So that is my tool tip is the screw pitch gauge. Right. So let's see. What's going on? Are we all good? Yeah. Okay. So moving along then I wanted to get into the ambient machine project. So you can see it over there hanging out. That's the ambient machine. So last week I talked about using these little Ikea drawers, these Baltic birch drawers that come in a thing called Mope, which is a drawer set that has three small, two medium and one large in a nice case. Looks like this here. And by the way, I noticed this morning I was watching one of the Arduino Uno REV4 announcements. And there's a moment where Massimo Banzi is sitting in front of a stack of about 10 of those. So someone in the Arduino offices built themselves a sort of chest out of a bunch of those. I'm not sure. Maybe they drilled them together or bolted them or something. So what I've done since, and I can't remember, sorry, I can't remember for last week. I might have already done that drilling out there. I used the laser cutter to make it nice and fast. You could use a drill and a drill template, which I'll, I'll, John Bergdahl says, I hear you've been practicing. I don't know. So this will be something that you can make with or without a fancy CNC controlled laser. You can you can drill out some holes, 20 holes pretty, pretty evenly. If you use a starter, tape a template to it and use a, make a little starter hole before you drill. And then this wouldn't be a much, much more painful to do by hand, but I made a little grill for the speaker. And so I'm placing a smaller box inside the bigger box to essentially house the electronics and the speaker. So you can see behind there, I've got a speaker screwed on there. And I'll show it in more detail under that camera over there. I've put 10 of the switches on this will, this will take 20 switches. And I'm using an IO expander to read those over I square C. And right now what's in there, let's take a look. And then I'll, and then I'll talk about some of my issues I've bumped into and some potential ideas. So let's get back over here. By the way, one of the things that I did with this for both the holes on the front and the speaker grill is I do a test cut in cardstock. I like to do this so that I'm not wasting real material. It's very fast. It's a couple minutes to make that cut here. And it's probably four or five times that once you're moving the laser slower to cut through some some chipboard or mat board like that. So that I can then do a reality check. I've got another one of these here. A reality check on before I commit to the material there. So I set this upper left corner distance as the upper left corner of the cut. So everything there should line up. Another thing I found very useful with this is having the multiple drawers gives you a kind of nice work surface when you start screwing in those switches. So let's see. You can't really set that down on its face once you screw those through. But I made the pattern small enough to fit inside of the small size one. Since I knew I'd have that back box for the sound resonator. So if I flip one of these like this you can actually set it on that as a little stand which is nice. So what I've got inside of here is not put together. It's just kind of shoved together. But you can see here I've got my speaker and I made the pattern here fit the mounting holes of the speaker. Little ears on the on the speaker there. And I'm just using some M3 I think they are or M2.5. I can't remember. This won't be M2.5 screws with nuts on the back of them. And then I've got a long set of wires running from the speaker to my electronics here which is set like that. Make it a little easier to see. So this is a screw terminal block on the amplifier that's an I2S amplifier mono output. I have not adjusted the gain on this. I think I'll probably end up gaining that up and that's a bridging of some of the pins on there that adjusts the gain on this one. I have a group of temporary wires here for a lot of things. So I'm in that sort of basically breadboarding stage. So I'm using the Metro M7 which has these female header pins in it so I can use these jumper wires. So I put header pins on my amplifier. Header pins on my SD card here. You can see I'm using a little right angle USB-C adapter just so the cable isn't poking too far out. Running the USB wire through this notch that's built into the moped handle drawer pull. And then I've got this IO expander. This is the MCP 23017. This has what is it 16 or 14? Is it 14? One, two, three, four, five, six, seven, eight. Yeah, 16 pins. So almost enough on its own for this. I didn't want to do a diode matrix. I wanted to make this as plug and play as possible with this little soldering. And so I'm going to use two of these. So it's I2C. I will just daisy chain a second one. And so I'll have my first two rows of five on one and a second two rows of five on another. That'll make the code nice and simple. I could use 16 of them on this and then four of them on available GPIO. And you could do that too if you didn't want to spend the money on a second one of these. I can't remember. I think these are maybe in the six or $7 range. It's a banana, Michael. What could it cost? $10? And so you could do that, but your code will then have to deal with the fact that some of your I.O. is coming from reading this little I2C expander and some is direct. No problem. You can do that in code, but for learned God purpose is going to try to keep it simple. It means you could also expand it up to 32 if you wanted to do a similar project with 32. You'd have all the I.O. built right onto there. And then you can see here I've got some arcade button cabling that we sell, which I've cut the JST connectors off the ends. They're all using a daisy-chained ground. So each one of these pairs, and you get a 10-pack of them, so that's 20 of these, which is exactly the number you need if you get one pack of these. Each of these are just terminal spades plugged into and not soldered to these switches. Again, it just made assembly easier, so I can pluck those all off. And then I ran a single ground chain to them and have just one ground wire running. So that's what it's looking like inside. Let me double check the chat to see if we've got any questions. Mouse said that they have a drawer full of batteries. That's partway to an ambient machine, for sure. You can also see here I've got this connected to one of our little metal grids, swirly grids using nylon M2.5 standoffs that makes it easy to get this contained. Otherwise, there's a bunch of parts just rattling around in there. So I may add a couple of holes to the bottom here so that that fits in or some other attachment method to this, again, just using these direct. So one of the things that I've got going on here is this SD card reader. So this is the SD card breakout that works over SPI. I'll flip this around so you can see that. This is the bottom side and that just has to do with the direction I happened to have put my header pins on there. So this is the microSD breakout used with SPI or SDIO. So we can't use SDIO on the Metro M7. My plan was to put my wave files for sample playback on the SD card and then be able to play them with with combinations of these switches, different samples. However, since we're not using SDIO, the speed that we can stream the wave files off of here seems a bit too slow for our needs. If I get more than about three of those playing at the same time, it really starts to chug and stutter and sound weird. So I'll demonstrate that for you. I'll also show you one possible solution I'm looking at which is forget the SD card. I can make small enough samples because they loop to just put onto the flash memory on the M7. Potentially do some SynthIO and some samples so that I can have bigger samples on the available space. And then there was also a suggestion. I think Tyeth in the chat was talking about this earlier and Lamora mentioned it to me yesterday and Dan Halbert did about upping the SPI bus speed for this purpose to its max. So whatever its default is, is not, I think it's what, 30 kilohertz? 30 megahertz? One of those probably doesn't make any sense at all. 30 something is I guess the maximum speed we should be able to do which is faster than the default. So I want to try that and maybe in the chat Tyeth or anyone else who has experience with that can see if I'm doing it right if we can get any improvement there. So what I'm going to do though is I'm going to bundle this up and all I really want to do is get that USB cable there out the side. By the way one of the things I may do is add a USB panel mount USB port right here so that we can power it from USB and maybe a power switch on the back but for now I've just got a internal cable in there that will be able to plug into power and data when we're using it. So let's 30 miles per hour that's it mouse. Mega pixels? Okay so what I want to do is some stuff out of the way here plug this in see if it's working. Okay it makes sound that's good so let me get a camera figured out here. My camera arm broke nothing a clamp can't sort of fix. Let's look at this view of the world okay that should be good and bright and then let me get just a I don't need that plotter anymore and I will remember to push these changes over to the live view like so and let's open up oh god please tell me it didn't just save auto save oh I have multiple crossing fingers okay so that's the code that's running on here and I'm going to take this cabinet mic and set it here so hopefully you can hear that so tell me how this sound mix is so you should be hearing me still talking as well as zero zero zero zero this goes with Yanescu's GIF pretty well actually so I'll turn that off for a moment and wait for streaming to catch up with the chat so you can tell me how that how that sounds how that works zero zero zero okay good so I'll leave it at that so right now what I have is that is playing off of internal flash so what I'm going to do is I'm going to put this back to sd card let me open up a terminus okay so you can see here uh first thing code does is it checks that directory and lists the contents which are wave files named bot num zero one through ten and I think what I'll do is set the okay so so let's let's tell it to open up just one wave file okay sounds pretty good uh now I'm going to say okay open up two so it's going to open up the one this that says zero and the one this is one uh these by the way made my life a lot easier with this and I think a previous project where I wanted to know which switches I was doing and not try to remember oh this bird call was was the first switch and this car horn was the second and and so on so um I generated these little uh machine vocoder machine or sample voices uh synthesized voices uh so you'll notice right now if I flip switch three four and so on uh I can tell the switch is gone but I'm not loading up enough voices to play those um so let's go to four voices so you can hear it is having trouble it is stuttering and it is slower now you'll notice there's no difference between the just playing one by itself or playing two three of them together in the sense that they're all playing all the time I'm just using the mixer the the circuit python audio mixer to turn up the gain or down so I can turn on three of these okay so let's go let's be bold I've got 10 switches here I've got 10 samples that's everyone right okay so that's not going to cut it uh so one of the suggestions uh and let me answer a question pen pen go ask what kind of sample rate are those waves so these are uh mono 16 kilohertz samples I'm going to open one up in a second to take a look at everything we can about the file uh they uh are probably around where we want them and so the the the issue is if I take these and run them off of flash memory instead of sd it's kind of doing what I want so now there's 10 loaded that I hit save let me hit save uh I didn't change what I thought I changed sorry here we go so this is where I'm telling it to grab off of uh local flash storage instead of sd so you can hear it's playing it back what sounds like just fine to me and there's 10 of them loaded I love it obviously during testing purposes this is not a soothing ambient machine it is a nightmare box but that's okay so that's uh that's possible and so one of the questions is if I'm playing it off of sd card um let's see I'm doing let's do yeah we'll leave it at 10 off of sd card uh this was the default spi bus speed and my question is am I properly adjusting the uh uh speed of the spi bus in this configuration here so this was based on just looking at some of our uh I think there's a guide from lemore on spi uh bus and so this by the way to go up to the top here uh this is using sd card i o uh the sd i o i o is the super fast one that runs on I think maybe just the rp 2040 maybe some others as well um but will not run on the m7 um and I don't think it's going to so if i'm trying to use sd card with sd card i o um is this the proper way to try to boost the speed so here's here's what it sounds like with the straight up um straight up default let that save and then this is the attempt to boost the speed so let's see uh 30 megahertz spi sd card pa says pen pangu sd card config sd config set see it's pen 17 sd configs spi speed hmm um so tyeth do you know or anyone else know in circuit python if this looks correct uh for trying to adjust the speed you can you can see if i reduce the speed by orders of magnitude i thought i had gotten it to do stuff so maybe this isn't working right now that's sounding the same i thought i had i had found ways to adjust that let's see oops what about uh let's see so c grover said i can double check the bus frequency to do print spi dot frequency let's do that hey have my changes not been happening oh why is that oh close this why am i not seeing that frequency let me get let me get rid of uh actually i'm asleep let's just hold up a second here it is not printing that why is that is it because i'm not creating sd card yet that is why okay let's do it right here oops why does it not want to print that i'm going to get rid of this uh other print hold on i'm going to just clear the uh disco tool session there restart that i'll also add some uh text to that print spi frequency that is mysterious why won't it uh anek data says to verify the speed of particular device on the spi bus the code needs to be in its context while it has the bus oh i see so that's not in the right context apparently huh uh and and then someone else said sd card i o dot sd card takes an argument for the speed okay well i'm going to shut that mystery down there for a second uh and i can do it here so sd card sd card so spi cs and then baud rate all right baud rate equals 30 underscore zero zero underscore zero zero zero zero well that makes it a lot easier to see let's try that yeah uh that's a good question uh c grove cedar grove why was that in italics that's really bizarre right is that happening anywhere else it is oh that's just uh this editors cute little trick there yeah freak me out too i don't usually use this one okay so if i'm setting it down here don't need that up there now let's try changing this can it go lower and remain the same that definitely sounds weird okay so if that's at 30 000 and i believe that is what dan or uh 30 yeah i think that's what dan said was the max we can try to be optimistic and just bump it up nope all right so i think that's our max so it seems to me unless someone um has any other ideas about this using sd card i o uh with that bus maxing out there i think that's not going to work so uh like i said it's okay because i can play these off of local flash and these are actually in this case currently very small files um pen pango said it worked over 60 000 all right let's see go back up here 120 sounds like a good number i don't think that's any different i don't think so feels like that's where it's um so i think pen pango this may be related to the board i don't know if you're trying this on a metro m7 um but that may be our limit on that uh but like i said if i just play these off of flash uh as long as i can cram them into there so i want to have 20 samples let's say uh or maybe 16 and save four buttons for uh for some other interface things um this may do it and so oh yeah and that's a good point i am using a pretty miserable sd card and i definitely need to try like with a good one um i didn't i wasn't using a good card in there and that that's such a basic thing i should have thought that sooner um card card speed can vary so much with trying to stream waves um so i will try that but uh what i want to do either way is talk about um making my sounds for this making my looping sounds so what i'll do is i'm gonna put this off to the side and thank you for your active participation in helping me determine if i was doing the uh speed thing properly how to do that because i didn't know all right so i'm gonna mic this little oh tithes's need to adjust the bus iosp frequency via configure inside the try lock all right i'll try that i'm willing let's do it sorry i know there's a little bit of a lag here between when you see stuff and when stuff happens in the chat when i do them so i might miss miss your suggestion okay okay so let's see if we go back to sd card uh adjust the bus spi frequency does this look right so i'm creating a bus iosp i on board zero clock we so mo see uh while not so waits to uh to lock it then i configure that speed and then uh unlock it so that's that's one version of this let's uh save that again so tithe does that look right does that look like i am setting my baud rate properly inside of the locked uh bus i o or was it spi frequency and not configure and what is that uh equal i do this no so maybe that was a configure and baud rate is that right so we'll set the bus to 60 and baud rate in the sd card so both hey sounds the same uh tithe said spi frequency of three one two five zero zero zero zero is that this three one two five zero zero zero three one two five seems about the same to me um so i'm not sure if it makes a enough of a difference uh yeah frequencies read only attributes you can just ask for it that is weird that i didn't want to print it huh let's let's try it right here print spi frequency it really doesn't want to print that it's the weirdest thing does it not print during lock i don't know uh okay i'll wait a moment here uh in case anyone has before i pull it pull this uh apart see if anyone has any other thoughts yeah looks it does sound about the same right okay so let's move on then uh let's assume i'm going to get the sounds i want on to flash memory um can i print that print the spi objects nothing wants to print only the only the wave list um okay i'll stop newly with that now right there that was it officially i'm going to unplug this here we go i'm sure someone will come up with the answer actually i'll leave it plugged in uh so let's talk about this though so one option we have is to just fit what we can on flash uh another kind of cool option would be boots up it plays uh it loads up my samples maybe a mix of samples in synthio um as a set that's stored on s on sd card moves that to flash memory and then plays from that and then we could maybe just configure one you know one through five whichever of those is on during startup it could go and grab that that'd be kind of neat kind of a cool bonus feature um so either way what i need to do is create some nice sounding loops not this robot saying zero uh we're done with that guy so i'm gonna go ahead and unplug this now um we'll we'll proceed as if i'm whoops there goes that camera we'll proceed as if i'm ignoring um the sd card issues and what i'm gonna do is i'm gonna mic up this little external amplifier and do one of or a couple of these sounds and show you how this works and actually i may i may do the full um process of getting these over to um the device here so what i wanted to show you here is um do that one yeah here is vcv rack uh and you know i love this one because it's a uro rack modular synthesizer that is free you can buy some modules these are all free modules that i'm using here um it's open source and in this case these most these modules are a virtual version of real existing modules that i like to use in real life so the hardware modules from mutable instruments are represented here as free modules um so turn this up and sorry i just realized some of my the last batch there where i was playing the input of that mic was a little quiet so a little spookier than i want to go in the end but um let's maybe noodle with this a little bit i'm gonna get this a little lower pitched and let me turn back the feedback yeah in fact let's do this let's get rid of most of that spookiness um this isn't crazy soothing but it's a start of something that's maybe just like a plucked string sound um i won't go too much into what i have happening here because that's its own thing but i'll say um short version of it is this first module on the left here this is a module called marbles in the real world it's a random um rhythm and pitch generator even though it says random sampler that's kind of a confusing name to be on there uh and i have a wire a little cable running from a pretty regular clock beat there um i'm gonna actually make that a little less regular so you can see sometimes it fires sometimes it doesn't there's a little chance that this t2 here uh or rather t3 output will or won't play uh and i can bias that so it's only skipping it every once in a while uh and then on the right here this one labeled x2 this is sending out different pitch information um i can run that into this next module here so this next module is being triggered by that t and its pitch is changing based on some random pitches selected within a scale and a small range and then i can do other adjustments to that sound design and while i'm doing that i'll sorry i'll have that uh be a regular strike bell like uh and then i'm going into this one called clouds uh which does a little bit of granular and reverb types of things uh depending on how much i blend between the original dry sound and the wet sound will get a very different result i'm gonna add a little reverb back in feedback okay like that uh and then the output of that i happen to be sending to a equalizer eq filter uh so we're listening to just the low pass uh filtered version of it so i'm cutting out a lot of high end stuff just because i want it to be a little uh richer lower end if i adjust that for a second uh this has all the frequencies represented if i go through that filter i'm just adjusting which frequencies are emphasized and which are kind of removed uh so what i'll do now is uh record that so if i come into this module down here uh where i'm going to record that to ambient string let's call this o2 dot wave amp strings o2 wave and now i'll hit the red report button and it's recording a wave file uh i think i have it set to mono 16 k 44 kilohertz that's good uh so now let's turn that all the way down uh and then if we come over into audition uh and you could use audacity for this uh or any other sort of sound editor um we can open up that wave file before i do that i'll say that here was a previous one so cooking show style i had done a previous one and i took it took it in picked a small snippet of it uh that loops fairly well i don't have a perfect seamless loop happening yet uh but then i pitched it down and elongated it so that it is not let me turn this one down this is a louder gain here so you can hear that one has a distinct uh sort of loop point i'm gonna remove those i'll do that later i won't do that right now here um but if we open up that new one we just did let's take strings to wave uh first of all you can see i want to boost this gain to something like that about negative three db for its peak uh we could also use a compressor or normalizer uh but let's listen so this is what we right there so let's just trim that not bad so it's pretty short loop obviously the longer the loop the better it's like five seconds long four seconds long the longer the loop the better in a in an ambient machine you don't want to hear a repetitive thing but um we'll see especially with mixing in some synthio stuff some noise we may be able to uh use really short samples and get away with it or i'll i'll push those um so this right now if you look at it this is a 16-bit um sample it's mono so it's just a single channel it's not left and right channels uh and the sample rate is uh very high it's 48 kill uh 48 thousand hertz 48 kilohertz so what i want to do is export this uh and i don't think you'll see this export window that shows up but i'll i'll just talk you through what i'm doing i'm uh resaving this where i have my ambient machine samples ambient strings o2a and i'm going to save that sample type as i think 22 thousand 50 hertz for the sample rate mono and it is going to be 16 bit i didn't save that amp strings o2a wave uh so now what i'll do is let's go back here we'll grab our machine now uh previously i'd been just ejecting my sd card and plugging that in um but now i'm gonna just put this directly onto the circuit python drive it's actually kind of nice workflow wise and see if i can convince this dying camera clamp no it just it snapped some little here's a nice big clamp let's see if i can there we go let me see something uh so what i'll do uh is you won't see this just in the finder and i apologize you won't see this i'm gonna take the file i just saved uh by the way before i do that i'm just gonna double check in code uh you can see when i am bringing in my wave uh files here in the mixer i'm saying i have a sample rate of 22050 a channel count of one which means it's mono and i'm 16 bits per sample um so that is the same uh you have to be consistent with all your files will want to be the the same specifications um so let's open um ambient machine samples copy that to samples you know i'm just going to dump this in the same folder as my numbers uh my list of wave files that one that prints out there at the beginning that is um sorted alphabetically so this one will actually show up first since it's a begins with the a and my other ones begin with a b so let's see what it thinks i'm gonna samples numbers why did it not grab it am i sorting starts with no numbers file name did i put it in the wrong place hmm samples numbers why not showing up it is there am strings it's named in a way that should be fine just to prevent confusion i'm gonna get rid of some of my sd stuff that will yell at me if i'm accidentally trying to do it off the sd card hmm just for kicks i'm gonna open that one directly just to hear it play since that's part of part of what i want to show here uh so i can do what's the starts with i thought it was not starts with dot and ends in wave which this qualifies for that samples numbers i'm confused as to why it's not showing up let me just see if it's actually i don't know why the name isn't showing up but guess what it's playing maybe i don't know what's up with my printing printing went weird huh let's uh quit disco tool there and relaunch it no that's really weird okay uh so that sounds pretty good actually it's a nice um sort of range of frequencies there for this box so part of what i'll do as i design the sounds for it is find things that work well with this speaker with the type of fidelity it has with this um enclosure here um and there are some tricks we can do so when i have multiple sounds playing at once um we may be able to do some use some like lfo objects to massage the uh mixer volume so i'll flip a switch and maybe that'll allow it to adjust its volume from point seven down to point four or something if there's multiples that can kind of fade in and out with each other it'd be kind of cool um yeah uh andy calloway getting a really haunted house vibe there it'll be a it'll be a challenge for me to make it less spooky but i think i need to make a little less spooky uh and i should listen to existing examples of of these types of meditative more meditative sound boxes uh or or not or maybe mine's got a spooky vibe to it i'll paint it black uh so what i wanted to do actually is bring in this other sound here that i have uh and it should i don't know why won't print but it should just land on one of my on my second switch there alphabetically or uh my first one actually so let me uh just copy that recording one second sorry i know you won't see this part recordings i don't think i exported that okay so yeah we'll go back let's go back to audition here so here was this one right here i'm gonna see a little less abruptly so what i what i'll need to do is um probably like offset this and do some cross fading um to avoid that click it's it can be difficult to uh to seamlessly loop but i'm not an expert at this so if anyone has tips especially i'm looking at you uh c grover i know you know how to do this in in uh probably 10 different ways but i'll take it as it is right now and export it call this one same settings 16 bit mono 22 050 hertz okay and i agree i think that that list of files that's printing there is coming from a ghost i don't know where that's coming from uh so let me copy i recommend saving somewhere real and then moving stuff over to your um sd card machine samples okay so let's go back here so Todd made a good point i wonder uh he wonders if i have just unplugged another circuit python board just in case that was part of the weirdness here uh let's see hey one of them showed up uh it's so weird i wonder if this requires like a power cycle to get that list correct no because it's now got two of these that's a mysterious mystery i don't get it uh oh you know what might might be interesting is to print the contents before the sort because the where am i printing where file sort print so if i print the file name it shows up something weird about that something weird happens there what's in the box ask dexter it's chimes and strings and robots uh so that's what's in the box dexter it's a metro m7 with an i2s audio out i have a bunch of switches i have a expander there's spooky things snaky maker cat says there are spooky things uh one of the ideas interface wise uh based on the original so this by the way i should give credit where it's due again this is based on uh an existing uh product by Yuri Suzuki and here's what it looks like uh this was made in a limited run and sold at an art gallery so you're you're not gonna probably find one of these too easily so i'm making the ikea box version of it um with some slight changes but that is the the ambient machine um to answer that question so uh that's what i've got yeah so so again if anyone has any ideas on um sd card stuff let me know but it seems like we should be able to bail and do some looping some shorter looping wave files along with some synthio stuff so that we can mix in a bunch of different sounds for either a spooky atmosphere or other could be cool to boot up 20 totally different samples or 16 totally different samples at startup just off of the sd card and then have those to work with that might be a nice ui thing let's see other notes from the discord uh see grover says you magnify the waveform and edit at the zero crossings they may have it as a selectable edit option thank you yes so this is a lot of clicks and things happen when um a wave at the end of your sound file is uh on its way down and then at the very beginning of your file if it's on its way up above and not still on its way down below the zero crossing line that's a that's a place where we get clicks and things and also just kind of mixing and match matching uh matching the sounds up a little more so it's not a sudden abrupt change will help um i could also make i could design sounds that that loop in um my vcv rack or however i'm making them um so that's another option is to create sounds that just loop well on their own especially ones that fade in softly long reverb tail fade out done that will just be a very easy thing to loop um but i think that's it so thanks everyone i know we went a little long just because i wanted to show some of these editing uh techniques for generating the sound and putting it on there thank you everyone for your help uh in trying to see if we can come up with the proper uh spi bus stuff um let me know if you have other ideas on that i think that's going to do it so before i go i will remind you you can grab yourself ten percent off in the store with the coupon code looper today so head to adafruit.com check out the cool stuff in the store such as not that can't get one of those but get the parts for it i'll be putting out a learn guide and i'll use some of these fine things including um 20 of these great little switches here uh you'll have to go to your own ikea or order online to get the cool baltic birch box i'm using there uh but either way go find some good stuff in the adafruit store on the way out type in looper and you will get a ten percent discount uh also remember if you want to uh know what kind of discounts or goodies i should say you can get at different price breaks for orders of 149 or more you can get a kb2040 and for orders of 299 or more you can get a circuit playground express those are the current deals i know sometimes we have others sometimes we have some ups ground shipping but right now things are a little up in the air and wild with ups so that's not there the freebies can change so stay tuned if you have a big order planned you might want to look and see we don't know what they are until they happen so i can't give you any heads up on them but uh go go get some stuff if you get a bunch of it you'll get some cool freebies and if you uh either way want to get 10 off just type in looper by the end of the uh day today i think it's midnight on the east coast us time uh is how long that coupon code will last for all right i think that'll do it thank you everyone so much for stopping by it's a lot of fun to have you here in the workshop and in the chats um thank you randall bone says beep beep uh thanks for stopping by in the youtube chat thank you everyone over in discord and everywhere else if i'm not seeing your chat i still appreciate you watching for eight of your industries i'm john park this has been john park's workshop i will see you next week and don't forget to tune in tomorrow for a deep dive with scott tan newt we'll be back with the deep dive friday all right thanks bye