nesdev.com
http://forums.nesdev.com/

Famitone2 - play track at half-speed?
http://forums.nesdev.com/viewtopic.php?f=6&t=14618
Page 1 of 1

Author:  EnigmaOverdrive [ Fri Aug 05, 2016 12:35 pm ]
Post subject:  Famitone2 - play track at half-speed?

I'm currently using the cc65 compiler and famitone2 library for music and soundFX.

Is there any way I can get one of the tracks to play at half-speed, so I don't have to create a separate, slower version?

Author:  rainwarrior [ Fri Aug 05, 2016 12:42 pm ]
Post subject:  Re: Famitone2 - play track at half-speed?

In your code that calls the famitone2 play routine, you can just put logic that skips the call every second frame if it's that track.

Author:  Myask [ Sun Aug 07, 2016 8:35 pm ]
Post subject:  Re: Famitone2 - play track at half-speed?

…wouldn't that slow down the SFX as well?

Author:  rainwarrior [ Sun Aug 07, 2016 9:10 pm ]
Post subject:  Re: Famitone2 - play track at half-speed?

Ah, good point. Well, you could modify FamiToneUpdate to skip just the music part every second frame, I guess...

I just noticed a much easier way though, there's a variable labelled FT_SONG_SPEED. You could just overwrite that? (e.g. double its value for half speed song!)

It would get reset by any Fxx effects in the original track, so you would have to make sure not to use those. I dunno.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/