alexfornuto / arduino

A repo for my github projects.
4 stars 4 forks source link

Find the number of values in an array. #1

Open alexfornuto opened 9 years ago

alexfornuto commented 9 years ago

Currently in https://github.com/alexfornuto/arduino/blob/master/metallica/metallica.ino I need to create an int value for every riff, and manually define it as the number of beats in that riff. It would be swell if I could find that value through some function in the playInput method instead.

movesmyers commented 9 years ago

Could you give an example of what you mean, maybe for one riff?

alexfornuto commented 9 years ago

https://github.com/alexfornuto/arduino/blob/master/metallica/metallica.ino#L9

On the next line I define an int of the number of the array, to use as third input of the playInput method. Rather than have to define that number manually for each riff, I'd like the playInput to derive that number from the noteDurations array for each riff.