Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: cc on September 30, 2007, 09:27:18 AM

Title: Why does playlist insert replace the current playlist when stopped?
Post by: cc on September 30, 2007, 09:27:18 AM

I was doing a patch for something else and I got to wondering why the current playlist gets replaced if you insert while stopped? What's the reasoning behind it?

I understand why you might want the option to do this (like you can while playing with "Play Next") but why make it the only choice?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on September 30, 2007, 09:37:42 AM
Why not, honestly? If you want to insert into an existing playlist, pause instead of stopping.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: nls on September 30, 2007, 09:56:01 AM
The reasoning behind it is that you do not have a current playlist when stopped. If you start playing without creating a new playlist rockbox will resume the old one.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on September 30, 2007, 10:19:54 AM
Why not, honestly? If you want to insert into an existing playlist, pause instead of stopping.

Sure, I understand you can do that. But there is extra code in there specifically to remove the menu options that would give you the other choices, so I thought someone had a reason for not wanting to offer the other choices.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on September 30, 2007, 10:26:26 AM
The reasoning behind it is that you do not have a current playlist when stopped. If you start playing without creating a new playlist rockbox will resume the old one.

The 'old one' isn't really old though, it is just the current_playlist that either does or doesn't get replaced when you do an insert. Unless I'm missing something, stopping playback doesn't do anything to the current_playlist.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on September 30, 2007, 11:27:15 AM
1) What "other choices" are removed? You simply asked about the "Insert" choice. Why exactly *doesn't* pausing work for you, and why should someone add an option to "Clear Playlist" since it's unnecessary as it stands? Right now, all inserting to a stopped playlist would add is the necessity for someone to manually clear a playlist without adding any new functionality, just hassle.

2) Please follow the posting guidelines. If you haven't read them, do so now, you will be expected to follow them in the future.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on September 30, 2007, 12:07:03 PM
My apologies - I guess I should have posted in the UI section?

1) What "other choices" are removed? You simply asked about the "Insert" choice. Why exactly *doesn't* pausing work for you, and why should someone add an option to "Clear Playlist" since it's unnecessary as it stands? Right now, all inserting to a stopped playlist would add is the necessity for someone to manually clear a playlist without adding any new functionality, just hassle.

OK, here's where I'm coming from: there is already an option in when playing which clears the playlist before inserting ("Play Next"). I though it would be easier to understand if this option was shown when stopped instead of "Insert" (which does something else when playing).

After implementing that I wondered why not show the other items in the menu when stopped? Hence my question.

(I guess you know, but the playing/stopped menu is one structure with different things shown depending on whether audio is playing or not).
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on September 30, 2007, 06:38:23 PM
"Play Next" and "Insert" would perform the same function when the playlist is empty. Whether it is physically empty or not, it is supposed to be conceptually empty when playback is stopped, therefor "Insert" is inserting into an empty playlist.

You still haven't answered the "What new functionality would this add, beyond requiring a user to have a new way manually clear the playlist"?

And no, the rules state that if you're not sure where to post something, put it in general discussion. It was the double post that was the problem. Did you actually go and read them carefully after I warned you, or did you just try to guess what was wrong?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 01, 2007, 02:33:17 AM

I did read the guidelines, but I was not aware I had made a double post. I can't find it now - did you delete it?

"Play Next" and "Insert" would perform the same function when the playlist is empty. Whether it is physically empty or not, it is supposed to be conceptually empty when playback is stopped, therefor "Insert" is inserting into an empty playlist.

This had not occurred to me. Maybe it is just me, but it does not seem logical to think the  playlist is empty while stopped when pressing play  starts right from where you left off  :)

You still haven't answered the "What new functionality would this add, beyond requiring a user to have a new way manually clear the playlist"?

The new 'functionality' would be an easier to understand interface - the playlist menu would always be the same independent of whether playback was stopped or not, and there would be no need to explain in the manual the different functionality of the menu (and particularly the insert function) has depending on the play/stop.

Also, there would be less code because there would be no need to have different code for these two cases.

This would not involve "a new way to clear the playlist", it would just use "Play Next".
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 01, 2007, 02:55:18 AM
Then what would be the point of even HAVING a stop function, if the playlist will always act exactly as if it were paused?

Play Next does NOT interrupt the current song, so to clear the playlist you'd have to stop, "Play Next", then resume, then hit next.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 01, 2007, 03:45:43 AM
Play Next does NOT interrupt the current song, so to clear the playlist you'd have to stop, "Play Next", then resume, then hit next.

Ah, this is what I had missed. I understand now.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 01, 2007, 01:10:07 PM
The fact that after a STOP it's still possible to resume the playback means to me that the playlist still exists. That's why I'd also assume that Insert would work as cc suggested.

The difference between STOP ans PAUSE would be that after STOP you go to the file (or db) browser, while after PAUSE you're still in the WPS.

To clear the current playlist, you can either explicitly clear it (is there an option for this) or select a song thus implicitly creating a new playlist.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: DefineByte on October 01, 2007, 03:37:30 PM
I find the current behaviour strange too.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 01, 2007, 10:23:24 PM
There is no option currently for explicitly clearing a playlist.

And "Selecting a song" won't work for inserting a single song into an empty playlist, meaning you HAVE to introduce a clear operation and make it more of a hassle for playing a single song than it is now.

Play can be thought of as "reloading" the previous playlist, if you need a term that is more semantically applicable. Does thinking of it this way solve your problems?

It's not that the playlist doesn't EXIST, it's that it ISN'T ACTIVE. If you Pause, the playlist is still active, but playback is not happening. If you Stop, then the playlist is no longer active at all, meaning that if you insert a song it's inserted into a blank playlist, and if you resume/reload, then it can attempt to start playing the previous playlist from where you were, necessitating a rebuffer. Stopping playback conceptually empties the audio buffer, necessary for certain things to happen. It really is STOP, and this is very different from PAUSE.

I think that if you actually think about what's going on, the behaviour will make more sense. Another solution would be to take away the Resume Stopped Playlist function? Would that solve the conceptual difficulty for you?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 04:07:23 AM
There is no option currently for explicitly clearing a playlist.

OK

Quote
And "Selecting a song" won't work for inserting a single song into an empty playlist, meaning you HAVE to introduce a clear operation and make it more of a hassle for playing a single song than it is now.

You could do that by selecting "Play next". IIUC, "Play next" works as follows: if there is current song, it's retained (queued). The rest of the list is erased. The selected song is inserted into the list. If you're in PAUSE, there is current song, and it will play to the end. If you're in STOP, there is no current song, so the list will contain just the inserted song.

Quote
Play can be thought of as "reloading" the previous playlist, if you need a term that is more semantically applicable. Does thinking of it this way solve your problems?

I'd rather think of it other way: a playlist never disappears, even after STOP or having reached its end. It can only be replaced by another list. Then we don't have to introduce the 'active' category at all.

Quote
I think that if you actually think about what's going on, the behaviour will make more sense.

The main thing is you can predict the results of your next action. If you can do that, even the most unlogical behaviour is OK. But to learn that behaviour is harder if there are many special cases.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 02, 2007, 04:41:53 AM

I agree with fml2. The confusion stems from the current side-effect of stop - a side effect that no-one would guess happened. Clearing the playlist on stop might be easier to understand, but it is also a side-effect and I think it would be pretty annoying. As a user the only difference I see between pause and stop is that the player will shut itself off when stopped, but not when paused. This is fine by me.

All the confusion could be removed by having the same menu whether you are stopped or not:

 - Insert Next
 - Insert Last
 - Insert Shuffled
 - Queue Next
 - Queue Last
 - Queue Shuffled
 - Replace
 - Replace Shuffled

As fml2 says the only slight difference in behaviour while stopped would be that Replace would not leave the current song queued. But people wouldn't have to know that to use it effectively.

After adding something, two more menu items would be shown "Insert Again" and "Queu Again" which would insert/queue after whatever had been added previously.

This is easier to understand - you can figure it out just be looking at the menu*. And the code would be shorter and cleaner.

I would do a patch for this if I thought there was any chance it would be accepted.

(* well except for knowing the special significance given to word "Queue", maybe that could be replaced with "Play Once")
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 04:54:50 AM
Quote
If you're in STOP, there is no current song, so the list will contain just the inserted song.
This contradicts your earlier arguments that "Stopped" playlists still exist. While the song isn't playing, pressing "Play" will resume in the middle of the song, so it's still the "Current" song, at least as much as the stopped playlist is the "Current" playlist, so this removes any logical consistency you think you're earning.

Seriously, if you've read the manual all this behaviour should be fairly clear. If it's not explained clearly in the manual, the solution is to clarify it, but "Stop" removes the playlist from memory, and this IS IMPORTANT, both functionally (other things can use the memory, such as plugins) and conceptually (Insert creates a new playlist).

