open-ear
open-ear copied to clipboard
In low BPM, exercise starts playing before cadence is finished
First of all: what an amazing tool. Exactly what I was looking for and started programming myself (however I cannot really program, hence a failed project). And Open Source! I love it and am very grateful for your work!
Now to my problem (iOS, v. 1.5.12): It seems as if the set BPM only affects the speed of the playbacks, but should also impact their starting time. Hence e.g. in the Chord Function Exercice when the BPM is lower than 90 the playback of the "question" (the chord that needs to be identified) starts before the cadence playback finished, leading to overlapping playbacks.
Hey, thanks for taking the time to report this issue. I've rephrased the description to better reflect the bug.
This project is maintained without any funding, so it's based on its contributors free time. If you want to get into a programming that could be a great opportunity to start. I think this bug would probably not be too hard to solve.
Awesome, thanks. Yeah, seems clearer now. But the issue exists in low BPM, so I changed that :) Thought about trying to fix it myself actually and already tried to grasp the architecture/structure, but did not really succeed so far. Maybe, you could point me to the right file or function I should look at? That would be nice :)
I assume you were able to fork the application and run it on your computer in developer mode. If not - start with so you can debug. (logs, breakpoints etc.)
I would take a look at ExerciseStateService#playCurrentCadenceAndQuestion, as this is where the logic of playing a cadence and the question is. When you debug it, you might be able to figure out of the bug is in that code, or someplace else.
Alrighty, thanks - I'll try to understand and follow that advice in the next days! :)
Yay! Found the issue and I think I fixed it :) The cadences played before the question are all the same length, correct? So no need to factor that in? I'll try to do a pull request in the coming days, but seeing how long it took me to get vscode, nodejs and git(hub) working, I'm not sure when I will find the time. So in case you wanted to do a new release in the coming days, here is the line in question:
exercise-state.service.ts line 270 needs to be changed to // Adding Delay between Cadence and Question, depending on BPM partOrTime: (1200/this._globalSettings.bpm)*150-600,
Nevermind. I was too excited and figured out how to do a pull request. Hope everything is in order and working!
Hey, thanks for much for taking the time to contribute! I saw your PR and replied to it
Solved in https://github.com/ShacharHarshuv/open-ear/pull/240
Awesome! Thank you :)