Closed alex-calamar closed 5 years ago
Does it work with your changes?
Dan Wilcox danomatika.com robotcowboy.com
On Jan 21, 2019, at 8:34 PM, Alex Ramos notifications@github.com wrote:
Hi Dan again, I'm back here because I'm still dealing with your addon. ;)
In our last conversations you suggested the use of the toSeconds function inside ofxMidiTimeCodeFrame and multiply it by 1000 to obtain miliseconds. And you were right, it sounded logical; but I found out that the function truncates the decimals in the casting of the miliseconds derived from the frames as you are using the framesToMs function which returns an int... So I would suggest that you should cast as well the return of framesToMs as I show here:
// ----------------------------------------------------------------------------- double ofxMidiTimecodeFrame::toSeconds() const { double time = (double)hours 3600.0; // 60.0 60.0 time += (double)minutes * 60.0; time += (double)seconds; time += (double) ofxMidiTimecode::framesToMs(frames, rate) / 1000; return time; }
Otherwise the framesToMs function could return a double instead...
What do you think? I checked it out and it's truncating it so... Let me know your thoughts.
Thanks again for your time. Alex
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Indeed, just with that casting to double it works much more better... Actually the "milliseconds" calculation can be done finally right!
Should I make a pull-request about this? ;o)
Yes. My laptop is away for repairs right now...
Hi Dan again, I'm back here because I'm still dealing with your addon. ;)
In our last conversations you suggested the use of the toSeconds function inside ofxMidiTimeCodeFrame and multiply it by 1000 to obtain miliseconds. And you were right, it sounded logical; but I found out that the function truncates the decimals in the casting of the miliseconds derived from the frames as you are using the framesToMs function which returns an int... So I would suggest that you should cast as well the return of framesToMs as I show here:
Otherwise the framesToMs function could return a double instead...
What do you think? I checked it out and it's truncating it so... Let me know your thoughts.
Thanks again for your time. Alex