plait

Digit

~ well, not sure this qualifies quite as a "How-To", but maybe another more fitting section will be found for it, or maybe i'll just try to make it more how-to-ish than i was originally intending to bother with ~

I just want to bring to your attention, a way of playing your music, that deserves more attention and widespread use.

plait.

do you like unix philosophy?  do you like the star trek computer?

plait's kind of both.

for example, to play some jazz, i would simply issue:plait jazz
rather elegant and simple.

so, presuming you've got it installed, and set up correctly in your ~/.plait/config, and have run plait -cto update the cache at least once, then the fun begins.

so, there's not really much to say about it is there.  a quick look through the man page, and you'll likely grok enough info.

plait -r bobwill play a shuffled playlist of any track with the the string "bob" anywhere in its filename, or tags.

ok, so that might not be an entirely practical way to use it.  but there are many better ways you'll be able to come up with to play just what you want.

plait 2013 plait floyd wish plait -r tull brick

of course, if writing plait is too much for you, you could always make a shorter alias in your ~/.bashrc or even as some script...alias plr="plait -r" or even some specific onesalias idm="plait -m idm electronica bleep" alias scaregran="plait -r gabber" alias scarestalker="plait -r nal unt" alias scarefriends="plait -r jedward"

and remember i said unix philosophy...

try that same lovely intuitive searching of your music to match your terms, with plait -l so maybe something like plait -l springsteen and viola, a nice clean text output of the paths to those tracks that match...  pipe that or output to files or... see, very nice for creating playlists n things like that.   :)  and of course, once you create a playlist, you can give it a unique memorable name, and then play it with plait ...

and loads of other cool stuff too.  once it's open to unix philosophy, the potential goes through the roof.

... but mostly, i just use it like the peeps in star trek ask for music from the ship's computer.

usually that's asking for a genre or a composer/musician/orchestra/band, or sometimes i get as specific to ask for an album, or a track, and sometimes more intricate and elaborate things.

usually it's just something like:plait tranceorplait baroqueorplait -r ambient soundscapeso i can quickly help induce the required brainwave state conducive to whatever i'm doing, working or learning or relaxing.

i do find myself doing plait -r anadaoften, and also plait anada ountry for some faves.

so, i hope you see the point i'm trying to emphasize here, that, although plait does open to a multitude of wonders and utilitarian gold, it's one simple simple ability, that being as a juke box, is done so well, such that merely doing that one thing so well is reason enough to bring plait to the attention of others alone.   it really has to be experienced to really get the jist of how much a boon it is to deal with your music playing in this manner.

presumably you've got a nice collection of music you like in your collection, and it's reasonably well populated with tags (usually just as they come), and that's enough to help plait make the best of that for you. 

plait does for playing your music, as tiling window management does for your workflow.     ~er something like that, not quite worded as clearly as i have it in my head, but it's the same kind of augment.  it gets the clumsy interface out of your way, and just neatly organises stuff and does what it's supposed to, as effectively and as out of your way as possible.   unobtrusive.  the quiet aid that does the job, not the loud glamor pop-tart toddler that puts all its efforts into being noticed.

in the back of my mind, i keep coming up with wonderful scripts, using time dependancy for what mood of stuff to play...  so i can have an endless playlist to tune into, always different every day, able to be left on 24/7, but adaptive and interactive/interuptable enough to switch it up to high gear (like if you have a party, and want the thumping music when you'd normally have been asleep), and so on... but then, plait works just so great and effortless for whatever you want to be playing anyways, it's like, why bother.   ^_^

having said that, if you do bother, please do share any of your plait script creations, or other use tips.  :)

greatest implementation of plait i have seen, was in INX. 

oh hey, that reminds me, it can stream too.  you can use that same genius interface to basically access any number of djs out there.  ~  i think there may be some fiddling and limitations to that...  yet to investigate at time of writing initial post.  (may return to edit with more stream info later)

so anyways, before i lose any sense of a punchy end and trail off, i'll stop there.

sudo apt-get install plait
(hopefully that gets you plaiter in the same package)

more (better) plait info here!

^ have at.  :)

valroadie

Awesome! Thanks digit, I think this will change some peoples minds about the way they listen to and query music on command!

:D

VastOne

Fantastic input and How To Digit!  I agree with valroadie... this is an eye opening look at playing your music

A question.... Is it smart enough to determine genders if built correctly?  For example, I would redo some of my genders to be 70's style so I could just hear

