Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Columns UI (Read 4024737 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

Re: Columns UI

Reply #7725
You can already do alternating background colors with titleformatting.

File > Preferences > Display > Columns UI > Playlist view > Globals > Style tab
Code: [Select]
$ifequal($mod(%_playlist_number%,2),0,
$set_style(back,$rgb(255,0,0),$rgb(255,100,100),$rgb(255,200,200)),
$set_style(back,$rgb(0,0,255),$rgb(100,100,255),$rgb(200,200,255))
)
This will produce an alternating red and blue background.

The syntax is:
$set_style(<default color>,<color when highlighted>,<color when highlighted but not in focus>)

You can adjust the first $set_style() line to set one of the background color (red) and the second for the other (blue).



Re: Columns UI

Reply #7728
I was tempted to use the bug tracker, but it's a request, so I guess it's better here, especially if you're not interested at all:

Glowing effect for columns UI panels ("playlist view" & "item details" especially, filters & playlist switcher too ?)

I think you know what glowing effect is but here is an example:
https://codepen.io/AllThingsSmitty/pen/VzXrgY

I don't know the impact in CPU/GPU ressources but (if it's not intensive) I always hoped you would develop that.
But that might be complicated and if you're focused essentially on maintaining this component, that's already nice.

Re: Columns UI

Reply #7729
Quick question, as I am in the midst of tagging (*counts*) 1,600+ untagged audio files.
Much like how one can use the Tab key to skip to the next field/column on a playlist item, is there a keyboard shortcut for skipping to the next row (vertically), so to begin editing (e.g.) the track name field of the next playlist item? Currently, I'm hitting enter and then left mouse button clicking twice to edit the next track name, over and over, which isn't as practical or time-efficient as it could be with a keyboard shortcut, especially as the clicks are time-sensitive and if I click too quickly I end up playing a song instead.  I do this kind of vertical editing far more often than horizontal editing, honestly, so I'd even welcome reassigning the tab key to do this permanently if possible.
Cheers!

EDIT: I've found one way around it, I can use the tab key, but it does mean disabling all other editable columns/leaving only the column I want to work with. Not the end of the world, but the question stands.

Re: Columns UI

Reply #7730
Not the end of the world, but the question stands.
You might have a look at the documentation. But apart from this, it seems that you are using the wrong tool for your task. You might also want to have a look at the editing capabilities of the standard foobar2000 properties dialog for this.

Re: Columns UI

Reply #7731
As far as I understand, one of the huge advantages Columns UI has is its ability to edit metadata fields in-line, so as to avoid constant opening and closing of the properties pane. I had a look at the documentation you linked before posting here, and there is no mention of how to perform what I want to do (and am now doing, if only with the workaround of toggling off all except the one column I want to tab-edit through.)

Re: Columns UI

Reply #7732
As far as I understand, one of the huge advantages Columns UI has is its ability to edit metadata fields in-line, so as to avoid constant opening and closing of the properties pane.
While this is more convenient for single changes, it should not be a big deal for mass changes. Just select all the tracks you want to edit, open the properties dialog, select all the fields you want to edit and choose edit. A new window will be opened with an editable table of all the selected field. Inside the table you can navigate with (SHIFT+) TAB horizontally and with (SHIFT +) ENTER vertically. But you need to be aware, that your changes are only saved after pressing the Ok or Apply button of the main properties dialog. If you accidently close the editing window with ESC, all your changes are lost (what sometimes happen to me, when I'm typing quite fast and I want to cancel a single cell edit with ESC while there isn't any cell edit active anymore).

there is no mention of how to perform what I want to do
Yes, your'e right I misread the behavior for the UP and DOWN key bindings. But this simply also means, that it is not possible to do what you want with the inline editing in the playlist.

Re: Columns UI

Reply #7733
Just select all the tracks you want to edit, open the properties dialog, select all the fields you want to edit and choose edit. A new window will be opened with an editable table of all the selected field. Inside the table you can navigate with (SHIFT+) TAB horizontally and with (SHIFT +) ENTER vertically. But you need to be aware, that your changes are only saved after pressing the Ok or Apply button of the main properties dialog. If you accidently close the editing window with ESC, all your changes are lost (what sometimes happen to me, when I'm typing quite fast and I want to cancel a single cell edit with ESC while there isn't any cell edit active anymore).

