BPM not being interpreted correctly (Magic Nodes)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Philby
Posts: 155
Joined: Wed Aug 10, 2005 7:49 am

Post by Philby » Mon Sep 26, 2005 6:31 pm

trixmoto,
My final version of this routine will be imbedded in a script that does a lot of other things with Custom fields, checking for lyrics, etc. But the MM developers and users have been very kind in helping me with my problems and requests (most of the time :-), so I will see if it works well, then post a customised version that just does what I have requested in this thread.
Regards
Philby

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

Post by trixmoto » Tue Sep 27, 2005 3:00 am

Cheers, I'll look forward to it! :)
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.

Philby
Posts: 155
Joined: Wed Aug 10, 2005 7:49 am

Post by Philby » Tue Sep 27, 2005 7:53 am

To onkel_enno
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) AND (IDSong IN (" & SongIDs & "))")
The above line gives an error "Too Few parameters - expecting 1"
I have no idea what is wrong !
Regards
Philby

onkel_enno
Posts: 2146
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno » Tue Sep 27, 2005 8:13 am

Ups :lol:

(BPM BETWEEN 0 AND 56) AND (ID IN (" & SongIDs & "))")
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx

Philby
Posts: 155
Joined: Wed Aug 10, 2005 7:49 am

Post by Philby » Wed Sep 28, 2005 5:27 pm

Thats fixed it. Works perfectly now. Many thanks onkel_enno.
I will set about preparing it as a complete script that can be posted for others to use. May be a liitle time befor I can do so, but I will.
Regards
Philby

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Wed Sep 28, 2005 6:00 pm

Code: Select all

removed this code as it was bad .  my code below is the good one for my win98 computer anyways.

Last edited by rovingcowboy on Sat Oct 01, 2005 11:06 am, edited 1 time in total.
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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Fri Sep 30, 2005 7:14 am

onkel_enno

fixed with code that is below

thanks 8)
Last edited by rovingcowboy on Sat Oct 01, 2005 11:07 am, edited 1 time in total.
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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Fri Sep 30, 2005 7:24 am

messeage deleted as it is nolonger relivent
Last edited by rovingcowboy on Sat Oct 01, 2005 11:08 am, edited 1 time in total.
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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Fri Sep 30, 2005 12:11 pm

same as my above message

deleted as it is no longer relivent
Last edited by rovingcowboy on Sat Oct 01, 2005 11:09 am, edited 1 time in total.
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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova » Sat Oct 01, 2005 4:00 am

I just noticed that rovingcowboy says he couldnt make tha magic nodes filter to work with BPM values and thats where the whole story with scripts started.

Hmm strange because in my case Magic Nodes worked just fine.
Try this for example:

Unknown Tempo|filter:BPM<1\<Artist>
and
Allegro|filter:BPM>1 and BPM<80\<Artist>

They both work fine for me

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Sat Oct 01, 2005 8:56 am

psyxonova wrote:I just noticed that rovingcowboy says he couldnt make tha magic nodes filter to work with BPM values and thats where the whole story with scripts started.

Hmm strange because in my case Magic Nodes worked just fine.
Try this for example:

Unknown Tempo|filter:BPM<1\<Artist>
and
Allegro|filter:BPM>1 and BPM<80\<Artist>

They both work fine for me

i see in your example above you have | in there and filter: in there.
they are not in the code i copied do you think that is what is wrong?
i am about to give up on it as it is just not working.

the songs i have that have bpm listed are slim to none.

does that matter.

how do you get the bpm to post.

i thought this would do it.

99% of my songs are ogg format.

i've used up the comment fields with special words for auto playlists so i can't add anything in them.

also not all my songs will analyze the volume either they will on this winxp but not on the win98 not even on the winMe.


so does that help anyone figure out what is wrong.?
i just can't understand this script wont work and all other vbs scripts work.

:o
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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova » Sat Oct 01, 2005 9:06 am

Hmmm, i know for sure that MixMeister free tool wont analyze neither write the BPM of ogg files... so perhaps thats your problem... none of your files has BPM.
As for Magic Nodes just copy paste my examples that works for sure....
Try to assign a (fake) BPM to some of your files manually and see if it works.
Thats all the help i can give you

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Mon Oct 03, 2005 10:15 pm

you might notice i deleted my other posts on this thread since they were the last couple and no longer needed.

I wish to say sorry for all the upset messges about this script. but it was not working in the windows 98 computer thats what made me upset you all said it worked and it did not? atleast for me at that time.


May i please direct your attention to the following code.Yes before you moan, i have tested this one for several hours booting and rebooting the computer. it works in win98.

Code: Select all

Below Script is to set the tempo.
add the following to the scripts.ini: 
****************************************************

