Go Back   Winamp Forums > Skinning and Design > Modern Skins

Reply
Thread Tools Search this Thread Display Modes
Old 3rd December 2006, 22:54   #1
clementj
Senior Member
 
Join Date: Oct 2006
Posts: 353
Next/last Song display?

I would like to display the next track which will be played, assuming of course that shuffle play is off. It seems that there are no facilities currently available for perusing the current play list. At least I could not find anything in std.mi or in the 2002 Wasabi developers manual. Of course it is possible that such facilities are available, but that they are not yet documented. Can anyone shed any light on this?

I would also like to display the name of the last track in the playlist. This requires not only the ability to peruse the list, but also the ability to be notified when the playlist changes. Again is this possible in a skin?
clementj is offline   Reply With Quote
Old 4th December 2006, 00:09   #2
flocksoft
Major Dude
 
flocksoft's Avatar
 
Join Date: Aug 2006
Location: Italy
Posts: 695
Toaster adds some new global hotkeys; one of these can show next songs (so the answer to your first question could be yes...)

with ActiveWinamp you can manipulate in very powerful way the playlists

how integrate these features in a skin? I don't know
flocksoft is offline   Reply With Quote
Old 4th December 2006, 00:20   #3
clementj
Senior Member
 
Join Date: Oct 2006
Posts: 353
I want to have a continuous display so you can just glance at the screen to see what is coming up next. Hot keys will not fill the bill. I will investigate ActiveWinamp. Thanks.
clementj is offline   Reply With Quote
Old 4th December 2006, 07:33   #4
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
It's completely impossible through standard interfaces. Some WACs may be... I don't know.
E-Trance is offline   Reply With Quote
Old 5th December 2006, 15:40   #5
PseudoChron
Member
 
PseudoChron's Avatar
 
Join Date: Sep 2006
Posts: 66
Send a message via AIM to PseudoChron
A crude workaround would be to trigger a next(), get the title, and then return with a previous() before the song starts playing. It probably wouldn't work too well if the next item takes awhile to open (like an internet radio stream).
PseudoChron is offline   Reply With Quote
Old 5th December 2006, 19:15   #6
clementj
Senior Member
 
Join Date: Oct 2006
Posts: 353
Yeah, cute idea. Unfortunately the interface needs some updating for more information. Please sir could we have more? Of course we will come back for even more later!!!!
clementj is offline   Reply With Quote
Old 5th December 2006, 19:34   #7
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
I think about. But it may be VERY unstable. Using this method you should determine type of file and decide whether to switch track to get info or not.
E-Trance is offline   Reply With Quote
Old 5th December 2006, 20:33   #8
PseudoChron
Member
 
PseudoChron's Avatar
 
Join Date: Sep 2006
Posts: 66
Send a message via AIM to PseudoChron
I tried it out, and I actually got it working pretty well. It wouldn't matter what type of file it is if, before you use next() to check it, you first stop() the playback.

PHP Code:
// Script to get the name of the next song and display it.
//
// If Winamp is paused or playing when the skin is loaded, no "next" will be displayed.
// Script disables itself when shuffle is on because: 
//        you would not be able to double-click on a song in the pl to skip to it.
//        When shuffle is on but repeat isn't, it will keep playing the last song.

#include <lib/std.mi>
#include <lib/config.mi>

Function nextSong();

Global 
Boolean stopped;
Global 
Text nextticker;
Global 
String nexttitle;

System.onScriptLoaded() {
    
nextticker getScriptGroup().findObject("nextticker");
    
    
// if a song isn't playing, skip to the next one to see what it is
    
if (getStatus() == STATUS_STOPPED) { 
        
nextSong();
    } else {
        
nextticker.setText(" ");
    }
}

System.onTitleChange(String newtitle){
    
nextSong();
}

nextSong(){
    
// don't do anything if shuffle is on
    
if (Config.getItem("Playlist Editor").getAttribute("Shuffle").getData() == "0")
    {
        
stopped = (getStatus() == STATUS_STOPPED); // get playback status
        // we can't do this if it's the last track, unless repeat is on
        
if (System.getPlaylistIndex() + System.getPlaylistLength() || Config.getItem("Playlist Editor").getAttribute("Repeat").getData() != "0"
        {
            
stop(); // prevent playback of the next track
            
next(); // skip to the next track
            // and see what it is
            
if (getPlayItemMetaDataString("Artist") != "")
            {
                
nexttitle getPlayItemMetaDataString("Artist") + " - " getPlayItemMetaDataString("Title");
            } else {
                
nexttitle getPlayItemMetaDataString("Title");
            }
            
previous(); // return to the track we want to play
            
if (!stopped// restore playback to original status
                
play(); }
        } else {
            
nexttitle "(end of playlist)";
        }
        
nextticker.setText(nexttitle);
    } else {
        
nextticker.setText("(random)");
    }

PseudoChron is offline   Reply With Quote
Old 5th December 2006, 20:40   #9
PseudoChron
Member
 
PseudoChron's Avatar
 
Join Date: Sep 2006
Posts: 66
Send a message via AIM to PseudoChron
Here the code is as an attachment:
Attached Files
File Type: m next.m (1.8 KB, 140 views)
PseudoChron is offline   Reply With Quote
Old 6th December 2006, 02:30   #10
clementj
Senior Member
 
Join Date: Oct 2006
Posts: 353
Thanks, but this idea is not my top priority. It is quite a kludge for something that should be simple!!! I have other things that I have added that might not go well with this method. Also it will not be accurate if someone rearranges the next song in the playlist. I am working on a reliable dance programmer that can be readily used by novices. I will try to make it foolproof, but obviously not damn fool proof.

Being able to glance at a display and see the next dance in the lineup would be useful. Finding it in the playlist is sometimes confusing.
clementj is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump