Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find the number of values in an array. #1

Open
alexfornuto opened this issue Feb 18, 2015 · 2 comments
Open

Find the number of values in an array. #1

alexfornuto opened this issue Feb 18, 2015 · 2 comments

Comments

@alexfornuto
Copy link
Owner

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
Copy link

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

@alexfornuto
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants