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
"duration" is an integer, should be double #8229
Comments
Commented by: daschuer As a workaround, you can use |
Commented by: daschuer If you like, you can fix it your self. Line 74 in 0774d77
you can make it a double, all ControlObjects are double anyway. But you need to track where this value is used and if the fractions of a second didn’t do bad things. Our general bugfix workflow is described here: |
Commented by: DJChloe hum, something clear is missing here daniel : are you sure it is the good link ? |
Commented by: DJChloe Majors problems for me :
Hey, I have some limits :/ Anyway, I will try to understand everything, but the bugfix workflow page is gone somewhere in the Twilight Zone ! :D |
Commented by: DJChloe hannnnnn.... I understood something reading the source code !!!! Soooo it's better to leave as it is. But what is interesting and not dociumented is that we have a property available : "Channels", that provide us the info to know if our track is Stereo or not. Therefore we can return a real value for the duration like that : |
Commented by: daschuer The page was hijacked, now the original content is back.
If you still have fun to take these challenges, go ahead, I will try to give you a help if yo ask. |
Commented by: DJChloe Thank you Daniel, but they are not priorities since they can be get around without problem. The very serious one is this one (and I think it is urgent and critical since it can resolve a bunch of issues that might be related to it) : The two annoying : https://bugs.launchpad.net/mixxx/+bug/1498134 (this one is diferent, but can get around) |
Commented by: daschuer After the track is loaded, to the player, TrackInfo::m_duration is updated with the real value, which is sample precise. The "duration" ControlObject is set from this real value. A ControlObject is always of type double, so it might make sense to use double precision here. But as said, we need to make sure not to introduce any regression. |
Commented by: DJChloe Yes, the workaround is that in midi scripting we have accesss to the track_samples and track_sample_rate value We could expose the Channels value without any drawback for everything else, so that we could get in MIDI scripting our value like that :
|
Commented by: daschuer Yes, this will work for me as well. We should call it "track_channels", since a deck has currently always two channels. |
Commented by: DJChloe "And even without the channel value, you should be able to guess the value of channels." Ho yes we can guess the value of channel, 99% of the time it will be Stereo. For mp3, I don't know if Mono audio exist (I think not), but for PCM wav file, yes, for sure. |
Commented by: daschuer If "duration" is 3:30 and "track_samples / track_sample_rate / 2" is 1:15:3 we have a mono track. :-) |
Commented by: DJChloe This is good! Nice trick! |
Commented by: daschuer Taglib 1.10 supports finer duration values. We should update Mixxx accordingly. |
Issue closed with status Fix Released. |
Reported by: DJChloe
Date: 2015-09-18T09:18:56Z
Status: Fix Released
Importance: Wishlist
Launchpad Issue: lp1497183
Tags: easy, metadata
Summary :
The Mixxx control value "duration" gives a rounded integer value
We need :
the actual "duration" value as a real number (400 milliseconds difference is 1 beat !)
"duration should be equal to =track_samples/track_sample_rate/2 (real value) "/2" because stereo
The text was updated successfully, but these errors were encountered: