Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
Smart DJ lets you find tracks based on how similar they sound to each other. It can also automatically add new tracks to your playlist based on how similar they are to what you've been listening to.

In addition to PyQt, this requires songanalysis (0.4.0 or higher), python-commandsplus, python-extattr, python-Observable and python-amarok (these last two are new dependencies) which can be found at

http://rudd-o.com/projects/

(the RPM packages have been linked here for your convenience, and will work if you have Fedora Core 4; the source packages are available at the aforementioned URL, and packages for other distributions may be found in the comments section of this page, thanks to very thoughtful and considerate individuals).

Songanalysis requires the GNU Scientific Library (package named libgsl or gsl, depending on your operating system), mpg321 (package mpg321) and ogg123 (package vorbis-tools).
Last changelog:

- Fixed various bugs
- Functionality was split into separate libraries which can be used standalone now


Ratings & Comments

66 Comments

xSober

Hi i try to run the script, but i get this error: DEBUG:AnalysisProcess: Analyzer started DEBUG:AnalysisProcess: Doing one iteration now DEBUG:amaroK Proxy: calling DCOP method: amarok.collection.query(’select tags.url from tags left join analysis on (tags.u rl = analysis.url) where analysis.url is NULL limit 1;’) DEBUG:SuperDynamicModeMonitor: Auto DJ Monitor started DEBUG:SuperDynamicModeMonitor: Auto DJ Monitor detected config change or just started up, adjusting everything DEBUG:ContextBrowserUpdater: Context browser monitor started DEBUG:amaroK Proxy: calling DCOP method: amarok.playlist.shortStatusMessage(’Smart DJ is analyzing your collection’) INFO:AnalysisProcess: Processing: ./xsober/Musica/Creed/01-Alone.mp3 DEBUG:ContextBrowserUpdater: file is not current context browser, ignoring ERROR:AnalysisProcess: Something wrong in background song analyzer, thread stopped Traceback (most recent call last): File “/home/xsober/.kde3.5/share/apps/amarok/scripts/Smart DJ/AnalysisProcess.py”, line 58, in run try: self._run() File “/home/xsober/.kde3.5/share/apps/amarok/scripts/Smart DJ/AnalysisProcess.py”, line 87, in _run self.processSong(next_song) File “/home/xsober/.kde3.5/share/apps/amarok/scripts/Smart DJ/AnalysisProcess.py”, line 122, in processSong date_analyzed = getfattr(file,n_date_analyzed) File “/usr/lib/python2.4/site-packages/extattr.py”, line 56, in getfattr raise Exception, “Error in getfattr: %s: %s”%(status,error) Exception: Error in getfattr: process 3333 exited with status 1: getfattr: ./xsober/Musica/Creed/01-Alone.mp3: No existe el fichero o el directorio i think there is a problem with the file’s path, because it’s looking in ./xsober/Musica/Creed/01-Alone.mp3 but the real path is /home/xsober/Musica/Creed/01-Alone.mp3. is the script running in the /home directory? look that it is, because the path that cause the error is relative to /home , this must be an absolute path… i using: Smart DJ-0.6.0 media-sound/amarok-1.4.9.1 media-sound/songanalysis-0.4.0 dev-python/python-amarok-0.1.1 dev-python/python-extattr-0.1.3 dev-python/python-commandsplus-0.2.3 dev-python/python-Observable-0.1.0 thanks for your work!! bye

Klostpret

When I compiled songanalysis on 64bit it didn't work. My solution: Use: ./configure CFLAGS=m32 and then make && make install. And songanalysis is working great :) In Amarok, Smart DJś priority queue works, the normal queue doesn't. I'll try to fix that. Thanks for the software! Greetings, Thomas Peter

Klostpret

When I compiled songanalysis on 64bit it didn't work. My solution: Use: ./configure CFLAGS=m32 and then make && make install. And songanalysis is working great :) In Amarok, Smart DJś priority queue works, the normal queue doesn't. I'll try to fix that. Thanks for the software! Greetings, Thomas Peter

lemmy04

just to let you guys know, i have all the needed dependecies that dont come with suse by default in http://software.opensuse.org/download/home:/lemmy04/ have fun

