Autocompletion enhancement: hierarchy
Autocompletion enhancement: hierarchy
Jun 3 2011, 16:08
Joined: 7-October 05
Member No.: 24946
In many cases, not just one but at least two strings are required to define a track (the term "song" intentionally avoided).
Concerto for piano nº 1
doesn’t suffice to identify a piece of music (many composers have a “Concerto for piano nº 1”); likewise,
doesn’t suffice either (he composed many pieces). In order to unequivocally identify a piece two ordered strings are required, usually (composer, work), like this:
Brahms : Concerto for piano nº 1.
Since two tags are needed to characterize such a piece of music, foobar2000 autocompletion feature isn’t able, in its present state, to help avoiding editing errors.
For instance, although Brahms did not compose a Viola Concerto, since autocomplete only sees a work at a time, one may mistakenly write “viola” instead of “violin”.
In an ideal word, autocompletion would first help finding Brahms among composers with names starting with Br then, after one confirmed his name as the content of the %composer% tag, autocompletion would only present works by him that begin with Co that are valid:
Concerto for piano nº1
Concerto for piano nº2
Concerto for violin.
If one has a large collection of music, one may end with a number of ambiguities, small errors like:
Brahms, Johannes | Brahms, J. | Brahms, J | ...
Concerto nº1 | Concerto nº 1 | Concerto No.1 | …
In order to circumvent foobar2000’s autocompletion limitation, I have been using for a while the method described below, which may be useful to others.
1) Define a special tag, %idx1%
2) Instead of filling separately the %composer% and %content group% tags, fill %idx1% instead.
Note that in order to allow the composer part and the content group part to be identified, a standard separator is necessary; let’s then choose “=”, a character that can’t appear in a name or a title, to be used as standard separator.
In the example, %idx1% should be filled so:
Brahms, Johannes=Concerto for piano nº 1.
Autocomplete will work, so that after typing the first letters Br a dropdown down list of valid works of Brahms will appear so that one may choose among them -- no typing errors.
3) After that, one should apply the following Masstager scripts to update both %composer% and %content group% with the right values.
[Format value from other fields]
Destination field: COMPOSER
Formatting pattern: $if($strchr(%idx1%,=),$LEFT(%IDX1%,$SUB($STRCHR(%IDX1%,=),1)))
Destination field: CONTENT GROUP
Formatting pattern: $if($strchr(%idx1%,=),$replace($replace(%idx1%,$LEFT(%IDX1%,$SUB($STRCHR(%IDX1%,=),1)),),=,),)
The method is not elegant: it implies into adding an intermediate tag IDX1 that only serves to avoid errors.
In my case, at least, this became essential given the size of the collection and the number of versions of the same music.
Nevertheless, I still dream that something (which has been suggested before as an enhancement) like the following will exist:
File | Preferences | Advanced | Display | Autocomplete fields:
GENRE; COMPOSER>CONTENT GROUP>TITLE; ARTIST; BAND; CONDUCTOR
with ">" meaning that Composer, Content Group and Title are treated as an hierarchy (they actually are).
Title should ideally also be part of the autocompletion hierarchy because many pieces are divided in parts (in classical pieces, they’re usually called movements).
In the example used, the piece has three movements, so the tagging for each track would result:
%tracknumber% %composer% %content group% %title%
01 Brahms, Johannes Concerto for piano nº 1 I. Maestoso - Più moderato
02 Brahms, Johannes Concerto for piano nº 1 II. Adagio
03 Brahms, Johannes Concerto for piano nº 1 III. Rondo. Allegro non troppo
This post has been edited by pstrg: Jun 3 2011, 16:12
|Lo-Fi Version||Time is now: 22nd May 2013 - 05:54|