Wednesday, 30 November 2016

DIY Arduino String Synth

DIY Arduino String Synth With Analogue Filter



***Updates at bottom of page - Easy to read Schematics etc****

Just like the Arduino Drum Machine, this is another build based on the amazing work of Jan Ostman, who is generous enough to share the code over on his website;

***Old website***
***New Website***

The suggested $3 dollar donation is quite simply amazing value for money, so if you use this, don't forget to tip!

On top of Jan's work, I've added a 12db filter with resonance (based on this design) to add a bit more sound sculpting to the synth.  Filters are a massive part of synthesis to me (mainly because I can't play but can quite happily turn knob) and an analogue filter really adds to the warmth 'wobble' of the synth.

The filter has a separate on/off switch and bypass switch.  Looking back it would've been better to build that into one switch, and also to move the output further to the right.  Ahhh the power of hindsight.

I wanted the synth to look very Minimoog-ish or Prophet 5-ish, which I think I achieved, but building the case was by far and away the hardest part of the build (due to my own inexperience/stupidity).

Total build time was spread over 3 months and probably took about 20 hours (most of that time was spent staring at nothing trying to think what to do next).  If I were to make it again I think I could get it down to about ten hours, if luck was on my side.

Here's a quick video of it in action;




Parts

The total cost of parts came to about €60, with most of that going on the MIDITECH midi keyboard. I used a cheap Chinese Arduino Nano clone to keep the cost down (around €2), then a few pots and resistors etc again from China. Also high quality plywood from Modulor for €2.90 (I think it was 6.5cmx250x500). The perspex was also from Modulor. Obviously if you don't already own wood stain and glue etc your cost will be significantly higher. For the panels I used my banggood laser engraver, which I think adds massively to the look of the synth.  If you don't have one of these you could use a label printer.

Electronics

Jan's website documents the build process pretty well, so go check there for schematics etc.  I did manage to draw up the wiring diagram which may save somebody a bit of time when hooking up the keys (find it somewhere below).

I started by taking apart the MIDITECH and unplugging the ribbon cables;


You won't need this part any longer so remove it to save some space;


I soldered the Arduino Nano to some perfboard to make it easier to handle (and to screw down to the chassis later on).



Then using some ribbon cables I began to figure out how to connect the keyboards out's with the Arduino's In's.





Eventually I figured out what went where and soldered it all down and covered the connectors with heat-shrink. You'll probably save a bit of time if you use this;



That's the majority of the synth finished!  From the nano's output I added a bypass switch and then the 12db filter.  I forgot to take any pictures of that though until it was already attached - sorry!  But it all fitted onto another small perf-board;


The Case

I started by cutting some cheap board and securing the key-bed onto it.  This gave me an idea of the final size of the synth to which I based my design around.  I kept the bottom plastic of the MIDITECH (always capitals!) keyboard because it would secure down easier (using it's screw holes) and also because it would probably be a pain to try and re-construct it any other way.  I also added some 'feet' at this point.


Feet...



With bottom panel size known,  I sketched out the rest of the case...


The side panels;



All the parts have been cut here (the other bit of perspex with the dials on was temporary just to make sure it was still working);

Notice the pencil with my name written on it.  That's mine it is.

Then using my old friend Ponal Wood glue I started sticking everything together (including fingers, clothes and everything else);







Then it was time to design the front panel and the laser engrave it onto perspex.  The smell was awful (and toxic)...  I stayed in the room long enough to feel faint.  I did sleep well that night though.

Running a test on card;


Burn!



After it was engraved I filled it in with white acrylic paint;





 With the panels and case completed it was time to stain the wood.  I used a mahogany brown stain, using two or three coats.  The trick here is not to use to0 much and to keep it moving when it's been applied, otherwise you'll get an uneven finish.






 Once this had dried it was time to add the varnish.  Like with the stain, I find it's best to use only a tiny amount and spread it out as much as possible to get the best finish (you can always add another layer later).  With this synth I found one layer to be enough;


Once this has dried you can now put it all together.  For extra security I also used some hot glue to do this (and it's not fallen apart yet)




I added screws to secure the perspex panel but can't find a picture of that. But I'm sure you can imagine what it looks like.

Conclusion

Overall I'm pretty happy with how it turned out, with only a few gaps in the wood caused by my rubbish cutting/maths skills.  Should I make it again I'd move the output over to the far-right as I've noticed it's possible to knock the cable when going mad on the filter (you should only touch a synthesisers knobs as if they are really hot, otherwise you're not a real synthesist).

I've been learning C for a while, but it's a massive mountain to climb.  From here though I've bought the following book;

When I eventually get around to reading it, it should give me a better idea of what's going on in the code, then I'd like to attempt a version 2 using maybe an Arduino Due and add some more controls.

Thanks!



****UPDATE****
SIMPLIFIED SCHEMATICS

Below is a simplified schematic for the string synth...  Sorry it's not the best quality I'll try and take a better picture later, but hopefully this should be of help those of you new to schematics that want to try and build this synth.

The connections where it says 'goes to keyboard', you can see elsewhere in this blog for another detailed diagram of where and how these can be wired up to the keys.   As for the potentiometers, I *think* I've drawn them the correct way (if you make this and the pots are working the opposite as you'd expect, swap around the ground and 5v connections on each pot).  If the drawing is incorrect, let me know and I'll re-do it. Even if this version is wrong, nothing will break & it'll still work OK (just the pots will work in reverse).

You can see where the pots 5volt and ground connections need to go in the diagram, I didn't join them in the picture because the wires would start overlapping and become confusing.  It's pretty obvious what to do though.

Also drawn is the audio out headphone socket, with the positive voltage/audio signal coming from the output D11, which then goes through the resister/capacitor (which acts as a filter to reduce some of the noise from the Arduino).  The other side of the audio goes to the ground signal.  If you don't know how to wire up a audio jack, maybe google 'audio jack pin-out' or 'audio socket wiring diagram'.

If you plan on adding the analogue filter, you'd leave off the audio jack and have the previously mention positive wire go into the input of the filter.  You'll have to learn to read the schematic for that I'm afraid, as I couldn't really simplify it without it becoming more complicated than a normal schematic.  Give me a shout if you get stuck though.

Good luck!

P.S

I'll draw a simplified schematic for the Arduino drum machine soon.



****UPDATE PART 2******

Below is a wiring diagram to add a bypass switch to the filter;




...And if you were struggling to figure out how to wire up the Pots for the filter, I've drawn out a simple picture showing how (I've had to do this whilst away traveling, so it's partly drawn from memory but I'm pretty certain it's correct)...

Obviously the drawing only shows how the pots are wired and not the full schematic.  Go look at the proper schematic for the rest of the plans, but this will give you a good idea of how to wire up the pots.




Powering the filter from a 9v Battery will give it it a bit more 'oomph', so if you'd like to do that, the below illustration will give you an idea.  Further, should you want an LED indicator showing if the filter is switched on or not, see the chequered box;


I only had SPDT switches available when I built the synth, so that's why there's separate switches for both the on/off & bypass, but you could easily just use one 2PDT to save space.  You could even add an audio in jack at the start of the filter to process other audio.

Good luck!

***UPDATE Arduino Drum Machine****
Simplified Schematic

Ok, so this 'simplified' schematic might not actually make things any simpler!  But some people have asked for it, so maybe it'll help clear somethings up a little bit - especially how to wire up the audio output and pots/switches.  This was drawn from memory so I hope it's correct - give me a shout if not and I'll update (the pots might work in reverse, but they'll still work).  I'd also urge you to look at the schematic on Jan Ostman's website for more help;

https://janostman.wordpress.com/the-o2-source-code/


Thanks!

171 comments:

  1. Hi i m realtà interesting in build one!but i ve no skills in C++ lenguage!could you help me with info at youthbooking@gmail.com?thank you

    ReplyDelete
    Replies
    1. All the code has been written already, you just need to upload it to an Arduino. You can find the files here; https://janostman.wordpress.com/how-to-build-your-very-own-string-synth/

      Delete
  2. This is amazing! I want to build one of my self! But can you explain, where The Sound goes out of the Andurino? And where on the andurino the Potis connect!? thanks alot

    ReplyDelete
    Replies
    1. Hi du kommst ja aus dem Lande, Wahnsinns Teil, klingt auch noch echt klasse!
      und sieht aus wie ein Moog! ;-) Super Arbeit. Sag mal, du erklärst in deinem Diagramm super, wo die Tastatur dran kommt, aber ich frage mich wo die 3 Potis an den Arduino kommen, und wo der Soundoutput drauf gelegt wird. Ist es viel Arbeit mir das darzustellen? Würde mich über eine Antwort riesig freuen! Will das Teil für meinen besten Kumpel zum Geburtstag bauen! Grüße

      Delete
    2. Hi!
      Ja, die beiden Sachen würden mich auch interessieren. Ich werde aus dem Schema bei janostman nicht ganz schlau.
      Danke!

      Delete
    3. Hallochen! Leider mein Deutsche ist nicht Super (bin Ausländer im Deutschland!), aber ich habe google translate! Morgan oder uber-Morgan ich kann schreiben/zeichnung ein einfach-freundlich schematic für dich. Danke!

      Delete
    4. That would be fantastic. I'm also studying your project and would like to make one for myself. Thank you very much in advance.

      Delete
    5. And for those you who are interested in nice front panels (especially people from europe). There is programm called "Frontplatten Design" where you can create your front panels. You can even send it directly to production. The price will be calculated in advance.

      Für all die, welche passgenaue und schöne Frontplatten haben möchten. Es gibt ein Programm genannt "Frontplatten Design". Dort kann man eine Frontplatte nach Wunsch designen und direkt bestellen.

      Delete
    6. I've just updated the blog with an easy to read picture: hopefully this should be all you need to make the synth. Look for the last picture for a full write up. Will draw a simplified drum machine schematic soon. Thanks!

      Delete
    7. wow, thank you a lot! very helpful!

      Delete
    8. I also think the scheme on http://tonylight-leploop.blogspot.de/2012/01/12-db-low-pass-lep-filter.html is very clear, but what I do not understand is exactly where Potis for Cutoff and Resonance come. Would you be so good at least to give us a little better illustration. Thank you very much

      Delete
    9. It also does not open up to me where or how I build the bypass switch between

      Delete
    10. I'm away at the moment, but I'll draw it out as soon as I get a chance. Thanks!

      Delete
    11. You are the best man! Thank you a lot!

      Delete
    12. I've updated the page with a few other drawings and things showing the pots and bypass switches etc. Good luck! Let me know how it goes!

      Delete
    13. Hi Hi, thank you soooo much! :D

      Delete
  3. Verrry nice!!! Thanks a lot! :)

    ReplyDelete
  4. Hey folks, I made a MIDI module version using the 28-pin PDIP version of the 328. The only needed change is using analog MUX channels 1 to 3 instead of 5 to 7 as channels 6 and 7 are only on the 32-pin device. Also, it might help solve some noise issues if you use A/D input weighting to stabilize the pot values, here is my main loop as an example:

    void loop() {
    digitalWriteFast(4,TRIG); //GATE jack
    digitalWriteFast(5,TRIG); //GATE LED
    //---------------------------------------------------------------
    //--------------- ADC block -------------------------------------
    while (bit_is_set(ADCSRA, ADSC)) ; //Wait for ADC EOC
    // Truncate A/D results to 8 bits and use exponentially-weighted sample averaging
    ADsample[MUX] += (((ADCL+(ADCH<<8))>>2) - ADsample[MUX])>>2; //
    if (MUX==3) PHASERMIX=ADsample[MUX]; //Ensemble
    if (MUX==2) {
    MOD=ADsample[MUX];
    DETUNE=MOD>>1;
    }
    if (MUX==1) {
    ENVELOPE=ADsample[MUX]>>3; //Contour is a 32 element pair of tables
    ATTACK=ATTrates[ENVELOPE];
    RELEASE=RELrates[ENVELOPE];
    }
    if (RELEASE==255) GATED=0;
    if (RELEASE!=255) GATED=1;
    if (DETUNE!=olddetune) {
    olddetune=DETUNE;
    for (uint8_t i=0; i<4; i++) {
    if (FREQ[i<<1]) {
    FREQ[(i<<1)|1]=FREQ[i<<1]+(((FREQ[i<<1]/50)>>0)*DETUNE/127);
    }
    }
    }
    MUX++;
    if (MUX>3) MUX=1;
    ADMUX = 64 | MUX; //Select MUX
    sbi(ADCSRA, ADSC); //start next conversation
    }

    Just be sure to put a uint8_t ADsample[4] = {0,128,128,128}; up in the variables list

    Scott Rider
    cs80.com
    /**/

    ReplyDelete
    Replies
    1. Thanks Scott - I'm planning on building a module version at some point, will keep this in mind

      Delete
    2. When will you make the midi version of that string machine? Greetings!

      Delete
    3. I'm pretty certain Jan Ostman had added midi-in to the code. there are a few other projects that already do this; https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string-synth/

      Delete
    4. This version also has midi -https://www.instructables.com/id/The-Strings-Theory/

      Delete
    5. I have tried the code from -https: //www.instructables.com/id/The-Strings-Theory/ and from - https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string -synth / but none responds to MIDI messages

      Delete
  5. That's cool! How about to adding /GATE signal for gating external ADSR envelope for filter? Excuse me for my english, but my english very bad...

    ReplyDelete
    Replies
    1. I think if you look on Jan's original schematics, there's a CV out from/near one of the pots, which could then be used to further control modules. I didn't use it in my version, but it would be very easy to add

      Delete
    2. These two versions both have gate out (with led indication ) and one has cv in.They both have midi in as well.
      https://www.instructables.com/id/The-Strings-Theory/
      https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string-synth/

      Delete
    3. Correction to my previous comment:- Only morocco dave's version has gate out and cv in!��Both have midi in.

      Delete
  6. Hello,
    My congrats for the synth.
    I tried this, but the octaves give all the same notes, it's the same octave all keyboard.
    Anyone else with this problem?
    Thank you

    ReplyDelete
    Replies
    1. Are you using the same keyboard as I used to build the string synth? If so, double check the simplified wiring diagram I posted. Or do you mean clicking the physical octave buttons on the back of the keyboard doesn't change the octave? These octave functions will no longer work once the Arduino is hooked up. Jan also posted code to make this unit controllable via MIDI, maybe upload this code & see if you can control it OK using an external controller?

      Delete
    2. Thank you for your response :) I explain better: In the physical octaves, when I press the key for example, the G, any octave sound the same note. In your video doesn't work like that, it's perfect :) Another thing is, when I press the same key, it changes the pitch random, like diferent notes in the same key. I changed the code so it works on Arduino Mega ADK, and the keyboard is diferent, but as also 8 col, 5 rows. I have working hard on this project, made a button to control or not the phaser, make it work on MEGA ADK, this is killing me :) and I'm using a LCD for fun. I will post my progress, maybe people get some ideas :) But still with that problems. Thank you so much and my congrats :)

      Delete
    3. And i alredy know the schematics from memory, triple checked averything :) I'm getting an overdose :D I'm dreaming with this :) well, I keep trying to see what I get and will tell. Thank you again :)

      Delete
    4. I've not used an ARDUINO Mega, but I think it has more analogue/digital pinouts? Maybe the pins are assigned to different numbers? Or maybe the code needs to be changed to reflect these differences? Sorry, I can't really be much more help than that :-( it might be worth getting hold of an ARDUINO nano and getting it to work on that first, then troubleshooting between the two?

      Delete
    5. Yes, Mega has more digital pins. I assigned to the numbers it should, I will keep trying, I was checking if somebody has the same problem. Thank you so much anyway :)

      Delete
    6. No worries! Best of luck to you!

      Delete
    7. Hello, I got it. It simp.ly doesn't work with another boards. I'm using a chinese NANO, the pins are burning, it's normal? LOL This is a Rammstein synth. Thank you all :D

      Delete
    8. Forget, now it's just normal. No rammstein. working so cool

      Delete
  7. Hi, would you be so nice and tell me, because I don't get it, how to connect the stereo Pot in the Filter schematics. I've tried my best here: https://easyeda.com/Synthfreak/String_Synth-472ef0d33d1b477ea43f95774c78a053
    Thanks

    ReplyDelete
    Replies
    1. Drawing it in a schematic program? Hmmm, I guess you'd either use a dual-pot in the footprint library (which you might have to create yourself), or maybe two single pots? Here's the original schematic from the electro-music forums, it might be easier to use this as a reference;
      http://electro-music.com/forum/topic-51780.html
      Are you planning on making a PCB? I'd suggest making it up on a breadboard first for reference incase you find a fault. I think if I were to make it again, I'd use a DPDT switch for the filter bypass, with one side switching the input to/from the filter/arduino (as the SPST does in the version I posted), and the other half of the switch switching the output from the filter/arduino. On my original version the outputs were joined and I'm not sure if part of the filter was leaking into the 'pure' Arduino output... a DPDT switch would fix this though.

      Delete
    2. Hi, which Pots are you using for Ensemble, Contour and Modulation?

      Delete
    3. Sorry for the delay, I'm using standard 10k pots

      Delete
  8. This comment has been removed by the author.

    ReplyDelete
  9. OK, Thank you very much. I firstly wanted to do a PCB, because it seems to be a lot easier. One more question, does the Arduino has to be powered by a second battery, oer via the USB Port, or via the Battery of the Filter?

    ReplyDelete
    Replies
    1. You have a few options;
      1. Power everything over USB (have one of the nano's 5v output pins connect to the power supply of the filter). This option would be simplest, but the filter might not sound as good. You could perhaps step-up the voltage for the filter to 9v, but you'd need to look into this.
      2. Power it with both a battery and usb, like in my example
      3. Power everything from the 9v battery... I've not looked into this, so you'll need to do a little research; I don't know if the Nano can except more than the 5v, so you may have to add a simple 7805 power regulation circuit into (I think) pin 30 (?!?) of the nano?

      There are probably other ways to!

      If you're making a PCB you might also consider ditching the Nano and using the raw components for that instead (you'll need a 7805 power circuit here anyway). I've just got some PCB's back for my drum machine & luckily it worked first time, but I did breadboard it before-hand, so I'd definitely advise on doing that and seeing which circuit works out for you best!

      I've been listening to your soundcloud music while typing this - nice! - just sent you a friend request (or whatever it's called on soundcloud)

      Delete
  10. hi there! greetings from Greece!
    i have a question i would like to ask!
    i uploaded the code on a cheap CH340xx arduino nano v3, upload went just fine!
    i used a multimeter device to determine columns & rows on an old EMU Xboard25, ok with this too!
    connecting clavier on arduino, ok!
    i didnt connected the pots thou but ove my enthousiasm i powerd up the arduino, hit the keys no sound came oute... are Pots essensial for the output signal??? i can hear my speaker making a short pulsy noise as i plug in the power, but thats it!
    thanks in advance

    ReplyDelete
    Replies
    1. Hey Ganesh in Greece! If you want any control over the sound you'll need to get some pots, but if you don't mind it staying at a constant you could always swap them out for some resistors? If you're only bread-boarding it, you can pick up some trim-pot resistors for almost nothing;
      http://www.ebay.co.uk/itm/10Pcs-DVD-VCD-10K-Ohm-Trim-Pot-Potentiometer-Top-Adjustable-Resistor-BT-K5J2-/282434710389?hash=item41c26bab75:g:kCEAAOSwHHFY8rjJ

      Delete
    2. This comment has been removed by the author.

      Delete
  11. Hey Blog! thanks for your quick reply! seems you're still active rather than Jan... he never answers man! :/
    well! i do have pots, res, caps n stuff... i made a bill of materials as soon as i decided that i was going to start this project!
    the reasson im asking is because on my breadbord at this very very moment there are only 2 things... the arduino & the keybort wires, but as soon as i plug the power on arduino and hit a key, nothing comes out from the output... thats why i asked you if the pots are essential or relative to the output signal... because im not getting any output signal! well, not with my current set up at least
    ;p

    ReplyDelete
    Replies
    1. Sorry I don't have it breadboarded anymore to check :-( I think Jan posted the code to make it MIDI controllable, so you could try that version, then see if you can control it from another MIDI keyboard. That would at least tell you if it's a problem with your keys. Also, if you're using a cheap nano clone you should double check the pin-outs match with a normal nano. And have you verified that the nano is working? I'd run a quick blink sketch to double check. That's all the things I can think of off the top of my head. Good luck!

      Delete
  12. i did verified the board! i found the same code somewhere else online and they implemented some serial commands trough the serial monitor option of arduino IDE.
    so... output works fine, but i think it must be something with my keys... in your version of the synth, hiting keys will give you variables of 10010000/10000000 in Serial Monitoring???
    i ll check again my keys due to their 8x8x4 wiring matrix, i mean my keyboard has 20wires instead of typical 8x4

    ReplyDelete
  13. >>so... output works fine, but i think it must be something with my keys... in your version of the synth, hiting keys will give you variables of 10010000/10000000 in Serial Monitoring???

    Sorry, I don't have it hooked up anymore to test for you :-( Maybe this video might be some help to verify the keyboard wiring (skip to 1min30sec);
    https://www.youtube.com/watch?v=lXX8v-ZW6Tk

    ReplyDelete
  14. Thanks Gary! for all of your help! ^^
    i did follow the procedure to find out my matrix! but still no sound... :/
    i read somewhere that if i short circuit the A0 pin with D5 pin the arduino will play a note...
    im only asking that because i did tried to do that bu still no sound and im starting to think that maybe theres some modification that need to be applied on the source code ^^
    Thanks again!

    ReplyDelete
  15. I ll like to build somethig like this but without keyboard, with a midi in instead

    ReplyDelete
  16. The code is out there to make this!

    ReplyDelete
  17. I just got the parts to build this! Thanks for such a great information!
    I'm doing gate out / no filter so I can hook it up to my modular (built a cool ms20 clone recently). Also gunna hook the Nano up to a 9v in (with toggle and LED) so I can power it with a standard wall wart.
    I hope it comes out looking as professional as yours!

    Pot values really don't matter? Gunna breadboard it with b100ks and see how that works first.
    Thanks again!

    ReplyDelete
    Replies
    1. I can't remember the exact pot values - it was either 5 or 10k. I think 100k will work, but you might find only a small turn will cause a large change, and then a large portion will do nothing. Best of luck though, and it'll be easy to swap out if not. Maybe post pictures somewhere?! :-)

      Delete
    2. I can't wait to build a case for it and share it!

      I have it on breadboard now but the Arduino code keeps getting error messages when I try to verify and tbh I don't know all the much about software. I'm using a Nano knockoff from Tayda, but I got the LED tester experiment running so I think it's connected correctly. I asked the muffwiggler forum post about it, but every Arduino question seems the same: "how do I make this work here's almost no information about MY problem HELP"

      I guess this is going to be a long term project.. but I needed a good reason to learn Arduino formatting so maybe its a good thing...

      Delete
    3. Hey Anders! The arduino from Tayda is probably ok, try running the blink sketch and see if the LED on the board flashes, then you'll know the arduino is working ok (if you don't know how to do this, there's bound to be a YouTube video). What error messages are you getting when you run the string synth code? Have you copied everything ok? If you're missing the end bracket it won't run! Also, make sure you're browser doesn't copy any extra spaces (they might even be invisible indented-blank spaces). When you get the error messages, it'll usually have a line number where the error is present take a look and see if anything looks different to the code you copied. Also, double check the arduino software is set up for the nano and not the Uno (which is it's default setting).

      Delete
    4. Thanks for all the help!

      The code issues were just spaces that shouldn't have been there. It works fine except three notes (middle G and two in the upper octave), but I'll double check the code later and can hopefully work it out.

      I tried to power it with a 9v power supply to the Vin and G but it added a lot of noise. USB sounded fine. Might eventually add a regulator to use the 9v power supply later, who knows.

      I'll send some photos when its done for sure!

      Delete
    5. Awesome - Glad you're underway!

      Delete
  18. Hey man, really cool version! i'm about to start building one myself and i wanted to know if it was possible to use it as a module, like with 5 pin MIDI ports.

    ReplyDelete
    Replies
    1. Hi Martin, See the comment from Scott Rider above for some help with this. Also, Jan Ostman talks about it in this post; https://www.muffwiggler.com/forum/viewtopic.php?t=146006

      Delete
  19. Hi I made the synth and put the firmware onto Nano and also included the code to handle 5 pin din midi although i havent connected this up yet. I also built the 12db filter on strip board. All the keys play single notes fine with the analogue filter bypassed. But when i put in the 12db analogue filter the third 'F' note plays along with a much lower BASS note, this is the only key that does this. I checked uner the keys for shorts (although i haven't lifted off the metal part)but this only happens when the analogue 12db circuit is in when its bypassed it doesnt do this, any ideas its driving me mad? Would appreciate your help.

    ReplyDelete
    Replies
    1. Hi Mark! The analogue filter shouldn't have any different effect on just the one key, so I'd rule that out. Are you using the same miditech (?) keyboard as I've used? If it's another type it may be set-up slightly differently and be causing the problem? I've not used the midi-out code, so I can't say for sure this works without problem, probably a good first step is to upload the standard code and confirm that's working first, then troubleshoot from there. Good luck!

      Delete
    2. Hi, Thanks for the quick reply! I did get the MIditech Garagekey Mini, but on my invoice it showed a Mark 2 version, looking at the pictures I think it's the same as the one you used. I have had a thought, the external midi circuitry would pull up the pin to +5v if it was in circuit and go low when data is coming through, at the moment I have nothing connected to the midi in (Rx) pin so it's sitting at ground,maybe this is the cause. Perhaps I should put in the circuitry for the midi as well. But yes you are right I will upload the standard code and see if the problem goes away. Will let you know how I get on, best regards.

      Delete
    3. Still haven't built the proper circuit, however I did use a pull up resistor on the Rx pin and the second note disappeared so I think all looking good for when I do add the midi circuit proper and no firmware re burn necessary to check! Will get it done soon been concentrating on a panel design and I have a different switch circuit for the filter which will look great when it's all done. I heard my panel was cut and etched today :-)

      Delete
    4. That's some excellent sleuthing there! I keep meaning to build this as a stand-alone midi-controlled box but can never find the time. One day!

      Delete
    5. Thanks, I know nothing much about NANO hardware, just wondered if they have such things as internal software pull ups, or indeed if there is one on the RX pin to switch on. It would really make sense to turn it on in software if there is to prevent this from occurring. Although once the circuit is connected correctly on the outside its fine. My panel should be here Monday I will make a last effort to finish it all off including the MIDI circuit, I have an opto coupler not sure what sort it is so have to experiment on the right pull up resistor to make everything work properly and fully test again. Regards Mark.

      Delete
  20. Hi Gary.

    The Infinity37 source-code is now up at:
    https://janostman.wordpress.com/infinity37-a-fully-polyphonic-diy-synth/

    The Infinity37 is fully polyphonic with the MIDITECH keyboard.

    ReplyDelete
    Replies
    1. Cool, thanks for letting me know!

      Delete
    2. Hi,I'm building both the minipops and string synth and have successfully uploaded the minipops code to an arduino nano.However I'm having problems with the string synth code,it doesn't finish compiling. A fault code pops up before uploading.I'm using the official code.has anyone else had the same problem?

      Delete
    3. I think the nano doesn't have enough pin-outs, so that might possibly cause it not to compile? Also, check to see if you have all the required libraries.

      Delete
    4. Thanks for replying so quickly. I'm new to arduino programming. Don't all nanos have the same number of pins? Which libraries do we need?The janostman site simply says "copy and paste the code" but it seems it's not that simple.

      Delete
    5. Oh sorry, for some reason I thought I'd used an Arduino Uno rather than the Nano. So it should work without a problem if you're also using the nano... Can you post the error you're getting?

      Maybe you've copied and pasted too little or too much? Some browsers copy extra html data, so make sure it hasn't added some extra text like >> at the start of some sentences. Use a tool like https://www.diffchecker.com
      To compare the code in your Arduino sketch compared to Jan's code.

      You've made sure the nano is working correctly with another sketch ('blink'is a good one)?

      Delete
  21. Yes,"blink" definitely works,i've even found out how to change the mark/space ratio.Its more likely my browser as you say.I'll try that diffchecker next.Error code to follow.Many thanks.

    ReplyDelete
  22. Hi once again.The Error Code is - " '#' is not followed by a macro parameter".

    ReplyDelete
    Replies
    1. Hmmm.... Sorry I don't know off-hand how to fix this error. I tried googling it and couldn't find an easy answer! Some things I'd suggest;

      1. Check the error message incase it tells you which line the error is happening on (it might just be (34) after the message etc. Play around with this line (maybe delete the hash if it's there and see if it makes a difference). See if the same hash is present in the code shown on Jan's website.

      2. Check out which version of the arduino compiler you're running... You might have a newer version, in which case you could find the older version relevant to the time Jan posted the code.

      3. Re-upload the code to the software using a different browser... maybe 1st paste it into wordpad, then copy it again from here into the arduino (I think wordpad only allows basic text with no extra html)

      Delete
    2. Good morning Hoskins.Well,I think I've cracked it!The first code I used was straight off the web page,then I used the "view raw" version direct from github.I compared them in diffchecker and found huge discrepancies!Next I copied the github code into a blank sketch and successfully uploaded it to my nano.
      Now where did I put my soldering iron?
      Thanks for all your help.

      Delete
  23. The String Synth is great! Thanks Hoskins!
    just have some problems with my keyboard. It is a 32Keys, 12wires , 6x6 matrix and the first key from the left is "F". So the notes don't match the keys. any way to fix the?
    still building the filter part... don't understand the connections yet.
    is it possible to add CV pitch and gate inputs?

    ReplyDelete
    Replies
    1. It took me a while to figure out how the connections worked... You'll probably need to take notes as you swap around the wires. If you look up this page and find a photo on graph paper called 'String Synth Connections' you'll see what wires you need to re-arrange (A0, A1, A2, A3, A4, D2 until D9). All these connections will change which keys do what. I just randomly re-configured these connections until I got the keys working, but you might be able to peek into the code and see if that saves you time? Sorry I can't be of much more help... I know over on Jan's website people haven't been able to get the keyboard working with really cheap Chinese toy keyboards as they don't contain enough Diodes, hopefully yours will be ok. Also, I believe there's already a gate-out on pin 10. Thanks & goodluck!

      Delete
  24. Excellent work on this you and Jan have inspired me. Audio out off the nano... Mono or stereo? Im writing up a parts list and need to know what sort of 3.5mm socket i should be using.
    Many thanks

    ReplyDelete
    Replies
    1. Thanks very much! The output is mono but if you only have a stereo jack just wire the one audio output to both the left and right connectors and it'll work (but obviously still be mono). You could also swap the 3.5mm jack for a guitar jack, it'll still work the same way. Best of luck!

      Delete
  25. I would like to use the schematics provided here, and would prefer to use the same keyboard, but the shipping price is very here for where I live. How can I know what keyboards I can use that will still have the 8x5x2 matrix, or use the same schematics? I am new to this sort of thing and would like to not have to change the design for a different keyboard.

    ReplyDelete
    Replies
    1. It would be impossible to know what a keyboard uses unless the company provides a schematic etc, or you physically take it apart. Lot's of people have tried this project with cheap children's keyboards and run into problems, so I'd probably suggest paying extra for the correct keyboard if you don't want to run into problems... maybe you can find it cheaper elsewhere, ebay or amazon or something? Miditech also list distributors on there website, maybe you're near one of those;
      http://miditech.de/en-126-Distributors

      Delete
    2. If I were to use a different keyboard with a different matrix, would it be a matter of shifting some of the code around, or changing the connections on the schematics?

      Delete
    3. After reading some of the comments over on Jan Ostman's blog, people have had trouble with the polyphony after using cheap childrens keyboards... they only allow 1 or two voices through, but I guess it depends on what keyboard you get hold of. Jan also has a schematic of the keyboard layout; it's loads of diodes in a matrix and the keys are just momentary switches. The amount of diodes in this configuration lets the polyphonic signals through, a cheaper keyboard physically might be unable to do this, even if you changed the code around. Saying that though, I'm often wrong, but it might be easier to build this matrix schematic on a breadboard, get it working properly then strip out a cheap child's keyboard and add it to that.

      Delete
  26. Right now I have an M-Audio Oxygen 25 with an 8x8 connection for the keys. https://imgur.com/gallery/xbQg1
    That link has an image of it, any suggestions about if that would work and how to make it work would be greatly appreciated. Honestly, if it comes to the point where I only get 1 voice through, I would be fine with that for what I need.

    ReplyDelete
  27. I can't say 100% but you should be able get something to work, if not the whole thing. You might be lucky and have it work the exact same way as I've drawn up in the instructions, so give that a try first; hook up the cables to the appropriate pins on the arduino (you might be able to jam the wire into the keyboard connector, rather than cutting the wire to expose it while you test). Then when connected go through and play the keys and see if you get any sound. It took me a while to figure out the connections for this, and remember some of those cable connections are for midi data so you won't hear a sound for those particular cables. If you do hear a sound from the key, write down that particular note on some paper so you build up a map of key positions relative to that cable... also one cable supplies more than one note, so go through the entire keyboard and see if you hear any other keys triggering... once you know what goes where, you just need to then connect the correct pins of the arduino. Hope this helps!

    ReplyDelete
  28. Hi hoskins. Can you give me an idea on what capacitor to use. Im searching 100nf and getting millions of options. Thanks

    ReplyDelete
    Replies
    1. Any will work, but I'd recommend Mylar ones over ceramic as apparently they sound better for audio;
      https://www.taydaelectronics.com/capacitors/polyester-mylar-film-capacitors/0-1uf-100v-5-mylar-film-capacitors.html

      https://www.ebay.co.uk/itm/20-x-0-1UF-100NF-100V-5-Mylar-Film-Capacitors-2A104J/352217348153?hash=item5201ca3839:g:My8AAOSwSutaFo5H

      Delete
  29. Did need to power both the arduino and the keyboard, or since the keys are basically acting as a switch would they not need separate power?

    ReplyDelete
  30. Hi, i was able to get my hands on a garagekey 37 but the model i got has ffc cables instead of pin based connections for the keys, can i it instead of the original project?

    ReplyDelete
    Replies
    1. I guess it should work exactly the same, you might have to order FFC jumper cables though. Best of luck!

      Delete
  31. What type of audio out are you using? I have a 3.5mm out with 5 prongs, and I'm not exactly sure how to connect all 5 pins to the arduino with this code/circuit. Could use some help connecting it

    ReplyDelete
    Replies
    1. I use either a mono 2 pin, or stereo 3 pin (& only connect two of the pins). I think 5 pin ones are for when you take out headphones, then it cuts to speaker?Basically you need to connect ground and and one positive pin. Ground will be at the base of the audio jack... maybe plug in the jack into the switch and see if you can see which pin connects to the base (a multimeter might help here, set to the 'speaker' symbol to check for connectivity). The same with the positive, see which pin connects to the tip of the audio jack.

      Delete
  32. If you're interested in making a modular version of the string synth check this link to find out how easy it is.https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string-synth/.you might need one of these as well-https://moroccodave.com/2017/10/04/diy-usb-midi-host/

    ReplyDelete
    Replies
    1. Nice work! I've just had a big read through your website, really enjoyed learning about how you made your panels and the modular case. Nice!~

      Delete
    2. I must emphasize the website is Morocco Dave's,not mine!

      Delete
    3. haha - well thanks for sharing it anyway :-)

      Delete
  33. Thanks for the great tutorial! Are you using linear or logarithmic pots? Thanks :)

    ReplyDelete
    Replies
    1. Thankyou :-) It's been a while but I believe they're all the B type linear

      Delete
  34. Hi hoskins,

    First of all,congratulations and thank you for your outstanding work here.
    I'm going to try building my own string synth. We'll ser if i'm lucky enough to make it work.I'm waiting for my components to arrive,for now.

    I've got a questión rounding my head. Does your synth hace a cv out or just a simple audio out?

    Thanks in advance

    ReplyDelete
    Replies
    1. I believe Arduino pin D10 has been set up as a gate out, although I've not used this.. have a look at Jan Osman's site for more info. Best of luck with your project!

      Delete
  35. Kits for the modular version of the String Machine (called StringTheory) will be available from midday Saturday 14th April.A free standing midi only version will follow shortly after. Check here-https://www.etsy.com/uk/shop/MakeSynthsNotWar.
    Details and sound samples here-https://makesynthsnotwar.com/modules/stringtheory/

    ReplyDelete
    Replies
    1. Wow, it looks great! I hope you sell a million! Hopefully I should be selling a version of the drum machine soon, just got to get around to finishing it. Thanks!

      Delete
  36. Hi,
    I love the sound you produced by adding additional filter section and I really will add one too. But this project needs a little upgrade and I've asked Jan himself to help: converting this project to use the 'usb 2 legacy midi' project to make it a compact usb midi host device instead of just converting the usb midi into legacy midi.
    What do you think about it?

    ReplyDelete
    Replies
    1. I'm referring to https://www.instructables.com/id/Arduino-USB-to-Legacy-MIDI-Converter/
      Instead of buying this midi daw controller and "destroying" it, just plug into the usb host shield with the arduino pro mini 3v3 (powered by e.g. a powerbank)

      Delete
    2. Sadly I don't have that much spare time at the moment for projects, but best of luck to you

      Delete
    3. Have a look at this project,it's much simpler!It's midi only.The schematic has a missing connection between 5v and pin 8 on the 6N137 chip!I've recently converted my Ostman style String Machine to this layout,putting the midi board back in the Garagekey mini.Luckily I didn't cut the wires off!I've also built a standalone version as per morocco dave's website.The gate out could be used to trigger a vcf or other module.

      Delete
    4. Ok forgot to add web link.! https://www.instructables.com/id/The-Strings-Theory/
      And this one ! https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string-synth/

      Delete
  37. Hi. I it just me or should it be some crazy distortion when pressing a chord with phasemix set to max?

    ReplyDelete
    Replies
    1. Okay, thanks. If I press a 4 key chord a couple of octaves up it sounds terrible. I suspect the addition of DCOs hit the roof bitwise. I´ll try to contact JanOst then.

      Delete
    2. It's possible that the Arduino IDE has been updated since the code was published, so you could try flashing it with an earlier version? Sorry I can't be of more help.

      Delete
  38. Hi !! The https://janostman.wordpress.com/how-to-build-your-very-own-string-synth/ blog has desactive... can I find the code for my project ? Help please..

    ReplyDelete
    Replies
    1. http://blog.dspsynth.eu/the-o2-source-code/

      Delete
  39. Hi Hoskins,

    I built the O2 drumachine and the string synth some time ago and both worked perfectly,but never built a proper case/enclosure for the synth. It was in a box on a shelf for many time. The other day I got it out and played with it. I felt in love with its sound again and decided to give it a proper body.
    This is the result of the two brothers together.

    https://ibb.co/QMBBs6H

    I must admit that I would never got it without your help and previous work (and Jan ostman who I gave a tip too).

    Thank you so much.

    ReplyDelete
    Replies
    1. Looking great! I'm glad you're enjoying it! :-)

      Delete
  40. Hello! Thank you very much for the post! I started building this synth, and plan into making it a two-keyboard synth, like e-organs, with a Arduino unit for each KB, allowing for different sound config for each hand. I want to build my own keyboards with wood, but need the diode schematics for the keyboard. Unfortunately all pictures have been removed from the github article, and the original post from the programmer has been deleted altogether.
    Do you happen to still have the diode schematics?

    ReplyDelete
    Replies
    1. EDIT: After some trial and error I found the pinouts for the individual keys. Here it is, should anyone be interested:
      (a diode must be used for each individual connection, black stripe on the analog pin side)
      PIN-PIN=note(From lowest note to highest)
      A0 - D2 = A
      A0 - D3 = A#
      A0 - D4 = B
      A0 - D5 = C
      A0 - D6 = C#
      A0 - D7 = D
      A0 - D8 = D#
      A0 - D9 = E

      A1 - D2 = F
      A1 - D3 = F#
      A1 - D4 = G
      A1 - D5 = G#
      A1 - D6 = A
      A1 - D7 = A#
      A1 - D8 = B
      A1 - D9 = C

      A2 - D2 = C#
      A2 - D3 = D
      A2 - D4 = D#
      A2 - D5 = E
      A2 - D6 = F
      A2 - D7 = F#
      A2 - D8 = G
      A2 - D9 = G#

      A3 - D2 = A
      A3 - D3 = A#
      A3 - D4 = B
      A3 - D5 = C
      A3 - D6 = C#
      A3 - D7 = D
      A3 - D8 = D#
      A3 - D9 = E

      A4 - D2 = F
      A4 - D3 = F#
      A4 - D4 = G
      A4 - D5 = G#
      A4 - D6 = A
      A4 - D7 = A#
      A4 - D8 = B
      A4 - D9 = C

      :)

      Delete
    2. Hey good work! Sounds like a fun project - please post a picture when you're finished. Should you need to see the original website you can always view it from the internet archive;
      https://web.archive.org/web/20170918055903/https://janostman.wordpress.com/how-to-build-your-very-own-string-synth/

      Delete
    3. Wonderful, thank you!
      When I'll be done, I'll share pictures! :D

      Delete
  41. I had only 470km potentiometers and it seems they are not suitable. because they do not work. By the way, I have everything a third lower, should it be? I have a note instead of c

    ReplyDelete
    Replies
    1. I think the pots divide the values to work out where they are positioned, perhaps you could update the code?

      Delete
    2. No, because it's harder for me than finding new potentiometers, but I tried 50km and it worked

      Delete
    3. Okay, I just forgot to connect the earth to the potentiometers ... Everything works!

      Delete
  42. The website for the code seems to be down, can somebody upload it here or add a link ?

    ReplyDelete
    Replies
    1. https://web.archive.org/web/20170918055903/https://janostman.wordpress.com/how-to-build-your-very-own-string-synth/

      Delete
  43. Have a look at this project,it's much simpler!It's midi only.The schematic has a missing connection between 5v and pin 8 on the 6N137 chip!I've recently converted my Ostman style String Machine to this layout,putting the midi board back in the Garagekey mini.Luckily I didn't cut the wires off!I've also built a standalone version as per morocco dave's website.The gate out could be used to trigger a vcf or other module.
    https://www.instructables.com/id/The-Strings-Theory/
    https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string-synth/

    ReplyDelete
    Replies
    1. It looks good - and a really great first project for people. I'd been planning on making a mini version of the string synth with a one-octave keyboard of switches but having the spare time has so far eluded me :-(

      Delete
    2. I have tried the code from -https: //www.instructables.com/id/The-Strings-Theory/ and from - https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string -synth / but none responds to MIDI messages, HELP :(

      Delete
  44. I'm not having any luck with morocco daves's method.He puts the code into a "naked" Atmega 328 using a nano as a "go-between".Im going to abandon that and put the nano straight in as per Instructables project.Testing soon,hopefully!

    ReplyDelete
  45. Hi, Jan Ostman here.

    After retiring I got a bit bored so decided rebuild the blog again.
    And it's alive as http://www.synthworks.eu

    /Jan

    ReplyDelete
    Replies
    1. Good to hear you are back Jan! I updated the link to your new website
      Cheers!
      Gary

      Delete
  46. What laser engraver do you have? I'm shopping for an inexpensive one and like your results. Thx.

    ReplyDelete
    Replies
    1. https://bloghoskins.blogspot.com/2016/08/banggood-2500mw-laser-engraver-setup.html

      Delete
  47. Anyone have any idea how the code could be modified for a 6x5 matrix. Got everything working except every 6 notes it skips 2 notes because of the difference in the matrix. I've been fiddling around with the code myself but so far not had any luck. If anyone can help I would be forever in their debt.

    ReplyDelete
    Replies
    1. It's been a while since I worked on this, but if you look under the section 'electronics' you'll see how I figured out how each key needed to be plugged in. It's possible you might have some luck trying this method yourself... plug one cable into the arduino, play all the keys until it plays a note and make a note of the key/cable. I remember it took me a while until I figured out how to play a full scale, so keep at it.

      Delete
    2. Thanks for the swift response. I've had a go at that and I've got all the keys working but to no avail. The problem seems to be to my understanding that the difference matrix means my keyboard is assigning 6 notes to each analog pin when the code expects it to assign 8 this means that I lose 2 notes each six. For instance starting from Low C and going up one key at a time the notes go C, C#, D Eb, E, F, G#, A, Bb, B, C, C#, E and so on. So missing out F# and G and then D and Eb. I think the solution could be in some editing of the for loop in the 8 DCO block below

      DCO=0;
      for (uint8_t i=0;i<8;i++) {
      if (integrators[i]) integrators[i]--; //Decrement integrators
      DCOPH[i] += FREQ[i]; //Add freq to phaseacc's
      if (DCOPH[i]&0x800000) { //Check for integrator reset
      DCOPH[i]&=0x7FFFFF; //Trim NCO
      integrators[i]=28; //Reset integrator
      }
      DCO+=integrators[i];
      }

      writepointer++;
      delayline[writepointer]=DCO;
      DCO+=(delayline[(writepointer-lfoval2)&255]*PHASERMIX)>>8;

      It seems to increment the note until it reaches the 8th note and then reset which would make sense for an 8x5 matrix but in my attempts to edit the code for my keyboard I've come up short. I'm fairly new to programming so I'm probably missing something. Like you say I'll probably get there if I keep at it but so far no dice.

      Delete
    3. I guess you could try and change some of the code from 8 to 6, but I've no idea if that would work! Or another option is like as chunky54 says, build the midi only version. If you want to use your keyboard, you could use another Arduino nano and convert that separately to midi... There's lots of online tutorials about how to do this like:
      www.instructables.com/Add-MIDI-port-to-Keyboard/ (maybe even after trying this, the string synth code might become more clear). Also you wouldn't need the midi connectors, you could wire it all directly. This might be the easiest way unless you can figure out the code

      Delete
    4. I'm currently building this and ran into a similar issue with a 4 octave board. My solution is hacky but works - I just defined a vector in code translating the pitches. Something like uint8_t pitch_trans[49] = {5, 11, 17...}. Then in the key scanner, instead of sending note k+21 I send pitch_trans[k]+21. Good luck!

      Delete
    5. Oh sorry Unknown, ré-interpreted your post. I think the scanning takes place in the Keyscanner section, keytable[k]=digitalReadFast((k&7)+2);
      Which scans pins 2 to 9. Perhaps changing this to k&5 might help

      Delete
    6. Back with a quick update on two tiny bits of hacky re-coding.
      1) I was wanting a more linear attack/release response, as the default moved too quickly between too long and too short. This can be achieved by changing ATTrates, RELrates, volume, ATTACK and RELEASE to float variables, then using the following definitions for the ATTrates and RELrates:
      const float ATTrates[32]={
      1.07,1.14,1.23,1.33,1.45,1.6,1.78,2,2.29,2.67,3.2,4,5.33,8,16,255,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
      };
      const float RELrates[32]={
      1.07,1.14,1.23,1.33,1.45,1.6,1.78,2,2.29,2.67,3.2,4,5.33,8,16,255,255,16,8,5.33,4,3.2,2.67,2.29,2,1.78,1.6,1.45,1.33,1.23,1.14,1.07
      };

      2) I found that the ENS knob raised the average pitch too much, and when I turned it all the way down, the synth felt like it tuned down a few cents. This can be adjusted in the LFO Block on the assignment of lfoval, where I added "-31" which my tuner said was more in tune:
      lfoval=(pgm_read_byte_near( sinetable + lfocounter )-31 * MOD)>>10; //LFO for pitch

      Delete
  48. As someone who has built this project, you would save a lot of time and effort buying a Garagekey Mini, as the code was written specifically for this keyboard. Alternatively build the midi only version linked here-https://www.instructables.com/The-Strings-Theory/
    And here-
    https://moroccodave.com/2017/09/13/diy-modular-synth-solina-string-synth/
    Hope this helps.

    ReplyDelete
    Replies
    1. Unfortunately my budget is pretty small so all of my materials and components are scavenged from broken equipment from my job as a performing arts technician (My total cost for all parts is £5 for an Elegoo Nano). I was trying to avoid purchasing a garagekey mini by using a broken Yamaha keyboard that still had decent keys but a dodgy circuit board. The midi one is definitely an option but I don't currently have a midi keyboard and the other option would be as Hoskins has said to repurpose a second Arduino to convert the keyboard information to midi to send to the midi only version. This could be a solution but to me sounds more complicated and time consuming than fixing the code and it would require more parts. I'm happy to take my time tweaking the code until I get a result as I'm hoping to gain a better understanding of programming and trying to keep costs low.

      Delete
  49. Hi Gary, as old as the post is, thank you (and Jan) so much. Currently building, and the base synth works brilliantly (after changing the output audio resistor to 1M).

    However, in attaching the Filter, I'm suddenly getting a lot of noise, lowish freq. I'm currently powering the filter from the 5V of the Nano. Slightly less noise from the 3.3V. Was wondering if you powered the filter from the Nano, or directly from an external source? Thanks so much in advance.

    ReplyDelete
    Replies
    1. Hello! If you look at the second to last picture, you'll see where the 9v battery is added... it's there purely to power the filter. I'm not sure if 5 or 3 volts would be enough to power it, so hopefully you'll get rid of the noise by adding the battery. If not, I've found usb connections from computers are often noisy, so that might be the source (try a mobile phone charger instead). Apart from that check the solder connections. Cheers!

      Delete
    2. Thanks so much for clarifying, sorry I couldn't work that out myseld! The extra noise is gone with the battery, though the filter seems to have turned into a high-pass... But I'll figure that out later. Progress!

      Delete
    3. Glad you figured (some of) it out!

      Delete
    4. Thanks again Gary. I got the LPF working but didn't want to have a second power source, so I opted for a passive LPF instead. Made a short video if you're interested, and not sure how to contact Jan but my thanks and donation to him too! https://youtu.be/oNzcr5A9P5I

      Delete
    5. Hey! It looks really good, and it's nice to see someone actually be able to play! I read once that the filter starts to self-resonate at 12 volts (I've not tried it though), so I assume it's a bit more aggressive at 9 volts over the 5. If you put in a simple 7805 voltage regulator circuit, you could power everything from a 9 volt battery... Just an idea though.
      How did you figure out the keyboard matrix? Do you have the code posted somewhere?

      Delete
    6. You make it sound easy haha! I might give it a try with a future synth, but my next project is your Helios One :). And good point - I've updated the video description with a link to my code.

      Delete
    7. I just looked into it and it looks like you can power a Nano directly from the 9v;
      https://forum.arduino.cc/t/simplest-battery-power-to-arduino-nano-solution/530242
      Good luck with the next build. Cheers!

      Delete
  50. Hello, I'm trying to build this with a pro micro, and as pins A4 and A5 don't exist on this board, I'm using pins A14 and A15. I'm having trouble altering the code, as I can't find where those pins are assigned. . .could you by chance help me out with that? Sorry for the rudimentary question, I'm quite new to this.

    ReplyDelete
  51. Um. . .I just realized this was the wrong blog. . .woops, I was meaning to ask about the minipops. . .I'm so sorry about that!

    ReplyDelete
    Replies
    1. I thought this would be simple to answer but sadly it isn't (At least not for me anyway). There's a chance it relates to:
      pinMode(16,OUTPUT);
      pinMode(17,OUTPUT);
      ..but I'm not sure, as there's nothing relating to A4 or A5 being defined. At the top of the page you can see a couple of imports:
      #include
      #include
      #include
      If I were you I'd google the io.h file and see if there's anything in there that reassigns the inputs and outputs. Sorry I can't be of more help

      Delete
    2. Sorry,the imports should read:
      #include avr/interrupt.h
      #include avr/io.h
      #include avr/pgmspace.h

      Delete
  52. Thanks so much for replying! And that's no problem, it's more info than I had before! I'll definitely start by googling the io.h file. I figure it must be something like that, some funny lines if code that convert the pins and make my life harder 😅 thanks so much! If this takes too long I'll just buy a nano lol

    ReplyDelete
    Replies
    1. I looked further into the io.h file... the Nano uses an atmega328p chip, so you have to locate that in the .h, then open the linked file which will show you some different pin names that might be being used (you might also have to google both 'Arduino nano pinout' and 'atMega328p pinout' and make a list of the different names of the pins).
      ...To be honest buying a nano might save you a lot of time! I think Jan who wrote the code is quite an advanced programmer, so he's using some clever tricks to squeeze more performance from the Nano. Most other projects you'll run into for the arduino would be as simple as renaming the pins from A4 to A15 etc, so you might be best saving the Pro Micro for one of those?

      Delete
  53. Thanks for replying again! I only just read this, but it ended up being fairly trivial. They were being assigned through the ADC register. Basically anything that says if(mux==X), then that refers to an analog pin. I'm currently changing the bit resistors for the audio output stuff, that's been fun 😅 but in getting there. . I'm just going to buy a nano for the synthesizer 😂😂

    ReplyDelete
    Replies
    1. Ahhhhh - great work figuring it out! Thanks for letting me know :-)

      Delete
  54. *bit registers, woops

    ReplyDelete
  55. I'd like to make this project for school, but I could not find the required libraries.
    Can you tell me where to find those?

    ReplyDelete
    Replies
    1. At the top of the code it looks as though it's requesting AVR libraries... if you google that, you'll come to this site; https://github.com/arduino/ArduinoCore-avr download the code as a zip file, then install it into your Arduino IDE. I think that should do it?

      Delete
  56. Love to build it - the link to the code is no longer available - anybody have a copy of it somewhere?

    ReplyDelete
    Replies
    1. https://github.com/nightflasher/solina

      Delete

Say something...