It is "Stop", the playback engine is shut down. This is the difference between it and "Pause." It's like quitting Winamp, the music code is no longer running. While "Pause" is like clicking the Pause key in winamp. The program's still running, and still maintains control of memory, you just don't hear audio.

I'm not sure why this is so conceptually confusing...

If you don't want the playlist cleared, why don't you just Pause? I mean, I don't see why both "Pause" and "Stop" should be 100% functionally identical except whether they leave the WPS: If this is true, why even HAVE two different buttons?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 05:05:04 AM
Quote
If you're in STOP, there is no current song, so the list will contain just the inserted song.
This contradicts your earlier arguments that "Stopped" playlists still exist.

I meant 'current song' as in 'song being played back', not the stored position (which indeed exists even if we're in STOP.) So there's no contradiction IMHO.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 05:06:04 AM
Well, by your standard if we "Stop" the playlist is still there, but the song that was being played isn't... I don't understand this, it's even more contradictory than "Neither still exists in memory, but can be reloaded"
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 05:18:42 AM
Well, by your standard if we "Stop" the playlist is still there, but the song that was being played isn't... I don't understand this, it's even more contradictory than "Neither still exists in memory, but can be reloaded"

I mean that if we Stop, no song is being played back. The song is of course still in the playlist, and the playlist still exists. If we Pause, this counts as the song still being played back, just paused (I mean mentally; technically in the depth of RB it might count as not being played). Where is the contradiction?

And even if we stop, the last playback position is stored somewhere so that after pressing Play the playback will resume from the last position.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 05:21:53 AM
Okay, here's where I'm confused.

Basically, you suggest that "Insert, Queue, and Play Next" treat the current playlist as if it were still active, but the current song as if it were not active.

The current method treats both the playlist and the song as if they're not active. You're making "Insert" and "Play" treat things differently, especially in the case of a single-song playlist. It seems to be adding more inconsistency, because you're NOT playing a single song, you're playing (and have buffered) several songs, or at least, one whole playlist (that can be one or multiple songs).

To me, "consistency" means "If playback is stopped, there is no active song or playlist, it playback is happening, both are active", it seems strange that you can stop, and the song isn't active but despite that the playlist *is* active, but not loaded (it can't be loaded / in RAM or it prevents several other things from ever being usable).
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 06:33:30 AM
Basically, you suggest that "Insert, Queue, and Play Next" treat the current playlist as if it were still active...
'present' would be a better word.

Quote
...but the current song as if it were not active.
again: present. And current song in the sense of the song currently being played back, not the song whose position is stored somewhere for later resume. (I hope you agree that if we're in STOP there is no song being played.)

With these definitions, I don't see any contradiction. 'Play next' retains the current song (in the above sense) if it's present and makes it queued (instead of firmly inserted). If there's no current song, there is also nothin to retain.

Since the playlist is still present, Insert can also be made. It's only not quite clear what the insertion point would be. I'd suppose it to be where it would be if no STOP had been made (since STOP does not impact the playlist in any way).

Quote
You're making "Insert" and "Play" treat things differently
As they usually are

Quote
To me, "consistency" means "If playback is stopped, there is no active song or playlist, it playback is happening, both are active"

Here lies the difference in our points of view. I consider the playlist as still present. And I don't even want to introduce the word 'active.'

Anyway, I'd suggest others to write their opinions. It seems that I'm not the only person in the world with the reasoning I presented here.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 06:42:16 AM
You seem to have missed my point. You're using words like "present" and "current" as if they had different meanings

Let's use "Previous" both for the last playlist played, and the last song played. Neither of them is in RAM, so neither is "active" and you want to treat the playlist as if it WERE active (honoring the current position within it, and inserting tracks into it as if the playlist were active) while treating the song as if it were not active (removing it if you choose play next, and ignoring the fact that a resume position exists). This is my point: You want to treat them differently, though when you are Stopped NEITHER is 'active' and when you're Paused, both are.

You've especially not addressed the fact that this
A) Makes the Pause and Stop buttons essentially identical in function, removing the usefulness of one of them entirely
B) Requires that the Insert function ignore whether the playlist is stopped or Paused, but the Play Next function dependent upon the playback status, rather than simply admitting globally that there is a difference between "Stop" and "Pause." You basically just want a stopped playlist to be treated differently by a different option than what treats it differently now, which is just moving the inconsistency you claim is there, while making "Stop" semantically useless in the process.
C) You ignore the fact that Stop removes the playlist from RAM, so it is an entirely different function. The playlist is not "Current" or "Active" or any other word you want: It's NOT THERE. Rockbox just remembers what WAS there, and can bring it back. It NEEDS to not be there for a variety of technical reasons, so suggesting that there be no way to stop, is silly.

