"Arpeggio Length" Value

Post about feature requests here.
User avatar
Lum
Posts: 75
Joined: Tue May 26, 2015 2:32 am

"Arpeggio Length" Value

Postby Lum » Fri Aug 07, 2015 10:17 am

Hey guys! I'm sorry if this has been suggested before, but this is something I think would really benefit FamiTracker.

I've noticed that people tend to avoid the arpeggio effect (0xy), because you can't define how long to wait before switching to the next note in the sequence. At 60/50 Hz, 0xy gives you a sound that's too fast and messy to be useful in most situations. Usually people will create a separate instrument for each chord, using long arpeggio macros (such as | 0 0 3 3 7 7), but that gets redundant when you start using lots of different chords, volume/pitch/duty macros, and expansion chips, because then you have to create a different instrument for each possible setup. The fact that people have to do this so often kind of defeats the purpose of having 0xy in the first place.

My suggestion is to add a little numerical box (I'm thinking somewhere on the toolbar) that defines how many engine cycles the 0xy effect should hold each note before moving on to the next. If you're familiar with Deflemask, think of the Arpeggio Tick setting. A value of 1 would make it function as it currently does, 2 would be like a | 0 0 x x y y arpeggio macro, 3 would be like | 0 0 0 x x x y y y, etc.

Personally I think this would be a great feature. It would make getting those pleasant-sounding arpeggios so much less cumbersome.

User avatar
HertzDevil
Posts: 475
Joined: Thu Apr 23, 2015 7:39 pm
Location: Hong Kong SAR
Contact:

Re: "Arpeggio Length" Value

Postby HertzDevil » Fri Aug 07, 2015 11:42 am

Lum wrote:Usually people will create a separate instrument for each chord, using long arpeggio macros (such as | 0 0 3 3 7 7), but that gets redundant when you start using lots of different chords, volume/pitch/duty macros, and expansion chips, because then you have to create a different instrument for each possible setup.

Use a build that doesn't.
Lum wrote:| 0 0 x x y y arpeggio macro, | 0 0 0 x x x y y y, etc.

Use them directly.
Lum wrote:My suggestion is to add a little numerical box (I'm thinking somewhere on the toolbar) that defines how many engine cycles the 0xy effect should hold each note before moving on to the next. If you're familiar with Deflemask, think of the Arpeggio Tick setting.

A global setting, or even a FTM-wide setting, means that one cannot change that amount during the song; in other words 0xy cannot be used at both {| 0 x y} and {| 0 0 x x y y}. On the other hand, if such a value can be modified through an effect, its parameter space would be either too wide and containing parameters too large for practical use in any given engine speed, or too small and specific (1-3 as in Defle Mask is inadequate for fast engine speeds).

Nonetheless this can be done if ft_arpeggio in effects.s is in the following form:

Code: Select all

ARP_POS_X = 1                   ; tick count of 0
ARP_POS_Y = 2                   ; tick count of 0 and x
ARP_LEN   = 3                   ; tick count of 0, x, and y
                                ; 0 < ARP_POS_X < ARP_POS_Y < ARP_LEN
                                ; not necessarily multiples of ARP_POS_X!
ft_arpeggio:
    lda var_ch_ArpeggioCycle, x
    cmp #ARP_POS_Y
    bcs @LoadThird              ; BCS instead of BEQ
    cmp #ARP_POS_X
    bcs @LoadSecond
@LoadFirst:
    lda var_ch_Note, x          ; Load first note
    jmp @DoNextStep
@LoadSecond:                    ; Second note (second nybble)
    lda var_ch_EffParam, x
    lsr a
    lsr a
    lsr a
    lsr a
    jmp @Addition
@LoadThird:                     ; Third note (first nybble)
    lda var_ch_EffParam, x
    and #$0F
@Addition:
    clc
    adc var_ch_Note, x
@DoNextStep:
    jsr ft_translate_freq_only
    lda var_ch_EffParam, x      ; adjust total ticks for arpeggio
    and #$0F                    ; this can also be done within ft_cmd_arpeggio
    beq :+                      ; but doing so requires a new register
    lda #ARP_LEN - 1            ; arpeggio has 3 notes
    bne :++                     ; (ARP_LEN - 1 must be positive for 0xy to make sense)
:   lda #ARP_POS_Y - 1          ; arpeggio has 2 notes
:   sta var_Temp
    lda var_ch_ArpeggioCycle, x
    cmp var_Temp
    bcc :+
    lda #$00                    ; reload arpeggio phase
    sta var_ch_ArpeggioCycle, x
    beq :++                     ; (always)
:   inc var_ch_ArpeggioCycle, x ; increment arpeggio phase at last
:   jmp ft_post_effects
where instances of ARP_POS_X, ARP_POS_Y, and ARP_LEN are patched by during NSF exportation in a manner similar to the vibrato table. Changing those constants into RAM variables and creating an effect that writes to these addresses will turn the arpeggio length setting into an effect and obviate the need of patching constant values.

Such an effect is provided in ipi's fork, but it is unsupported and does not export the effect to NSFs.
refactoring 0cc-famitracker

User avatar
Stratelier
Posts: 378
Joined: Sun Apr 26, 2015 7:46 pm

Re: "Arpeggio Length" Value

Postby Stratelier » Sun Aug 09, 2015 2:05 am

HertzDevil wrote:A global setting, or even a FTM-wide setting, means that one cannot change that amount during the song; in other words 0xy cannot be used at both {| 0 x y} and {| 0 0 x x y y}. On the other hand, if such a value can be modified through an effect, its parameter space would be either too wide and containing parameters too large for practical use in any given engine speed, or too small and specific (1-3 as in Defle Mask is inadequate for fast engine speeds).


As this would undoubtably affect the way the NSF is compiled, an FTM-wide option seems fine. Yes, it is limited in that you can't mix arpeggio lengths on the fly but how is that any different from the current situation? If my module/song only uses one style of arp and it means I don't have to define a dozen instruments (in turn meaning less instrument clutter and a smaller NSF) to get the arps I want, that feels well worth the cost.

(On an aside, I barely use the 0xy arpeggio at all, and when I do it's usually a 00y or 0yy such that it's a two-note chord with one note held for two engine cycles, simply because I prefer it over a 0y0. And because I just can't chord, either. ;))

Like how we have vibrato styles. I realize this is for compatibility with (by-now-much-)older FTMs, but there's no practical reason to use the old style when you can just pitch-shift your vibrato as desired.


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest