Help - Search - Members - Calendar
Full Version: Logging of Audio Tracks
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
supreg
Is there a feature in foobar that can help log the songs I've listened to, so that i can analyze the songs i listen to and make some interpretation of them.

thanks in advance
shakey_snake
maybe you'd be interested in this:
http://www.last.fm/

and this component
supreg
QUOTE(shakey_snake @ Apr 2 2007, 10:19) *

maybe you'd be interested in this:
http://www.last.fm/

and this component



Thank you for the link, i'm interested in something similar to this. but i want the log for myself to make some analysis over it. And since foobar is the audio player i use. Does it have the capability of making a data entry of the songs i listen to.

shakey_snake
Have you tried any one of the playcount components?

http://wiki.hydrogenaudio.org/index.php?ti...oo_playcount%29

(hint: make sure the tracks are added to you media library first)
Yotsuya
You might also be interested in foo_custominfo. I don't use it myself as I could never figure out how to get it to store and retrieve information programatically without using manual clicking on context menus. However, it reports the ability to exchange information with SQL databases.

Also, if you are using Panels UI you can use $setpvar() under a // PerTrack header to store information when track changes occur. Several of us have recently begun using this technique to build short playback history lists. However if you want to process a significant amount of data it isn't a very good solution.

Does anyone know if there is a way to dump information out of foobar into a text file by code? Any way to append a string of text to a text file? Or any sort of $docmd() where we can execute context menu options without manually using the context menu or a button? Dumping pvars to an sql database on trackchange could be useful. Appending to text files could be used to build cue sheets for ripping online radio.
Old Grouch
QUOTE(Yotsuya @ Apr 1 2007, 23:40) *

...Any way to append a string of text to a text file?...

The DOS window command-line copy command can do this, although not very elegantly, and only with standard text files.

[The remainder of this reply is intended for those asking "what's that???" wink.gif ]

Simplified syntax: copy source1 [+source2] [+additional source(s)...] destination

source and destination can include full paths, but it's much easier if you're executing in the directory that contains the files you want to work with. It's also easier if the filenames are 8.3 format (otherwise, you have to determine their "DOS names").

If file1.txt is the file you want to append stuff to, first create a second file (say, named scratch.txt) that contains the text you want to add. Then the command would be:
CODE
copy file1.txt+scratch.txt file1.txt

Be sure to list file1.txt first in the source string, otherwise you'll lose its contents (and get an error). Also file1.txt has to exist before you start (although scratch.txt doesn't... go figure!).

Afterward, you'll probably want to delete scratch.txt.
Yotsuya
Old Grouch: I am quite familiar with dos commands and can see how one could set up "echo [%album artist% - ]%title% >> filename.ext" to a foo_run event... but how would one trigger the event on a per track basis automatically without manually clicking on a custom button?

Or did you have another approach to triggering the copy command in mind?
Old Grouch
QUOTE(Yotsuya @ Apr 8 2007, 03:58) *

Old Grouch: I am quite familiar with dos commands and can see how one could set up "echo [%album artist% - ]%title% >> filename.ext" to a foo_run event...

Didn't mean to impugn your knowledge. Nowadays, the command line is a closed book to many people, and thought it might be worth mentioning.
QUOTE(Yotsuya @ Apr 8 2007, 03:58) *

Or did you have another approach to triggering the copy command in mind?

Actually, you can mark me as another user who is looking for a way to do what you and supreq are asking for, and so far I haven't found anything that does the exact job.

Foo_history generates a list, and you can periodically select all and dump that, but (1) AFAIK not automatically (maybe foo_run+foo_scheduler can do this?), (2) if a song gets played twice between dumps, both plays will show the later timestamp, (3) the title format can't be different from the one for playlist display. It's also a bit of a nuisance that it won't list tracks that aren't in the library or are less than one minute long, and that the time stamps lag the actual start time by one minute.

In a perfect world, I'd like something with indepentently formatted output (so you could specify comma delimited record strings for database or spreadsheet input) with arbitrary headers and/or footers (so you could create HTML pages on the fly), and that would be capable of logging system events (pause, add track, change playlist, etc.).

I wonder if one of the notifier plugins could be modified to to this?
Old Grouch
Okay, further searching turned up yet another plugin list dry.gif , which led to Skyprich's "simple now playing" plugin [download page].
QUOTE
Simple now playing plugin to output formatted string to plain text file using one of the following encodings: UTF-8, Unicode or ANSI.
Custom tag %volume% is also supported.
Unfortunately, he archives it using "7z" compression, and my 7z archiving utility just got broken by Microsoft's Animated Cursor exploit patch:
QUOTE
The Hhctrl.ocx file that is included in security update 928843 and the User32.dll file that is included in security update 925902 have conflicting base addresses.


Aaarghh!! headbang.gif

Think I'll give this thing a couple of days to blow over and then try it again.
kanak
Here's one thing you could do.

1. Use foo_history or an autoplaylist that keeps track of the songs you've played.

2. Use foosion's text tools which are in foo_utils to output the text to a file.

It's manual labor but it works.
Old Grouch
"Final report" for anyone left who might be interested. Here's how the "simple now playing" plugin mentioned in my April 7th post works:

It adds a page (PREFERENCES -> TOOLS -> NOW PLAYING SIMPLE) on which you can specify the logfile name and path, its encoding, and the format (same syntax as PREFERENCES -> DISPLAY -> TITLE FORMATTING).

When active, at the beginning of a track it creates the logfile if not already present, then writes one line to it based on the format specified. When the next track plays (next event?) it overwrites (does not append to) the logfile with new information.

So right now it's more of a proof-of-concept demonstration than a useful item (although really close to being what you're looking for). I suppose you could write an external program to periodically check for changes in the logfile, and scrape info when it was changed.
amppa
I have logged all my music listening in foobar2000 to a text file for over three years by now, first with musicmusic's foo_text (with foobar 0.8) and now with AMIP (0.9). I, too, made this because I was unhappy with the existing statistics services. I made my own statistics site to add the log to a database and make various interpretations based on it (and some extra features, like automatic cover art and lyrics downloading). It still works pretty well with some 77k log rows. Not sure if this was what you're interested in or not.
efe
QUOTE(amppa @ Apr 22 2007, 11:49) *

I have logged all my music listening in foobar2000 to a text file for over three years by now, first with musicmusic's foo_text (with foobar 0.8) and now with AMIP (0.9). I, too, made this because I was unhappy with the existing statistics services. I made my own statistics site to add the log to a database and make various interpretations based on it (and some extra features, like automatic cover art and lyrics downloading). It still works pretty well with some 77k log rows. Not sure if this was what you're interested in or not.


amppa,
how do you have AMIP set up to make it append to the output file rather than overwrite it after each track?
thanks
amppa
QUOTE(efe @ May 30 2007, 02:30) *

amppa,
how do you have AMIP set up to make it append to the output file rather than overwrite it after each track?
thanks

I configured the AMIP using an older version, so these are how I did it:
  • Other integrations -> Callbacks -> Exit: /file:(file_path|WIN) [quit]
  • IRC integration -> Presets -> 1: /file:(file_path|WIN) %dstamp.%monstamp.%ystamp / %hstamp:%mstamp:%sstamp %s

The IRC integration had to be used, since there was no "Change" tab at the time (explanation). The file doesn't get overwritten, don't know if there's any separate setting for that. At least didn't find any.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.