mmontag / chip-player-js

Web-based music player for a variety of video game and chiptune music formats.
https://chiptune.app
GNU General Public License v3.0
345 stars 19 forks source link

add repeat function #51

Closed paperluigis closed 3 years ago

paperluigis commented 4 years ago

Please, add repeat function! [ask for a function]

Sometimes, I want to listen to music more than it's length.

mmontag commented 3 years ago

Many game songs were meant to repeat so I think this is even more important for a retro music player. It's on my list of things to do!

paperluigis commented 3 years ago

Many game songs were meant to repeat so I think this is even more important for a retro music player. It's on my list of things to do!

Thanks! =)

mankeli commented 3 years ago

I definitely vote for this! What a great player and UI otherwise!

mmontag commented 3 years ago

Added a repeat button. It cycles through 3 modes (Repeat-All, Repeat-One, Off).

mmontag commented 3 years ago

Note that repeat-one mode won't repeat subtracks within NSF files. It's a Sequencer-level repeat, so it also doesn't utilize loop points defined in song metadata. Feel free to open another issue if that really bothers you :)

mankeli commented 3 years ago

NSF files are program code, any song length is defined afterwards. Game rips often play forever and so does most of the "scene" songs. This is also true for several other song formats. (SPC, SID, etc) Mod files also often rely on the "implicit" looping that the player just wraps to pattern 0 seamlessly, and there are also "jump to order" repeat commands in mod files.

I guess the repeat feature should use this if it's available?

paperluigis commented 3 years ago

Oh thank you! I already knew songs could repeat, slowly watching how pattern 39 (for example) jumps back to pattern 5, excluding the start, making the length of song infinite.