
bpm calc 4 amarok (Version 1 and 2)
Source (link to git-repo or to original if based on someone elses unmodified work):
Available as/for:
Description:bpmclac4amarok
----------------
Detecting the BPM's (beat per minute) from amaroks song database.
Because the amarok script bpmcalc is not working on my computer and it is handy for me to calculate the bpm at ones, I have wrote this application.
The application is using the amarok database, but only mySQL.
And also depends on:
- apt-get flac ffmpeg soundstretch
The bpm is calculated with the tool soundstretch and the resulting bpm go written back into the database.
To finding the bpm's, there are two parameters for the analysis: the starting point and length, both in second.
Not discovered bpm's are serialized with -9 and they can later be re-analyzed repeatedly with diffrent parameters.
There are 4 scan methods (based on the information in amarok mySQL database):
- songs in which the bpm was not found. these are the songs previously serialized with -9. I discover that changing startpoint and lenght can detect many of them.
- songs in which the bpm is outside of a range. bmp below 50 and bpm above 200 seem suspicious to me. it is possible to "correct" them with some parameters.
- repeating the bpm detection process for all songs
- the default is to process only song without bpm information.
How to use it:
Open a shell window, type "bpmcalc4amarok.gambas" and hit enter to see help. Add parameters as expected to process.
Many parameters are avaiable to control.
A in-depth description of the opportunities come maybe later.
Here the applications help text:
usage:
ouput to logfile
--o=-filename (default=no log)
sql login:
--l=host address (default=localhost)
--t=port number (default=3306)
--u=username
--p=password
--d=databasename (default=amarok)
bpm detection specific, optional:
--k=skip seconds, default=0 (point at start bpm analyzing)
--g=read seconds, default=60 (bpm analyzing)
song selection, optional (sql select limit):
--b=start at row (default=0)
--m=max rows to read (default=all)
--c=sql-where-clause, over fields in table tags:
url,dir,title,year,comment,track,bitrate,length,samplerate,bpm
createdate,modifydate,album(id),artist(id),composer(id),genre(id),deviceid
song scan options, optional. no parameter is default=only undedected songs:
--f full rescan of all songs
--r rescan failed bpm detection
--j out of range bpm scan (see x,y and a,z)
bpm range accept, defaults=all (recomended: min=50, max=200
--x=min bpm;
--y=max bpm
--i round detected bpm
bpm "correction" when less(x) or bigger(y), optional:
--a=multiplier (a*bpm= corrected bpm
--z=divider (bpm/z= corrected bpm
other options, optional:
--v verbose information
--h this help
Version 0.1.4-1
- Support for Amarok2;
Use Parameter "--s=# Version" to Amarok-Version or run with --h to geht Parameterlist-
Version 0.1.2-1
- Fixed missing Schema when not default Databasename amarok is used (thanks noerg)
Version 0.1.1-1
- Databasename as parameter
- SQL Where-clause as parameter
- Fixed tagging when "Couldn't detect BPM rate"
Ratings & Comments
4 Comments
... all I get is the error “Main.?.0: Cannot find driver for database: mysql” An yes, I have mysql installed and uses it with amarok ;) Any ideas?
just install gambas-gb-mysql
Thank you! Now the error does not appear. But everytime I run the program it just puts out “calculate BPM for 0 files .... Done”, no matter what I tell it what files to scan. Are you sure it works with Amarok 2?
I don't know - thats the same behavavor for me and i tried it with amarok 1.4 database but also get only “calculate BPM for 0 files .... Done”.