 Thank you very much Okay, so an introduction to building your own digital audio effects, and there's a variety of projects of mine Yeah, there's quite a lot of different things that I've made so far, but Just just to start off. I just talked very briefly about me. I'm Scott Becathely. I Write music make instruments play live under the name Cutlasses So I'm a programmer with no electronics background. In fact, I was thinking about it today I think I got an E in AS level electronics and for years thought, okay, I can't do electronics I'm also terrible at DIY. I can't put up a shelf. I'm no good at that stuff So what I really want to get across in this talk is that if I can do this stuff, then you almost certainly can too So why would we want to make our own things rather than buy things? Well, it's almost certainly not going to save you any money Yeah, it's not saving me any money. That's for sure But you do get to make something completely unique And there's you know, there's a lot of people using the same plug-ins the same audio samples But no one's gonna have the piece of hardware that you designed and built Unless you give it to them but also you get to make stuff and I'm guessing that most of us here like to make stuff and You know, that's a big part of it for me. I want to I want to build things and that's a lot of why I do it So I think we're experiencing a bit of renaissance in musical hardware at the moment There's lots of small manufacturers Doing really interesting things Very experimental things things that wouldn't work mass market but things that sound very individual and very Interesting and I think one of the reasons for that is that the barrier to entry is lower than it's ever been before and I think Partly that's because microcontrollers are cheaper if you can get hold of them Development boards are cheaper And you can get PCBs made in very small numbers Which wasn't the case, you know a decade ago So what I'm going to talk about is How you can get started making your own audio hardware? I'm going to outline the process is a bit involved in building building some hardware Look at some hardware building blocks and how you can treat them a bit like Lego and not necessarily need to understand exactly how they work What I'm not going to go into is any specifics of DSP because there's other people that can teach you that a lot better than I can Lots of great books on it. I'm not going to go into any code really Or anything in any great detail because we don't have very much time So I've already got half an hour, so it's going to be very high-level, but hopefully I can just give you the inspiration to go and look more you can check out the stuff that I'm doing check out all the people that are doing great stuff and Get started basically So an activity of a hardware digital effect, what is a digital effect? Well, I'm talking about anything from guitar pedals Eurorack modules Rack mounted units. They're all essentially the same thing They import audio from the analog domain into digital They have some kind of microprocessor microcontroller inside them that processes that audio does something with them and effects Bit delay reverb or some completely new effect And then they spit it back out as audio again, and that's really all they're doing So how do we get audio? From the analog domain a voltage in a wire to Something that we can process in digital. Well, we have to do Something called analog to digital conversion. So we have an ADC and a DAC So the ADC is an analog to digital converter and The DAC is a digital to analog converter. So they're like the two core bits at either end of what we're doing We get the Be the analog signal into digital by a process called sampling, which I'm sure most of you are aware of And you can see that image up there. We've got some arbitrary waveform and we're sampling it at regular rates We're taking the voltage or the amplitude of the signal at that point and we're converting it into a digital number so the Frequency at which we take those samples is a sample rate in Hertz and how much Space we allocate for each sample It's a bit depth. There might be 16 bit 12 bit 24 bit, but that's the depth So if you think about a CD that's 44.1 kilohertz and 16 bit samples CD sound good. So, you know, there's no need to go much higher than that some a lot of things work at 24 bit nowadays but Again, if you're starting off CD quality has been good enough for most people for a long time Also the the more frequent your sampling and the larger your samples The more memory need to deal with them. So that's a consideration So here's a really simple breakdown of what digital effects doing you've got some analog audio coming in to your ADC or analog to digital converter is going into your microcontroller We've got some additional hardware that the microcontroller is also going to read be it switches or encoders or potential Diometers or whatever it is that parameterize your effect in some way If you're doing your rack, you might also have CV coming in that you need to deal with and then We're doing our process. Whatever that is As I say, it might be your reverb your delay, whatever and Then we've got to spit it back out again as As analog so we have to go from digital to analog and that's really what every hardware effect is doing essentially So how do we get started making them? Well, you can go the entire Like from scratch route So build everything yourself assembly your own PCBs build your own, you know connect everything up Which is what I did with one of my modules sands module Which you can read about if you're interested, but I Wouldn't advise starting like that It's much easier to start out with a development board So here I'm going to talk about teensy and daisy is to kind of good options. How many people here know what Arduino is? Right, so the vast majority people so teensy and daisy very similar idea. It's just a development board You've got your microcontroller and a bunch of hardware to allow you to interface with the outside world Once you've got your design using development board Then you if you want to you can go that bit further and you can eventually get rid of the development board and build it all from scratch And that's obviously if you want to build hundreds of them and sell them and that's that's probably what you would do So the other option is you could use a Linux base board say Raspberry Pi That's what Norns uses which is quite a popular audio processor or sound computer There's Beagle bone black Which Bella uses? But in my mind these are a bit heavyweight for doing simple effects You don't really want a whole operating system just so that you can edit some audio live because a it's a Lot of hardware That you're paying for and you know if you want to build many of them It's going to be a problem, but also you've got an inbuilt latency just from the fact that you're using an operating system I'm not very experienced at using Linux base board. So I can't you know just go much more into than that But but what I want to talk about is is using these kind of bear to the metal Development board. So first of all, we're going to talk about teensy which comes from a company called PJ RC So that has an ADC in a DAC built-in so we can do low-fi audio with it They're not audio components, so they're not designed to do audio, but to get you started absolutely fine They're quite noisy But yeah, they're fine the audio library is really well documented. They've been making these for years and years They're really stable really really really good bits of hardware and So that it's the teensy at the bottom, but just above it is the audio shield So if you do want high quality audio that has what's called an audio codec on which we're going to talk about in a minute And that will give you a high quality audio. It also has an SD card reader in it And you can program that through the Arduino IDE which is great to get started although Not necessarily so great if you want to do a really big project But yeah, it's just really well supported and You can buy the teensy 3.2 in the audio shield for about 35 pounds So not super expensive to get going And one of the things that's really nice about the teensy environment is that they have their own web-based design tool So you can go on to their web page. You can arrange their in-built effects make a little signal chain export it to C++ And then you can just compile it and go and so once you've wired it up You don't have to do any more programming than that. You've got a digital effect. So great to get started probably not what you I Don't tend to use it now, but it's a really nice way of getting started And so this is what the pinout would look like so you buy your teensy This is a teensy 3.5. I think Or 3.68 they look they look the same But you can see on that board Pin a 22 and a 21 your DAX. So that's where you'd be getting your Audio out because you're going digital to analog and then any of the pins that are gray are the analog pin So you can get your ADC and you can convert from analog to digital and then you've got audio in and out So that was teensy very briefly and the other one I wanted to mention is the daisy the seed from electrosmith It's audio capable with high quality audio right off the bat It's got a fully featured audio library much like the teensy one You can program it through the Arduino IDE, but also you can program it through The C++ toolchain using visual studio code or eclipse or whatever you want to use It's very neat. Well relatively you compared to the teensy. It's a couple of years old now, but the documentation is not as fully fleshed out But they're not expensive. They're about 30 pounds if you can get them I couldn't find anywhere that had them, but actually elevator sounds in Bristol Ordered me some in which is really good because I thought you can get them imported from US But then obviously you need to pay import tax and whatever so they've got them for me so yeah elevator sound should have probably written this on there, but yeah, that's A good tip if you want to get some because it's quite hard to find So again, there's there's a pinout that's that's showing what did what you want to connect to and you see here If you look at pins 19 to 16 You'll see there's like dedicated audio. So rather than using the standard built-in ADC and DAC using the high quality audio And all the other like a 0 and D 15 they are analog and digital input So that's what you're going to connect your other peripherals to your other components to So just as a very quick comparison, I would say teensies arguably a little bit easier to get started with It's got that nice graphical tool to build something really simple Daisy has a lot of RAM like an insane amount of RAM for a microcontroller like 64 megabytes May not sound very much of you're working with a PC or with a phone But it's a lot for a microcontroller development board and it's so it's really useful for doing Audio where you can just have huge buffers to do interesting things But saying that a lot of my early projects were based on the fact that I had very small buffers in the teensies So I only had 64k and so I had to do something that was based around a very small amount of RAM So I came up with this audio freeze and I wouldn't have done that if I'd have had more memories. So sometimes Excuse me sometimes limitations are good The days he also is easy to debug you can Use an STM programmer rather than doing it over USB and then you can you got full JTAG debugging Which is really useful. I spent I Don't know how many weekends tearing my hair out with a teensie trying to get some audio bugs sorted By just looking at audio by looking at serial Output and when you're running at audio rate 44,000 times a second You've got so much serial output You have to like scroll through it and just being able to put a break point in Literally saves you days And at some points I was like, why am I doing this? I'm not having fun I'm really stressed out and this is like my limited hobby time. So Yeah, debugging is is useful And I think Daisy's probably a better path to manufacture if you want to go and make loads of them because teensie has some bespoke Components that you need to buy from them if you want to go straight from using their development But I think which either one of you's it's all really a training to You know if you wanted to then go ahead and build some room from scratch So really quickly, I'm not going to go into this table really, but it's just to show you the difference in capability. So you'll see the That the Linux base ones are two at the top have loads of Memory really fast processors, but they're more expensive in the teensie You can see any has 64k teensie 3.1 But it's still that's fine if you want to do a delay or a reverb. That's enough So also you can use SD cards If you if you want to get around the fact you've got limited memory, you might think oh SD cards I've got gigabytes of memory And that means you can hold hours and hours of audio and you can write to it and read to it in real time The quality of the card is super important if you buy a cheap card And sometimes it's not even that easy to tell if you're getting like a rebranded card or not The quality is generally not good, but even on the high-quality cards You can get really inconsistent read times. So you need really large buffers I did a I've written a looper for your users an SD card and 99% of the time works fine every so often I'll get a read or a write on the SD card that takes a second of time None of my buffers are big enough to hold a second of audio and you get a glitch And there's just nothing I've found to do about that So and also they work better if you're using linear access patterns So a looper is a good example if you're just looping something around fine If you want to do something more glitchy a bit more experimental and you want to jump around in that memory SD cards are not gonna be good for that because your buffering is unless you got some very clever buffering So that's how that's kind of a very quick summary of the dev board situation. So I just want to Do a lightning kind of tour of how you might go and what you might do with a dev board So you've bought your dev board. This is a teensy 3.2. We've got some sorry not breadboard. You bought a development board You plugged it into your breadboard Here it is hooked up to power or hooking the power up to the to the lines And I just wanted to show you some of the really simple building blocks that you you need You see you don't need to understand any complicated circuits This is just your audio in and your audio out. So you've got this little Jack connector, which is called a thonky con connector made by or sold by a company called thonk who do loads of Eurorack style kits It has a ground pin and the signal pin The other pin is kind of a switch when bother going into that But essentially you got a ground and a signal and all you need to do at the very simplest way to get your audio in Is just is to hook your ground up to your ground line and to hit your signal or the tip of the Connector up to your pin that's doing the audio and away you go. That's that's it. You've got audio You might want to get a potentiometer in there. So potentially it's just like a dial You know, you might want to set your reverb time your delay time whatever it is. You're parameterizing That's that's all you need to do it you you would set your potentiometer up like a voltage divider So on one side you've got power on the other side You've got ground and your wipers just going to one of your analog pins and you're just reading that Voltage as it gets split and it will go from Power at one end to ground the other end So so you're going to get like maximum to minimum as you turn your dial and you can use that to scale and apply to Whatever you want in your code and that's you know, that's simple It's a simple layout. You might have ten of them. So it might look complicated on a schematic But they're all doing that exact same thing And same with switches you would tie one end of your switch to ground the other end of your switch to a digital pin And then you can just read when that switch is closed and open now when it's open It's going to be floating so you'd want to pull it up To power to your power line and so you would do that with a pull-up resistor But actually it's generally even easier than that because most microcontrollers have pull-up resistors built-in So you just configure that in the code. So There's a really simple breadboard example that I did in a workshop A while ago and it's just a teensy with a little button that you can press that plays a built-in sample and runs it through some effects that You can set up and some potentiometers to parameterize the effect Like those components, you know are a few pounds And you can build something really quickly and do loads of experimenting just just with that really simple setup So once you've got those simple building blocks again and need you know I'm not saying that that that's as simple as it is It gets more complicated the more you get into it, but I just want to get across it. You can get started really quickly But you know you might want to deal with external power You're probably gonna want to do some kind of gain staging attenuation depending on what your different levels are coming in Op amps are super useful for that. So, you know You can look at non inverting or inverting op amps to do those things But you know, it's all a gradual development, right? You don't start with those things you start with getting something working and getting that reward and going okay That worked because that's how it works for me I find if there's too many things I like I don't understand it I'm not gonna try but if I can get something simple working and see it working. I'm like, okay I get that now and I can move on for the next thing So yeah, you might add up connect up other Hardware interactions your encoders screens LEDs whatever and there's many open source examples of these so Tom Whitwell from music theme modular and Emily Gile For a mutual instruments, they both open source everything is great. You can steal it all and Obviously, don't if you're gonna steal it completely then you need to talk to them about it But I mean just stealing parts of it It's just really useful and you just kind of see oh, that's what that is and you just see these bits Essentially of Lego that you're cobbling together So I just want to talk quickly, but I realize I'm going through things quite quickly But I'm just trying to give a very high-level overview. So audio codex I did briefly mentioned before when I was talking about Daisy and teensy. They're essentially a Dac and an ADC and one IC package, but they are geared up to doing audio so normally you would configure them with I to see which is just a Serial digital protocol for setting them up and you would squirt them data as I to S Most of this stuff is abstracted for you in hardware libraries So you may never need to care about the intricacies of that But if the more you get into it's useful to know that that's what's happening under the hood and the way they normally set up is you'll have a hardware interrupt that will interrupt the the microprocessor a regular rate based on your Sample rate and say right here's a block of audio and you've got say 256 samples You'll take those samples you'll process them and then you'll spit them back out again And that process has to happen quickly enough that you finish it before the next one comes along because otherwise if you're if you're overlapping Your audio interrupts are overlapping then you're going to get glitching So that's when you have to like make sure things are fast enough and that's when you have to think about things like performance This one here is a WM 8731, but there's loads Basically, it's whatever you can get your hands on nowadays Hopefully that will sort itself out eventually, but yeah, the everything's hard to get at the moment, isn't it? So, yeah, so I'm just going to talk about Eurorack So I don't know how many of you familiar with Eurorack, but it's basically a type of synthesizer that you can spend thousands and thousands of pounds on And I think when I just heard about it I was like I'd like to get into that but I know that if I start buying it I won't stop so I made myself a rule that I was only gonna use things that I built myself which Now has become a bit of a problem in itself, but So the reason that I like Eurorack It's probably not the same reason as other people like it I sort of like it because from a building perspective You just have to build a front panel you got your hardware underneath you don't need to build an enclosure You don't need to worry about power really because that's already in the case the standards for the signals are all there for you So you can interact with other modules The dimensions are well known and also it has a dual voltage power supply. So plus and minus 12 volts Which makes dealing with AC signals like audio much easier because you don't have to do any offsetting and anything complicated with virtual grounds It's all kind of there for you I Don't tend to use a huge amount of CV in my projects and I've had comments under my YouTube videos saying why did you bother putting this? They're so angry. I'm not sure why why did you bother putting this thing in into Eurorack when you've got no CV? And I'm like to me. They're just like guitar pedals that I'm just making in a more easy way, but Yeah, they probably weren't that angry, but anyway It's you know, it's not really the way I use it It's not really probably how Eurorack is intended to be used although I have started to use CV a bit more And I'm starting to come around to why it might be useful so This is I think building kits is a really great way of getting started This kit is the music thing Radio music which is the first kit I built I think You can get that from thonk and it's teensy based and it's plays back audio from an SD card it's pretty easy to build and It's a really good kind of learning experience because just from looking at it and turning it around and you go Okay, I see that's where the teensy is that they've done some like double layered thing to make it smaller That's the kind of that's how they've stacked it up and just looking at it and putting it together You kind of work out how I could build this and change it a little bit and I've also written my own firmware for it So I have a few in my case that are running kind of bespoke firmware So you once you've taken your idea and you've breadboarded it and you've written some code and you've got an effect working But you don't necessarily want to take a breadboard out live because it's a little bit precarious You want to make something a bit more solid that's gonna last now you can go down the veriboard route and Solder to veriboard and use one of those tools to break the tracks and that's great. I've done that but Nowadays making PCBs is so cheap that I kind of feel that it's just it's just cheaper and easier just to get some made So you've got two main bits of software, which I think the community using one of them is Eagle once kikad I started with Eagle and now use kikad. They both have their foibles. I think There's a certain amount of Stockholm syndrome. I think from using them that you kind of That you kind of can't get over But kikad is being constantly developed and is totally free Okay, so I've only got five minutes left. So so here's That's a schematic. So that's when you've laid out all of your Components in the tool and then you can lay out the the PCB so there are various tools For doing that and you'll be like laying down tracks It feels a little bit like a kind of 80s puzzle game as you're trying not to go over the other tracks And it's kind of fun and you're placing your components way. We want them on the board One one tip before you send anything off for manufacture print it out lay out the components on your board Because it saves you so much time if you find your footprints wrong or things are too close together So make sure you do that The other thing is once you know you make PCBs you can use that exact technique to make Front panels so the silk screen which is the white which is normally for text The copper layer which is for your tracks and the solder mask which is the green layer depending on what color your PCBs are They can just be colors for a Front panel so here is a on the left is a front panel in kikad and that's what it was like when it's cut out So all that difficult drilling is done for you. I could never have cut that nice square out for the screen So it's a really nice way of doing front panels. There's some examples there The front panels that I've made So I'm just going to quickly show you the glitch delay. So this is an effect It's based on the teensy 3.5 Uses a WM 8731 codec I was talking about and I'm just going to play this short video To a buffer and Has multiple read heads on that buffer at different pitches and some are playing backwards You can just control and parameterize those those those looping read heads Okay, so so that and I've got loads of videos on YouTube if you want to check them out after this But just want to show you that to give you a rough idea of what it might sound like before I show you what it looks like And this is the board as you can see I stole that idea off the radio music and making it multiple layers There's a teensy on the back And there it is side view so you can see it's like a Two-layer board with a teensy mounted on the back that bit the top left is the power There's all those little circuits we looked at kind of just glued together So that's it really In terms of things you should read If you're interested in this you should absolutely read handmade electronic music the art of hardware hacking by Nicholas Collins It's the book that got me started on all this really and it's just really really great It also goes into a lot of the kind of The origins of sound art and yeah, it's great Designing audio effect plugins in C++ by Will Perkel I bought that recently. I'm enjoying it. So it's good kind of DSP versus code The dope for page for the construction details is useful You should if you're learning chi-cad you should watch Sean Heimel's Introduction video on YouTube. I watched that watched all of them and then basically I could use chi-cad also the teensy audio workshop is Really really good. That's on YouTube and Yes, so if you just look on the teensy site, you'll see that that's well worth watching So if I was gonna if you asked me now, how should I start? I'd say get a teensy 3.1 get an audio shield get some breadboard get a few components You don't need many LEDs potentially on to switch is whatever get a multi meter That's all you need. Just get those things and you're away now You can go and buy a cheaper oscilloscope I have a 20 pound Chinese oscilloscope and I'm still using it and fine for me You can get a cheap signal generator that's useful as well But again, you don't need it those top things you can get going For small orders of things eBay is great AliExpress is like a Chinese website. You can get stuff direct. It's really good But you will have to wait several months for things sometimes So yeah, if you if you know in ahead of time, and it's great and it's cheap Farnel and RS and rapid, you know, your bog standard you can get pretty much everything from those and also Mauser and Digikey So just to wrap up very quickly I'd say getting into building a hardware is really rewarding really satisfying You will get some awesome sounds that you didn't think about and that you end up using in every single track you ever write but it is a completely bottomless rabbit hole and You you get into it. You may never get out of it. So just sort of a little word of warning But if you've got a working knowledge or a winning list to learn programming and you you will be able to do it You know just you just need to get started So yeah, learn the building blocks and then like things like power and the audio and borrow from Open source projects. Just plug them together on breadboard. Just try things when you've got them going just build something Obviously nowadays everything's on YouTube Twitter forums Just keep looking at all that stuff because someone's probably tried that exact thing you're trying to do The hardest thing is working out what it's called so you can ask the question So that's it. Thank you very much I'm gonna be playing live at the they tell me it's the main stage. I think it's the only stage is just being nice But it's on Sunday at 10 p.m. And yeah, that's the the gear and gonna be using hopefully it's all survived the The journey it was a very full car. So I haven't got it out yet. So let's hope that it all still works But thank you very much indeed. Cheers