Stencyl 3.4.0 is now out. Get it now!

Change Audio Pitch [V 1.0]

Max Finch

  • *
  • Posts: 2180



This is an extension I requested over half a year ago. Letmethink figured out how to use the pitch property and sent me a zip.


I've updated it. It works pretty well -- I'm using it to enhance a slow motion effect. But you could use it for more!


Here's the blocks, they're pretty easy to use. 1 is normal, .9 .8 .7 .6 .5 etc bring the pitch down and 1.1 1.2 1.3 etc bring it up.


**Note** You can only change the pitch of sounds that are currently playing. To change the pitch of a new sound, you must play the new sound and then change the pitch using the channel block.





CLICK HERE TO DOWNLOAD V 1.0




LIBERADO

  • *
  • Posts: 2209
Two "Engine Extension Compilation Error" when I try to use any block of this extension:
   

   

« Last Edit: September 05, 2016, 11:46:25 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Justin

  • *
  • Posts: 3704
Looks like pitch is only available in legacy openfl.

For Live Support: Join our discord channel and ping me @justin.

LIBERADO

  • *
  • Posts: 2209
No matter if OpenFL Legacy is selected or not. This extension causes the compilation errors, anyway.

« Last Edit: July 16, 2017, 11:38:12 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Justin

  • *
  • Posts: 3704
What platform are you testing on? Some of them use next by default (html5 and flash, IIRC).

For Live Support: Join our discord channel and ping me @justin.

LIBERADO

  • *
  • Posts: 2209
Cppia --> OK
Android --> OK
Flash --> Compilation Error  :(
HTML5 --> Compilation Error  :'(

I would like to use this extension in Flash and HTML5 games.

« Last Edit: September 06, 2016, 02:20:38 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Justin

  • *
  • Posts: 3704
http://community.openfl.org/t/change-pitch-or-speed-of-audio/1118

Looks like there's no planned support at all for pitch on Flash and HTML5, so it'll likely be a lot more work for the extension author to support those two.

For Live Support: Join our discord channel and ping me @justin.

LIBERADO

  • *
  • Posts: 2209
 :( That is sad news.
It would be great if it were possible to use this extension to change the pitch of the engine sound in Flash and HTML5 car games, as in this example that I am running on Cppia:
   
<a href="https://www.youtube.com/v/ftRzVhy80po" target="_blank" class="new_win">https://www.youtube.com/v/ftRzVhy80po</a>

« Last Edit: September 06, 2016, 01:26:45 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Irock

  • *
  • Posts: 2823
That is sad news. I saw this thread and got all excited :'(

Max Finch

  • *
  • Posts: 2180
That demo is sick though Liberado. :)

letmethink

  • *
  • Posts: 2521
Iirc when I made this I did a bit of research and say a way to do it in flash (via native flash code), but never looked into it too deeply because Max was using it for iOS.
~Letmethink

squeeb

  • Posts: 954
WOW. great idea with this extension.  ill try it out soon.  does it change all sounds on a channel?  can i have more than one channel and change pitch to separate channels at the same time when a button is tapped?  seems like you could.  just curious before i try

Rainbros

  • *
  • Posts: 169
Does this still work for iOS? The download isn't there anymore.

LIBERADO

  • *
  • Posts: 2209
Sadly, this extension does not work on Stencyl v3.5, maybe because pitch is only available in OpenFL Legacy, as Justin said.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.