Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playback modes for groups #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

4lbertoC
Copy link

@4lbertoC 4lbertoC commented Jan 1, 2013

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

@jaysalvat
Copy link
Owner

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.

@wbashir
Copy link

wbashir commented May 27, 2013

When is this going to be merged. I would love to use the chain to run through sounds in a sequence

@USAWal
Copy link

USAWal commented Jul 16, 2013

Could anybody tell me scenario when chain mode is useful?

@wbashir
Copy link

wbashir commented Jul 16, 2013

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.

@jaysalvat
Copy link
Owner

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?

@4lbertoC
Copy link
Author

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?

@USAWal
Copy link

USAWal commented Jul 20, 2013

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.

@Fresh-Mess
Copy link

will the above playlist ever be implemented?

@jaysalvat
Copy link
Owner

Hello @trippah
i plan to work on Buzz 1st quarter 2016. Playlist is part of the plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants