Pages

Thursday 9 July 2020

Helios-One Arduino Synth - Part 3.1 - Minor Updates



**Update**
**End of update**

I made a few small changes to the V3 code;

https://github.com/gary909/Helios-Arduino-Synth-V3.1

V3.1 - Minor Updates
*Improved Filter Resonance (?). Apparently After setting resonance, you need to call setCuttoffFreq() to hear the change. Swapped in code.
*Increased note sustain from 10 seconds to 60 seconds
*OSC OUTPUT made louder on audio update>>9; // changed down from 10 to 9 because was louder


Still working on the LFO section, hopefully not too much longer...

9 comments:

  1. OH MAN I JUST GOT IT WORKING! THE SHEER JOY! This is my first standalone synth; the closest I came before was a Raspberry Pi running Yoshimi, so this is definitely a little more exciting. Thanks for your work!

    ReplyDelete
    Replies
    1. Hey! Glad you're enjoying it, and that you managed to get it working ok! Hopefully in the next few weeks I'll be able to figure out the LFO section and get that published. Thanks!

      Delete
  2. Hey man...great project. Still love your blog very much as every now and then as I make a visit something cool is going on here. May I dare to ask if you can record some audio snippets to get an idea how the Helios sounds? Much appreciated!

    ReplyDelete
    Replies
    1. Hey Ben, yep I should've really posted videos of it progressing through the tutorials... but you know how things are, sometimes it's better just to post anything otherwise I might post nothing if I wait for it to be perfect! I've got the day off on Friday, hopefully I'll get round to doing something then. The LFO section is now almost working to. Thanks!

      Delete
    2. Finally made a video: https://youtu.be/yYaN0gxwWfk

      Delete
  3. Thank you for sharing your project with transparency and generosity. I’m following your series closely. I’m building an Arduino Nano 8 pot synth myself. Hardwarewise I have it covered, but I'm a slow learner when it comes to coding. What I'm trying to accoplish is: to make the synth listen to MIDI CC64 (sustain pedal), in order to affect the ADSR envelope. My goal is to sustain a note as long as MIDI CC64 comes with a 127 value, and to enter release phase when MIDI CC64 comes with 0 value. Also, I want to code waveform selector using a pot instead of a switch, but I’m still in the learning curve. Any insights would be greatly appreciated.

    ReplyDelete
    Replies
    1. Hey Sergio, I'm also a little slow when it comes to coding - so maybe take anything I say with a grain of salt! I did a course on it once, and they said beginners always use If/Else statements. I use a lot of these! It's a bit inefficient though, which matters a lot when using something like an Arduino where calculation speed is already limited. The people on the Mozzi forums are always helpful if you get stuck. The whole midi side of the project is a complete mystery to me, but it's using a library by 'forty seven effects' who have quite a lot of documentation, so you may find something useful there. If you add the following near the top of the code;

      //Tip: set note_on = true for testing sans MIDI input
      boolean note_on = false;

      ...I think a note will sustain for ever (if set to true). You could then declare a on/off switch, put this in a 'If statement' (ie If switch is high set note to true, else set note to false). I use something very similar in the code where you switch waveforms. You could copy and paste that, and change the appropriate bits.

      In the Helios code, I also set the attack and decay of the envelope (something like 'atkVal, 60000, 60000, dkyVal') The 4 values here are for the ADSR, but due to the Arduino not having enough pots I set the two middle values as 60000 (aka 60 seconds). You could declare the sustain value as a switch, then use another if/else switch statement (ie if switch = high sustain == 100000 else == 60000 (ie sustain either lasts 60seconds or 10 minutes). The code would have to be written better than this, but it might give you a start.

      Using a pot to select waveforms is possible... Pots on Arduino register between 0 and 1023. So say you had four waveforms, you could divide 1023 / 4 = 255. So waveform 1 would be selected if the value was equal to 0 to 255, waveform 2 would be selected if the value was equal to 256 to 511 etc. Then in an If/Else If/Else statement you could set the oscillator (not too different from how I already do it in the code). Again, there are better ways to do it, but if it works! I'm not the best at coding, so always seek a second opinion :-)
      Cheers,
      Gary

      Delete
    2. Gary, thank you very much for your help. I’ll take your approach and let you know my findings. Cheers!

      Delete
    3. No worries - Just remember I don't always know what I'm talking about! Here's a good tutorial about if/else statements controlled by a potentiometer, which you alter to use as a waveform selector: https://www.arduino.cc/en/Tutorial/ifStatementConditional

      Delete

Say something...