Ogg Vorbis playback and volume animation

4 views
Skip to first unread message

Peter Perhac

unread,
Apr 22, 2010, 5:33:46 PM4/22/10
to PulpCore
Hello, I am having difficulties with looped sound playback and volume
animation. I tried to achieve a simple music fade-in effect by
animating the Fixed property passed to Sound.loop(volume) for volume
but this stops the looping.
I can either fade-in and not loop the music, or loop the music without
fade in. Manually setting [volume.set()] the volume to any other level
works fine, looping works. Can anyone please help me out with this? I
just can't believe this can't be done effortlessly in a framework so
cool as PulpCore.

I wrote more about this problem here:
http://stackoverflow.com/questions/2525758/pulpcore-music-playback-loop-sound-and-animate-volume

and here is a link to the game I am writing. far from finished but far
from start :-)
http://www.perhac.com/shared/forest-defender/index.html

--
You received this message because you are subscribed to the Google Groups "PulpCore" group.
To post to this group, send email to pulp...@googlegroups.com.
To unsubscribe from this group, send email to pulpcore+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pulpcore?hl=en.

David Brackeen

unread,
Apr 22, 2010, 5:41:08 PM4/22/10
to pulp...@googlegroups.com
What version of PulpCore are you using?

Peter Perhac

unread,
Apr 23, 2010, 1:47:43 PM4/23/10
to PulpCore
I believe the latest, pulpcore-0.11.5
Thanks for your attention. I would be so happy if you could shed some
light on this issue. The game is evolving, I have just uploaded the
latest changes, towers and traps both work as intended :-) well,
almost. a lot of work to do on the user interface etc... but I am
enjoying working with pulp core. It's really neat.

Peter

On Apr 22, 10:41 pm, David Brackeen <brack...@gmail.com> wrote:
> What version of PulpCore are you using?
>
> On Thu, Apr 22, 2010 at 2:33 PM, Peter Perhac
> <perhac.pe...@googlemail.com>wrote:
>
>
>
> > Hello, I am having difficulties with looped sound playback and volume
> > animation. I tried to achieve a simple music fade-in effect by
> > animating the Fixed property passed to Sound.loop(volume) for volume
> > but this stops the looping.
> > I can either fade-in and not loop the music, or loop the music without
> > fade in. Manually setting [volume.set()] the volume to any other level
> > works fine, looping works. Can anyone please help me out with this? I
> > just can't believe this can't be done effortlessly in a framework so
> > cool as PulpCore.
>
> > I wrote more about this problem here:
>
> >http://stackoverflow.com/questions/2525758/pulpcore-music-playback-lo...
>
> > and here is a link to the game I am writing. far from finished but far
> > from start :-)
> >http://www.perhac.com/shared/forest-defender/index.html
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PulpCore" group.
> > To post to this group, send email to pulp...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > pulpcore+u...@googlegroups.com<pulpcore%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/pulpcore?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "PulpCore" group.
> To post to this group, send email to pulp...@googlegroups.com.
> To unsubscribe from this group, send email to pulpcore+u...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/pulpcore?hl=en.

David Brackeen

unread,
Apr 29, 2010, 9:50:50 AM4/29/10
to pulp...@googlegroups.com
It is a PulpCore bug. When the output volume is zero, the sound player stops looping the sound.
To work around it, animate from a value that is not zero, like this:
musicVolume.animate(0.0001, 1, FADE_IN_TIME);

Peter Perhac

unread,
Apr 29, 2010, 1:09:28 PM4/29/10
to PulpCore
Thank you, thank you very much. Now I think I should have tried that.
But it wasn't really that obvious after all.
Is this going to be fixed in the next pulpcore release? I had a look
at the list of improvements for 0.11.6 and it's looking good.

Cheers and regards,

Peter


On Apr 29, 2:50 pm, David Brackeen <brack...@gmail.com> wrote:
> It is a PulpCore bug. When the output volume is zero, the sound player stops
> looping the sound.
> To work around it, animate from a value that is not zero, like this:
> musicVolume.animate(0.0001, 1, FADE_IN_TIME);
>
> On Fri, Apr 23, 2010 at 10:47 AM, Peter Perhac
> <perhac.pe...@googlemail.com>wrote:
> > <pulpcore%2Bunsu...@googlegroups.com<pulpcore%252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages