Close

Code | Rough, but almost ready

A project log for DIY SamplePad Controller (MkI)

A unit to allow sample audio files be triggered and played by Roland drum pads

craig-hissettCraig Hissett 08/30/2019 at 00:202 Comments

'Done Compiling'

Two beautiful words I love to see after attacking the Arduino IDE for a little while:

I've added some missing functions to the code, and now have something I'd be happy to test the hardware once assembled.

The code will:

Read analog inputs

Allow volume and bank control from encoder

Show on screen volume and bank data

Trigger sounds on the sound modules

In future revisions I will work on adding EEPROM into the code to save settings, arrays to save various settings for each pad input (volume, target sound module to start) to save into EEPROM, and update the menu to show more levels. Perhaps pressing and holding the button then allows the user to switch to a pad select mode (scrolling will move the pages between each pad) then clicking will allow to move between settings for the pad, with a further click allowing to select the value to be edited. One last click would save the changed setting, whereas holding would go back to the main menu.

In addition to this I will almost certainly include a series of Serial commands to allow for the settings to be updated via serial.

Discussions

Ken Yap wrote 08/30/2019 at 04:25 point

Tip: consider using the C switch statement to replace the series of if statements.

  Are you sure? yes | no

Craig Hissett wrote 08/30/2019 at 06:04 point

Thanks Ken - I'll be replacing this collection of if stetememnts with a switch statement in the next iteration. At the minute in the code both the main pad and the rim of the pad are just triggering the same function, but that behaviour will be changing to allow different sounds to be triggered by the rims. Once I've worked out exactly what that is going to do ill be able to tidy it up with switch :)

  Are you sure? yes | no