I'm flummoxed that I either never knew about that feature or completely forgot about it, thanks for the info. I just tried it and it works nicely. You are right though, the fact that potentially a lot of work could be lost with the slip of a finger is pretty concerning, It also means having three foobar2000 windows open rather than one which is marginally less efficient, and the OS-defined visual appearance of the properties dialog (black text on white background) isn't so friendly to my eyes. Perhaps tabbing downwards in the Columns UI playlist is still a feature worthy of consideration considering the above issues, but I'm pretty satisfied now from my side of things.

Re: Columns UI

Reply #7734
appearance of the properties dialog (black text on white background) isn't so friendly to my eyes.
As it is completley off topic, I don't want to start a discussion about it here. Just that: I thought the same about it until a few years ago, but I asked an eye specialist and she told me that it is actually the best combination for the eyes. It is proofed by many studies. Just google for it.

Re: Columns UI

Reply #7735
1) it's more convenient for me to see the 'minutes seconds milliseconds' variant (instead of the 'hours minutes seconds milliseconds' variant)
(the aspect related to milliseconds is described in the end of this post)

these are the examples of what i need to see:
62 47 instead of 1:02:47
74 19 instead of 1:14:19
80 05 instead of 1:20:05
99 59 instead of 1:39:59
106 25 instead of 1:46:25

currently i lean towards a thought that the following range is sufficient: from the minimal point of 1 hour, and up to the point of slightly less than 10 hours
which means that i need to get the range from 60 00 (instead of 1:00:00) to 599 59 (instead of 9:59:59)

i mainly managed to achieve it (in a quite primitive way). but how to optimize these 2 modest scripts?:

this script-1 is for the 'playlists switcher panel':

$if($greater($len(%length%),7),$replace(%length%,':', )$tab()%size%   ,$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace(%length%,':', ),1 00 ,60 ),1 01 ,61 ),1 02 ,62 ),1 03 ,63 ),1 04 ,64 ),1 05 ,65 ),1 06 ,66 ),1 07 ,67 ),1 08 ,68 ),1 09 ,69 ),1 10 ,70 ),1 11 ,71 ),1 12 ,72 ),1 13 ,73 ),1 14 ,74 ),1 15 ,75 ),1 16 ,76 ),1 17 ,77 ),1 18 ,78 ),1 19 ,79 ),1 20 ,80 ),1 21 ,81 ),1 22 ,82 ),1 23 ,83 ),1 24 ,84 ),1 25 ,85 ),1 26 ,86 ),1 27 ,87 ),1 28 ,88 ),1 29 ,89 ),1 30 ,90 ),1 31 ,91 ),1 32 ,92 ),1 33 ,93 ),1 34 ,94 ),1 35 ,95 ),1 36 ,96 ),1 37 ,97 ),1 38 ,98 ),1 39 ,99 ),1 40 ,100 ),1 41 ,101 ),1 42 ,102 ),1 43 ,103 ),1 44 ,104 ),1 45 ,105 ),1 46 ,106 ),1 47 ,107 ),1 48 ,108 ),1 49 ,109 ),1 50 ,110 ),1 51 ,111 ),1 52 ,112 ),1 53 ,113 ),1 54 ,114 ),1 55 ,115 ),1 56 ,116 ),1 57 ,117 ),1 58 ,118 ),1 59 ,119 ),2 00 ,120 ),2 01 ,121 ),2 02 ,122 ),2 03 ,123 ),2 04 ,124 ),2 05 ,125 ),2 06 ,126 ),2 07 ,127 ),2 08 ,128 ),2 09 ,129 ),2 10 ,130 ),2 11 ,131 ),2 12 ,132 ),2 13 ,133 ),2 14 ,134 ),2 15 ,135 ),2 16 ,136 ),2 17 ,137 ),2 18 ,138 ),2 19 ,139 ),2 20 ,140 ),2 21 ,141 ),2 22 ,142 ),2 23 ,143 ),2 24 ,144 ),2 25 ,145 ),2 26 ,146 ),2 27 ,147 ),2 28 ,148 ),2 29 ,149 ),2 30 ,150 ),2 31 ,151 ),2 32 ,152 ),2 33 ,153 ),2 34 ,154 ),2 35 ,155 ),2 36 ,156 ),2 37 ,157 ),2 38 ,158 ),2 39 ,159 ),2 40 ,160 ),2 41 ,161 ),2 42 ,162 ),2 43 ,163 ),2 44 ,164 ),2 45 ,165 ),2 46 ,166 ),2 47 ,167 ),2 48 ,168 ),2 49 ,169 ),2 50 ,170 ),2 55 ,175 ),3 03 ,183 ),3 10 ,190 ),3 19 ,199 ),3 27 ,207 ),3 35 ,215 ),3 41 ,221 ),3 48 ,228 ),3 55 ,235 ),4 02 ,242 ),4 08 ,248 ),4 17 ,257 )$tab()%size%   )


