Timeline for Coding issue with for loop
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 28, 2019 at 16:47 | vote | accept | Robbie Perry | ||
Dec 27, 2019 at 19:30 | vote | accept | Robbie Perry | ||
Dec 28, 2019 at 16:47 | |||||
Dec 26, 2019 at 23:03 | answer | added | Robbie Perry | timeline score: 1 | |
Dec 24, 2019 at 14:42 | answer | added | Jeff A | timeline score: 1 | |
Dec 24, 2019 at 2:24 | comment | added | Robbie Perry | You are correct jsotola. I only want to hear the same note on each tap of the same sensor | |
Dec 24, 2019 at 2:18 | comment | added | jsotola | and, that is not what you want? ... you do not want to hear the next note, you want to hear the same note on each tap? | |
Dec 24, 2019 at 2:07 | comment | added | Robbie Perry | Yes, that is correct. Of course, if I keep my finger on the sensor then I hear the sustain of that note until I take my finger off again | |
Dec 24, 2019 at 2:01 | comment | added | jsotola |
you say keep tapping ... does that mean that you tap the sensor and you hear one note, then you tap again and hear the next note, and so on?
|
|
Dec 24, 2019 at 1:24 | comment | added | Robbie Perry | Thanks for your help. @jsotola...it means that if I keep tapping the first sensor only, i will hear each of the scale's notes, one after the other so I know the problem is to do with the for loop as it keeps cycling around. In fact, all the sensors will do this. I guess I'm not sure how to do that with a seperate function but I will look into it Dougie, thanks | |
Dec 24, 2019 at 0:35 | comment | added | jsotola |
what does this mean? ... it does not make any sense to me ... each sensor will play each of the scale's notes by itself with each finger press
|
|
Dec 23, 2019 at 23:32 | comment | added | Dougie | You should have another function to do that sensor checking so there isn't all that cut'n'paste code (which some folks consider bad programming). In your checkSensor() function check which sensor is active and call the new function to process it. I'd probably use a switch/case construct for that beginnersbook.com/2017/08/cpp-switch-case | |
Dec 23, 2019 at 22:06 | history | asked | Robbie Perry | CC BY-SA 4.0 |