plait  70's

Or if the gender is already Classic Rock, could you do a

plait Classic Rock 70's

or

plait Classic Rock Who Pink Floyd Bob Seger The James Gang

Things like that?
VSIDO      VSIDO Change Blog    

    I dev VSIDO

Digit

Quote from: VastOne on September 13, 2013, 01:37:59 AM
Fantastic input and How To Digit!  I agree with valroadie... this is an eye opening look at playing your music

A question.... Is it smart enough to determine genders if built correctly?  For example, I would redo some of my genders to be 70's style so I could just hear

plait  70's

Or if the gender is already Classic Rock, could you do a

plait Classic Rock 70's

or

plait Classic Rock Who Pink Floyd Bob Seger The James Gang

Things like that?

you keep saying genders...  is that intentional?  or do you mean genres?
if the former, then, no idea about genders or how they apply to this situation.
otherwise, *tries those commands* *gets engulfed in disco from 70s* *gets soothed by familiar guitar struming, and 25 years and my life is still g~ from classic rock* yeah, seems to be working well enough on my collection,
...and i've never bothered editing that meta data except for on my own creations.   
who knows how much is missed from plait's gaze,
~oh that's right, i can just plait -l and compare to what other players' readouts might be telling me...
if i'm ever bothered.  ^_^  plait does the job n gets it out of the way... it has drastically reduced how much effort i'm willing to put into getting my music playing.   ^_^    ~  ok, i still sometimes use ncmpcpp, and clementine.  different use cases.  but the one i reach for, >90% of the time, is plait.

rly glad i did plait classic rock

mmmm. 

VastOne

Long long day.... yes Genres

These spell-checkers really need to be more intuitive!

Thanks Digit   ::)
VSIDO      VSIDO Change Blog    

    I dev VSIDO

Digit

i should have also added this link, to emphasise the plaiter as well as the plait, since more of the niceness can be found and done with plaiter.

http://stephenjungels.com/jungels.net/projects/plait/readme-plaiter.html


but i really just wanted to emphasise the baaaaaasic use.  ;)   cos it's worthy at that.  :)

Digit

just installed plait in vsido, and it works great ootb.


just

sudo apt-get install plait(tho thnx to my aliases, i only needed to type "agi plait"

then much success was had when i did: plait -c && plait trance

my vsido is installed on the machine with the good better speakers, idk why i was playing my music through my laptop... it's even stored on that machine with the better sound...  why?  idk.  it's not like i was earning any geek kudos playing my music stored elsewhere thnx to sshfs, since controlling it through ssh from here is just as geek-kudos worthy.  lol

sounds great.

i might have to try out the config from my vsido box on here, for those times when i do actually have a reason to use plait local on the #! laptop.  it uses the unix-plaiter player, and seems to be working fine...  oh, wait... is it struggling to skip to next tracks...   well... at least plait --next works nice.   doesnt on my config using mplayer. (or was it mplayer2)   anyways... just wanted to say...


plait in vsido, = nice.

hrmm.. .... i wonder... could use to play some boot music maybe?   or am i just being silly now?  %_%

statmonkey

#7
Good stuff. Thanks for posting this.  For my system I did have to use mplayer and modify my config and helpers to use it instead of the defaults.  I use hdmi sound and for that reason the defaults resulted in the command "plait genre" returning ... crickets. 

Now I have a fun new toy to play with.  It is pretty amazing, I had toyed with plait some time ago and for some odd reason forgot how wondrous it was.

VastOne - since you are the guru on this.  I am wondering if I can get the now playing info for my conky.  It seems that the actual info is coming from plait and not whatever player I am using.  For example if I am using deadbeef and I try to get the output to conky normally I would use ${execi 10 deadbeef --nowplaying '%a - %t'} but this results in "nothing".  I am really open to any player but it drives me nuts not to be able to look up and see the what song is now playing.

dizzie

Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |

jedi

Wow Digit!  Just wow!  Quite possibly the easiest and best thing I've ever done with Linux.  I love music!!!!  Play music that matches your mood with a simple terminal command?  Seems to good to be true, but it is true!  I love it, and thanks for the great tip about it.  I'd never even heard of it...
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

Digit

#10
i only just found out the "now playing" of plait.

"plait -l" does well, unless mixed with -r, then you cant tell where you are and what's playing.

however, take a look in ~/.plait ...  see the status file?  cat that.  ;)  pipe it, whatever.

