Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

scritch editor

A simple, customizable audio player designed for artists · By torcado

To loop a track

A topic by Yadu Rajiv created Sep 03, 2022 Views: 309 Replies: 12
Viewing posts 1 to 3

Would it be possible to add a feature to,

  • Loop a whole track / region continuously or a set number of times 
  • Have a play looped option for each track apart from a play button (this is probably may end up being a bit too much for the end user)

Thanks for building the tool! I had written a custom player and hosted it on my website and then embedded it as an iframe initially, now that I was updating my asset pack, decided to switch to Scritch :)  

Developer(+1)

Hi, thanks for the question! Loopable tracks is a good suggestion, I can see that being useful especially for showing off looping background music.

There’s a lot to think about for the first request to make it clear to the user what’s happening. Looping a track continuously would be fairly simple, it would just mean requiring the user to skip/click on the next track in order to continue the playlist. With a set number of loops I think there should be a counter somewhere, and there would have to be a decision made about what actions cause the counter to reset. A looping region is more complicated to support, but a lot of the ui I made for the preview region could be reused for this.

For the second request, I could see a solution where the play button switches to a loop-play button maybe by holding shift or long-pressing for mobile, or alternatively with a toggle switch somewhere near the top.

Let me know if you have any immediate thoughts, either way I’ll look into implementing some part of this soon!

I think we are thinking pretty much along the same line.

The looping region seems to be the challenging bit, but if these are BGMs or looped tracks, they are most likely to be looped in its entirety. So, it feels that the looped region seems to be the last thing one might need.

The set and edit track preview section can just have a straightforward loop ☑️ and a count 0 (being loop infinitely to N). When on, it can essentially just disable the region setting clipping options like how the "audio is pre-clipped" does it, 🤔 the rationale behind having a count for the loop is to play the piece for a fixed number of times and then skip to the next track.

I was thinking of pressing shift (which you do in audacity to play once 😅) and long press is cool too! But, now thinking about it, if you let the end user decide if the track needs to be looped in the player, then you'd probably still have to take care of looping regions too 🤔

Aside: I think a lot of players use this for repeat 🔁 and repeat one track 🔂 and also ♾️ for loop same track.. I think 🤔  

Developer(+1)

Thanks for your insights! I think I have a good idea of how to handle this now.

I was thinking about it more last night and I realized having an option to loop the whole playlist would also be useful. Most players use exactly the icons you mentioned at the end, so I think it would make sense to have a toggling button that switches between no loop, playlist loop, and single track loop.

I’ll look into implementing this soon :)

🙏 Thank you so much! and all the very best! :)

Aside from looping the whole playlist, in my case specifically for the kind of music (very tiny looping tracks) I make, looping a single track makes sense too 🙈 - Mini Loops by Yadu Rajiv (itch.io) 

Either way :) looking forward to how you go about solving this! All the best again! 💪😊

Developer(+1)

Hello again, this has now been added! Let me know if you have any issues or feedback otherwise.

I decided not to add a dedicated looping region setting for now. You can still set a preview section and loop that, if applicable.

I added a loop toggle button to the player, which allows you to loop the playlist or a single track repeatedly. I didn’t add the shift-click play to loop, I figure the loop button toggle is more intuitive. I may change my mind later

Hi, this is super cool! Thank you so much for adding the new feature! 💖

I've updated the player on my loop pack. The only problem at the moment seems that the loops are not seamless 🤔

I also don't think the shift click is intuitive, especially on mobile 🤷

Developer

Hm good point, I didn’t test seamless looping. That may be tricky/unfeasible to fix, but I’ll look into it!

Developer(+1)

Hi, I’ve made a new update to hopefully make looping more seamless, let me know if it works for you.

The solution is a bit of a workaround, and may not be 100% consistent. a more correct solution requires me to rework the entire audio playback system. I’ll consider it another time

Yup :) Thank you for all your hard work! :)

I don't think this would warrant a rewrite unless there are a lot of people asking for it :)

I don't know if this is a side effect, but if I drag and drop the config file into the playlist it does use some of the config data, but the ⭐ seems to be a bit weird. I have to check again. So what seems to be happening is that when I set the star to something else, after I download the zip, that seems to reset to the previous (or in this case the first track in the list)

Aside: I don't know if you do this, but do you use the starred track info from the config file? If so, maybe use the loop count info also 🙈 because otherwise one has to manually put those numbers etc in again. Not super important, but thought I'd let you know :)

Developer(+1)

oh, good catch! Thanks for pointing that out. I forgot to account for the new track info with the config overwriting feature. I’ve uploaded a new version which should fix the featuring issue, and should now also load in all the other track info (loop count, locked state, preview settings, etc.)