Magic Node tempo script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Magic Node tempo script

by Guest » Thu Dec 21, 2006 4:39 pm

rovingcowboy wrote:
Philby wrote:I use WinXPpro.
It could be the version of Windows, but we should get an opinion on that from onkel_enno, the author of the original script. There are some powerful SQL statements being executed in this script, and there may be an issue with Win98 or the VB runtime files (I am only guessing though).

Are you looking in the Properties section of each track to see if the Tempo is there ?

Do you have your Tempo entries set up according to those defined in the script ?

All my tracks are mp3.
i don't know where else to look for the tempo of the songs other then in the properties?

yes that is the way they are set up in media monkey.

by rovingcowboy » Sat Oct 01, 2005 11:04 am

http://www.mediamonkey.com/forum/viewto ... 4573#24573


that is the link to the code i got to work for my windows 98 computer it really is working in that script this time and it is working from inside the monkeys tools/scripts menu

you just put the script in the scripts folder and it works.

don't ask me how i found out what to do to fix it but i got it fixed i just don't really know how unless the lord helped me cause i cant program worth a crap. so i had help from him i guess. 8)

by rovingcowboy » Fri Sep 30, 2005 8:14 am

okay will try the tags sync also.

i posted some in the other thread as to what i found in the script i posted and i am just going to get off line and go to the other computer to try it..

will post back as to what happens.

8)

by trixmoto » Fri Sep 30, 2005 8:01 am

This is what I did.

1) Tag all mp3s with BPM value (using MixMeister software)

2) Rescan all tracks so library contains BPM values

3) Open MediaMonkey.mdb in Access and change List table to contain all the records I wanted (Type=1, Data=Slow | Type=1, Data=Medium | ...)

4) Download script, save as SetTempo.vbs

5) Edit the script so the categories match the information I set up in the .mdb file

6) Double click on the .vbs file to run the script externally

This is all I did and all my files are successfully tagged with tempo, presumably because I have MM set up to edit my tags when updating the library.

Just to be sure, this is the contents of my .vbs file:

Code: Select all

Option Explicit

Sub SetTempo

REM "Unknown" for BPM < 1
REM "Largo" for BPM between 0 and 56
REM "Andante" for BPM between 57 and 82
REM "Allegro" for BPM between 83 and 145
REM "Presto" for BPM > 145

Dim SDB
Set SDB = CreateObject( "SongsDB.SDBApplication")

Dim KeyLargo
Dim KeyAndante
Dim KeyAllegro
Dim KeyPresto

Dim dsTemp
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Slow'")
   if not dsTemp.EOF then KeyLargo = dsTemp.ValueByIndex(0)
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Moderate'")
   if not dsTemp.EOF then KeyAndante = dsTemp.ValueByIndex(0)
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Fast'")
   if not dsTemp.EOF then KeyAllegro = dsTemp.ValueByIndex(0)
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Very fast'")
   if not dsTemp.EOF then KeyPresto = dsTemp.ValueByIndex(0)
set dsTemp = Nothing

'Delete all Tempos
SDB.Database.ExecSQL("Delete from AddSongInfoInt WHERE DataType = 10101")

'Set all Tempos to Largo, where BPM between 0 and 56
if CStr(KeyLargo) <> "" then
   SDB.Database.ExecSQL("INSERT INTO AddSongInfoInt (IDSong, DataType, IntData) Select Songs.ID, 10101, " & KeyLargo & " FROM Songs WHERE BPM BETWEEN 0 AND 56")
else
   MsgBox "Largo is not part of the Tempo-List"
end if

'Set all Tempos to Andante, where BPM between 57 and 82
if CStr(KeyAndante) <> "" then
   SDB.Database.ExecSQL("INSERT INTO AddSongInfoInt (IDSong, DataType, IntData) Select Songs.ID, 10101, " & KeyAndante & " FROM Songs WHERE BPM BETWEEN 57 AND 82")
else
   MsgBox "Andante is not part of the Tempo-List"
end if

'Set all Tempos to Allegro, where BPM between 83 and 145
if CStr(KeyAllegro) <> "" then
   SDB.Database.ExecSQL("INSERT INTO AddSongInfoInt (IDSong, DataType, IntData) Select Songs.ID, 10101, " & KeyAllegro & " FROM Songs WHERE BPM BETWEEN 83 AND 145")
else
   MsgBox "Allegro is not part of the Tempo-List"
end if

'Set all Tempos to Presto, where BPM between 0 and 56
if CStr(KeyPresto) <> "" then
   SDB.Database.ExecSQL("INSERT INTO AddSongInfoInt (IDSong, DataType, IntData) Select Songs.ID, 10101, " & KeyPresto & " FROM Songs WHERE BPM > 145")
