Discussion:
Feature Request (play random Song / follow playback in view)
Jiaom
2011-05-03 10:53:28 UTC
Permalink
Hi everyone,

I recently discovered this great Music Player, however I'm missing two
small Details. Having used foobar2000 before, I'd love to have a command
that plays a random Song from the current view (would be great if usable
via cmus-remote, too). In conjunction to that, it'd be great if there were
a "Cursor follows Playback" equivalent. Simply an option to append
"win-sel-cur" to every track change would be awesome. If something like
this is already possible, I'd be glad if you give me a small hint in how
to get it working.


Greetings

Jiaom
Johannes Weißl
2011-05-03 12:36:31 UTC
Permalink
Hello Jiaom,
Post by Jiaom
I recently discovered this great Music Player, however I'm missing two
small Details.
Thanks for your suggestions and great you like cmus!
Post by Jiaom
Having used foobar2000 before, I'd love to have a command that plays
a random Song from the current view (would be great if usable via
cmus-remote, too).
There is the "tqueue" command to queue a random song from the library.
As far as I know, there is no way to get the current view via
cmus-remote, so there is no possibility to script this behaviour.

Are there any objections to output the current view via
`cmus-remote -Q`? Then a script would be possible!
Post by Jiaom
In conjunction to that, it'd be great if there were a "Cursor follows
Playback" equivalent. Simply an option to append "win-sel-cur" to
every track change would be awesome. If something like this is
already possible, I'd be glad if you give me a small hint in how to
get it working.
This has been requested multiple times in the past. I wrote a small
shell script which accomplishes that:
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_follow_playback

Can you check if it works? You have to set it as status_display_program:
http://cmus.sourceforge.net/wiki/doku.php?id=status_display_programs#usage_installation



Greetings,
Johannes
a.l.e
2011-05-03 12:44:48 UTC
Permalink
hi
Having used foobar2000 before, I'd love to have a command that plays
a random Song from the current view (would be great if usable via
cmus-remote, too).
the one thing i've been wondering several time: is there a way to
randomize the current queue (or pick a random song from the queue)?

my use case is:
- i add several albums (or songs sorted by authour) to the queue
- and then i won't to listen to all those songs in a random order

ciao
a.l.e
Johannes Weißl
2011-05-03 13:08:19 UTC
Permalink
Post by a.l.e
the one thing i've been wondering several time: is there a way to
randomize the current queue (or pick a random song from the queue)?
- i add several albums (or songs sorted by authour) to the queue
- and then i won't to listen to all those songs in a random order
Hmm, I don't think randomizing the queue is possible at the moment. But
why not use the playlist instead? If you want to use the queue, I wrote
a script that pushes tracks/albums to the queue in a random order:
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_queue_randomly

You can bind it to a key:
:bind -f common ^E run cmus_queue_randomly

Does this solve your problem?


Johannes
Johannes Weißl
2011-05-03 13:54:18 UTC
Permalink
Post by Johannes Weißl
As far as I know, there is no way to get the current view via
cmus-remote, so there is no possibility to script this behaviour.
I was wrong, I wrote a (bit hacky) script that does select the next
track in the current view (view 1-3):
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_play_random

Is this what you meant?


Johannes
a.l.e
2011-05-05 22:49:23 UTC
Permalink
hi johannes
Post by Johannes Weißl
Post by Johannes Weißl
As far as I know, there is no way to get the current view via
cmus-remote, so there is no possibility to script this behaviour.
I was wrong, I wrote a (bit hacky) script that does select the next
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_play_random
Is this what you meant?
i don't think so...

what i'm looking for is a way to scramble the current queue...

ciao
a.l.e
Johannes Weißl
2011-05-05 23:10:10 UTC
Permalink
Hi a.l.e,
Post by a.l.e
Post by Johannes Weißl
Is this what you meant?
i don't think so...
what i'm looking for is a way to scramble the current queue...
How about this script I just wrote:
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_randomize_queue

Put it in a directory in your PATH, make it executable and run:
!cmus_randomize_queue

('!' is bound to :shell in cmus 2.4.0)

It is not very fast, but who has thousands of tracks in the queue...
Is this what you meant?

Johannes
a.l.e
2011-05-07 01:42:03 UTC
Permalink
On Fri, 6 May 2011 01:10:10 +0200
Post by Johannes Weißl
Hi a.l.e,
Post by a.l.e
Post by Johannes Weißl
Is this what you meant?
i don't think so...
what i'm looking for is a way to scramble the current queue...
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_randomize_queue
!cmus_randomize_queue
('!' is bound to :shell in cmus 2.4.0)
It is not very fast, but who has thousands of tracks in the queue...
Is this what you meant?
yep!

that's it!

i would welcome it as a cmus feature... but i can live with a script!

ciao && thanks
a.l.e

Johannes Weißl
2011-05-03 20:37:21 UTC
Permalink
Post by Johannes Weißl
This has been requested multiple times in the past. I wrote a small
http://cmus.sourceforge.net/wiki/doku.php?id=cmus_follow_playback
Just wanted to clarify that I uploaded all scripts in this thread while
writing the mails (had them / or similar scripts locally). Otherwise it
looks like I would suggest that people didn't RTFM... sorry for that!


Johannes
Continue reading on narkive:
Loading...