flixel icon indicating copy to clipboard operation
flixel copied to clipboard

Enhancement: Implement pitch and speed variables for FlxSound

Open CyndaquilDAC opened this issue 2 years ago • 3 comments

I really don't know how difficult this would be to add, but it would be useful for saving storage space and just generally a helpful tool for game development.

CyndaquilDAC avatar Jul 28 '21 18:07 CyndaquilDAC

I think that what really depends it is on lime to add a solid Pitch changing thing. ninjamuffin made a PR about setting the pitch in html5 and Desktop, And I made a PR today about some rough code with changing the timer when the pitch is changed.

it could be possible, of course! but it would require some tweaking and stuff

Cheemsandfriends avatar Dec 29 '21 23:12 Cheemsandfriends

The requisite commit (https://github.com/openfl/lime/commit/e6674ba1791284ed530bce71c343d7103a5b802b) has been merged, so this feature is feasible to implement into Flixel 5.0.

EliteMasterEric avatar May 27 '22 00:05 EliteMasterEric

https://github.com/HaxeFlixel/flixel/pull/2564 it's expected for 5.0.0, but it's not a breaking change so it can happen any time. not sure when lime will release the change

Geokureli avatar May 27 '22 00:05 Geokureli

I believe this issue should be closed since #2564 was merged

ninjamuffin99 avatar Oct 03 '22 20:10 ninjamuffin99

I don't see any option for playback speed unless I am missing something

EliteMasterEric avatar Oct 03 '22 20:10 EliteMasterEric

I believe this issue should be closed since #2564 was merged

true

MemeHoovy avatar Oct 03 '22 20:10 MemeHoovy

I don't see any option for playback speed unless I am missing something

i believe that changing the pitch changes the playback speed. funnySound.pitch = 2; Would double the pitch, so the sound will place twice as fast, since really changing the pitch sorta just "squishes" the sound wave. At least I believe that's how sound works hehehe (peep dis one: https://youtu.be/i09V6SkVkz8)

ninjamuffin99 avatar Oct 03 '22 20:10 ninjamuffin99