Although I'm working with a contributed library, I think this is a broad enough question.
I have a function that doesn't return a value (utilizing midibus library).
void noteOn(int channel, int pitch, int velocity) {
//stuff
}
Within this function I can create a variable for velocity. However I only know how to use this variable within this function. I want to use it elsewhere within other functions.
Questions: How do I do this? What is it called when you want to use a parameter from a function outside that function?
Inspired by the recent "unnamed soundsculpture" piece I want to learn more about 3D point clouds. Any suggestions on how to get started? Any libraries I should use or documents I should read? Any suggestions is appreciated. Cheers.