Announcing Spicefly SugarCube
** UPDATE: This thread is seriously old now! SugarCube is still in development, now on Version 4.x details can be found on the http://www.spicefly.com/ website **
THIS THREAD IS OLD - PLEASE SEE http://forums.slimdevices.com/showthread.php?t=73988 FOR RELEASE v2 of SUGARCUBE
This is the public release of Spicefly SugarCube a plugin written to achieve my desire for SqueezeCentre and MusicIP to just work it out between themselves and play music, nonstop with no hassle, no annoying pre-creating playlists and all that pesky button fidderling!
Features Volume fade, to gradually step down the volume each track change, perfect as a nightime aid for sleeping.
Player Sleep functionality, to shutoff the player after a user specified time description.
** Does not require the MusicIP Plugin to function so no more double scanning **
*How it Works*
Just pick a single track to play from your library and while that track is playing, SugarCube takes it and asks MusicIP for another track (based on specified criteria). SugarCube then randomly chooses a track from the MusicIP results and queues that up to play.
Once the first track ends, the second track is now your seed track and the process continues, so on and so on!
You are taken on a journey through your music library without all the hassle of playlists or lots of key pressing, you never experience the same playlists ever or reach the end! Great if you work from home all day!
*Pre-requisites*
You ideally require MusicIP to be configured and running in headless mode.
*How to Install It*
See SugarCube Version 2 thread. http://forums.slimdevices.com/showthread.php?t=73988
*How to Use It*
Once Enabled just select a single track to play and play it! Once the track starts playing you will see another track queued up. Sit back and enjoy your collection. Note to go back to normal playing mode, you need to disable the plugin via the Extra menu or the settings page.
Thats all for now! Constructive feedback always welcome.
*History*
Release V1.0 - First Public Release - 25th June 2008, released into the wild to gauge response on future development.
**Extra Version info removed due to length restrictions, see website for full details**
*** 2009 ***
Version 1.8.0 - 3rd January 2009
+ Major rewrite of functions and code improvements to make SugarCube play nicer with SqueezeCenter
+ Changed tracking array method to incorporate entire path and track
+ Added checks to ensure current playing track is not stored multiple times in the tracking array
+ Major Engine Replacement of tracking and checking routines, big improvement in reducing track duplication when playing including foreign character sets.
= Removed old routines not required anymore
+ Rewrite of menu code, to input.choice which reduces loading on SqueezeCenter.
+ Added Volume Fade and Player Sleep Enable/Disable functionality into the menu system.
+ Rewrite of MusicIP Calls to Async Code; which reduces loading on SqueezeCenter.
+ Added Repository support for SugarCube
Version 1.8.1 - 8th January 2009
= Alteration to unique track routine to make it case insensitive, MIP helpfully will on occasion return tracks ignoring case
Version 1.8.2 - 9th January 2009 (Internal Developer Release)
+ Switch from Async call to Sync call to enable integration back into Dynamic Playlist
= Restructuring of procedures to enable integration back into Dynamic Playlist
Version 1.8.3 - 10th January 2009
+ Fix of Dynamic Playlist integration
+ Addition of Duet Squeezebox Controller menus!
Thanks to Erland for fixing this!
Version 1.8.4 - 26th February 2009
+ Fix for & signs in track names
+ Fix of SugarCube Dynamic Playlist integration with Alarm and Mediafly
Version 1.9beta - 16th May 2009
NOTE This version will not work on 7.4 SQLLite due to changes in the core database engine
Major New Features
Mix by Genre
Coming Up Next
Per Player Opt in and Opt Out
+ Added Selected Track, Next Playlist Track, Next Playlist Album and Next Playlist Artist exposure to MusicInfoSCR
+ Added additional error checking to strength SugarCube
+ Added support for Restricting Genre to seed track, can cause an adverse reaction if small library or few tracks with the same genre
+ Added Coming up Next; Artist, Track and Album details
+ Added additional Seed Options, seed from Album
= Removed all log output from SugarCube at info level to reduce noise in log files
+ Added basic Mac Support ( extended charset support unknown?) thanks to Morberg
+ Added subscription to PAUSE notification to stop Coming Up Next from displaying when paused and not playing
+ Added subscription to PLAY notification to re-establish Coming Up Next (if applicable) after a pause event
+ Added ability to restrict mix to a Genre overides mix by Filters
+ Added per player opt in and opt out for SugarCube
+ Added hash data structures to enable per player Coming Up Next details
= Removed status hash for player, instead we check its live status when required
Version 1.9 Gamma - Released to Friends of Spicefly 7th June 2009
Public Release 7th September 2009
+ Added Full Recipe Support for User-defined Recipes
= Removed extraneous code no longer required
= Tweak of On/Off to top of menus
+ Tweak of prefs savings method to enable per player settings
+ Added Seed Option selection for Song/Album mode per Player, removed data hash
+ Added UpNext per Player, removed data hash
+ Few tweaks to Upnext Code to be more intelligent of player status (on/off/paused etc)
+ Added Genre Mix per Player, removed data hash
Version 2.x
See http://forums.slimdevices.com/showthread.php?t=73988
Results 1 to 10 of 422
-
2008-06-25, 07:47 #1
Announce: Spicefly SugarCube (Automatic MusicIP DJ now with Sleep and Fade)
Last edited by cparker; 2012-04-12 at 02:02. Reason: New Thread
www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.
-
2008-06-25, 08:40 #2
Announce: Spicefly SugarCube (AutomaticMusicIP DJ)
> *How it Works*
> Just pick a single track to play from your library and while that track
> is playing, SugarCube takes it and asks MusicIP for another track (based
> on specified criteria). SugarCube then randomly chooses a track from the
> MusicIP results and queues that up to play.
Sounds cool! So... compared to a traditional MIP mix this doesn't stop after 30 or what tracks, but continues, similar to RandomPlay?
> $mymip = "http://localhost:10002/";
> $myss = "http://localhost:9000/";
These values can be read from the prefs:
preferences('plugin.musicip')->get('port')
preferences('server')->get('httpport')
Also - why do you need the CAUTH?
--
Michael
-
2008-06-25, 09:25 #3
Hi Michael
Yep it goes on.. and on and on.... until you get fed up of it!
I use the CAUTH as I push the new track to Squeezecentre via the web api, I will look at other methods CLI maybe? but this one was quick and worked
I will look at the web interface, as it will probably be needed in later versions. Though looking initially at some sample code, it looked like it wasnt possible to make it more complicated
Cheers
PS Forgot to mention there is an example of how to find the CAUTH on my website with screen captures.www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.
-
2008-06-25, 11:35 #4
Announce: Spicefly SugarCube (AutomaticMusicIP DJ)
Great! Sounds like just what I wanted to do myself.
How does a user select the initial seed song? Does this appear as a mixer on the currently playing track?
I'm worried though that I may end up with a random music that repeats/revisits the same tracks frequently. I thought it may be better to add a playlist of 20 items from choosing a single track, and then after every 10 songs add another 10 using the last 10 songs as a seed (I think there's an option to not include the seed songs in the mix, or perhaps it would be easier to request a new single song each time, but reject the song and choose another if it has been played recently/is in the current playlist already).
Phil
-
2008-06-25, 11:45 #5
> I use the CAUTH as I push the new track to Squeezecentre via the web
> api, I will look at other methods CLI maybe? but this one was quick
> and worked
Believe me: using the CLI your submitting the new track to SC would be reduced to a one liner ;-). Instead of sending the params to the web interface (p0=playlist&p1=add&p2=$element) you can use the same as a CLI command:
$client->execute(["playlist", "add", $element]);
Done.
I did the above changes to your file, as a proof of concept. Please see the attached file.
Also you should try to use some of the work which is already done in the MIP plugin to verify whether MIP is available at all, port number, mixer parameters etc. It's all there. And SC's own http request object instead of LWP.Last edited by mherger; 2008-11-21 at 06:08.
-
2008-06-25, 11:48 #6
Oh, and your mix parameters must be quite liberal compared to mine. From Yello to the Kelly Family in four tracks :-)
-
2008-06-25, 12:32 #7
Announce: Spicefly SugarCube (AutomaticMusicIP DJ)
I am currently running SC 7.2. I tweaked the install.xml to set maxVersion=*. The plugin seems to load without any errors, but doesn't seem to work.
I browse to a song, press play, it starts to play and then finishes, and that's it. No errors or warnings are reported.
-
2008-06-25, 12:59 #8
Thanks Michael, nice piece of code!
I've updated the zip file so no more worries on CAUTH strings, I always thought it was a bit clunky, so thanks for that.
www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.
-
2008-06-25, 13:06 #9www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.
-
2008-06-25, 13:37 #10
Can confirm that Michael's proof of concept plugin.pm works with 7.2 (no need for CAUTH string) but the original does not. Am still playing around with this, but has huge potential cparker, so thanks very much. An easier way to enable/disable would be next on my list, but note your comments about the nature of this first version.
Mix parameters and filtering seems to be working fine for me: 135/2/Do not mix excluded tracks is producing some fine, progressive playlists.Who am I on LAST.FM?
"Siduhe Loved Tracks radio got the thumbs up. Feedback included: yeah, it's good... got the odd dodgy track tho..." (c) ModelCitizen

Reply With Quote

