NSF Export doesn't get this instrument right - FamiTracker

# FamiTracker

FamiTracker Support Forums

Skip to content

## NSF Export doesn't get this instrument right

Please post about bugs here.
Forum rules
When making a bug report, please try to be as specific as possible. Include information on how to reproduce the bug and an example file if possible.
If the application crashed, please include the generated memory dump file as well.
Post Reply

- Print view

3 posts • Page 1 of 1

TheMudkipMaster12
  Posts: 320
  Joined: Sat Apr 25, 2015 1:26 am
  Location: :uoıʇɐɔoן
  Contact:
  Contact TheMudkipMaster12
  Website Twitter YouTube

### NSF Export doesn't get this instrument right

- Quote

Post by TheMudkipMaster12 » Tue Jun 23, 2015 5:35 am

When I export this FTM to an NSF, it sounds different and I'm not sure what causes it.

Attachments
  How it's exported.nsf
    Exported NSF
    (5.91 KiB) Downloaded 364 times
  How it should be.ftm
    Original FTM
    (1.01 KiB) Downloaded 359 times

"It's funny because cool, means cold." -Savestate, Feb. 17, 2016
HI IM KIPPTUNE AND THIS IS MY OLD ACCOUNT LOL
Top

HertzDevil
  Posts: 475
  Joined: Thu Apr 23, 2015 7:39 pm
  Location: Hong Kong SAR
  Contact:
  Contact HertzDevil
  Website Facebook Twitter Skype
  YouTube

### Re: NSF Export doesn't get this instrument right

- Quote

Post by HertzDevil » Tue Jun 23, 2015 5:48 am

The channel note underflows, after which it is treated as a note higher than B-7. Such behaviour can be shown more simply by using a relative arpeggio sequence of {| -12} and no other sequences. One fix would be:

Code: Select all

`@Relative:
; Relative
clc
lda var_ch_Note, x
adc var_sequence_result
bmi :+ ; add this line
; cmp #$01 ; these lines only work when the note value is 0x00 (C-0) since carry flag is cleared upon
; bcc :+ ; *unsigned* underflow and every unsigned 8-bit value other than 0x00 is larger than or equal to 0x01
cmp #$5F
bcc :++
lda #$5F
bne :++
: lda #$01
: sta var_ch_Note, x
jmp @ArpDone
`
As relative arpeggio offsets are signed, the line ensures that all underflowed note values will be set to 0x01 (C#0) rather than 0x5F (B-7).
refactoring 0cc-famitracker
Top

retrodpc
  Posts: 194
  Joined: Tue Apr 21, 2015 12:05 am
  Location: !wow
  Contact:
  Contact retrodpc
  Website

### Re: NSF Export doesn't get this instrument right

- Quote

Post by retrodpc » Thu Jun 28, 2018 4:13 am

If you do not wish to implement this fix yourself, you may also avoid this by not going too low and assuming that the note will floor at A-0
Don't copypasta Quotes
my sondclop
Top

Display posts from previous:
Sort by

Post Reply

- Print view

3 posts • Page 1 of 1

Return to “Bug Reports”

Jump to

- Rules
- Wiki
- FamiTracker
- General Talk
- Bug Reports
- Feature Requests
- Source and development
- Music
- Original Music
- Cover Music
- Other
- Site Issues & Suggestions