Re: basic mp3 and/or sprite playback #60
Replies: 5 comments 2 replies
-
Hi, Sorry for the late reply, and glad to hear that this is useful for you ❤️ . Audio sprites are not implemented yet, but open to do it. Can you describe precisely what you need or how do you use use-sound to achieve your goals? |
Beta Was this translation helpful? Give feedback.
-
Wouldn’t really matter if it’s a sprite or just mp3 playback to me. I mean, there is certainly the extra network traffic of downloading multiple files vs a single file, no? Is it already possible to playback a single custom mp3 with smplr?My main goal is to have smplr be my only audio library in my music teaching app, and right now use sound is still needed for mp3 playback.Thanks!Scott _______________Scott Wolf, DMAOxnard College - Professor of MusicOn Feb 15, 2024, at 1:03 PM, danigb ***@***.***> wrote:
Thanks for the detailed response. One thing I don't understand is why you need all this complexity. Why you can't use just a single file for each "tune" instead of pack them all inside a single file? I mean, I agree that could be a transport (network) optimization. But does it worth it? Maybe I'm missing something...
Said that, I'm open to implement sprites (won't be very soon). But I'm wondering if, at least for this case, it worth the effort...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey! Yes, you can use a |
Beta Was this translation helpful? Give feedback.
-
It works great to play an mp3 with the Sampler! One issue, the onEnded()
callback doesn't work at the end of playing the mp3, perhaps because there
is no duration specified? Could you give access to the duration of the
loaded buffers? Or is there a way to make onEnded function when the mp3 has
completed playing?
Thanks!
Scott
…On Sun, Feb 18, 2024 at 3:37 AM danigb ***@***.***> wrote:
Hey!
Yes, you can use a Sampler to load and play any mp3:
https://github.com/danigb/smplr?tab=readme-ov-file#sampler
—
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJVT3RG2YEA6OQL3O5NX7SLYUHRWFAVCNFSM6AAAAABC6WWOBSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKMBWGY3TK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*Scott Wolf, DMA*
Oxnard College - Professor of Music
www.scottwolfguitar.com
All Strings Considered <http://www.scottwolfguitar.com/podcast.html>
Follow on Twitter - @allstrings <https://twitter.com/allstrings>
Subscribe free on iTunes
<https://itunes.apple.com/us/podcast/all-strings-considered/id562425515> -
Subscribe - Please Rate!
|
Beta Was this translation helpful? Give feedback.
-
Update: I can get access to the duration in a slightly hacky way:
const duration = sampler.player.player.player.buffers['id'].duration;
But then giving duration to the sampler note doesn't work either, as it
will no longer stop for some reason? sampler.start({note: 'id', duration})
won't stop playing with sampler.stop(), I'll submit a new issue with just a
request for onEnded to work after playing back of buffered mp3.
Scott
…On Sun, Feb 18, 2024 at 10:00 AM Scott Wolf ***@***.***> wrote:
It works great to play an mp3 with the Sampler! One issue, the onEnded()
callback doesn't work at the end of playing the mp3, perhaps because there
is no duration specified? Could you give access to the duration of the
loaded buffers? Or is there a way to make onEnded function when the mp3 has
completed playing?
Thanks!
Scott
On Sun, Feb 18, 2024 at 3:37 AM danigb ***@***.***> wrote:
> Hey!
>
> Yes, you can use a Sampler to load and play any mp3:
> https://github.com/danigb/smplr?tab=readme-ov-file#sampler
>
> —
> Reply to this email directly, view it on GitHub
> <#60 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJVT3RG2YEA6OQL3O5NX7SLYUHRWFAVCNFSM6AAAAABC6WWOBSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKMBWGY3TK>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
*Scott Wolf, DMA*
Oxnard College - Professor of Music
www.scottwolfguitar.com
All Strings Considered <http://www.scottwolfguitar.com/podcast.html>
Follow on Twitter - @allstrings <https://twitter.com/allstrings>
Subscribe free on iTunes
<https://itunes.apple.com/us/podcast/all-strings-considered/id562425515> -
Subscribe - Please Rate!
--
*Scott Wolf, DMA*
Oxnard College - Professor of Music
www.scottwolfguitar.com
All Strings Considered <http://www.scottwolfguitar.com/podcast.html>
Follow on Twitter - @allstrings <https://twitter.com/allstrings>
Subscribe free on iTunes
<https://itunes.apple.com/us/podcast/all-strings-considered/id562425515> -
Subscribe - Please Rate!
|
Beta Was this translation helpful? Give feedback.
-
Hey Danigb, still using smplr a ton in my music teaching app! It's working great with soundfonts. It would be awesome if I could also use smplr to playback short mp3 files or sprites. That way I wouldn't have to use a separate library when the audio is just an mp3 file, currently I'm using use-sound but it's pretty buggy and not maintained well. Any info is appreciated!
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions