It is currently Tue Nov 20, 2018 11:25 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Sep 10, 2018 10:50 pm 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 2056
Location: Fukuoka, Japan
I'm starting to test more and more soundfx and now I hit a new wall. The famitracker/famitone combo is working fine but some of my sound sfx are longer then the limit imposed by famitone, which I was not aware of. When the sound sfx is played with no music then I can save it as a song and bypass that limit but when I really need it to play it at the same time as the song..

Does anybody had this issue and found a workaround about that? I tried to split the sfx in both channel and trying to play then in channel 0/1 (second parameter of sfx play function) but it didn't sound the same. I need to check the cause, maybe it's possible that way (like 1 channel fx affect the other one or something like that).


Top
 Profile  
 
PostPosted: Tue Sep 11, 2018 12:43 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6959
Location: Canada
I had this old note describing how to allow bigger effects in an e-mail to shiru from a few years ago, but I don't think he wanted to add it (haven't really investigated how famitone2 has changed since). Here's the note if it's useful to you:
Code:
3. It's only a very small modification to allow effects longer than 256 bytes:

- famitone2.s: replace 3 "iny" instructions in @read_byte / @get_data with "jsr @sfx_inc"
- famitone2.s: add "@sfx_inc" subroutine
- nsf2data.cpp: create constant for new maximum length, e.g. MAX_EFFECT_LEN
- nsf2data.cpp: use MAX_EFFECT_LEN for effect_data size
- nsf2data.cpp: use MAX_EFFECT_LEN in effect_add function
- nsf2data.cpp: use MAX_EFFECT_LEN in effect_ptr<256 test in convert_effects

@sfx_inc:
   iny
   bne @inc_done
   ; offset >= 256, need to update the pointer to keep going
   inc <FT_TEMP_PTR_H
   inc FT_SFX_PTR_H,x
@inc_done:
   rts

It's a few more cycles, of course. If you put this inline instead of a "jsr", it's really just an extra "bne" except rarely.


Top
 Profile  
 
PostPosted: Tue Sep 11, 2018 1:59 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 2056
Location: Fukuoka, Japan
Thanks for the information, that should help figure out what to do next! The fx I have issues is 274 bytes long so it just "a little bit too long". I will try to double the length and see how it goes. Separating the channels and playing at the same time didn't work so I'm just concerned if the sound fx would play nicely with the famitracker or not.

If it works fine I could share the results later. thanks again!


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 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