Instead of re-stating your idea, why not specifically address the points such as "Why you think nobody should ever be able to actually clear their playlist" considering the fact that people frequently ask how to, and "What should we do about the fact that some plugins can't be used unless the audio buffer is freed and playback is completely stopped" and why "An empty buffer, and shutdown of the audio engine" shouldn't mean "an empty playlist".
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 02, 2007, 06:58:38 AM

Hmm, maybe the problem is that rockbox does such a good job of pretending the playlist is there  :D

I mean, if I stop and then go to "View Current Playlist", there it is!
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 07:06:51 AM
This was added on Aug 25th, as part of the ability to replay a playlist after it ended.

The playlist still isn't buffered. Would a more acceptable solution be to remove any and all capability of viewing the playlist when it's stopped, because it's not in RAM?

You've still neglected to answer several of my points, and I would very much appreciate it if you would actually address the problems your solution would introduce rather than simply quibbling over existing inconsistencies. Just because they exist doesn't mean that your solution is the only method for fixing them, nor does it mean they're necessarily bad since I strongly feel it's better to actually have functionality that lets you perform all the actions you want than to arbitrarily restrict the user's actions in favour of an artificial "consistency" that exists only in the minds of some people in the first place.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: petur on October 02, 2007, 07:40:27 AM
well count me to the confused ones as well....
I have never understood how playlist handling works.

If you say that the playlist is gone when you pressed stop, then why can I power down, boot and play, and see that 'vanished' playlist back again? Not quite how 'closing winamp' is explained...
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 07:42:14 AM
Well, I don't know about winamp (haven't used it in ages), but I've used music playing applications that reload the last playlist when you reload the application. It's gone while the application is closed, but reloaded when you launch it again...
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 02, 2007, 07:46:14 AM

OK, I can see where you are coming from now!

Let me do those points you had above:

A) Makes the Pause and Stop buttons essentially identical in function, removing the usefulness of one of them entirely

Stop still has the useful unloading features you talk about above. It just doesn't prevent you inserting into the current playlist while resuming.

Quote
B) Requires that the Insert function ignore whether the playlist is stopped or Paused, but the Play Next function dependent upon the playback status, rather than simply admitting globally that there is a difference between "Stop" and "Pause." You basically just want a stopped playlist to be treated differently by a different option than what treats it differently now, which is just moving the inconsistency you claim is there, while making "Stop" semantically useless in the process.

From the point of view of the code it is treated differently. The user just sees "Play next" playing their songs next, which if there is nothing playing is straight away. No-one is going to be surprised by that.

Quote
C) You ignore the fact that Stop removes the playlist from RAM, so it is an entirely different function. The playlist is not "Current" or "Active" or any other word you want: It's NOT THERE. Rockbox just remembers what WAS there, and can bring it back. It NEEDS to not be there for a variety of technical reasons, so suggesting that there be no way to stop, is silly.

I guess convincing people it is not there is pretty hard now there is the resume functionality, which is why this has come up now. I certainly would not have been asking any of these questions if pressing stop destroyed the current playlist (which it sounds like was the old behaviour).

Quote
Instead of re-stating your idea, why not specifically address the points such as "Why you think nobody should ever be able to actually clear their playlist" considering the fact that people frequently ask how to,

I don't think they would ask if there was a "Replace" option in the playlist menu.

Quote
and "What should we do about the fact that some plugins can't be used unless the audio buffer is freed and playback is completely stopped"

Well, stop still frees the buffers, it is just an extension of the resume playlist functionality - at the moment you can resume the previous playlist, why not allow inserting into the previous playlist, while resuming?

Quote
why "An empty buffer, and shutdown of the audio engine" shouldn't mean "an empty playlist".

Because the current playlist is pretending not the be empty now.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 07:53:19 AM
If we're going to allow any playlist manipulation while stopped, shouldn't there then be an option to clear a playlist, or start a new playlist without starting playback then?

I mean so far, all you've suggested is making "Starting an empty playlist" require more keypresses than before, while not actually adding any new functionality, so I still really don't see any benefit to your method other than what can be interpreted as "Consistency."

Another way to be consistent, simply, would be to remove the "Insert" option entirely when playback is stopped, and put "Play Next" (perhaps renamed to "Play Now") at the top.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 02, 2007, 08:13:43 AM
If we're going to allow any playlist manipulation while stopped, shouldn't there then be an option to clear a playlist, or start a new playlist without starting playback then?