unabatedshagie

What would be the easiest way of installing this script into amarok on ubuntu?

avh4

I'm looking at the contents of amarok-show-tempo-1.3.1.diff, and I'm noticing the lines //check boundaries if ( bpm > 250 ) bpm = 250; ... which seems to indicate 250bpm is the maximum that can be assigned. My musical tastes run towards jazz that commonly plays up to 280bpm, sometimes even over 300. Is there any reason I can't change that "250" to a more reasonable :) value, say "400", or is that likely to cause problems with some parts of the script?

halcyon

Here are the contents of the logfile: ERROR:root: An error occurred while starting up. PID: 12994 Traceback (most recent call last): File "/home/halcyon/.kde/share/apps/amarok/scripts/Smart DJ/Smart DJ", line 281, in main try: _actual_main() File "/home/halcyon/.kde/share/apps/amarok/scripts/Smart DJ/Smart DJ", line 228, in _actual_main amarokObject = amaroKProxyPlus() File "/home/halcyon/.kde/share/apps/amarok/scripts/Smart DJ/amarokplus.py", line 207, in __init__ amaroKProxy.__init__(self) File "/usr/lib/python2.4/site-packages/amarok.py", line 742, in __init__ self.smartPlaylistCollection = amaroKSmartPlaylistCollection(self) File "/usr/lib/python2.4/site-packages/amarok.py", line 594, in __init__ self.reread() File "/usr/lib/python2.4/site-packages/amarok.py", line 612, in reread if self.has_changed(): File "/usr/lib/python2.4/site-packages/amarok.py", line 608, in has_changed if self.mtime != os.stat(self.filename)[-2]: return True OSError: [Errno 2] No such file or directory: '/home/halcyon/.kde/share/apps/amarok/smartplaylistbrowser_save.xml' Is this a file I have to create, or does SmartDJ create this file for me?

yoho

I get an error like this : File "/home/vpanel/.kde/share/apps/amarok/scripts/Smart DJ/songanalysiswrapper.py", line 15, in get_version if status.command_not_found: return None AttributeError: 'int' object has no attribute 'command_not_found' I probably miss a package, but in which one is the "command_not_found" attribute of an int ? Could someone tell me the output of "grep -R "command_not_found" /usr/lib/python2.4/" ? Thanks

SupuS

Hi I have big mp3 file - more than 200MB and its analyze kill smartDJ every time. Has anybody same experience? Is it way to limit size of analyzed songs?

SupuS

I realized this problem is on this one song only .. I tried repair it by mp3fixer but without succes .. So is way to disable analyze this song by smartDJ? Thankx

triptol

I have made some (primitive but working) Gentoo Ebuilds. No support whatsoever, so please don't bug me about it ;-) You can get them here: http://files.jordswart.org/SmartDJ-ebuilds.tar.gz Unpack to your overlay root directory and emerge the contents.

triptol

BTW: the songanalysis relies on the sci-libs/sql libraries. I would consider this a pretty heavy dependency. No way you can do this without the dependency?

SupuS

I update presented ebuilds for new version of Smart DJ. You can get it on http://www.zserver.cz/smartDJ_0.6.ebuilds.tar.gz It works fine for me. I have one question. In howto is 30s as time for analyse of one song .. but on my computer it is much longer .. about 15 minut and more .. and the mpg321 with songanalysis eat about 50% of CPU .. any suggestion?

karlheinz

I have used your ebuilds for the new version which works much better than the previous one that always crashed analyzing some songs, thank you all. As for your problems: The analysis of each song takes about 30 secs, so all normal for me here. But the high cpu load you are experiencing is the same for me, but I think this is normal, songanalysis and ogg123 or mpg321 take as much as they can. Maybe some "nice" option would be useful here, just make a feature request to the author.

gordin

songanalizis should run with a niceness of 20 by default. At least it does it for me. BTW, I submitted bugreports at bugs.gentoo.org for the needed programs. I only tested with ppc and x86. Can somebody confirm that this works with amd64 and not with sparc (as stated in the songanalysis-ebuild provided by SupuS)? I would suggest that you make a comment at bugs.gentoo.org, then songanalyzis: http://bugs.gentoo.org/show_bug.cgi?id=114243 python-commandsplus: http://bugs.gentoo.org/show_bug.cgi?id=114245 python-extattr: http://bugs.gentoo.org/show_bug.cgi?id=114246 python-amarok: http://bugs.gentoo.org/show_bug.cgi?id=118661 python-Observable: http://bugs.gentoo.org/show_bug.cgi?id=118660