else
   MsgBox "Presto is not part of the Tempo-List"
end if

Set SDB = Nothing 

End Sub
If your library has the tempo tags but your songs do not, try saving your tags to files manually.

ADDITION: By "manually" I mean by selecting all your tracks and clicking "Menu|Advanced Tag Management|Synchronise Tags" or clicking "Ctrl+S".

by rovingcowboy » Fri Sep 30, 2005 7:09 am

trixmoto wrote:All my tracks are mp3s too, with ID3v1 and v2 tags.

Philby is quite correct about me being wrong. You shouldn't rescan as this will copy your blank tags back into the library. What you should do is save your library to your tags so that the tempos are copied into each file.

Hope this helps.

at this point i have tried lots of stuff and i am unsure what your telling me to do.
:-? :o
so give me step by step instruction.
8)

by rovingcowboy » Fri Sep 30, 2005 7:08 am

Philby wrote:I use WinXPpro.
It could be the version of Windows, but we should get an opinion on that from onkel_enno, the author of the original script. There are some powerful SQL statements being executed in this script, and there may be an issue with Win98 or the VB runtime files (I am only guessing though).

Are you looking in the Properties section of each track to see if the Tempo is there ?

Do you have your Tempo entries set up according to those defined in the script ?

All my tracks are mp3.
i don't know where else to look for the tempo of the songs other then in the properties?

yes that is the way they are set up in media monkey.

by trixmoto » Fri Sep 30, 2005 3:09 am

All my tracks are mp3s too, with ID3v1 and v2 tags.

Philby is quite correct about me being wrong. You shouldn't rescan as this will copy your blank tags back into the library. What you should do is save your library to your tags so that the tempos are copied into each file.

Hope this helps.

by Philby » Thu Sep 29, 2005 10:24 pm

I use WinXPpro.
It could be the version of Windows, but we should get an opinion on that from onkel_enno, the author of the original script. There are some powerful SQL statements being executed in this script, and there may be an issue with Win98 or the VB runtime files (I am only guessing though).

Are you looking in the Properties section of each track to see if the Tempo is there ?

Do you have your Tempo entries set up according to those defined in the script ?

All my tracks are mp3.

by rovingcowboy » Thu Sep 29, 2005 9:44 pm

i have tryed the script that i got to work with out causeing any errors.
and posted in the other thread.

every which way to sunday and it just will not put the tempo's in to the tempo area.

which os's and formats are you to use it with? as it will not put the tempo on midi wav mid rmi ogg mp3.

so just what the ... ....... is wrong?

all i did in the script was to add the one for very fast. and change all them strange words? like largo to the ones used in my meida monkeys english

so i don't under stand why the words are not being put in the text area for tempo.?

i have double clicked on the vbs when monkey was off. it started monkey then closed monkey.

i then started monkey and rescaned it still did not show the tempo? :o

as i said every which way to sunday and i still can't get it to work.

so the only thing i can think of is the os? i am trying to use it on win98 and all the other scripts i got work with monkey on that os?

8)

by Philby » Thu Sep 29, 2005 6:20 pm

You shouldnt have to rescan the library - because the script is updating the MM database (the library) directly - the track tags themselves are not touched.

by rovingcowboy » Thu Sep 29, 2005 4:43 pm

you mean you have to rescan the libriary?

after you run the file?

by trixmoto » Thu Sep 29, 2005 7:28 am

I ran the script externally. Just double clicking on the vbs file and when i rescanned my music the values were there. I have not tried running it from within MM.

by rovingcowboy » Thu Sep 29, 2005 6:51 am

in my script i posted in that other thread i changed all those to work with what media monkey had in it properties listing for the songs.

so if it worked before with the others for other people then it should work now for me with those changes.

but yet all it did was not cause an error. and not put the tempo in to the tempo area for the songs?

so how do i get it to put the tempo in to the tempo area for the songs.

by trixmoto » Thu Sep 29, 2005 2:58 am

If you're getting the messages:
"Largo is not part of the Tempo-List"
"Andante is not part of the Tempo-List"
"Allegro is not part of the Tempo-List"
"Presto is not part of the Tempo-List"
Then it's because you don't have Largo, Andante, Allegro and Presto in your tempo list. This line looks in the MediaMonkey.mdb database:

Code: Select all

Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Largo'")
You either need to open MediaMonkey.mdb in Access (or other database program) and go to the "Lists" table and edit the entries (just add the names at the bottom of the list making sure the Type is entered at 1).

Or you can change the script to say

Code: Select all

... AND TextData = 'Slow'")
or other categories alraedy in this list.

by rovingcowboy » Wed Sep 28, 2005 6:07 pm

check the other post i just put the code in that i had to adjust but it just don't work. :o

Top