this script-2 is for the 'playlist view > columns > length > display':

$if($not($greater($len(%_length_ex%),10)),$replace($replace(%_length_ex%,:, ),., ),$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace(%_length_ex%,:, ),1 00 ,60 ),1 01 ,61 ),1 02 ,62 ),1 03 ,63 ),1 04 ,64 ),1 05 ,65 ),1 06 ,66 ),1 07 ,67 ),1 08 ,68 ),1 09 ,69 ),1 10 ,70 ),1 11 ,71 ),1 12 ,72 ),1 13 ,73 ),1 14 ,74 ),1 15 ,75 ),1 16 ,76 ),1 17 ,77 ),1 18 ,78 ),1 19 ,79 ),1 20 ,80 ),1 21 ,81 ),1 22 ,82 ),1 23 ,83 ),1 24 ,84 ),1 25 ,85 ),1 26 ,86 ),1 27 ,87 ),1 28 ,88 ),1 29 ,89 ),1 30 ,90 ),1 31 ,91 ),1 32 ,92 ),1 33 ,93 ),1 34 ,94 ),1 35 ,95 ),1 36 ,96 ),1 37 ,97 ),1 38 ,98 ),1 39 ,99 ),1 40 ,100 ),1 41 ,101 ),1 42 ,102 ),1 43 ,103 ),1 44 ,104 ),1 45 ,105 ),1 46 ,106 ),1 47 ,107 ),1 48 ,108 ),1 49 ,109 ),1 50 ,110 ),1 51 ,111 ),1 52 ,112 ),1 53 ,113 ),1 54 ,114 ),1 55 ,115 ),1 56 ,116 ),1 57 ,117 ),1 58 ,118 ),1 59 ,119 ),2 00 ,120 ),2 01 ,121 ),2 02 ,122 ),2 03 ,123 ),2 04 ,124 ),2 05 ,125 ),2 06 ,126 ),2 07 ,127 ),2 08 ,128 ),2 09 ,129 ),2 10 ,130 ),2 11 ,131 ),2 12 ,132 ),2 13 ,133 ),2 14 ,134 ),2 15 ,135 ),2 16 ,136 ),2 17 ,137 ),2 18 ,138 ),2 19 ,139 ),2 20 ,140 ),2 21 ,141 ),2 22 ,142 ),2 23 ,143 ),2 24 ,144 ),2 25 ,145 ),2 26 ,146 ),2 27 ,147 ),2 28 ,148 ),2 29 ,149 ),2 30 ,150 ),2 31 ,151 ),2 32 ,152 ),2 33 ,153 ),2 34 ,154 ),2 35 ,155 ),2 36 ,156 ),2 37 ,157 ),2 38 ,158 ),2 39 ,159 ),2 40 ,160 ),2 41 ,161 ),2 42 ,162 ),2 43 ,163 ),2 44 ,164 ),2 45 ,165 ),2 46 ,166 ),2 47 ,167 ),2 48 ,168 ),2 49 ,169 ),2 50 ,170 ),4 17 ,257 ),., ))