[SetTempo] 
FileName=SetTempo.vbs 
ProcName=SetTempo 
Order=10 
DisplayName=Set Tempo Script 
Description=... 
Language=VBScript 
ScriptType=0 


**********************************************************
the code below is what i put in a text file
and saved it as settempo.vbs
and then put it in the Auto Folder in the Script folder
when i restart monkey it sets the tempos each time.
**********************************************************


Option Explicit 

Sub SetTempo 
REM "Very Slow" for BPM between 0 and 56 
REM "Slow" for BPM between 57 and 82 
REM "Moderate" for BPM between 83 and 145 
REM "Fast" for BPM between 146 and 200 
REM "Very Fast" for BPM > 200 
End Sub 

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

Dim KeyVerySlow 
Dim KeySlow 
Dim KeyModerate 
Dim KeyFast
Dim KeyVeryFast 

Dim dsTemp 
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Very Slow'") 
   if not dsTemp.EOF then KeyVerySlow = dsTemp.ValueByIndex(0) 
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Slow'") 
   if not dsTemp.EOF then KeySlow = dsTemp.ValueByIndex(0) 
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Moderate'") 
   if not dsTemp.EOF then KeyModerate = dsTemp.ValueByIndex(0) 
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Fast'") 
   if not dsTemp.EOF then KeyFast = dsTemp.ValueByIndex(0) 
   Set dsTemp = SDB.Database.OpenSQL("SELECT ID FROM Lists WHERE IDListType = 1 AND TextData = 'Very Fast'") 
   if not dsTemp.EOF then KeyVeryFast = dsTemp.ValueByIndex(0) 
set dsTemp = Nothing 

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

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

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

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

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

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

Set SDB = Nothing 
notice i had to take out the part for the unknown to bmp's it was one of the things i could not put in because i can not get the monkeys database file open to add it to the tempo list.

so the code only goes from very slow to very fast.

and it does really work but it needs to have the bmp's in the properties of the file first.

some one was kind enough to make a code for adding the bmp's in to the file but it also did not work on my win98. so i had to modify it to work.

it is below.
you just need to follow the instructions in the list below, and then all you do is select the songs in the playlist and click the the link in the scripts menu on the tools menu.
the songs MUST be selected for somereason even though the script says to set it to all songs list, that does not work and i don't know why.

Code: Select all

**************************************************
I put the below script in the script's ini file
change the order number to the number of
scripts you have listed in the ini file.
**************************************************
[MultiplyBPM] 
FileName=MultiplyBPM.vbs 
ProcName=MultiplyBPM 
Order=9 
DisplayName=Multiply BPM 
Description=Multiply BPM 
Language=VBScript 
ScriptType=0 
Shortcut=Shift+Alt+B 


*********************************************

i put the script
below in a text file and  saved it as 
multiplybpm.vbs and put it in the scripts
folder.  this will work with out any 
bpm listed in the properties.
it will add to the bpm each time you 
click on the link in the scripts menu on 
the tools menu in media monkey.

**********************************************

' Multiply me 
'by psyXonova 
'modifiyed for auto running by roving cowboy / keith hall.
Sub MultiplyBPM 


' Define variables 
Dim list, itm, i, multiplier 

multiplier =29

' Get list of selected tracks from MediaMonkey 
Set list = SDB.SelectedSongList 
If list.count=0 Then 
Set list = SDB.AllVisibleSongList 
End If 

' Process all selected tracks 
For i=0 To list.count-1 
Set itm = list.Item(i) 

' Multiply the BPM 
itm.BPM = itm.BPM + 2 * multiplier 

' Update the changes in DB 
itm.UpdateDB 
itm.WriteTags 
Next 

End Sub  
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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

Guest

Post by Guest » Tue Oct 04, 2005 9:03 am

just so you can know what style of music is what according to this key.

VerySlow BPM between 0 and 56 = lots of kids songs fit this one like the song : ten little indians

Slow BPM between 57 and 82 = some blues and jazz but this is almost too slow for them.

Moderate BPM between 83 and 145 = some Jazz and blues but it is almost too fast for them. most country and rock and roll and disco.


Fast BPM between 146 and 200 = most marches and bluegrass breakdowns are around 120-155 bpm's which are here.

VeryFast BPM faster then 200 = breakneck acid rock and people on rocket ship speed songs. very few of these songs are around as they tend to give the drummers heartattacks.

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Wed Oct 05, 2005 8:26 am

the above scripts i last put in for my win98 are working great and have been for the last couple days i been adding in songs and when needing been using those scripts and it works.

so a bigThank YOU to the orginal scripter that made them where i could then modifiy them. 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 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

Post Reply