The Swiss Army Knife Of Audio Synthesis

Thirty years ago, we would be lucky if a computer could play audio. Take a computer from twenty years ago, and you’ll be lucky if it can play an MP3 in real-time. Now, computers can handle hundreds of tracks of CD-quality audio, and microcontrollers are several times more powerful than a desktop computer of the mid-90s. This means, of course, that microcontrollers can do audio very, very well. For his entry to the Hackaday Prize, [Fabien] is capitalizing on this power to create a Swiss Army knife of audio synthesis. It’s called the Noise Nugget, and it’s just what you need when you want to put audio in anything.

The microcontroller in question is an ARM Cortex-M4 running at 180MHz, with a quality DAC. There’s connectivity in the form of USB, two audio outs, one audio in, I2C, UART, and GPIOs. With this, you’ve got a digital synthesizer with a MIDI interface, audio effects for guitar pedal tomfoolery, an audio effect trigger board for playing pre-recorded sounds, a digital recorder, and a USB sound interface.

So, with all that processing power, what can the Noise Nugget actually do? Well, first of all, it’s a sampler. [Fabien] has a video demo of the Noise Nugget set up in sampler mode, where it can play a lute-ish sample and a cat sound. All of this is controlled over MIDI and played through a cheap speaker. The results — except for the cat sample — sound great. You can check that video out below.

