**Update**
The full build guide is now available here:
**End of update**
*************************************************
Part 2 now available;
https://bloghoskins.blogspot.com/2020/06/helios-one-arduino-synth-part-2.html
*************************************************
This is the first part in a series covering how to make a MIDI controlled synthesizer using an Arduino Uno and the Mozzi library. By the end of Part 1 we'll have a midi controlled synth that you can select between two waveforms, Square & Saw.
Before we start you'll need to go to the mozzi website and download the library, and also the 47 effects MIDI library for Arduino. Make sure these are both installed into the Arduino IDE before uploading the code, otherwise it won't work. Read the respective links for info on how to do this.
Here's the circuit for the MIDI Input;
Ignore the line leading out to the optional MIDI thru... we'll save that for a bigger synth and for now just concentrate on something simple. IMPORTANT Notice on the arrow out to the RX pin, it says to add a switch: this is to stop the circuit interfering with the Arduino while you upload the code. You could always just disconnect this wire whenever you upload if you like, but you'll need to use one of these methods, otherwise you'll struggle to get the code onto the Arduino.
To hear the audio output, we'll use the following circuit;
There's no need to add the 1meg pot for audio volume just yet, that'll be for later.
Choosing Oscillators
I drew out a few different designs for oscillator selection, but decided as this is meant to be a simple synth, I'd keep it as simple as possible, so settled on using a simple switch to choose between two waveforms. Here's some of the ideas;
And what I settled on;
This was used as it only requires one drill hole, I could've used a pot to choose between multiple wave forms, and that would've also only needed one pot, but I like the feel of the switch and the fact it's position is visible.
To hook up a switch, run a cable from Arduino pin 2, to a breadboard with a two way switch (with 3 pins). Have the arduino pin 2 cable join to the switches center pin. Connect one other pin to ground, and the remaining pin to 5v. When the switch goes high or low, the arduino will see this and change the waveform accordingly.
When all is set up, you should have something that looks a bit like this;
Now we need to upload the code, remember to disconnect/switch the RX pin off from the breadboard before uploading, or you'll struggle to get the code to run (and remember to re-connect it again after, or you'll also struggle to get it to run!).
Here's a link to the code;
https://github.com/gary909/Helios-One-Synth-V1
Just download the .ino file and open it in the arduino IDE. Make sure you have the correct USB port selected and that the board is set to 'UNO'. Then upload the code. You should be able to control the arduino using a MIDI keyboard, and to change waveforms using a switch.
We'll keep adding to it to make it a more fully featured synth in the next part of this series.
Also if you hear lots of hiss from the audio, try powering the Arduino from anything other than a laptop... that most likely where the noise is coming from.
Cheers.
Superb start. Thank you for posting.
ReplyDeleteThis is awesome!
ReplyDeleteCheers :-)
Delete