Page 3 of 8
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Sat Jun 21, 2008 6:45 pm
by Just JP
Guest wrote:Hello,
I haven't been here for an while and just recently saw a message from Just JP pointing to this thread (thanks Just JP!).
Rycher
You're welcome!
It's not often I can help out here. Most of the time I'm on the receiving end of help. It's nice to give instead of take every once in a while.
Jim
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Mon Jun 23, 2008 8:49 pm
by Davo
I'd like to try Rycher's modified script but i'm on MM3. Any chance that someone could update the script for MM3?
Thanks - David
Re:
Posted: Tue Jun 24, 2008 7:21 pm
by Just JP
It already is.
Bex wrote:This should do it.
Replace line 96.
From:
Code: Select all
Set MySongs = SDB.Database.QuerySongs("AND Songs.Custom3='" & DoubleUpSingleQuotes(SDB.Player.CurrentSong.Custom3) & "' AND Songs.SongOrder >= " & SDB.Player.CurrentSong.TrackOrder & " ORDER BY Songs.SongOrder ASC")
To:
Code: Select all
Set MySongs = SDB.Database.QuerySongs("Songs.Custom3='" & DoubleUpSingleQuotes(SDB.Player.CurrentSong.Custom3) & "' AND Songs.TrackNumber > '" & SDB.Player.CurrentSong.TrackOrderStr & "' ORDER BY Songs.TrackNumber ASC")
Not tested...
If you read down the thread others have modified the script further to suit their needs.
Jim
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Tue Jun 24, 2008 10:30 pm
by Davo
Thanks Just JP - I am using Bex's mm3 mod in Steegy's script & it's working fine. I noticed that Rycher also included Bex's mod in his version but he also said that his script might still need some changes for MM3 so i've taken my cue from that to be on the safe side as i'm not that script literate. Anyway I'll give it a try & see how we go.
David
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Fri Jun 27, 2008 9:30 pm
by Davo
@Rycher - I've installed your script in MM3 (with Bex's mod) & it's working but not how i expected which was along the lines of Steegy's proposed amendment some time ago that no matter what song (track) was selected in a group, say track 5 in a group of nine then the script - "would add 1 to 4 before, and 6 to 9 after track 5, and the playback would start from 1 and go continuously to 9, after that, the normal now playing behaviour continues."
At the moment in AutoDJ if track 5 is selected the script adds the tracks before & after but then plays track 5 (incorrect action) then turns off Auto DJ goes back to Track 1 & plays the whole group, turns on AutoDj & plays the next track (Correct action)
In Shuffle mode there is a different problem. If track 5 is selected it plays Track 5 then turns Shuffle off & playsTracks 6 - 9, then turns shuffle on & selects another track. So Tracks 1 - 4 in the group are not played.
Would appreciate any help on this.
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Sat Jun 28, 2008 5:59 am
by Davo
More feedback on script (Rycher's) in MM3.
AutoDJ: If a group track is the first track in the Now Playing playlist - say track 5 of 4 - 6. Then Auto DJ turns off, track 5 plays but the other tracks in the group are not selected. When track 5 finishes auto DJ turns on & the next track in the list plays.
Shuffle Mode: If an album comprises two separate groups the script always seems to play the entire album rather than selecting & playing one group then shuffling to a new track. Maybe this is because the script only looks for an "LT" which both groups start with.
On a minor note - the documentation in the "USE:" section at the front still refers to using the value "TG" but i can see in the script this should be "LT"
Again - Any help with these issues is appreciated.
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Tue Jul 01, 2008 11:25 pm
by rycher
I've just upgraded to MM3 and saw that the script's behaviour was different than in MM2, i.e. that the current track plays before going to the beginning of the group. So I came here and saw that others had the same problem but no solution. I'll have a look at this in the coming days.
Rycher
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Wed Jul 02, 2008 5:53 pm
by rycher
I did some test but can't make it work in MM3. Somehow, the script takes a while to process when the song starts to play, and some commands seem to do nothing.
What I see when MM3 starts playing a linked track, it that the original track starts playing and it takes at least 5 seconds before the other tracks are added to the playlist. But they are added before and after the current track, so the tracks before never play. More clearly, if 1, 2 and 3 are linked and 2 starts to play, it takes 5 seconds before 1 is added before and 3 is added after. So 2 and 3 play, but not 1.
In my script, when the current track was linked, before adding the tracks I went to the previous track (using SDB.Player.Previous), then added the other linked tracks at the right position (before or after the original track), and then went to the next track (using SDB.Player.Next) which was now the first track of the linked group. But the next and previous commands now do nothing. It does not give any error message, it just does not do what it did in MM2. I even tried using Stop before the whole manipulation and then Play at the end, those do nothing either. I checked in the scripting documentation but did not see anything.
Does anyone have an idea if there is something to do? Apart from a bug report?
Thanks,
Rycher
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Mon Jul 07, 2008 12:54 am
by Davo
Any progress on this. Almost a week and no response to your request for help with this?
I for one would really appreciate a script like this so that I could use Shuffle & AutoDJ mode with classical works which is not possible now because of the "track driven" approach. This script potentially goes a long way to solving the long discussed but never resolved "Grouping" issue.
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Tue Jul 08, 2008 8:51 pm
by rycher
Davo wrote:Any progress on this. Almost a week and no response to your request for help with this?
I waited a few days to see if there would be a reply in this thread. Over the week-end I posted a bug report about the different behaviour in MM3 vs MM2, no reply yet. Here's the bug report thread:
http://www.mediamonkey.com/forum/viewto ... =7&t=30863
Rycher
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Tue Jul 08, 2008 10:55 pm
by Davo
@Rycher - Thanks for the update. I see no-one's responded to your post in the Bug forum either. Surely we're not the only two MM users who need this script.
C'mon Scripters - give Rycher a hand with this great script.
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Sun Aug 03, 2008 4:02 pm
by Davo
@Rycher - Just wondering if there's any progress in solving the problems with the script in MM3?
Regards
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Thu Oct 09, 2008 6:45 pm
by rycher
I've been away for a while, and I still don't have a solution for this problem...
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Sat Oct 11, 2008 12:18 pm
by rycher
Good news everyone!
I did not find a way to have the behaviour I wanted when a track started playing...
BUT when looking in the forums I (finally) discovered that in MM3 you can now make scripts to control the behaviour of AutoDJ when adding a track (type 4).
So I made a script to add songs at random from a playlist, but when a song belongs to a group the whole group is added in order. It only works when using AutoDJ, but then again it's the only time I want this to work. If I'm adding tracks manually, I know what I'm doing, I don't want the player to add tracks by itself then ("I'm sorry Dave, I can't do that"). So for me it's a better way of doing this then before.
Basically here is what it does:
-If the last track of Now Playing is a grouped track, it gets the next tracks in the group. If there is one, it adds it.
-If not, it gets a track a random from the specified playlist (configured in the options of AutoDJ when you select to add tracks from "AutoDJ Tied songs groups"). If the random track is a grouped track, it adds the first of its group, otherwise it simply adds the random track.
As with the previous script, tracks must have a common tag starting with LT (it is described in the script). I took the time to put a drop-down list to select the source playlist in the Options window, but I didn't make the tag location configurable, it has to be in Custom3. You can modify it to your taste, or make it configurable if you wish. As a source playlist, I like to use an auto-playlist configured to contain tracks that haven't been played for 6 weeks, to avoid early repeats.
Here is the script, it's also simpler than the old one:
Code: Select all
'==========================================================================
'
' MediaMonkey Script
'
' NAME: DJTiedSongsGroups
' DESCRIPTION:
' Lets you use auto-dj while playing together groups of songs that should go together
' (groups of songs must previously be tagged as linked)
'
' AUTHOR: Tanguy Kervahut
' DATE : 11.10.2008
'
' INSTALL:
' - Copy script to MediaMonkey's "Scripts" folder
' - Add an script entry to file Scripts.ini (example shown below)
'
' USE:
' For songs you want in one group, change the Custom3 field for these songs to
' the same value, beginning with LT (this indicates a "linked track").
' E.g. for an album "Pink Floyd - Dark Side of the Moon" you can change the Custom3 field
' for all tracks to "LT Pink Floyd - Dark Side of the Moon". (without quotation marks).
' Bear in mind that shorter values for the Custom3 field are faster (so better "LT PF-DSOTM")
' Order of tracks in a tied group is indicated using the standard Track Number field.
'
' [DJTiedSongsGroups]
' FileName=DJTiedSongsGroups.vbs
' DisplayName=AutoDJ Tied songs groups
' Language=VBScript
' ScriptType=4
'##############################################################################################
Option Explicit
Public TagGroupPlaylist
Sub InitConfigSheet(Panel)
Dim Edt, Lists, i
Set Edt = SDB.UI.NewLabel(Panel)
Edt.Common.SetRect 1, 1, 75, 20
Edt.Caption = "Use playlist:"
Edt.Autosize = False
Edt.Alignment = 0
Set Edt = SDB.UI.NewDropDown(Panel)
Set Lists = SDB.PlaylistByTitle("").ChildPlaylists
for i = 0 to Lists.Count-1
Edt.AddItem(Lists.Item(i).Title)
next
Edt.Common.SetRect 86, 1, 200, 20
Edt.Common.ControlName = "TagGroupPlaylist"
Edt.Text = SDB.IniFile.StringValue("TagGroup", "DefaultPlaylist")
End Sub
Sub CloseConfigSheet(Panel, SaveConfig)
if Saveconfig then
SDB.IniFile.StringValue("TagGroup", "DefaultPlaylist") = Panel.Common.ChildControl("TagGroupPlaylist").Text
end if
End Sub
Function GenerateNewTrack
Dim LastSong, LastGroup, NextSong, NextFound
Set LastSong = SDB.Player.PlaylistItems(SDB.Player.PlaylistCount - 1)
NextFound = false
If Left(LastSong.Custom3, 2) = "LT" Then
Set LastGroup = SDB.Database.QuerySongs("Songs.Custom3='" & LastSong.Custom3 & "' ORDER BY abs(Songs.TrackNumber) ASC")
Do While Not LastGroup.EOF
if LastGroup.Item.TrackOrder > LastSong.TrackOrder then
Set NextSong = LastGroup.Item
NextFound = true
exit do
end if
LastGroup.Next
Loop
end if
If NextFound Then
Set GenerateNewTrack = NextSong
else
Dim CheckPlaylist, RandomTrack
TagGroupPlaylist = SDB.IniFile.StringValue("TagGroup", "DefaultPlaylist")
Set CheckPlaylist = SDB.PlaylistByTitle(TagGroupPlaylist).Tracks
RandomTrack = Int((Rnd() * CheckPlaylist.Count) + 1)
Set NextSong = CheckPlaylist.Item(RandomTrack)
If Left(NextSong.Custom3, 2) = "LT" Then
Set LastGroup = SDB.Database.QuerySongs("Songs.Custom3='" & NextSong.Custom3 & "' ORDER BY abs(Songs.TrackNumber) ASC")
Set GenerateNewTrack = LastGroup.Item
else
Set GenerateNewTrack = NextSong
end if
End If
End Function
Hope you'll enjoy this!
Rycher
Re: TiedSongsGroups: lets you make tied groups of songs
Posted: Mon Oct 13, 2008 3:44 am
by Guest
Hi Rycher - I've been trying out your new script & have discovered a few issues.
1. It errors out if you don't have a "Last TracK" - I usually clear the Now Playing list before i select AutoDJ so i don't have a Last Played track. I just click Play in the empty Now Playing list which selects the first 10 tracks . This works ok for Auto DJ & other scripts which use AutoDJ like AutoAlbumDJ & RadioDJ.
2. It doesn't select the grouped tracks (eg It only selected track 1 of a group of 3 - Played track 1 then went on to a random track
3. For some reason it is selecting multiple instances (10 in one case) of the same track. ??
I'm assuming it works ok for you so maybe i'm doing something wrong
Regards - David