Mirage as standalone solution

76 views
Skip to first unread message

FrankD

unread,
Mar 7, 2010, 6:56:40 AM3/7/10
to Mirage - Automatic Playlist Generation
Hi I'd love to be able to exploit the power of Mirage as a standalone
playlist generator for cli.
Is this possible?
I've seen this related post http://groups.google.com/group/mirage-list/browse_thread/thread/66227e68e648f637
but i'm not if it still apply as i can not seem to be able to use
what's in the Test folder.
Any help appreciated.
Frank D.

Bertrand Lorentz

unread,
Mar 8, 2010, 5:11:10 PM3/8/10
to mirag...@googlegroups.com
Hi,

As a prelude, in case you're not aware of that, I should make the late
announcement that Mirage is now included in the "Banshee Community
Extensions" project.
The source is now available on Gitorious :
http://gitorious.org/banshee-community-extensions

The basic structure of Mirage has not really changed :
- libmirageaudio.so : C library interfacing with GStreamer
- Mirage.dll : C# library doing the analysis (using libmirageaudio) and
the similarity calculation
- Banshee.Mirage.dll : the Banshee extensions using Mirage

What has changed is that Mirage.dll doesn't do any storage anymore, this
is handled by Banshee.Mirage.dll. This reduces the dependencies and
allows for a tighter integration in the application using it.
This also adresses one of the questions in the post linked above.

So yes, you should be able to use Mirage.dll as a standalone library,
along with libmirageaudio.so. But you you have to handle the storage of
the analysis data for each track (called Scms).

As for the content of the Test folder, it didn't build, but I just
committed a fix for that in the Gitorious repository.
The genre classification test is commented out, because it doesn't work
anymore after the changes described above, and it's quite complicated to
set up anyway.

I hope this helps, and I'll be happy to hear any news about what you're
building with Mirage.

--
Bertrand Lorentz <bertrand...@gmail.com>
> http://bl-log.blogspot.com <

signature.asc

Frank Danieli

unread,
Mar 9, 2010, 3:49:14 AM3/9/10
to mirag...@googlegroups.com
Hi Bertrand.
Thanks for your reply.

Maybe I've not expressed myself well.
What i meant was creating a sort of "stand alone tool", executable from command line, that would use the mirage lib and similarities features to compare audio files and return a playlist based on those features.
At a very basic level, something like

$  mirage -input collection_of_audio.txt -output playlist_resulted.txt

This could bring Mirage out to a larger audience that don't know C (like myself), creating a very useful tool, with a much broader range of applications.
What are your thoughts in this regards?
Thanks
Frank Danieli

eric casteleijn

unread,
Mar 9, 2010, 8:32:15 AM3/9/10
to mirag...@googlegroups.com
On 03/09/2010 03:49 AM, Frank Danieli wrote:
> Hi Bertrand.
> Thanks for your reply.
>
> Maybe I've not expressed myself well.
> What i meant was creating a sort of "stand alone tool", executable from
> command line, that would use the mirage lib and similarities features to
> compare audio files and return a playlist based on those features.
> At a very basic level, something like
>
> $ mirage -input collection_of_audio.txt -output playlist_resulted.txt
>
> This could bring Mirage out to a larger audience that don't know C (like
> myself), creating a very useful tool, with a much broader range of
> applications.
> What are your thoughts in this regards?

This could be done pretty easily as the mirage C library is very nicely
usable from any language with C bindings. You could start doing this in
C# by looking at the source code for mirage itself, or if you prefer
Python, you could look at autoqueue (and more specifically the mirage
bindings in that, which I've recently separated out a bit more cleanly.)

https://launchpad.net/autoqueue

Also: do you propose to have this:

mirage -input collection_of_audio.txt -output playlist_resulted.txt

scan an entire collection and make a short semi-random playlist of
similar songs out of it, or take an x number of songs and order them in
some way by their mirage similarity scores?

The first is certainly possible, but unless you store the results of the
analysis somewhere, as Bertrand says, it will take a very long time each
time you call it (1.5 seconds per song for the analysis alone, on my
machine).

The second is interesting, and I've written a plugin for quodlibet that
does just that as well: mirage miximize (also included in autoqueue)
which takes a bunch of songs, computes the similarity matrix between
them, and then does a sort of simplified travelling salesmen traversal,
to sort them in an order with the smallest jumps in distance between the
songs. It has very little quodlibet specific code, so I think you could
easily create a command line tool from that.

cheers,

Eric

Reply all
Reply to author
Forward
0 new messages