It is currently Fri Dec 15, 2017 4:21 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Aug 05, 2016 12:35 pm 
Offline

Joined: Sat Jul 09, 2016 10:16 am
Posts: 9
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?


Top
 Profile  
 
PostPosted: Fri Aug 05, 2016 12:42 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5898
Location: Canada
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.


Top
 Profile  
 
PostPosted: Sun Aug 07, 2016 8:35 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
…wouldn't that slow down the SFX as well?


Top
 Profile  
 
PostPosted: Sun Aug 07, 2016 9:10 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5898
Location: Canada
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group