(i haven't found a way to place these 2 codes in a better way: when using the 'code' forum-function, the codes get much less readable because each of them turns into a huge 1 line)

some optimizations are needed because:
- foobar already got slightly slower (especially when launching it, but also when applying its preferences at pages that are related to these 2 scripts)
- both scripts are implemented at a minimally possible scale:
from 60 00 to 170 00 only (each minute of this very essential range is included), plus several important extra-points like 175, 183, 190..., 257
the extra-points were added because my collection already has such huge audio-files
- i would like to get rid of the new slight slowness of foobar, and also make these scripts more complete (from 60 00 to 599 59)

is there a way to make these 2 scripts more elegant and much shorter?
(while extending the range from '60 00 - 170 00' to '60 00 - 599 59', with the inclusion of each minute of this range)



the next 3 items are rather added as acts of desperation
(because i realize that there are nearly no chances that you'll help me to solve these huge long-time problems):

2) how to stop foobar from rounding up the seconds? (especially in the 'playlists switcher panel')
(and even the milliseconds: at least in the 'playlist area' and in the 'properties' sub-window)

3) how to add milliseconds to the 'playlists switcher panel'?
the actual state: 'minutes seconds'
the necessary state: 'minutes seconds milliseconds'

unfortunately, the %_length_ex% doesn't work here
please read/see some details here   (this is the simple forum of the wonderful 'everything search engine' program)

4) how to get the total length of selected tracks in a current playlist? (i don't use the status bar)

Re: Columns UI

Reply #7736
Try this instead.

Code: [Select]
$div(%length_seconds%,60):$right(%length%,2)

Also you might look at %length_seconds_ex% and %length_seconds_fp%

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.25length_ex.25

And when using $replace in future, don't nest it. Use it like this...

https://hydrogenaud.io/index.php?topic=121476.msg1002381#msg1002381

Re: Columns UI

Reply #7737
%length_ex%
%length_seconds_ex%
%length_seconds_fp%
they all don't work


Quote
$div(%length_seconds%,60):$right(%length%,2)

i'll think about it later
it's difficult for me to say now whether i can use it for an updated code or not (my coding skills are very limited)


Quote
And when using $replace in future, don't nest it. Use it like this...
i used that example to create and test these variants:

$replace((%length%),':', ,1 13 ,73 )$tab()%size%  
$replace(%length%,':', ,1 13 ,73 )$tab()%size%  

but even these basic lines don't work


Re: Columns UI

Reply #7739
when i try this variant:
$div(%length_seconds%,60) $right(%length%,2)$tab()%size%  
foobar displays 0 32 instead of 73 32
(it's just 1 example)

i suppose that we are speaking about different things (i speak about the 'playlists switcher panel')
there i should see the total length of all tracks in a current playlist

so proposed by you      $div(%length_seconds%,60)       is not a solution
and seemingly, it can't be. because wiki says: 'The length of the track in seconds'
(track, not tracks)

Re: Columns UI

Reply #7740
My mistake, you're right that the playlist switcher doesn't use standard title formatting and manages its own special fields which aren't available elsewhere. It has to do this for calculating totals for a whole playlist's worth of tracks.

Re: Columns UI

Reply #7741
I guess this manipulation of the %length% field is better than your original but still pretty ugly...

Code: [Select]
$ifgreater($len(%length%),6,$add($mul($substr(%length%,0,$sub($strstr(%length%,:),1)),60),$substr(%length%,3,4))$right(%length%,3),%length%)

 

Re: Columns UI

Reply #7742
I was tempted to use the bug tracker, but it's a request, so I guess it's better here, especially if you're not interested at all:

Glowing effect for columns UI panels ("playlist view" & "item details" especially, filters & playlist switcher too ?)

I think you know what glowing effect is but here is an example:
https://codepen.io/AllThingsSmitty/pen/VzXrgY

I don't know the impact in CPU/GPU ressources but (if it's not intensive) I always hoped you would develop that.
But that might be complicated and if you're focused essentially on maintaining this component, that's already nice.
I don't the texting rendering functions currently in use support such an effect, so it would add a lot of complexity I'm afraid.

Perhaps tabbing downwards in the Columns UI playlist is still a feature worthy of consideration considering the above issues
Yes, I think it's a perfectly reasonable request. But needs some consideration of what the keyboard shortcut should be (perhaps something like Ctrl-Up to go up and Ctrl-Down to go down if those aren't used already).

My mistake, you're right that the playlist switcher doesn't use standard title formatting and manages its own special fields which aren't available elsewhere. It has to do this for calculating totals for a whole playlist's worth of tracks.
Yes, I could easily add the other length field variants as well.
.

Re: Columns UI

