; ARP_EFFECT_RATE needs to be defined in driver.s and perhaps allowed for direct ; modification during NSF compile-time in FamiTracker for it to become a module ; setting (which in turn requires modification to the FTM file format, or an ; extra Windows register entry); the same goes for DIRECT_0XY. Each occurrence ; of ARP_EFFECT_RATE can be replaced with values such that 0xy does not have the ; same number of frames per note. ; ; effect.s ; ft_arpeggio: .ifdef DIRECT_0XY lda var_ch_EffParam, x sta var_ch_SequencePtr2, x .else lda var_ch_ArpeggioCycle, x cmp ARP_EFFECT_RATE * 2 ; counter value for third note bpl @LoadThird cmp ARP_EFFECT_RATE ; counter value for second note bpl @LoadSecond ... @LoadSecond: ... lda var_ch_EffParam, x ; see if cycle should reset here and #$0F bne @DoNextStep lda var_ch_ArpeggioCycle, x ;;; new cmp ARP_EFFECT_RATE * 2 - 1 bmi @DoNextStep lda #$00 ... @LoadThird: ; Third note (first nybble) ... jsr ft_translate_freq_only lda var_ch_ArpeggioCycle, x ;;; new cmp ARP_EFFECT_RATE * 3 - 1 ; 0xy cycle length, minus one bmi @DoNextStep ... .endif