Re: [Audacity-devel] [PATCH] create a time display format "seconds + milliseconds"
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Martyn S. <mar...@gm...> - 2014-11-26 00:37:21
|
Hi suizokukan I admire your dedication and arguments here, thanks for your dedication! I personally like the idea of a secs + millisecs display as well. But where in the list of formats? I'm not sure that the time spent on the internationalisation is worthwhile, I'm sure that our translators will get to it, as required. You clearly have some motive there, but I'm not sure what it is. You may well know more about this than me. Your patch did not apply directly here. We like patches to be made from the main directory, and I attach what I think would be a more reasonable patch, as an example. Thanks for your work here! On 25/11/2014 18:31, Steve the Fiddle wrote: > Thanks for submitting the patch suizokukan, It's always nice to see > new contributions from new contributors. > > One comment on the the new format: With my poor eyesight, I did not > find it immediately obvious what was being shown (due to my difficulty > in distinguishing a comma from a dot). I've not looked at the code, > but personally I would find it more readable as: > 000 115.330 seconds > rather than > 000,115.330 seconds Well, there a number of other formats that use a comma, this only follows our (British, I think) convention. I'm open to change on that though. > Personally, I often prefer to work in seconds, and many of my "own > use" plug-ins use "seconds+decimal places". > > I agree with your point about their being "so many time formats that > may be required". While I like the general idea of this patch, what I > would like to see is a more general solution to allow customising the > time format. For example, to be able to select any combination of: > days, > hours, > minutes, > seconds, > number of decimal places, > frames, > number of frames per second > bars, > number of beats per bar, > beats, > number of beats per second, > fractional units (eg 1/4, 1/6, 1/8, 1/32....) > > That's 12 choices (rather than the current 16), but would accommodate > many more time formats, including previously requested "microseconds" > and "bars / beats". The NTSC ones were particularly difficult to get right, I seem to recall, and would always need custom code. > Obviously such a project is much more work than the patch currently on > the table, but that's my wishful thinking :-) A 'general solution' would mean a load of knowledge from a user, once more sparking the 'is it for a specialist' vs 'is it for a beginner' discussion. It's always a line we are treading, and allowing this level of customisation would be used by very few users, I guess. TTFN Martyn > Steve > > > On 25 November 2014 at 13:41, suizokukan <sui...@or...> wrote: >> 0: summary >> 1: pros >> 2: cons >> 3a: the patch : c++ >> 3b: the patch : i18n >> >> (0/ summary) >> >> This patch suggests to modify a time format defined in >> (NumericTextCtrl.cpp) >> TimeConverterFormats[], namely "seconds" into "seconds + milliseconds". The >> patch takes in account the problem of the localizations' update. >> >> Email attachment: result of the following command : >> >> diff -r -u audacity-read-only/ audacity-modified/ > patch.txt >> >> Two images that sum up this patch : >> >> - before the patch : >> http://94.23.197.37/linuxfr/links_to_images_used_in_my_articles/before.png >> - after the patch : >> http://94.23.197.37/linuxfr/links_to_images_used_in_my_articles/after.png >> >> (1/ pros) Why Audacity may need this patch ? >> >> Audacity has currently 16 different "time display" formats, the default >> one >> being "hh:mm:ss + milliseconds". Up to now, there's no "seconds + >> milliseconds" >> format, only "seconds". Some users like me seem to regret being forced to do >> some maths, e.g. converting "00:57:03.291" into "3423.291 seconds". It's >> clearly >> a small detail, but I'm not the only one to think it would be usefull: >> >> - same idea expressed in 2007 : >> >> http://audacity.238276.n2.nabble.com/Bug-128-RFE-Add-millisecond-selection-format-td238910.html >> >> - I created a thread on a French forum >> >> (http://linuxfr.org/news/modeste-contribution-a-audacity-sur-l-affichage-des-temps). >> The idea was well-received and a user, named "ganymede", explained that >> he >> would like to use such a format to synchronize video and audio stream. >> However, he didn't explained why he would prefer to work with "seconds >> + milliseconds" >> rather than "hh:mm:ss + milliseconds". >> >> - I created another thread on the Audacity forum >> (http://forum.audacityteam.org/viewtopic.php?f=20&t=82163&e=0) >> to discuss my patch before submitting it. In this thread a user, named >> 'Edgar', showed all the different time formats he brings to his >> "clients" (by >> patching manually Audacity ?). In his own version of the software, the >> "seconds" >> format is followed by "seconds + hundredths", by "seconds + >> milliseconds" and >> by "seconds + samples". The point is clearly to add more precision to >> the >> "seconds" format. My patch would allow to somehow replace three of this >> formats, namely "seconds" + "seconds + hundredths" + "seconds + >> milliseconds" >> since "He who can do more can do less". >> >> - from my point of view, this patch would help to read the timestamps in >> a >> format accepted by softwares unable to read the "hh:mm:ss + >> milliseconds" >> format but able to read "seconds + milliseconds". I'm using Audacity to >> cut >> audio files into small pieces and I need to get the start/end position >> of >> each selection. These positions are then stored in an XML file ready by >> a >> software of my own, DipylonReader >> (https://github.com/suizokukan/dipylonreader). >> The audio files I'm working with are small and seldom last more than >> two >> minutes. In this context, it's easier to read timestamps like "83.235 >> seconds" >> rather than "00:01:23s.235" >> >> As I said, "He who can do more can do less". Since Audacity has a >> "seconds" >> format, why can't we add the milliseconds to it ? Such a time format doesn't >> prevent users to read only the seconds if they want and it would allow to >> read >> the time code more exactly. >> >> (2/ cons) Why this patch may be a bad idea ? >> >> - Some users may be accustomed to the "seconds" format (even if I don't >> know if >> such a time format is usefull). Anyway, ignoring the milliseconds is easier >> to such users than doing the maths I spoke above ! >> >> - My patch doesn't solve the main problem. There are so many time formats >> that >> may be required by different users and Audacity has already 16 time formats. >> It would be more convenient to offer a last format, a "user-made" one, based >> by >> example on the syntax of the printf() function. My patch is much more modest >> but, at the very last, doesn't add a new time format to the 16 others. >> >> (3a/ the patch : c++) >> >> It's a very simple patch : in src/widgets/NumericTextCtrl.cpp I slightly >> modified TimeConverterFormats[] : >> >> _("seconds"), >> >> becoming : >> >> _("seconds + milliseconds"), >> >> ... and I modified the corresponding commentaries. >> >> I took care not to modify the number of lines in the source code; doing >> so, >> the current *.po files can be easily modified and my patch contains only >> "real" >> modifications (and not modifications relating to line numbers who changed). >> >> This patch is ok for me on my Linux(Archlinux) system. In this thread >> (http://forum.audacityteam.org/viewtopic.php?f=20&t=82163&e=0), Gale Andrews >> explained than the c++ part of the patch "built and worked OK [...] on >> Windows". >> >> (3b/ the patch : i18n) >> >> I found interesting to update the locale files (locale/*.po). It was >> quite easy since the string "hh:mm:ss + milliseconds" was already >> translated, >> allowing me to see how the "+ milliseconds" string was translated. All I got >> to do was to add this translation to the corresponding "seconds" string : >> I finally got the translation for "seconds + milliseconds". >> Some .po files doesn't have a translation for "hh:mm:ss + milliseconds". >> In this case I leave out the translation, reduced to an empty string. >> >> By example : >> >> BEFORE (fr.po): >> #: src/effects/AutoDuck.cpp:502 src/effects/AutoDuck.cpp:508 >> #: src/effects/AutoDuck.cpp:514 src/effects/AutoDuck.cpp:520 >> #: src/effects/AutoDuck.cpp:526 src/prefs/PlaybackPrefs.cpp:65 >> #: src/prefs/PlaybackPrefs.cpp:66 src/prefs/PlaybackPrefs.cpp:81 >> #: src/prefs/PlaybackPrefs.cpp:82 src/prefs/PlaybackPrefs.cpp:88 >> #: src/prefs/PlaybackPrefs.cpp:89 src/prefs/PlaybackPrefs.cpp:103 >> #: src/prefs/PlaybackPrefs.cpp:104 src/prefs/PlaybackPrefs.cpp:110 >> #: src/prefs/PlaybackPrefs.cpp:111 src/widgets/NumericTextCtrl.cpp:279 >> msgid "seconds" >> msgstr "secondes" >> >> AFTER (fr.po): >> #: src/effects/AutoDuck.cpp:502 src/effects/AutoDuck.cpp:508 >> #: src/effects/AutoDuck.cpp:514 src/effects/AutoDuck.cpp:520 >> #: src/effects/AutoDuck.cpp:526 src/prefs/PlaybackPrefs.cpp:65 >> #: src/prefs/PlaybackPrefs.cpp:66 src/prefs/PlaybackPrefs.cpp:81 >> #: src/prefs/PlaybackPrefs.cpp:82 src/prefs/PlaybackPrefs.cpp:88 >> #: src/prefs/PlaybackPrefs.cpp:89 src/prefs/PlaybackPrefs.cpp:103 >> #: src/prefs/PlaybackPrefs.cpp:104 >> msgid "seconds" >> msgstr "secondes" >> >> #: src/widgets/NumericTextCtrl.cpp:279 >> msgid "seconds + milliseconds" >> msgstr "secondes + millisecondes" >> >> >> list of the the locale files followed by what I did : >> >> >> ========================================================================== >> (translation's quality) >> >> ========================================================================== >> symbol | meaning >> >> ========================================================================== >> *** | I'm 100% sure of what I wrote down. >> >> -------+------------------------------------------------------------------ >> ** | I'm sure of what I wrote down. >> >> -------+------------------------------------------------------------------ >> * | I'm not sure of my translation; language unknown to me but >> the >> | correction was easy. >> >> -------+------------------------------------------------------------------ >> ? | I'm not sure of my translation; language unknown to me : I >> may >> | be wrong since the correction was difficult to write. >> >> -------+------------------------------------------------------------------ >> >> >> locale/af.po not translated : no translation for >> "+ milliseconds" >> locale/ar.po translated; ? (the right-to-left writing's >> direction is hard to deal with) >> locale/be.po translated; * >> locale/bg.po translated; * >> locale/bn.po not translated : no translation for >> "+ milliseconds" >> locale/bs.po translated; * >> locale/ca.po translated; * >> locale/ca...@va... translated; * >> locale/cs.po translated; * >> locale/cy.po not translated : no translation for >> "+ milliseconds" >> locale/da.po translated; * >> locale/de.po translated; ** >> locale/el.po translated; * >> locale/es.po translated; * >> locale/eu.po translated; * >> locale/fa.po translated; ? (the right-to-left writing's >> direction is hard to deal with) >> locale/fi.po translated; * >> locale/fr.po translated; *** >> locale/ga.po not translated : no translation for >> "+ milliseconds" >> locale/gl.po translated; * >> locale/he.po not translated : no translation for >> "+ milliseconds" >> locale/hi.po translated; * >> locale/hr.po translated; * >> locale/hu.po translated; * >> locale/id.po translated; * >> locale/it.po translated; ** >> locale/ja.po translated; * >> locale/ka.po translated; * >> locale/km.po translated; ? (I don't even see the >> characters >> in my editor, they're replaced by boxes) >> locale/ko.po translated; * >> locale/lt.po not translated : no translation for >> "+ milliseconds" >> locale/mk.po not translated : no translation for >> "+ milliseconds" >> locale/my.po translated; ? (I don't even see the >> characters >> in my editor, they're replaced by boxes) >> locale/nb.po translated; * >> locale/nl.po translated; * >> locale/oc.po not translated : no translation for >> "+ milliseconds" >> locale/pl.po translated; * >> locale/pt.po translated; * >> locale/pt_BR.po translated; * >> locale/ro.po not translated : no translation for >> "+ milliseconds" >> locale/ru.po translated; * >> locale/sk.po translated; * >> locale/sl.po translated; * >> locale/sr_RS.po translated; * >> locale/sr...@la... translated; * >> locale/sv.po translated; * >> locale/ta.po not translated : no translation for >> "+ milliseconds" >> locale/tg.po translated; * >> locale/tr.po translated; * >> locale/uk.po translated; * >> locale/vi.po translated; * >> locale/zh.po translated; * >> locale/zh_TW.po translated; * >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> audacity-devel mailing list >> aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audacity-devel >> > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > audacity-devel mailing list > aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |