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.

Poll

Do you wish foobar2000 graph builder plugin?

Yes
[ 5 ] (31.3%)
Yes, by developing/expanding foo_facet plugin
[ 3 ] (18.8%)
No
[ 6 ] (37.5%)
I am not sure.
[ 2 ] (12.5%)

Total Members Voted: 16

Topic: To wishlist: foobar2000 graph builder plugin? (Read 2732 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

To wishlist: foobar2000 graph builder plugin?

In my opinion, it will be very useful: to show in pie charts, nested pie charts or other type graphs the percent and quantity by compositor and composing year, recording year, genre, performer, file origin and date, file type and so on, and so on.

There is a workaround: send full media library to Mp3tag (a brilliant application, too), then from there export to Excel or a PHP page, and build a graph. But it is time consuming (mainly because to import >40 thousands files to Mp3tag take a while...), not very user friendly.

Facet plugin has a little such abilities (for example, lists all genres or what you want, and shows+sort-by items/length/duration/...), and this is very nice; but it did not build graphs.

Re: To wishlist: foobar2000 graph builder plugin?

Reply #1
There is something here in the vein of what you're looking for. No pie charts but horizontal bar charts. Made for wsh panel mod. I can't find who wrote it but there is a thread about it here on hydrogenaudio (haven't found it yet, will post if I do). It's old but still works fine since I use it as a central part of my own config.

Basically it writes all data to an sqlite database and the wsh panel mod script reads from the database and makes charts out of them.  I adapted the script to my own liking by adding lots of extra charts to choose from which is not hard to do with some basic sql understanding and with trial and error.

Re: To wishlist: foobar2000 graph builder plugin?

Reply #2
Hi jazzthieve, excuse my off topic, but if that's your configuration, may I ask what is the panel bottom right of the central section with the artist names and pics?

P.S.
By the way I think I've seen that graph on jam2.
I'm late

Re: To wishlist: foobar2000 graph builder plugin?

Reply #3
@davideleo left and right from the central playlist are both graphical browsers.

Thread for the wsh panel mod script for charts.

Re: To wishlist: foobar2000 graph builder plugin?

Reply #4
Thank you, jazzthieve, it sounds interesting.

Re: To wishlist: foobar2000 graph builder plugin?

Reply #5
@davideleo didn't manage to make it work, and he went through a lot of effort.
I wish there was a friendlier option.

Re: To wishlist: foobar2000 graph builder plugin?

Reply #6
I would love to see something like this as well - I think the description of graphs doesn't really sell the potential application - basically enabling visualization of foobar playback statistics.

Fooscrobble is certainly popular, while lastFM is a husk of it's former glory - I would love to leave it entirely if Foobar could fill that data crunching niche.

My own idea was to at least add a formatting function(s) to simplify the maths:
$items(%field%) $subitems(%field%)

The data seems to already exist, yet remain trapped in Facets/foo_(enhanced_)playcount.



Re: To wishlist: foobar2000 graph builder plugin?

Reply #7
People are still interested in this? I'm still using the charts although I changed it to fit a more narrow panel (text fills the bars instead of the numbers). I created about 48 different I can call, rating based, track based, playtime based,.... Also shows up to 1000 elements shown in 100 step increments. It's pretty fast at generating 1000 which was surprising, perhaps it's because I'm running foobar2000 as portable on a ramdisk.



I know in the other thread me and davideleo tried to make it work but failed. One thing I could perhaps try, since I'm using portable, is to strip my config and share it with the chart and database intact if people are interested.

Re: To wishlist: foobar2000 graph builder plugin?

Reply #8
Thanks for offering. I'd just like to be sure about what can or can't be done. Here's an example.

Let's say I have a given playlist (or Facets selection - is Facets mandatory for this BTW ?).
All files in that playlist may have different bitrates. Some at 64 Kbps, some at 320 Kbps, some in lossless form, etc..
Is it possibe to make a custom bar graph to reflect that ? For example :
- Bar 1 : bitrate < 128 Kbps
- Bar 2 : 128 <= bitrate < 192 Kbps
- Bar 3 : 192 <= bitrate < 256 Kbps
- Bar 4 : 256 <= bitrate < 320 Kbps
- Bar 5 : 320 <= bitrate < 1412 Kbps
- Bar 6 : 1412 <= bitrate

You get the idea. Same concept could be applied to other tag fields (e.g. duration). I don't know if that's feasible.
I have JS Panel with a basic cover art script by marc2003.

 

Re: To wishlist: foobar2000 graph builder plugin?

Reply #9
Sure that's possible, all date is stored in an sqlite database so the graphs are produced using sql. This is the query for the graph in the image:
Code: [Select]
query = '\"SELECT SUM(PC) AS GL4B_COUNT, GL4B, PC FROM fingerprint WHERE '+dateRangeSqlStr+'  AND PC > 0 GROUP BY GL4B_ID ORDER BY GL4B_COUNT DESC LIMIT '+limit+';\"';

It's best you're a bit familiar with javascript used on wsh/js panel and know sql because it's all done in the code. No easy graph builder or anything like that. Frankly I'm hoping more someone with coding skills take a look at this, get some ideas from it and could revamp it. This graph panel here is far superior to what last.fm offers with its graphs. I can make (almost) any kind of chart I can think of with any kind of combination of data. And over 10 years worth of data is lots and lots of data to play with.

Edit: forgot to mention, this has nothing to do with facets or any other foobar2000 component. This is just old wsh_panel_mod using FB1.4. I do however use text_tools when I want to re-import the entire database (I'm constantly updating tags and data is only updated when played). Also using DB Browser for SQLite to access the database independently and test queries, and using firefox SQLite manager for the actual import.


Re: To wishlist: foobar2000 graph builder plugin?

Reply #11
Frankly I'm hoping more someone with coding skills take a look at this, get some ideas from it and could revamp it.
+1. Agreed.
Currently it seems too complicated for most users, me included. I don't have any specific JS / SQL skills. Only titleformat, lol.