Magic Node tempo script

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

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.
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

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)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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".
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

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)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

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)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
Guest

Post by Guest »

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.
Post Reply