I mean so far, all you've suggested is making "Starting an empty playlist" require more keypresses than before, while not actually adding any new functionality, so I still really don't see any benefit to your method other than what can be interpreted as "Consistency."

You have lost me here, why would someone want to start an empty playlist, or clear a playlist? I was assuming that what they want to do is replace the current playlist with some new songs.

And yes, to be complete there would be an option to edit without starting playback. But not having this option is not going to confuse anyone.

Quote
Another way to be consistent, simply, would be to remove the "Insert" option entirely when playback is stopped, and put "Play Next" (perhaps renamed to "Play Now") at the top.

Yes, that idea is what got me started on this whole thing. I put "Play Next" in the stopped menu and then wondered why all the other things weren't there too... asked the question and here we are... pages later  :D

Actually at the moment there is also "insert shuffled" when stopped, so I did "Play Next shuffled" too.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 11:18:15 AM
Quote
If we're going to allow any playlist manipulation while stopped, shouldn't there then be an option to clear a playlist, or start a new playlist without starting playback then?
For the sake of completeness -- yes, there could be such option. But I think a list would only be cleared just before adding something to it. And that can be made either by "Play Next" or by selecting a song. In the latter case, playback is automatically started as well.

If we would treat the playlist as non-existent (or not active) as you suggest, each Insert operation would empty it, right? So it wouldn't be possible to sequentially add several songs to the list while in Stopped.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 11:23:05 AM
The first insert starts playback (but doesn't enter the WPS). This is in line with the theory "The playlist isn't there (or 'active') when playback has stopped."
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 11:46:52 AM
The first insert starts playback (but doesn't enter the WPS). This is in line with the theory "The playlist isn't there (or 'active') when playback has stopped."

He-he, I can't agree. "The playlist isn't there (or 'active') when playback has stopped." doesn't mean "If there's a playlist then playback should start." I.e. I dont' understand why an Insert should start playback. I'll speculate: this is just to make possible insertion of several songs while staying in line with your proposal (stop=no playlist). Right?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 02, 2007, 11:52:12 AM
There's no reason to have an active playlist if playback isn't happening, though. If you need to prepare one in advance, the PC is far better, and even then if you don't want to hear anything, don't plug in your headphones, but if you're starting a new, empty playlist on a player, the assumption is that you're playing it. I don't quite understand what exactly you're asking, though.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 02, 2007, 12:06:01 PM
Quote
There's no reason to have an active playlist if playback isn't happening, though.
For you

Quote
If you need to prepare one in advance
For me, this is a perfectly reasonable reason to have a playlist without playback. This is also in the line with the facts that you can see the playlist while stopped.

I look at this from the perspective of a user. I'm not interested in the fact that the playlist (technically speaking) isn't there but is restored in the moment you want to see it. If I cann see it anytime, it's there. This is the perception.

Quote
the PC is far better, and even then if you don't want to hear anything, don't plug in your headphones
Well, THAT is really errr... a trick

Quote
but if you're starting a new, empty playlist on a player, the assumption is that you're playing it.
Again, this is your assumption.

Quote
I don't quite understand what exactly you're asking, though.
Agreed. If not many are inteersted in it then there's no point in argueing. I won't make a patch for this. If cc does then it's up to him to persuade everybody that it's good. But I'd be rather on his side.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: LinusN on October 03, 2007, 02:40:29 AM
On several occasions, I have had the need to prepare a small playlist with the player, and not have it start playing the first inserted song immediately. I think it would be a quite neat feature.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 03, 2007, 04:51:49 AM
On several occasions, I have had the need to prepare a small playlist with the player, and not have it start playing the first inserted song immediately. I think it would be a quite neat feature.

Maybe the behaviour of an editing-playlist-while stopped feature should be to never restart playback after insert/queue/replace?

Presumably if the user has stopped playback and gone into the (new) playlist menu he intends to do something more complicated than just selecting a file (or directory) to play.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: pondlife on October 03, 2007, 05:13:35 AM
I might be wrong, but I think the problem is one of consistency.  Originally, Rockbox was definitely intended to work as "the current playlist doesn't exist once playback is stopped".  However, some changes have been made towards "the current playlist always exists" model (which I would personally prefer).

I can't see why stopping playback should have an impact on the current playlist really, it's the action of selecting a file in the browser when stopped that clears a playlist, no?

I'd also not prefer to have it automatically start playback when inserting.  Make the playback state independent of the playlist construction.

pondlife
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 08:42:29 AM
If that's the case, what do we want to do with the stop button? In a case where it doesn't make the playlist inactive any more, it's really lost its purpose.

Not starting playback on the first insert is fine, but Play and Pause will become the same button, functionally. The only difference will be whether the audio buffer is preserved or not, and functionally speaking, I think there's no reason not to always preserve the audio buffer, but if Paused, allow a plugin to empty it if necessary.

It does, on the other hand, mean that we free up another button.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Febs on October 03, 2007, 09:01:51 AM
If that's the case, what do we want to do with the stop button? In a case where it doesn't make the playlist inactive any more, it's really lost its purpose.

Considering that the iPod doesn't even have a stop button, I don't think that this is necessarily a bad thing.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 09:05:28 AM
The iPod gets "Long press of Play" back, though. But other players have a button physically labelled "Stop", but we're negating any real difference between "Pause" and "Stop" (though there isn't any need for there to be a difference, if users don't want 'stop' to act like there's no longer an active song and playlist).
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: LinusN on October 03, 2007, 09:47:58 AM
If that's the case, what do we want to do with the stop button? In a case where it doesn't make the playlist inactive any more, it's really lost its purpose.
I believe the main issue here is the automatic start of playback on Insert. I want to be able to start creating a playlist without having to play it first.

And no, I can't do it in paused mode. In order to pause the music, I have to start playing it, which I wanted to avoid in the first place.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 10:09:17 AM
Well, "What happens when you press stop" and "What happens when you choose to insert" are two different concerns anyway.

But for you, there'd need to be some way to load a playlist up (to then proceeed to insert into) without first playing that playlist, unless you're talking about inserting into a blank playlist (which simply requires having "Insert" not start playback, at least with the way things currently work).

Right?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: bascule on October 03, 2007, 10:16:44 AM
... I want to be able to start creating a playlist without having to play it first...

Doesn't the Playlist Catalog functionality cover this requirement?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: pondlife on October 03, 2007, 10:36:36 AM
I'd be happy to merge the STOP and PAUSE states.  What are the current differences (from a user perspective)?

- PLAY->PAUSE, the WPS remains displayed, PLAY->STOP returns to the browser (or previous screen?)
- In PAUSE, selecting a file queues that file (and returns to the WPS) but doesn't resume playback.  In STOP, playback is started.
- PAUSE prevents voice output (that's a bug), STOP does not

Any more?

pondlife
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 10:40:33 AM
STOP allows you to open large image files, gameboy games, or use other plugins that require use of the audio buffer. PAUSE returns an error message when you attempt this.

And for those already in the know, PAUSE means that 'Insert' adds to the current playlist, STOP means that 'Insert' starts a new one. There are are lot of people used to this behaviour, partially based on the number of times I've had people ask how to clear the playlist just to reveal to them it already is as long as you've pressed stop.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: bascule on October 03, 2007, 11:16:27 AM
Personally, I think the current behaviour is fine and quite understandable. The difference in the context menu also serves as a reminder (for me, at least) of which state the player is in and allows me to correct a potentially erroneous insert.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 11:23:26 AM
What could be done is to have "Play" be at the top of the context menu, which plays JUST the highlighted song now. "Insert" inserts without starting playback.

Insert when music is stopped inserts into a blank playlist.

To "fill" a playlist before manipulating it (such as if I want to edit bob.m3u) I Insert bob.m3u, thus loading it, then manipulate it without playback starting.

Pressing stop again, while already stopped, once more "clears" the playlist making the next insert able to wipe it.

During all of this, "Play/Pause" will either resume the last playlist (if the current one is "empty" because of a press of stop) or begin playing the playlist that is being constructed.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 03, 2007, 11:36:05 AM
functionally speaking, I think there's no reason not to always preserve the audio buffer, but if Paused, allow a plugin to empty it if necessary.

This seems like the perfect solution to me - that way pause and stop can be merged, playlist editing will always be the same and the UI doesn't have any wrinkles caused by plugins sharing the audio buffer.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: DefineByte on October 03, 2007, 03:22:05 PM
Rather then needing to use the context menu could you move some functionality onto single and double presses of the select button (or are double presses problematic on some players?)?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: bascule on October 03, 2007, 03:25:16 PM
(or are double presses problematic on some players?)?
...most players, I would say (being the owner of four different ones).

The buttons are mostly just not made for it and it would be very unergonomic (IMHO)
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 03:26:39 PM
There are people who already have a problem with short and long presses, because they press the button too slowly to register as a short press.

Adding a third option into the mix, double press, will (in my opinion) be a step away from making things more usable, not toward.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: DefineByte on October 03, 2007, 06:22:43 PM
You wouldn't be making anything less useable (unless you think accidental double presses are likely. Possible I guess) because you'd only be adding a feature, not taking anything away. It's up to the user whether they use it or not.

Fair enough if most players wouldn't work well with it though.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 03, 2007, 06:26:36 PM
You suggested "moving" the functionality, as an alternative to having it in the context menu. Your phrasing suggested that it would only be accessible via double click.

But yes, accidental double clicks are also a real possibility as well. So in both cases, I'm still against it.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: DefineByte on October 04, 2007, 07:43:36 AM
I can see why you'd read it as such but it wasn't what I intended. :)
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 04, 2007, 04:24:07 PM
Not starting playback on the first insert is fine, but Play and Pause will become the same button, functionally. The only difference will be whether the audio buffer is preserved or not, and functionally speaking, I think there's no reason not to always preserve the audio buffer, but if Paused, allow a plugin to empty it if necessary.

I looked at the code. Am I correct in thinking that the "plugin empties the buffer if necessary" functionality is already there? plugin_get_audio_buffer calls audio_stop before it returns the buffer.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 04, 2007, 04:26:01 PM
There are plugins that refuse to start if audio is playing, rather than forcing a stop though.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 05, 2007, 03:22:54 AM
Hmm... while browsing through the forums, I've found the following quotes about the consistency:

I guess I just don't understand why people see "convenience" being so much more important than consistency.

And this:

so I still really don't see any benefit to your method other than what can be interpreted as "Consistency."

Is that the consistency? :-)
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 05, 2007, 06:44:34 AM
Notice I said "What CAN be interpreted as consistency" making it somewhat clear that to me it's rather dubious whether this is consistency or not.