triptol

I have made some (primitive but working) Gentoo Ebuilds. No support whatsoever, so please don't bug me about it ;-) You can get them here: http://files.jordswart.org/SmartDJ-ebuilds.tar.gz Unpack to your overlay root directory and emerge the contents.

jimct

Hi, first of all, thank you for your great script, it is working very well with my collection. However I found that SmartDJ gives an error whenever I try to play a webradio stream. The error is Javascript: TypeError: Null value I think that perhaps a protection should be made such that smartdj does not try to analyze streams.

Db0

Btw, I also wrote a quick HowTo for Ubuntu. You can find it here: https://wiki.ubuntu.com/SmartDJHowTo

Db0

After fiddling around with the script for a bit I wanted to tweak the slider or tempo/style in order to find similar songs to my liking. As it stands now, the script tends to choose songs that I don't think sound too similar (for example bringing a rock song after a darkwave metal one). However I don't know what these things stand for. Furthermore I have no idea what "Editing the tempo" is supposed to do or how it is used (However the calculation of the tempo is always much lower than the original) Could you write a quick description about those? Also a suggestion for future versions. If possible, have an option to take the genre of the track into consideration when adding new songs, giving tracks of the same genre a higher priority. In a well-tagged collection it would help for smoother transitions while on a badly-tagged one it could just be turned off.

HessiJames
xoulis

You saved me!! Thanks

Db0

I get an error whenever Smart DJ tries to append a track to the playlist Looking at the .log file, this is the relative entry ERROR:SuperDynamicModeMonitor: Error while running super dynamic loop Traceback (most recent call last): File "/home/db0/.kde/share/apps/amarok/scripts/Smart DJ/SuperDynamicModeMonitor.py", line 173, in run_guarded run_if_unlocked() File "/home/db0/.kde/share/apps/amarok/scripts/Smart DJ/SuperDynamicModeMonitor.py", line 168, in run_if_unlocked try:self._the_real_run() File "/home/db0/.kde/share/apps/amarok/scripts/Smart DJ/SuperDynamicModeMonitor.py", line 289, in _the_real_run paths_to_prune,subquery=subquery) File "/home/db0/.kde/share/apps/amarok/scripts/Smart DJ/SuperDynamicModeMonitor.py", line 141, in find_suitable_song artistalbumstring = ce.queryOne("select CONCAT( artist.name , ' - ' , tags.title ) from artist inner join tags on tags.artist = artist.id where tags.url = %s ;" % ce.sql_escape(result)).lower() AttributeError: 'NoneType' object has no attribute 'lower' DEBUG:SuperDynamicModeMonitor: Event received: 'NoneType' object has no attribute 'lower'

RuddO

Please try the latest version and see what the log file says. I'm working on that. I will need the complete log file, by the way.

Db0

Now as soon as it starts it asks for the python-observable package. A google search revelaed some link with the python-twisted package but it wasn't that. There is no log generated for this error (I have deleted it an a new one doesn't appear) Where can I find that package?

Db0

A-HA, sorry, just noticed the new description sorry

Pling
0 Affiliates
Details
license
version 0.6.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Amarok 1.x Scripts from RuddO:

The amaroK bindings for Python
RuddO
last update date: 19 years ago

Score 5.0

Other Amarok 1.x Scripts:

Gnome Play Video in Totem
mwheatland
last update date: 19 years ago

Score 5.0

editLyrics-gnome
ZeeD
last update date: 19 years ago

Score 5.0

amarok Alarm
aroth
last update date: 16 years ago

Score 5.0

amaroK Web Collection V xmms
pti-jean
last update date: 16 years ago

Score 5.0

SongLogger
lucatnt
last update date: 17 years ago

Score 5.0

amaroK Web Collection
pti-jean
last update date: 16 years ago

Score 5.0



System Tags