Jukebox mode / Party mode (library playlist)

  • apologies, if this has already been requested (i couldn't find it)!!!

    it would be great if there was a jukebox mode, that would autoplay random songs when playlists or albums had finished.

    it could be configured using a specific criteria (genre, directory etc) and would just kick in when your playlist had finished. this would be great for parties, you would never have to worry about the music running out!! :d http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/cool.gif

    i used to use a software app on the pc called 'audiosoft ejukebox'. fantastic piece of software, where the idea comes from. have a look at www.audiosoft.net and see what you think????

    anyone else fancy this??
    stace :d


  • its been on my todo list for a loooong time now. now that the shuffle button is removed from the library window, i may move this up on my list.


  • no. you just need to scan once so that the database gets populated. if you add new songs, you can re-scan and tell it to only add the new songs.


  • I would love to see this feature too. I would like to at least fill my screen with qued music (I am running at 1080i and have room for at least 4 more songs)


  • i was just gonna ask for a 'random' feature!
    glad i did a search first. not only would i like this feature to be implemented for music but also for video. i have many music videos, with the list growing rapidly as i rip music videos from my dvds, and would like for these to play randomly too.
    as the original poster said to have it working but also, if possible, to have it randomly play files in folders in a heirarchy - if that's at all possible, or even makes sense?
    also, have to say, the software is getting better with every release. keep up the good work guys - it's very appreciated!
    vit


  • actually you dont have to maintain anything...
    1) scan your music
    2) go to library, then songs
    3) use "queue" on "all songs" item at the top
    4) switch to now playing window, enable randomize


  • actually you dont have to maintain anything...
    1) scan your music
    2) go to library, then songs
    3) use "queue" on "all songs" item at the top
    4) switch to now playing window, enable randomize
    exactly... sure it takes a couple of seconds if you have a 10gb mp3 share, but it works like a charm...


  • Not sure but its possible the Repeat code got screwed up. I presume you dont have Repeat enabled?

    What happens with two video files?
    What about a single music file?

    I can test in a few hours.

    ** edit **
    Sorry Pike but I cant reproduce your problem. Videos are not looping for me.


  • hi,

    maybe these python scripts will help .. turn on xbox and play all music on xbox at random:
    -create file autoexec.py and dump it in your script dir
    -create autoexec
    -create file startup_playlist.py and dump it in autoexec

    begin autoexec.py
    -----------
    # auto execute scripts when xbmc starts, place this file in xbmchome\scripts\
    #
    # note: - do not execute more than one script at a time which asks for user input!

    # import xbmc

    xbmc.executescript('q:\\scripts\\autoexec\\startup _playlist.py')
    -----------
    end autoexec.py

    begin startup_playlist.py
    -----------
    ''' vim: ts=8 sw=4 noexpandtab
    author: rune hammersland
    version: 0.3

    xbox media center comes with a script to play an mp3 file at startup
    (startupmp3). this script will load a playlist if it exists, and if not,
    traverse a directory and load all relevant music files. it is intended as a
    replacement for startupmp3, and enables you to listen to a playlist, or all
    music files in a given directory.

    changelog:
    2005-05-27 13:10:33 - rune hammersland:
    * added possibility for multiple playlists.
    * added possibility for multiple music dirs.

    '''

    import xbmc
    import os

    # ---------------------------------------- #
    # "configuration"
    # ---------------------------------------- #

    # change this to your playlist(s).
    # written like this: ['path\\to\\plist1', 'to\\plist2', 'plist\\3']
    playlist_files= ['']
    #['e:\\tdata\\0face008\\albums\\playlists\\all.m3u']
    # dirs(s) to traverse if playlist does not exist. nb: no trailing slash.
    # written like this: ['path\\to\\dir1', 'to\\dir2', 'dir\\3']
    music_dirs = ['f:\\music']
    # shuffle playlist if this var equals 1.
    shuffle_files = 1


    # ---------------------------------------- #
    # code
    # ---------------------------------------- #

    # function for adding files to playlist
    def add_files(pl, dirname, names):
    for filename in names:
    if (os.path.isfile(dirname + "\\" + filename)):
    add = 0

    # check extension of file.
    if (filename[-4:] == ".mp3"): add = 1
    if (filename[-4:] == ".ogg"): add = 1
    if (filename[-4:] == ".wav"): add = 1
    if (filename[-5:] == ".flac"): add = 1

    # if file is to be added, do it.
    if (add == 1): pl.add(dirname + "\\" + filename)
    elif (os.path.isdir(dirname + "\\" + filename)):
    os.path.walk(dirname + "\\" + filename, add_files, pl)

    # get music playlist from xbmc
    plist = xbmc.playlist(0)
    plist.clear()

    # load playlist if it exists
    for playlist_file in playlist_files:
    if (os.path.isfile(playlist_file)):
    plist.load(playlist_file)
    # else, find all available music
    else:
    for music_dir in music_dirs:
    os.path.walk(music_dir, add_files, plist)

    # do the shuffle!
    if (shuffle_files == 1): plist.shuffle()

    xbmc.player().play(plist)
    ------------------
    end startup_playlist.py



    worx like a charm for me .. hope it helps ya out .. and erm .. what button ..hehe ..

    sincerely mnc!


  • i have worked with a few multi room systems, some of which have a party mode, which basically plays random music at the click of a button, i thought it would be cool to have a party mode or random button available on the toolbar on the left of the screen once inside the relevent bookmark, which would randomly play music from all of my albums?


  • how exactly do you think this is related to the playlist changes? and if you post a log, be sure to post a debug log.


  • No. Use the new playlist editor.


  • Just a heads up that I'm changing the whole way the "current playing item" is highlighted. It's going to be handled within the new listcode (which makes things way easier on us!)

    It kinda negates your last changes, but I didn't realise you were working on it.

    Cheers,
    Jonathan


  • Anytime I back out of a python script using the back button on the controller things lock up.


    05:10:08 M: 54239232 NOTICE: -----------------------------------------------------------------------
    05:10:08 M: 54218752 NOTICE: Starting XBoxMediaCenter. Built on Dec 3 2006
    05:10:08 M: 54218752 NOTICE: Q is mapped to: Harddisk0Partition1dashboard
    05:10:08 M: 54218752 NOTICE: Log File is located: Q:xbmc.log
    05:10:08 M: 54218752 NOTICE: -----------------------------------------------------------------------
    05:10:08 M: 54218752 NOTICE: Setup DirectX
    05:10:08 M: 54190080 NOTICE: load settings...
    05:10:08 M: 54190080 NOTICE: loading T:guisettings.xml
    05:10:08 M: 54063104 NOTICE: Getting hardware information now...
    05:10:08 M: 54063104 NOTICE: Checking resolution 4
    05:10:08 M: 54063104 NOTICE: Per AV pack settings are on
    05:10:08 M: 54063104 NOTICE: Standard found : loading T:avpacksettings.xml
    05:10:08 M: 54050816 NOTICE: Getting hardware information now...
    05:10:08 M: 54030336 NOTICE: Checking resolution 4
    05:10:08 M: 54145024 NOTICE: q:userdatasources.xml
    05:10:09 M: 49139712 ERROR: Window Translator: Can't find window myvideotitles
    05:10:09 M: 49225728 NOTICE: Checking the Date!
    05:10:09 M: 49225728 NOTICE: start dvd mediatype detection
    05:10:09 M: 48701440 NOTICE: initializing playlistplayer
    05:10:09 M: 48701440 NOTICE: DONE initializing playlistplayer
    05:10:09 M: 48701440 NOTICE: load default skin:[Project Mayhem III]
    05:10:09 M: 46702592 WARNING: use dashboard
    05:10:09 M: 46702592 NOTICE: initialize done
    05:10:09 M: 46702592 NOTICE: Running the application...
    05:10:12 M: 41005056 NOTICE: XBFileZilla: Starting...
    05:10:13 M: 33554432 NOTICE: XBFileZilla: Started
    05:10:33 M: 37900288 ERROR: CThread::staticThread : Division by zero (code:0xc0000094) at 0x00258697


  • I was thinking it would be nice to have a couple different party modes: one for everything, one for a specific criteria, or perhaps many for various critera.

    For instance, I like being able to select "everything" as one party mode, but then at other times I may only want to select all "Electronic" genres for party mode. I realize there is a way to do this within the xml. But, to actually have a couple different versions to select from would be nice.

    Just a thought...


  • Not sure but its possible the Repeat code got screwed up. I presume you dont have Repeat enabled?
    Affirmative ..The builtin PlayerControl(Repeat) is b0rked, on works/off not :rolleyes:


  • i definitly second that and if possible, make use of a bpm change limiter/slider, just like in winamp.


  • if you just want to be able to play random music from your whole library you could just add your music share to a playlist and play it with random.
    that means having to maintain a playlist for an ever growing library, what i am interested in is one button, that randomly plays everything in that bookmark, without having to make and maintain a huge playlist.


  • Party mode auto selects 10 objects, however in my setup there is room for 3-4 objects more on screen. It looks "wrong" or "empty" that the lower part is not filled with tracks.

    Running 720p with ariel font


  • ok, forgive me if this is already achievable, but i think it would be good if there was an option so that when a playlist is playing, select will queue instead of play the selected item. say you have a few people over, or a party, and you have a long playlist running. people go to add a song, and quite often accidentally select the item (especially if they're newbs). then the song starts, and you have to search through the playlist to find where you at and start it again.

    my understanding of the keymap.xml is that you can change keys based on what window you are on (i.e. playlist window), but cannot change keys based on what type of media is playing. is it possible to achieve this?


  • Thanks. Its a side-effect of the music "Auto Play Next Item" option which automatically queues up the entire folder when just a single item is selected. I'll correct that shortly so that the selected item is the first item in the playlist, and the rest of the items in the folder are added behind it in a shuffled order.


  • great!

    so, would this be the approach to use to enable random play in a particular genre or artist?

    1. scan your music.
    2. go to library, then genre
    3. select genre (the particular genre) or select artist (the particular artist)
    3. use "queue" on "all songs" item at the top
    4. swith to "now playing" window
    5. enable randomize.

    do you have to scan the music every time that you would want to do this?

    thanks!

    john


  • Partymode.xml is just an example of a smartplaylist. Thus, we basically just need a GUI designed for construction of a smartplaylist.

    Smartplaylists basically consist of a set of rules that are either ANDed or ORed together, and may be limited in length, and sorted by some criterion.

    The GUI should therefore have:

    1. Ability to configure a single rule. Such rules are "Artist like U2" or "Genre like Pop".

    2. Ability to have a list of rules and add/subtract rules, and specify how the rules should be combined (either ANDed or ORed).

    3. Ability to alter the limiting and sorting - these can probably be spin controls.

    4. A name for the smartplaylist.

    I suggest something like the "Add Source" dialog. A list control would hold the rules, clicking a rule would bring up a separate rule configuration dialog. Under the list would be the other configurable items (limits, sorting, name) and to the right of the list would be Add, Remove and Edit.

    The first step is getting a design that will incorporate all we need to do.

    Once the design is done, the coding isn't too much of a hassle ;)

    In addition to the above, we'd just need a good design idea for how to organise the choosing of the smartplaylist. One idea would be a simple selector on screen which showed the "source" for the party mode. As to where this should be, and what it should consist of (and how navigation is performed), I'll leave that up to you.

    Cheers,
    Jonathan


  • Just a heads up:

    If shuffle is enabled, and you go into a folder and click (select) a particular item, that item won't start (another one in the folder will). Ideally, it would shuffle but start playback from the particular item selected.

    Cheers,
    Jonathan


  • The operation of the Now Playing windows has changed. Please post any bugs here.

    Overview
    ---------
    There are two main changes:

    - Removal of the PLAYLIST_MUSIC_TEMP and PLAYLIST_VIDEO_TEMP internal playlists
    - Removal of the Random button from the Now Playing window

    1) Removal of the PLAYLIST_MUSIC_TEMP and PLAYLIST_VIDEO_TEMP internal playlists

    Prior to this change, internally Xbmc managed four playlists -- two which were visible via the Now Playing windows, and two which were completely hidden. Since these two hidden playlists (the _TEMP one) have always been a form of a mystery to users, they have been removed.

    Playlist ID's are now:
    0 = PLAYLIST_MUSIC (Music Now Playing window)
    1 = PLAYLiST_VIDEO (Video Now Playing window)

    *more stuff*
    is there anywhere to get the old 'hidden playlist' functionality back other than using an old build?

    or at least a way to not make playing a file clear the playlist and queue the whole current folder?


  • Yeah, sorry about that. I forgot to commit a file. Open GUIInfoManager.cpp and delete those four references to the _TEMP playlists. I can commit a fix it in about two hours or so.

    **edit** Nevermind, someone already corrected it. Please let me know if anything else seems broken.


  • i vote for the random play button...

    the one thing to consider is that having a function that randomly plays the songs from the db and not populate a playlist first, saves memory and we need as much as we can spare on the xbox.


  • Yap, craps out around the time application.cpp comes into play


  • your right, videos would be good too!!!


  • I'll map the control later today and test it. Just remembert that Repeat is not a simple on/off toggle. It cycles thru Off -> All -> One and always has. I have to look back at the code to be certain but I think there's also direct player controls of RepeatOff, RepeatAll, and RepeatOne.

    ** edit **
    If anyone can test this in the meantime, please report. I wont be home for a while.

    ** edit 2 **
    I just tested and cant anything wrong with repeat. It works as it should. It cycles through the options as I described, and each type works correctly.


  • Sorry buddy, I have no idea what you're getting at. PartyMode is a continually running randomly generated playlist. That's the whole point of it.

    Oh, i throught it was generated at first and only played that selected songs and no more...


  • goto library then artist and queue or library and genre then queue...


  • there are quite a few people interested in the song/album info on a visualisation.

    it would also be good, if the visualisation showed details on the 'next track' to play. that incorporated with the 'jukebox mode' mentioned above, would make this great app complete (for me at least!!! http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/tounge.gif )

    stace :d


  • I just wanted to check back in on this issue to see if it was still on your radar...

    Certainly not pushing...just wondering. Thank you (and all the devs) for all you do!


  • Sorry buddy, I have no idea what you're getting at. PartyMode is a continually running randomly generated playlist. That's the whole point of it.


  • In time, sure. There's a visibility condition (LISTITEM_ISPLAYING) that will be used for that (eg show a little play icon + maybe some other stuff).

    The listitem layout stuff currently can't handle vis conditions at present, however.

    Cheers
    Jonathan


  • No. Use the new playlist editor.
    ok, thanks.

    i'll go back to 2.0.1 :D

    and thanks for such a fast response.


  • Something like: NumberOfVisibleRows = ClientWindowHeight DIV RowHeight;

    Not a big problem, just an idea ;)


  • for some reason it seems videoclips LOOP now.

    example:

    A single avi 'restarts' when it reaches the end.

    Related ?


  • actually you dont have to maintain anything...
    1) scan your music
    2) go to library, then songs
    3) use "queue" on "all songs" item at the top
    4) switch to now playing window, enable randomize

    so....can this approach be used to randomly play songs in a specific genre....or artist?? say you want to randomly play songs from the "chanson" genre.

    john


  • And a "randomize" or "shuffle" mode? Just start to play songs in a random style, without playlist: play a song, end the song, select random another song and play it, no more. Is this option implemented? I don't see anymore that "Party Mode" that is just a random generated playlist...


  • None of this will happen pre-2.0 anyway.

    After that, the all-singing, all-dancing GUI will be developed.


  • i'd love a jukebox menu option
    i'd love to be able to give it criteria to use in its random selection, like genre, share folder, playlist(s) etc. to customize the type of music it will play.

    this would be awesome!


  • if its ever done, it'll be after 2.0.0


  • The "Auto Play Next Item" problem is corrected. When shuffle is enabled, the entire folder is queued, shuffled, the "selected" item is placed at the top, and playback starts from the top item. (If shuffle is not enabled, the entire folder is queued, the "selected" item remains where it is, and playback starts from that item.)

    I also corrected a problem where the current playing item wasnt being highlighted.


  • How about having a few *.xml-files in a folder called "Partymode". The xmls should have the same content like a smart playlist.
    If a user selects such a file, Partymode is activated and the "smart playlist" is processed and the songs are selected out of the Song-Pool. :;):


  • Another idea for an aproach, could be to create a context sensitive party mode.

    The idea is to shuffle all music that meets the criteria selected in Library view. If, for example, U2 is selected under Artist and Party mode is activated, all music with U2 is shuffled and played. If, for example, Rock is selected under Genre and Party mode is activated, all rock music is shuffled and played.

    One of the big advantages of this solution is that it does not require a lot of GUI programming.

    /tinBuzz


  • That was one of my original ideas when Party Mode was first added. The downside is that it doesnt have much flexibility. It's basically nothing more than using play or queue on a folder in the Library. So, instead of implementing a temporary solution, the backend code to support a completely flexible system was put in place based off of Smart Playlists. It just needs to be GUI'ified now.


  • Ofcourse, that can be easily done (Party mode from this source). The key is we want the above functionality for smart playlists anyway - partymode is a bonus.


  • ^^ hehe

    i´m hoping to get 2.0 soon :cool: :;): :laugh:


  • Thats fine. I wasnt really sure if I broke the highlighting or not. But since it was bugging me, I fixed it :)

    Question... any chance of multiple selection colors or types so that the currently playing item could be highlighted differently than the item selected when the context menu is invoked?


  • Its correct. Looks are deceiving. edit: Though, it would be quite trivial to make it an advanced setting option.


  • hi all,

    the new "party mode" feature is terrific ... any plans to incorporate "party mode by genre" - going from rock/pop to classical to country sounds a bit strange.

    :kickass:

    kz

    ps: to the xbmc team ... :bowdown:


  • if i have a lot of ppl over or whatever, i load the top 100 list and put that on shuffle that way it only plays decent songs b/c the media library could be filled with a bunch of crappy wav files and stuff, that's just my substitute for lack of that feature. random videos would be cool for music videos


  • Yes, its possible and its something I was wrestling with back when the new music library was introduced. In my opinion, whatever you "sort by" should be the lead piece of information in the label. Like in your example, if you're at an albums listing and you sort by Artist, then the albums should be labeled as "Artist - Album". And if you sort by year (which I thought was there already), they would be labeled as "Year - Album".

    The problem is how to implement such a thing. I was considering a fully user configurable set of options, but its very difficult to map out because there's so many variations. So, my other thought was a very simple on/off switch called "show sort by tag in label" or something like that. If this option was enabled, you would see items labeled like in my example. If disabled, you would see the default labeling.

    Thoughts?


  • yeah, nothing fancy to start ;-)

    just something that randomly selects a song from the db, and when that one is done gets another one.

    or whatever is simplest ;-)


  • yes... eventually. the party mode code is already setup to accomodate stuff like this. the code that picks the random songs can be restricted. it's the gui part that needs alot of thought first.


  • The use of that xml file is really the start of this feature. However, don't expect it anytime soon. A gui element needs to be developed to allow the user to pick criteria and save it as a xml, and then a gui element needs to developed so that the user can pick which one to use. Until then you'll just have to use the filemanager to rename xml files. (Or code this up and submit it as a patch.)


  • The operation of the Now Playing windows has changed. Please post any bugs here.

    Overview
    ---------
    There are two main changes:

    - Removal of the PLAYLIST_MUSIC_TEMP and PLAYLIST_VIDEO_TEMP internal playlists
    - Removal of the Random button from the Now Playing window

    1) Removal of the PLAYLIST_MUSIC_TEMP and PLAYLIST_VIDEO_TEMP internal playlists

    Prior to this change, internally Xbmc managed four playlists -- two which were visible via the Now Playing windows, and two which were completely hidden. Since these two hidden playlists (the _TEMP one) have always been a form of a mystery to users, they have been removed.

    Playlist ID's are now:
    0 = PLAYLIST_MUSIC (Music Now Playing window)
    1 = PLAYLiST_VIDEO (Video Now Playing window)

    Any 3rd party applications which reference an internal playlists by number will need to be updated accordingly.

    2) Removal of the Random button from the Now Playing windows

    There has always been some confusion due to the Shuffle and Random buttons in the Now Playing windows. The following changes eliminate this confusion by removing the need for the Random button. So, the first change
    to note is that the Random button is now gone from the PM3 skin. Skins need to be updated accordingly. (If the button exists, it just wont do anything.)

    The builtin PlayerControl(Random) function now controls the Shuffle button of whatever the currently active playlist is (this is either Music Now Playing or Video Now Playing.)

    The state of the Shuffle button is now saved, but continues to work like it did before where the list can be unshuffled.

    Changes in Operation:
    ---------------------

    My Music and My Video work a little differently due to how Music autostarts so I'll explain them seperately and detail where the difference exists.

    1) My Music

    When the Music Now Playing window is empty, newly queued items are automatically added in a shuffled order to the window. (They can still be unshuffled.) Music will autostart the queue from the top.

    If the Music playlist is being playing and new items are queued, the new items are added in a shuffled order mixed directly into the playlist starting at two positions below the current song. (Crossfading keeps track of the "next" song.)

    If the Music Now Playing window is not empty, and new items are queued, they are added to the bottom of the existing playlist but in a shuffled order. This is to maintain the previous operation in Music where if the playlist was not playing, and new items are queued, playback begins from the new items.

    2) My Video

    When the Video Now Playing window is empty, newly queued items are automatically added in a shuffled order to the window. Like before, Video queues do not auto start.

    If the Video playlist is being played and new items are queued, the new items are added in a shuffled order mixed directly into the playlist starting at two positions below the current song. (For simplicity, the operation matches music. I am considering changing this but I need to check that the video player doesnt keep track of the "next" item first.)

    If the Video Now Playing window is not empty, and new items are queued, they are added to the bottom of the existing playlist, in a shuffled order. Here's where the difference between music and video comes into play... Because video doesnt autoplay, if you queue single items, they will not be not be added in a shuffled order because Xbmc is really shuffling a list of 1 item. The work around is to start playback from the first added item, return to the gui while its playing, and add the others. This way the new items will be shuffled according to the rules above.

    ** edit **

    One thing I forgot to mention is that now both Music and Video behave like WinAmp and Foobar context menu options in Windows. When you use "PLAY", the contents Now Playing window is cleared before the items are added.


  • Would like to point out this broke the svn and it dosn't compile any more :sad:
    d:xbmc SourcexbmcutilsGUIInfoManager.cpp(1264): error C2065: 'PLAYLIST_MUSIC_TEMP' : undeclared identifier
    d:xbmc SourcexbmcutilsGUIInfoManager.cpp(1270): error C3861: 'PLAYLIST_MUSIC_TEMP': identifier not found, even with argument-dependent lookup
    d:xbmc SourcexbmcutilsGUIInfoManager.cpp(1387): error C2065: 'PLAYLIST_VIDEO_TEMP' : undeclared identifier
    d:xbmc SourcexbmcutilsGUIInfoManager.cpp(1393): error C3861: 'PLAYLIST_VIDEO_TEMP': identifier not found, even with argument-dependent lookup


  • if you just want to be able to play random music from your whole library you could just add your music share to a playlist and play it with random.


  • Thanks for the response. I'll have to play around with the file manager - this sounds like a promising option that I had not thought of. As for coding a patch...I wish I had the know-how, but unfortuantely my coding skills are pretty limited, so I really wouldn't know where to start (I certainly wouldn't mind the challenge though, so if you have suggestions as to where to start, I'll take 'em).

    Thanks again.


  • Thanks for the reply.

    Personally, I would prefer the more configurable option...but I understand that would be more work for you guys, and a potential support nightmare...so the "on/off" switch would do just fine.

    And regarding the "sort by: year" option...I think it's only availble in the video library.


  • Would it be possible to enable the artist listing when viewing by album in the music library?

    This would allow one to view by album and sort by artist to get a true "Jukebox" effect - rather than only having the album title (and cover) which I may or may not recognize.

    Also, when browsing by artist, could a "sort by" "Year" option be added? Call me anal, but I like to view an artists catalog in order of release as opposed to alphabetically, etc.

    Thanks for the consideration!







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Jukebox mode / Party mode (library playlist) , Please add it free.