Reply #7743
snotlicker, thank you for the help. these days i'm trying to optimize my 2 scripts (using your advices and codes)
currently it seems that both new scripts are finally normal

this is the new script-2 (for the 'playlist view'):

$div(%length_seconds%,60) $if($not($greater($len(%length_ex%),8)),$substr(%length_ex%,3,4),$if($greater($len(%length_ex%),10),$substr(%length_ex%,6,7),$substr(%length_ex%,4,5))) $right(%length_ex%,3)


this the new script-1 (for the 'playlists switcher panel'):

$ifgreater($len(%length%),6,$add($mul($substr(%length%,0,$sub($strstr(%length%,:),1)),60),$substr(%length%,3,4)) $right(%length%,2),$substr(%length%,0,$sub($strstr(%length%,:),1)) $right(%length%,2))$tab()%size%  

i will re-check them later (in hope that there will be no additional issues)
if anybody sees some mistakes, let me know


musicmusic
Quote
Yes, I could easily add the other length field variants as well
(if it's technically easy for you)
please help me to solve a long-time problem. i need to see the milliseconds in the 'playlists switcher panel'

it will remove the huge inconvenience when foobar is rounding up the seconds (sometimes minutes)
- the solution may appear for the 'playlists switcher panel' (at least for this very important part of foobar)
- the problem will seemingly stay in the standard playlist manager (i don't know at all how to add the milliseconds there)

my version of 'columns ui' is 0.3.6.4        (foobar is 0.9.6.4)
if i knew how to edit/create the corresponding dll (foo_ui_columns.dll), then i would have done it myself without bothering you with the request that is so special
(mainly because the version of 'columns ui' is not new at all, but i know what i'm doing,
and i really need to keep using this exact version of foobar and this version of 'columns ui' that is compatible with my foobar)

example: currently foobar displays (in 'playlists switcher panel') (minutes and seconds):
84 27
while in reality the duration is 84 26 503
so my tiny wish is to see
84 26 503
instead of 84 27

84 27 is misleading and wrong, if we speak about seconds        (it's important for me)
84 27 is not informative, if we speak about milliseconds         (i often need the complete info)
the current foobar's approach can even lead to displaying of wrong minutes (in cases like 79 59 500 or 59 59 716)

Re: Columns UI

Reply #7744
If these updated length fields were added to the latest version of Column UI, you'd need to upgrade the pre-historic version of foobar2000 you're clinging on to. That's well over a decade old.

CUI now requires at least fb2k v1.4 (released well over 2 years ago, the current version is v1.6.7). At least windows 7 is also required.

Re: Columns UI

Reply #7745
i found at least 1 big mistake in the script-2 (for the 'playlist view'):

$div(%length_seconds%,60) $if($not($greater($len(%length_ex%),8)),$substr(%length_ex%,3,4),$if($greater($len(%length_ex%),10),$substr(%length_ex%,6,7),$substr(%length_ex%,4,5))) $right(%length_ex%,3)

the script consists of 3 parts that are divided by a space. they are sequentially responsible for the displaying of:
- minutes                $div(%length_seconds%,60)
- seconds
- milliseconds           $right(%length_ex%,3)

as it turned out, the short part 1 is not acceptable because it leads to the following mistake:
2 examples:

1) a file lasts for 59 59 464
there are no problems here. the 'playlist view' correctly displays: 59 59 464

2) a file lasts for 59 59 560
there is a problem here. the 'playlist view' incorrectly displays: 60 59 560


this mistake exists because of that above-mentioned foobar's defect
the description of this defect: foobar is obtrusively  rounding up the seconds, minutes, and sometimes even milliseconds

(while simultaneously not giving the user any tiniest choice/setting/option to choose between the current bad situation and the possibility to enable a setting like this: 'do not round up anything anywhere in foobar')

a few minutes ago i tried to solve the problem by changing the line
$div(%length_seconds%,60)
to
$div(%length_seconds_fp%,60)
luckily, this variant of code works correctly


my supplication to musicmusic stays absolutely actual:
if someday you'll have several free minutes, please add the support for the %length_ex% (in the 'playlists switcher panel')
for the foo_ui_columns.dll file (version 0.3.6.4), and upload this dll-file here (even without any hope, i'll still be waiting)

 
SimplePortal 1.0.0 RC1 © 2008-2021