buzz
buzz copied to clipboard
Playback modes for groups
Hi there,
I made this little addition to the groups, maybe it can be helpful. Right now you can only play group sounds all together at the same time, so I introduced the following playback modes:
-
blend
: default mode, play the sounds all together (like it is right now) -
random
: play a random sound of the group -
chain
: play the sounds in a sequence, in the order they are found in the array
It only works with group.play()
(pausing a random sound, for example, doesn't make much sense, I think).
Other methods added:
-
group.getPlaybackMode()
-
group.setPlaybackMode(mode)
Thank you! Alberto
Great, thanks.
I will check that as soon as possible but not so much time to work on it currently.
Thanks again for your contribution.
When is this going to be merged. I would love to use the chain to run through sounds in a sequence
Could anybody tell me scenario when chain
mode is useful?
Playing a list of sounds in order can be applied in several places. I use it for the Quran to play each verse from start to finish.
Hello, Thanks for your precious contribution and really sorry for the late response.
I think those features are great ideas. but Group is not the right place for these features. To many weird behaviors. I guess we have to create something like that:
var myPlaylist = buzz.playlist(sound1, sound2, group1);
myPlaylist.shuffle();
myPlaylist.play();
myPlaylist.next();
myPlaylist.previous();
// etc...
var nowPlaying = myPlaylist.getCurrentlyPlaying();
console.log(nowPlaying.getTime());
What do you think?
Hi Jay,
Yes, I agree with your suggestion.
I guess that, apart from the specific playlist methods, they should also provide the basic methods that are already available for sound and group, like mute()/unmute(), loop()/unloop(), etc... This way you could make playlists of groups, but also groups of playlists. Does this make sense?
Hi guys,
I think that's a good idea to separate these abstractions but the primary distinction between group
and list
is that the first one is an implementation of unordered Set and the second one is ordered List. Actually we don't care about indexing and retrieving by it at all and I believe that the best name is not the list
but the queue
.
will the above playlist ever be implemented?
Hello @trippah i plan to work on Buzz 1st quarter 2016. Playlist is part of the plan.