BPM not being interpreted correctly (Magic Nodes)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

turbo88
Posts: 13
Joined: Sat Feb 27, 2010 5:28 pm

Re: BPM not being interpreted correctly (Magic Nodes)

Post by turbo88 » Mon Mar 01, 2010 12:03 pm

hi , as i said in another of my posts, im new here :P so i dont understand much of mm specially scripts. If i understood correctly this script that is being proposed on this thread reads your whole music database, and inputs a tempo number acording to the "speed" of the track right? you can then organize making playllist for taking a nap, chilling in your couch, or even for the gym right? if thats so, then thats exactly what im looking for therefore im asking , how to do it :P

where do i paste the script, what do i need to execute , can any1 explain for dummies?? ill be extremely thankful it'd be a dream to create playlists including every single track that i posses, in an organize way.

Guest

Re: BPM not being interpreted correctly (Magic Nodes)

Post by Guest » Sun Feb 19, 2012 9:13 am

turbo88 wrote:hi , as i said in another of my posts, im new here :P so i dont understand much of mm specially scripts. If i understood correctly this script that is being proposed on this thread reads your whole music database, and inputs a tempo number acording to the "speed" of the track right? you can then organize making playllist for taking a nap, chilling in your couch, or even for the gym right? if thats so, then thats exactly what im looking for therefore im asking , how to do it :P

where do i paste the script, what do i need to execute , can any1 explain for dummies?? ill be extremely thankful it'd be a dream to create playlists including every single track that i posses, in an organize way.
I know it's an old thread, but has anyone found a way to add beats per minute into the media monkey screen please?

MusicBringer
Posts: 622
Joined: Wed Oct 25, 2006 12:53 pm

Re: BPM not being interpreted correctly (Magic Nodes)

Post by MusicBringer » Sun Feb 19, 2012 10:31 am

@Guest, there an MM field called BPM that can be added as a column to your view.
However to display any results it must first be populated with BPM data - now from where do you obtain reliable BPM data....

I would love all my tracks to have a BPM record and be able to play playlists according to the tempo. I wish :roll:
MediaMonkey user since 2006

ohneland
Posts: 119
Joined: Mon Jan 08, 2007 11:11 am

Re: BPM not being interpreted correctly (Magic Nodes)

Post by ohneland » Thu Aug 09, 2012 8:04 am

ohneland

Win 10
Logitech Media Server on a Synology NAS with diff. players
MM 5, MP3Tag, EAC, Musicbee

ohneland
Posts: 119
Joined: Mon Jan 08, 2007 11:11 am

Re: BPM not being interpreted correctly (Magic Nodes)

Post by ohneland » Sat Aug 11, 2012 2:58 pm

Ok, I installed the programme MixMeister BPM Analyser and realised that I could not save the value to tag. But I swear that some years ago I did it with this software. I don't remember how though.
ohneland

Win 10
Logitech Media Server on a Synology NAS with diff. players
MM 5, MP3Tag, EAC, Musicbee

sterlingm
Posts: 27
Joined: Wed Feb 19, 2020 4:54 pm

Re: BPM not being interpreted correctly (Magic Nodes)

Post by sterlingm » Wed Feb 19, 2020 5:29 pm

Saw this thread and wanted to relay what worked for me.

I used tuneXplorer from AbyssMedia and had it update the mp3 files of my collection: 7300+ files. Took an hour. This added BPM and "Initial Key" to the MP3 using tag v2. This is native for mp3's but is not currently in MediaMonkey so it also saved the "Initial Key" to the front of the Comment section. As soon MM handles "Initial Key" it'll be available natively since it's in the mp3 tag.

Once that was done, I needed a way to set the TEMPO in MM since that's a more readable way to create playlists.

But first I rescanned the library for good measure even though when looking at properties the tags were showing up.

After the rescan...

The below script was great but it didn't work. I was able to correct the below code and pasted it below. Basically it wasn't inside a Sub / End Sub block, the 'i' variable was added, and I changed the language to be english throughout.

Here's how to make it work as a script:
1 - Create a file called AutoTempoBPM.vbs in the scripts folder of MediaMonkey.
2 - Copy the "TEMPO CODE" code into AutoTempoBPM.vbs - Save this file. (It can now be closed.)
3 - Edit the Scripts.ini file and add the "Scripts INI" code listed below to the bottom of this file.
NOTE: If you have another script with an order of '60' you'll want to change the number to a number not currently used in the INI file.
4 - Save Scripts.ini and close it.
5 - Open MediaMonkey. You should now see a script called AutoTempoBPM in the list for Tools-Scripts. When you select the script it will activate without warning and do its thing in the background. It's super fast. Did all 7300+ files in about 10 minutes
NOTE: It will process on whatever songs are showing in your current window. So if you just want to do a single album select the album on the left and it'll process against that album only - because only those songs from that album are showing in the main window. If you have your entire library (which is what I wanted) showing it'll process all of the files.

