top of page

Tech Project Updates #5

Updated: Nov 24, 2019

Troubleshooting the code


As my project is a combination of the following sources:

and


I decided to use the code from "Studio Drums" as it features 5 drum sounds in total, and uses a free and easily accessible program called Processing. I initially tried to download a program called Ardrumo as recommended by "Midi Arduino Drums" however my Mac was recently updated and this new software update wasn't compatible with Ardrumo.


The code has to be run in both Arduino and Processing in order for the project to work successfully.


Arduino


First, I copied and pasted the code (directly from the website, not the PDF version) into Arduino and verified the code to see...

As I went through the errors in the code, I did some research and realised a lot of it was caused by incorrect placement of brackets which caused some parts of the code to be read as comments. Once this was fixed, the last error in the Arduino code was...


This was due to incorrect use of brackets.


Once the code compiled and there were no errors which arose, I loaded the code into the Arduino using this source for guidance - https://www.youtube.com/watch?v=ELUF8m24sZo


After following the instructions in the video, the code was successfully uploaded to the Arduino!


Processing


So, having successfully downloaded Processing, I directly copied the code from a downloaded PDF version of "Studio Drums" and clicked 'run.'


Here's what I got...

Unsurprisingly, the code didn't work straight away

Without initially realising, copying and pasting directly from the PDF isn't ideal as it's very easy to copy text which is unwanted and creates issues for the code (such as 'studio drums: page 5' as highlighted above). This creates an error in the code, which prevents it from running from start to finish and then looping.


An additional issue was that the drum images which the code needs to be able to identify (which I downloaded from the PDF file) were not actually images in a png format, but were in aiff (Audio Interchange File Format) which couldn't be recognised by the code, creating another interference.

To overcome this, I downloaded images from the internet (in png format) and to make troubleshooting a bit easier, I downloaded numbers 1-4 so that each image (which was a number) could be identified with the code more easily (e.g. image 1 in the code corresponded to a downloaded png file of the number '1').

7 views0 comments

Recent Posts

See All

PoL

bottom of page