Read my words carefully, and you'll notice that often the choices I make are important. ;)

I think it'd be consistent that the playlist isn't there when stopped, rather than it being consistent that Pause and Stop are actually the same state, just with different names (as the words do not actually mean the same thing).
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 07, 2007, 03:02:26 AM
There are plugins that refuse to start if audio is playing, rather than forcing a stop though.

Could someone point me in the direction of a plugin that does this? I want to see what it does and I can't find one - the nearest is the jpeg viewer which gives you a choice before stopping the audio.

Also, is it platform specific?

(PS Llorean, any chance of unlocking that thread on the insert order? Or should I start another one?)
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 07, 2007, 12:24:05 PM
Try loading a ROM with Rockboy while music is playing (note: Only tested on Gigabeat, which will let you load some ROMs, but if they're too large will not because it needs the audio buffer to use for the larger ROMs).

As for the insert order thread, feel free to open another one, but as it looks like you've identified and fixed the bug in a patch, I'm not sure what further discussion is needed.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 07, 2007, 01:32:53 PM

Thanks, I'll take a look at rockboy.

As for the insert order thread, feel free to open another one, but as it looks like you've identified and fixed the bug in a patch, I'm not sure what further discussion is needed.

Yeah, I had some questions about how it worked, but I figured them out myself and did the patch.

 
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 09, 2007, 08:38:19 AM

For anyone following this thread... I have made a patch to decouple the playlist editing from the play/stopped state:

 http://www.rockbox.org/tracker/task/7911

I thought about also getting rid of the stopped state completely (as was discussed earlier), but I could not figure out what all the implications of this might be, so I left it as is and just changed the playlist menu.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 09, 2007, 12:24:34 PM
Outside of my opinion as to whether the patch is necessary or not:

I really don't like the hiding of the "Insert" function, nor its renaming. Especially the renaming, honestly, the phrase "Insert in order" sounds bulky, and compared to "Insert Next" and "Insert Last" it's confusing why that one is named not for where, but how it's inserted. I think, especially with the hiding, you can preserve your goal while still leaving it named "Insert."

"Insert in Order" especially does not clear up any confusion about where "Insert" will place it, and just seems to suggest a parallel to "Insert Shuffled" which, I think, doesn't help the usability of it anyway.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 09, 2007, 01:58:29 PM

Yes, I struggled with the renaming, the accurate term was a bit recursive: Insert after the previous Insert next or previous Insert after the previous Insert next or...  ;D

I thought "in order" because it inserts in order that you do the insertions. I thought "Insert ordered" was too close to "Insert shuffled" which is why I ended up with the more cumbersome "Insert in order". But, it is a tough call though whether using a more specific but potentially more confusing term is better than one that gives less of an idea but less chance of confusion.

I think the hiding when it isn't needed helps usability by making it easier to figure out what it is doing by trying it - there are less things to try and the commands don't do different things depending on whether it's the first time or not.

But it's a very simple patch and easy to take which ever bits you want and ignore the rest.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 09, 2007, 02:03:45 PM
Maybe "Insert After" or "Insert More"?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 09, 2007, 02:08:57 PM

I thought of "Insert After" , but then: after what?

But... "Insert more" I hadn't thought of... and think may be perfect!

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: bascule on October 09, 2007, 03:43:20 PM
'Insert Again' or 'Repeat Insert'?
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 10, 2007, 07:42:51 AM
'Insert Again' or 'Repeat Insert'?

I considered those - in fact I used 'Insert again' until recently, but I thought they give the impression that the same stuff is going to be inserted as last time - confusing, maybe?

I'm still liking Llorean's "Insert more".
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 10, 2007, 01:53:28 PM
I liked "More" the most too, of all the ones I could think of. It clearly suggests that the insert is in some way dependent upon the previously inserted files, so it's more intuitive that you'll be inserting after them. (At least to me.) Just because I'm against an idea doesn't mean I won't try to help make it a better idea that I still don't like. ;)
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: fml2 on October 11, 2007, 04:05:07 AM
in fact I used 'Insert again' until recently, but I thought they give the impression that the same stuff is going to be inserted as last time - confusing, maybe?