That's it. All files in my library now have Tempo, BPM, and "Initial Key" tagged. Again, "Initial Key" is saved in the mp3 tag but it's also placed in the comments of each file, so until this is native in MediaMonkey you'll only see it in the Comments.

It's not as fancy as the other scripts available but the original poster did a good job putting it together and I appreciate the efforts.

Hope this is helpful to someone else.
-Sterling

Scripts INI

Code: Select all

[AutoTempoBPM]
FileName=AutoTempoBPM.vbs
ProcName=AutoTempoBPM
Order=60
DisplayName=Auto TEMPO...
Description=Auto assign TEMPO based on BPM tag value...
Language=VBScript
ScriptType=0
TEMPO CODE

Code: Select all

Sub AutoTempoBPM
' REM 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
' REM End Sub

' Define variables
Dim list, itm, i

' Get list of selected tracks from MediaMonkey
' DO NOT USE CurrentSongList to get selected tracks. It can go badly if selections are not done properly. Set list = SDB.CurrentSongList
 Set list = SDB.SelectedSongList 
  if list.count<1 then exit sub
   
' Process all selected tracks
For i=0 To list.count-1
Set itm = list.Item(i)

' Check the BPM and set Tempo
If (itm.BPM < 40) Then itm.Tempo = "Very Slow"
If (itm.BPM >= 40) and (itm.BPM < 83) Then itm.Tempo = "Slow"
If (itm.BPM >= 83) and (itm.BPM < 145) Then itm.Tempo = "Moderate"
If (itm.BPM >= 145) and (itm.BPM < 200) Then itm.Tempo = "Fast"
If (itm.BPM >= 200) Then itm.Tempo = "Very Fast"
' Clear the other Tags if you want
' itm.Quality = ""
' itm.mood = ""
' itm.occasion = ""
Next
' Write all back to DB and update tags
list.UpdateAll

End Sub
Last edited by sterlingm on Sat Feb 22, 2020 7:29 am, edited 2 times in total.

Erwin Hanzl
Posts: 451
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: BPM not being interpreted correctly (Magic Nodes)

Post by Erwin Hanzl » Thu Feb 20, 2020 8:23 am

Hallo sterling,

da gibt es ein böses Script von MM: "AutoIncTrackN.vbs". Gedacht für die Nummerierung von Album-Tracks.
Dieses nummeriert die Song# aufsteigend.
Dieses Script bezieht sich auch auf "SDB.CurrentSongList" und verändert ALLE sichtbaren Dateien.
Führt zur Katastrophe, wenn man nicht richtig selektiert.
Ich empfehle Dir dringend, in allen Deinen Scripts NUR "Set list = SDB.SelectedSongList " zu verwenden.

There is a bad script from MM: "AutoIncTrackN.vbs". Intended for numbering album-tracks.
This numbered the song # in ascending order.
This script also refers to "SDB.CurrentSongList" and changed ALL visible files.
It leads to catastrophe if you don't make the right selection.
I strongly recommend that you ONLY use "Set list = SDB.SelectedSongList" in all your scripts.

Code: Select all

  Set list = SDB.SelectedSongList 
  if list.count<1 then exit sub
MMW 4.1.29.1906 Gold-Beta | Meine Einstellungen
CustomFieldsTagger 1.0.3.0 | Discogs Tagger 5.7.5 | External Tools 1.4.
FindCurrentPlayingTrack 1.3.2 | Lyrics and Comment Viewer 2.2.0.0 | Randomise Playlist 1.3.
MMA 1.3.9.0923 Free Beta-Tester | Huawei Mate 20 Pro 128GB | Android 10 | USB-Cable-Sync
Win 10 Vers.2004 PRO 64-Bit | Defender mit Echtzeitschutz | I7-3840 QM 2,8 GHz 4-Kern | RAM: 32 GB
Samsung-SSD on board: 840 PRO-512 GB und 860 PRO-2 TB | Extern: SSD T7-2 TB

sterlingm
Posts: 27
Joined: Wed Feb 19, 2020 4:54 pm

Re: BPM not being interpreted correctly (Magic Nodes)

Post by sterlingm » Fri Feb 21, 2020 6:29 am

Thanks for the information. I've never written a script for MM (as I didn't originally write this one, and really just added the sub block to make it work) so I appreciate the insights into MM coding.

I'll edit my post accordingly with your notes about this particular function.

Be well,
-Sterling

Post Reply