:)  didnt realise there was a now-playing in plait.  oh happy day.  ;)

cat ~/.plait/status

or maybe tail -n 1 ... however you want to get the info (for conky or whatever)

;)

ps,
i'm sure i knew this long ago.  certainly knew it had to be possible somehow, since inx's interface made use of it. 

pps,
anyone streaming with it yet?


ppps,
oh,plaiter --status

statmonkey

#11
Digit.  Thank you my good man.  That last post of yours saved me a ton of time and effort, I had already started a trial and error process for conky vars and using different players.  Just curious are you playing through plaiter or using another player as I am?  I think plaiter is trying but still not getting sound output when I run with it in the config and just calling plaiter.  I have some other ?'s but think I will start here.  I have been going through the readme's line by line with limited success.

Well, I will just add on to this since I solved my issues and probably not the best way to do this but perhaps it will help someone save some time or there is a guru here that can come up with a better way.

I wanted to use plait with my previously set up mpd system and it would not work.  After some google fu I came across a patch for plait that was supposed to make it work with mpd.  Unfortunately I could not get it to play nice on my system.  Further research led me back to http://sourceforge.net/p/plait/code/HEAD/tree/trunk/ and after downloading and reading what was in there I re-installed plait and support files from this page, specifically plait version 1.6.3 which is http://sourceforge.net/p/plait/code/HEAD/tree/trunk/plait.

I did have to download each of the supporting files separately but I am guessing that if you already had plait they are pretty much the same.

I then changed the platform to unix-mpc and the helpers to point to mpd.  I will continue tweaking but it works quite well. The only issue I am getting is a couple of error: Not found statements.  I am not sure if this is from the plait itself or something mis-directing in the supporting awk scripts, I suspect the latter.  Admittedly I know little of awk so there is that to learn.  BTW it set up everything for plait in my $USER directory which is nice and plait just automagically adjusted itself to my mpd path settings for my library.  I could not find an installer package for this trunk by the way. 

For giggles I wrote a little random word grepping script that runs on startup, grabs a word from my library list and plugs it into a plait command,  So on boot I get a truly random playlist every time.  Completely stupid, inane and fun. Plus with mpd I can still have my music at the login screen.

Digit

QuoteJust curious are you playing through plaiter or using another player as I am?
on my crunchbang, i have it using linux-mplayer.  this means i miss out on some of the funky plaiter features.

on my vsido, i have it using plaiter, however, as nice as it is to get some more of the plaiter features, it also seems to fail to move on to playing the next track after finishing a track.

still to determine how to remedy past this compromise to once again get the best of both worlds.

i've yet to try it with mpc/mpd.  n1 that u did. :)

so, does your helpers file just contain the one line now?   rather than something like:
Quoteogg:ogg123
httpogg:ogg123
flac:ogg123
mp3:mpg123
httpmp3:mpg123
http:mpg123

statmonkey

My helpers are just all set to mpd and the platform is just set to unix-mpc. 

I had the same issue with plaiter by the way.  I could get it to play one song (no sound iirc) and then it would stop.

For me I have run mpd for a long time and have lots of support scripts so it just makes the most sense for me to go that way.  Once you pointed me in the right direction it was incidental to return the now playing info for use elsewhere and then I just threw a little zenity script together giving me the option of hitting a key combo to change my plait if I don't like what is coming up.  Like ...
mpc clear
ENTRY=`zenity --entry --text "Please enter search term" --entry-text "Search for" --title "Enter your search"`
if [ $? == 0 ]
then
plait "$ENTRY"
fi
mpc play
exit


I let mpc worry about randomizing the list. I also cobbled together another one that offers me the option of selecting from my saved playlists and I am good to go. Now that through all the good info on this site I have figured out fluxbox I can really do all I want with plait from the keyboard.  I do get some errors with that script by the way, I think it has something to do with the rough and hacky way I moved from plait  1.6.2 to 1.6.3.  They are not mortal and all works as it should or at least well enough for my needs.  I will figure out the errors at some point I am sure.  Just really glad you started this thread and got me looking at this.  Plait has raised my personal music enjoyment level quite a bit.  It's nerdy goodness is so much fun.  Thanks again.

Digit

nerdy goodness indeed!

that's awesome stuff there, statmonkey.  :)  living it up the nix way with aplomb!  inspirational. :)

i never got zenity working when i tried years back, and couldnt find out why... ~renewed interest now from that^^. :)

i'm very glad you came along for the ride in this thread.  :) :)