I'm still liking Llorean's "Insert more".

OTOH, 'Insert more' means to me that you have to choose what to insert after you've chosen this option. So, the most exactly phrase would probably be 'Insert this as well' (or something similar.)
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 12, 2007, 03:59:07 AM

Heh, yeah I thought that too - but I'm hoping as it is a context menu the 'this' is kind of implied.

Anyway, changed the patch to "Insert more" and also tweaked to code a bit so now the binary size increase is down to 76 bytes (for the e200 build).
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: dunno on October 13, 2007, 12:02:24 AM
Insert This
Insert Chosen
Insert Music
Insert Selected
Add This
Add Chosen
Add Selected
Add to
Add Music

my .00002c worth
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: GodEater on October 13, 2007, 07:51:08 AM
Well that's not intuitive at all - I've no idea what the difference between all those is.
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 14, 2007, 05:11:20 AM

Heh, does anyone have any comments on the new functionality itself rather than the strings?

The way I see it, the main advantages are:

- you can set up the current a playlist while stopped.
- it is understandable without reading the manual (apart from "queue" the meaning, but that is orthogonal to this patch)
- there are no side effects of play / stop as far as playlist editing is concerned
- All operations always do the same thing ('insert' does not do one of three different things
 depending on the internal state).

The disadvantages I see are:

- 76 bytes bigger binary
- it's different from how it works now
- more button presses if all you wanted to do was replace the current playlist and start playback (but then, there are easier ways of doing that).


Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: Llorean on October 14, 2007, 05:16:02 AM
What were the three different things "Insert" previously did? As far as I know, all it ever did was "Insert at the insert point."
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 14, 2007, 06:28:46 AM
Sure, if you already understand what it does you can think of it like that. If you are trying to explain it though, you need to say something like the manual does:

Quote
Add track(s) immediately after any tracks added via the most recent Insert  operation. If no tracks have yet been added via an Insert, new tracks will be added immediately after the current playing track. If playback is stopped a new dynamic playlist will get created with the selected tracks.

One sentence for each thing.

You could explain it in terms of the insert position, but then you'd need two qualifiers: one to say where the insert position starts and one to say what happens when stopped.

Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: dunno on October 15, 2007, 01:19:16 AM

Heh, does anyone have any comments on the new functionality itself rather than the strings?

The way I see it, the main advantages are:

- you can set up the current a playlist while stopped.
- it is understandable without reading the manual (apart from "queue" the meaning, but that is orthogonal to this patch)
- there are no side effects of play / stop as far as playlist editing is concerned
- All operations always do the same thing ('insert' does not do one of three different things
 depending on the internal state).

I like the fact that I can create a playlist without it starting playback immedialtely.

I like the new simplicity and intuitiveness of the menus

thanks CC
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: cc on October 15, 2007, 05:45:07 PM

Cheers, that's good to hear!
Title: Re: Why does playlist insert replace the current playlist when stopped?
Post by: shoe on October 16, 2007, 12:44:19 PM
Heh, does anyone have any comments on the new functionality itself rather than the strings?

I think this is a great improvement.  This clears up part of the user interface that has always been somewhat confusing.  I hope this is accepted, thanks.