SetChannelRate not working?

Monkey Targets Forums/HTML5/SetChannelRate not working?

Yoda(Posted 2014) [#1]
I have this:

SetChannelRate(0,r)
PlaySound (waves[instruments[w]],0)

... and the pitch doesn't change, no matter what value is assigned to r

- r has the correct value (float, from 0.5 to 2, I printed it in the same loop to check)
- SetChannelVolume works on the same channel
- SetChannelPan also doesn't work

What am I missing here?


therevills(Posted 2014) [#2]
ChannelRate and ChannelPan doesnt work with HTML5:

http://www.monkey-x.com/docs/html/Modules_mojo.audio.html#description

Note that not all targets have equivalent audio capabilities. In particular:

HTML5 : ChannelPan and ChannelRate have no effect.

Flash : ChannelRate has no effect.

Android : ChannelState always returns -1, ie: 'unknown'. Sounds to be used with PlaySound must be less than 1MB in length. Longer sounds can be played using the music commands.

Also, not all audio formats are supported by all targets:

wav : glfw, android, ios, xna (sounds)

mp3 : flash, android, ios, xna (music)

m4a : flash, android (music), ios

wma : xna (music)

ogg : android



Yoda(Posted 2014) [#3]
Too bad, I wanted to code a nice tracker, to make chiptunes, without having to load hundreds of samples ...


therevills(Posted 2014) [#4]
You could try mr_twister "fix":
http://www.monkey-x.com/Community/posts.php?topic=5829


Yoda(Posted 2014) [#5]
Actually I tried that already, but it also didn't work.


Nobuyuki(Posted 2014) [#6]
timing fidelity probably wouldn't be high enough for a proper tracker, anyway. If it was, I probably would've attempted a gimpy test tracker myself :)