42 thoughts on “The Swiss Army Knife Of Audio Synthesis

  1. Oddly enough before this laptop arrived I managed by growing iTunes creation of digital audio in MP3 format on a Dell Dimension running (of all things) Windows XP and it played them back rather well. The Dell Dimension arrived about twenty years ago.

    By the way the tribbles say hello.

    1. “Take a computer from twenty years ago, and you’ll be lucky if it can play an MP3 in real-time.”

      My memory of 20 years ago agrees with Bryan’s. Your laptop is not from 20 years ago. 20 years ago is 1998. (ahh… my college years). I know your laptop isn’t that old because WindowsXP was released in 2001. State of the art (for Windows) in 1998 was… you will never guess… “Windows 98”! I know 3 years doesn’t sound like much but Moore’s law was VERY much in effect at that time. It made a HUGE difference!

      In 1998 Pentium Is were the good stuff from Intel and PCs running 80486s were still not an uncommon thing. An 80486DX (math coprocessor built in) or an 80486SX with an add on math coprocessor running Windows (which most did) could usually play a “CD quality” MP3 without too many glitches so long as the user wasn’t trying to use the computer for anything else at the same time. Running Linux the user might have a shot at some light text editing or simple commandline work at the same time.

      Of course, running a Pentium playing an MP3 and even multi-tasking while doing so was no problem but like I said, 80486s (often SXs with no math coprocessor) were still common enough to not be weird so I would say that yes, you were lucky if you could easily play MP3s at that time.

      This is all assuming you were happy with what we called “CD Quality”. I forget how many bits per second that was but supposedly it matched that used on music CDs. Today’s high quality music files would have been useless on those machines!

      It’s kind of sad really. That was probably about the last time I saw a sound card with a good analog section. Sure, the digital side of today’s soundcards run circles around those of 20 years ago but your ears do not hear ones and zeros. You need to convert that to analog and amplify it before sending it to the speakers. We had the AWE64 back then. It’s analog section looked almost like something out of a home stereo! These days they are almost wiring the speakers directly to the ADCs! All that rich sound that is recorded in these high-sample rate audio files is just getting thrown away in the analog section before it gets to the speakers anyway.

      1. I think you’re overestimating the capabilities of 486 machines. I had a 486sx25 from 1992-1997 when I upgraded to a Pentium 2. There’s no way my 486 could have played even low quality mp3s. I bought a Pentium 90mhz laptop off of ebay around that time and it could barely manage 128k CBR MP3s as long as I did nothing else. Variable bit rate or trying to multitask anything at all would start causing cracks and pops in the audio. The Pentium 2 machine was perfectly fine with any MP3 I threw at it, even while doing other things like web browsing.
        In fact, here’s a Youtube video showing playback on a 486DX 33mhz (with fpu) of 128K 44khz CD quality mp3s.
        https://www.youtube.com/watch?v=ITdZGL-OafU
        It shows the same file using a 133mhz AMD 5×86 upgrade processor and even though it’s much better, there are still hitches.

        There were great strides in the 90s in computing power. The Pentium 2 I bought in 1997 was 233mhz. By 1999 I had an AMD Athlon at 750mhz and then in 2001 an AMD Athlon XP 1500+. That last one ran at 1.33 Ghz but I think the number meant it was similar to a 1.5ghz Pentium 3.
        Pentium 2’s were mainstream by 1997 or 1998 though. The Celeron 300mhz processors that came out in 1998 were extremely popular because they were cheap and similar in power to the Pentium 2’s and enthusiasts found they could overclock them up to 450mhz or so.

        20 years ago is a pretty accurate time for mp3s. That scene exploded in the late 90s since most computers started to be able to play them reasonably well.

        1. My first compressed music files were some concert records of The Prodigy in mp2 format. Played on Pentium around 100 Mhz no sweat. I kept these files for a while because cost me several hours on dialup downloading. We use to value the internet time:) Before that 1997 ish I was trying video editing on Adobe Premiere 1.0 Windows 3.11 not sure what audio compression was used but video was in Cinepak or Indeo. CPU 486DX 100 Mhz. There is mp3 player for DOS will take lower resources for sure.

          1. I remember being so excited when FTP clients came out that were capable or resuming stopped downloads! Then I remember having some program which would queue up a bunch of downloads and then automatically dial out at some preset time of the night and start downloading. At some time in the morning it would hang up and resume the next night. I remember thinking that was so awesome!

            When broadband became a thing that we all had at home I started losing interest in downloading MP3s. Apparently somewhere along the way it became more about the challenge than the music but the challenge was all gone.

            Oh well… that’s progress!

        2. That looks about right to me. My 486 ran at 66MHz, that one was only 33. Also, when I said that I couldn’t multitask if playing an MP3 in Windows I really meant it. I remember going so far as removing all startup items from the registry and even turning the screen saver off! I’d just start it playing and then turn off the monitor to prevent burn-in. Even then I do remember having glitches but not as many as the 33MHz PC in the Youtube video. It was closer to the Pentium. That was acceptable at the time because it was an improvement coming from worn out audio tapes recorded off of a friend’s CD! Linux was a lot better but for that I wouldn’t even use X. I was using MPG123 or maybe some ancestor of that running in a text terminal.

          I also had a Pentium-I 75MHz. I don’t remember having any problems playing MP3s on that. It was my ‘main’ computer that lived in my bedroom. The 486 sat in the dorm suite ‘livingroom’ area. It was supposed to be a server but mostly just allowed MP3 playing, web browsing and instant messaging from the living room. MP3 players and cellphones were rare and expensive back then. I was the only one I knew for whom MP3s were more than just a geeky curiosity because I had my computers wired into the aux in of a stereo. Those were the days! (I have the white hairs to let me say that)

          As for a 486SX 25MHz… I wouldn’t expect that to play an MP3 in any reasonable way.

          Sure, Pentium 2s existed. But I was only agreeing that one was LUCKY to be able to play music at the time, not that it was impossible! People who were both enthusiasts and had full-time jobs certainly had better hardware than the stuff I am talking about. It wasn’t the 2000s though. Computers were just starting to become important items worthy of heavy spending by the average person. They were also a lot more expensive. Not many people had the latest and greatest in their homes!

          In the college dorm rooms of a school with a large percentage of education and nursing majors I still saw a lot of 486s and low end Pentiums running mostly Win98, AOL(gag) and MSWord. I even saw a few Cyrix chips but I learned quick to always refuse anyone asking for help with those! Evergreen 586 upgrades were pretty slick but I only ever saw one of those and it was at work where we weren’t playing MP3s.

          Being an “enthusiast” myself, I did better once I had a few raises in my college job. That wasn’t until very late in 98 or maybe early 99 though. Then I skipped Pentium 2 & 3 entirely. AMD was king! The K6-2s,3s and later the Thunderbirds were better performance at 1/2 the price! I couldn’t fathom why anyone bothered with Intel in those days. For extra cash I scratch-built AMD based PCs for people, undercutting all the commercial PC vendors by a lot and I never had an unhappy customer! I was so sad when they started falling behind and I had to pay the Intel tax again…

    2. If I remember correctly, old desktop CD drives had audio controls and analog audio out straight to the computer’s external audio port. The effort of playing CDs fell upon the dedicated CD reading hardware and not upon the computer itself.

      1. You remember correctly.
        Back then, I used a spare PC CD drive in my car as a CD player. It didn’t even need a dual voltage supply, it ran fine with 5V only, at both the 5V and the 12V input. And it supported skipping to the next title, by pressing the play button longer.

  2. > Thirty years ago, we would be lucky if a computer could play audio.

    I beg to differ. That would have been the end of the 80s when 12bit audio DAC was absolutely no problem (the DSS-1 synth was not exactly “top-notch”, it just had a nice keyboard). On the C64 we did 4bit audio DAC with built-in tech and 8bit with add-ons without sweating.
    My first Amiga arrived mid-1980s – and it was DEFINITELY capable of playing audio.

    So … that statement is (how do I put it politely) … hard to swallow.

    1. He said you would be lucky. Maybe you were lucky.

      All I had at that time was a Tandy 1000 HX, released in 1987. It’s sound capabilities were basically an advanced version of the PC beeper. It’s improvement was that it had multiple voices but they were still just beepers, not DACs.

      Some time in the 90s I got ahold of a driver that made the PC speaker pretend to be DAC. It kind of worked but it still wasn’t anything you wanted to listen to. I’d never heard of the Disney sound thing. I’d have built one if I knew about them! Nor had I heard of Amiga. I did know the C64 but had no access to one.

      So, yah, in my eyes you were lucky. I hope you enjoyed it!

          1. As in ADC. I don’t think it had that did it? I thought it was just generating tones. It could generate multiple tones at the same time and mix them which was advanced compared to a regular PC. Still, it was only tone generation.

            I’m thinking of the difference between .wav and .midi.

      1. A disney sound source was very disappoiting… a 12mhz NEC V20 was barely enough to play 11000Hz 8bit mono samples (progammed in asm, int 8 handler) . And that was after 1992.An Amiga would have done much better before 1990.

      2. let me reiterate.

        “Play Audio” says nothing about the quality of what you play or hear. We “listened to audio” in the mid-1980s using a very simply 2 bit datasette-based ADC on the C64. It was good enough to play back some simple drum sounds to accompany SID music. In my eyes (ears?) that accounts for “playing audio”, because “playing audio” does not come with a quality tack “you need so and so many bit and so and so much bandwidth”.
        We built our first sound “card” in the late 1980s – that was 100% capable of playing back 44kHz 16 bit audio (but the computer was pretty much doing only that then).
        Our first “8 bit ADC” used zDiodes. I am not saying it did a great job – but it worked with the C64’s parallel port and created quite acceptable 8kHz sound samples.

        It wasn’t “luck”, it was just being a hacker. It’s not like “hackers” only live in the 201x. And claiming that a few decades ago things weren’t easily available to a hacker if she just had the wits is simply unfair.

        1. No, I wasn’t talking about quality either. I was talking about playback of recordings vs generating chiptunes using tone oscillators. I had a Tandy. It only did the latter. You say your C64 had an ADC. I guess you could do playback then. Congrats! We didn’t all have that. Therefore I am labeling you as “lucky” and thus not a counter-example to Brian’s statement. He didn’t say that NOBODY had that capability!

        1. The Creative Music System was released in 1987. The Game Blaster was released in 1988. The Sound Blaster was released in 1990. It says as much on that very page that you linked to. Reading is haaaaaaard.

      1. Can I ask why Ada? I would’ve loved to see this in C or C++ but unfortunately for me I don’t have time to learn yet another language. A real pity for lots of us I’m sure. I don’t even have time to waste learning python and god I hate scripting languages so kudos to you for not using python!!

        1. Hi ,
          great job, can be quite tricky to set-up a codec with a buffer and external storage. However, I was wondering what is the benefit using Ada? It’s the first time I heared about this languange. I used to programm the STM32-µCs using CubeMX together with Kile.
          Regards
          Hans

          1. Thanks :)

            The Ada programming language is all about functional safety, that is, detect when the software is not doing what is supposed to do (bugs!). With Ada you know quickly and exactly what is going wrong instead of scratching you head for hours on a buffer overflow or uninitialized driver. This means less time spent debugging. And since I don’t necessary have a lot time available to develop this software, every minutes counts.

        2. Ada is still current in some real time control applications, especially in the military. So it could just be a language the author knows, and it’s appropriate for the application.

          1. Ada is mostly used where failure is not an option: avionics, railway, space, air traffic control but also banking for instance. SPARK, the formally proven subset of Ada, is making progress in security and automotive domains as well.

            Because of this niche market(s), many people think Ada is dead or not interesting for them. I actually think that Ada great for hacking micro-controllers, that is why I started some projects to make it more accessible.

        3. I use Ada because it is a language that I know and love. I give some reasons in the project logs.
          Learning a new language can give you a new perspective on the ones you already know and use. I really recommend to give it a try on the interactive Ada learning website: learn.adacore.com
          Ada and C/C++ go along very well, so you can very easily write a C synth and integrated it in Noise Nugget.

  3. I have an MP3 copy of “A bicycle Made for Two” from an IBM 7090 computer, recorded in 1962. But I am stretching things. 30 years ago, we had Ad Lib cards for the PC, which couldn’t play unencoded music – for that we had to wait for the Soundblaster two years later. (which promptly wiped the Ad Lib card off the market, because you could hear speech in games like Wolfenstein). Around about the same time IBM were trying to get people to pay 500 bucks for the IBM Music Feature, which was essentially a Yamaha FM synth on a PC card. Roland weren’t far behind with the LAPC-I, and easily outstripped the IBM offering in the marketplace.

      1. I accidentally left my old falcon 030 at an old house in the attic when I moved, damn that machine was awesome. The addition of the 56001 DSP meant not much assembly would give you so much audio processing power and the audio switch matrix was a great idea. Miss those times :(

  4. Well, I suppose if you had an Apple II, you were lucky compared to the owners of a TRS-80 or Commodore PET, since only the former had (very meager) built-in sound capability. But then the Atari 400/800 came out with much more capable sound hardware. Eventually, also the C64.

  5. Lots of comments about “computers” not being fast enough, but the fact is they have been fast enough for far longer than 30 years. The problem is that the Operating Systems and woefully poor achitecture of most computers let the side down. It has only been since processor speeds reached the hudreds of megahertz that these issues could be overcome with simple raw processor speed.

Leave a Reply to ZaphodCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.