Need Reverse Arpeggio Effect

Post about feature requests here.
User avatar
GOZAHAND
Posts: 126
Joined: Wed Jul 15, 2015 3:40 am
Location: S.Korea
Contact:

Need Reverse Arpeggio Effect

Postby GOZAHAND » Sat Aug 01, 2015 10:27 am

Our FT already has Effect 0xy, the arpeggio effect.

But this effect is support only can go upper sound.
I need effect to go below sound, For Orche Hit.
VRC7 doesn't have arpeggio in instrument editor.
So I need go below arpeggio effect.
Hello! I love Classic Shmups, and KONAMI Sounds.
Let's Fly into the world of Shmup. GOOD LUCK!
I'm good at Japanese better than English.

youtube
https://www.youtube.com/channel/UCdGJLKJ0MgUqqSISgZb3u6A
niconico
http://www.nicovideo.jp/user/54359756

User avatar
ollaxe
Posts: 736
Joined: Mon Apr 20, 2015 7:07 pm
Location: Sweden
Contact:

Re: Need Reverse Arpeggio Effect

Postby ollaxe » Sat Aug 01, 2015 11:39 am

Yeah, I've wanted this too in the past, so I'm all for this!

In the meantime, you could probably do some trickery with speed 1 and a fast Qxy and Rxy.
Hi! I'm not really active here anymore but I still make music. Nowadays I mostly make dubstep with emphasis on good melodies and chord progressions.
SoundCloud: soundcloud.com/ollaxe
Twitter: twitter.com/ollaxe
Discord server: dis.gd/tK7uRnc
I'm also on Spotify. Search "OllAxe" and you'll find me.

User avatar
GOZAHAND
Posts: 126
Joined: Wed Jul 15, 2015 3:40 am
Location: S.Korea
Contact:

Re: Need Reverse Arpeggio Effect

Postby GOZAHAND » Sat Aug 01, 2015 12:38 pm

ollaxe wrote:Yeah, I've wanted this too in the past, so I'm all for this!

In the meantime, you could probably do some trickery with speed 1 and a fast Qxy and Rxy.




Yes, Your opinion is right.

I used speed 3 almost works.
I'll try to speed 1 works. thanks.



But I still want reverse arp effect...
Hello! I love Classic Shmups, and KONAMI Sounds.
Let's Fly into the world of Shmup. GOOD LUCK!
I'm good at Japanese better than English.

youtube
https://www.youtube.com/channel/UCdGJLKJ0MgUqqSISgZb3u6A
niconico
http://www.nicovideo.jp/user/54359756

User avatar
Xyz
Posts: 295
Joined: Tue Apr 21, 2015 4:36 pm

Re: Need Reverse Arpeggio Effect

Postby Xyz » Sat Aug 01, 2015 12:52 pm

Fast Qxy and Rxy is no longer needed with the && instrument now available in the current beta
>:( Fuck you hentai boy i hate you squid anus

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

Re: Need Reverse Arpeggio Effect

Postby Stratelier » Sat Aug 01, 2015 1:10 pm

I've been wanting an arpeggio-below-note option for a long time too.... (wild idea: effect label = hyphen, simply because that key is adjacent to the 0 key)

The quickest workaround is simply to define an arpeggio sequence as an instrument, but then you'll need a separate instrument for every type of arpeggio you're using.

User avatar
GOZAHAND
Posts: 126
Joined: Wed Jul 15, 2015 3:40 am
Location: S.Korea
Contact:

Re: Need Reverse Arpeggio Effect

Postby GOZAHAND » Sat Aug 01, 2015 3:25 pm

Stratelier wrote:I've been wanting an arpeggio-below-note option for a long time too.... (wild idea: effect label = hyphen, simply because that key is adjacent to the 0 key)

The quickest workaround is simply to define an arpeggio sequence as an instrument, but then you'll need a separate instrument for every type of arpeggio you're using.




I said about VRC7. You know VRC7's instrument editer no have arpeggio option.
Hello! I love Classic Shmups, and KONAMI Sounds.
Let's Fly into the world of Shmup. GOOD LUCK!
I'm good at Japanese better than English.

youtube
https://www.youtube.com/channel/UCdGJLKJ0MgUqqSISgZb3u6A
niconico
http://www.nicovideo.jp/user/54359756

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

Re: Need Reverse Arpeggio Effect

Postby HertzDevil » Sun Aug 02, 2015 4:13 am

A reverse arpeggio can be made in such a way that is compatible with the default arpeggio, for example:

FamiTrackerTypes.h

Code: Select all

enum effect_t {
   // ...
   EF_ARPEGGIO_REV, // insert before EF_COUNT if you do not want to break existing effects
   EF_COUNT
};

Code: Select all

const char EFF_CHAR[] = {
    // ...
   '9', // the reverse arp; non-alphanumeric characters should be limited to ones requiring the shift key
 };

ChannelHandler.cpp:

Code: Select all

bool CChannelHandler::CheckCommonEffects(unsigned char EffCmd, unsigned char EffParam)
{
   // Handle common effects for all channels

   switch (EffCmd) {
   // ...
      case EF_ARPEGGIO: case EF_ARPEGGIO_REV: // both arpeggio effects work here
         m_iArpeggio = EffParam;
         m_iEffect = EffCmd;
         // these effects should not alter the arpeegio phase here
         break;

Code: Select all

void CChannelHandler::UpdateEffects()
{
   // Handle other effects
   switch (m_iEffect) {
      case EF_ARPEGGIO: case EF_ARPEGGIO_REV: // handle both arpeggio effects here
         if (m_iArpeggio != 0) {
            if (m_iEffect == EF_ARPEGGIO_REV) { // pre-decrement
               m_iArpState = (m_iArpState + 2) % 3; // -1%3 results in -1 rather than 2
               if ((m_iArpeggio & 0x0F) == 0)
                  --m_iArpState; // handle 0x0 effects for reverse arp here
            }
            switch (m_iArpState) {
               case 0:
                  SetPeriod(TriggerNote(m_iNote));
                  break;
               case 1:
                  SetPeriod(TriggerNote(m_iNote + (m_iArpeggio >> 4)));
                  if (m_iEffect == EF_ARPEGGIO && (m_iArpeggio & 0x0F) == 0)
                     ++m_iArpState; // do not increment for reverse arp
                  break;
               case 2:
                  SetPeriod(TriggerNote(m_iNote + (m_iArpeggio & 0x0F)));
                  break;
            }
            if (m_iEffect == EF_ARPEGGIO) // post-increment
               m_iArpState = (m_iArpState + 1) % 3;
         }
         break;

PatternCompiler.cpp:

Code: Select all

enum command_t {
   // ...
   CMD_EFF_ARPEGGIO_REV, // must match position in ft_command_table!
};

Code: Select all

void CPatternCompiler::CompileData(int Track, int Pattern, int Channel)
{
   for (unsigned int i = 0; i < iPatternLen; ++i) {
      // ...
      for (int j = 0; j < EffColumns; ++j) {
         // ...
         switch (Effect) {
            // ...
            case EF_ARPEGGIO: case EF_ARPEGGIO_REV: // same implementations
               if (ChanID != CHANID_DPCM) {
                  if (EffParam == 0)
                     WriteData(Command(CMD_EFF_CLEAR));
                  else {
                     WriteData(Command(Effect == EF_ARPEGGIO ? CMD_EFF_ARPEGGIO : CMD_EFF_ARPEGGIO_REV));
                     WriteData(EffParam);
                  }
               }
               break;

driver.s:

Code: Select all

EFF_ARPEGGIO         = 1
; ...
EFF_ARPEGGIO_REV     = 9 ; any unique value works

player.s:

Code: Select all

ft_command_table:
    ; ...
    .word ft_cmd_arpeggio_rev ; must match position in comment_t!
;   .word ft_cmd_expand

Code: Select all

ft_cmd_arpeggio_rev:
    jsr ft_get_pattern_byte
    sta var_ch_EffParam, x
    lda #EFF_ARPEGGIO_REV ; the only difference from ft_cmd_arpeggio
    sta var_ch_Effect, x
    jmp ft_read_note

effects.s:

Code: Select all

ft_jump_to_effect:
    ; ...
    cmp #EFF_ARPEGGIO_REV ; same code as normal arp
    beq @EffArpeggio

Code: Select all

ft_arpeggio:
    lda var_ch_Effect, x
    cmp #EFF_ARPEGGIO_REV ; do the pre-decrement
    bne @DoneDecrement
    dec var_ch_ArpeggioCycle, x
    bpl @DoneDecrement
    lda #$02
    sta var_ch_ArpeggioCycle, x
    lda var_ch_EffParam, x
    and #$0F
    bne @DoneDecrement ; has a third note
    dec var_ch_ArpeggioCycle, x
@DoneDecrement:
    lda var_ch_ArpeggioCycle, x
    cmp #$01
    beq @LoadSecond
    cmp #$02
    beq @LoadThird
    lda var_ch_Note, x                  ; Load first note
    jmp @DoNextStep ; refactor
@LoadSecond:                            ; Second note (second nybble)
    lda var_ch_EffParam, x
    lsr a
    lsr a
    lsr a
    lsr a
    clc
    adc var_ch_Note, x
    jmp @DoNextStep ; refactor
@LoadThird:                                     ; Third note (first nybble)
    lda var_ch_EffParam, x
    and #$0F
    clc
    adc var_ch_Note, x
@DoNextStep:
    jsr ft_translate_freq_only
    lda var_ch_Effect, x
    cmp #EFF_ARPEGGIO ; do the post-increment
    bne @DoneIncrement
    inc var_ch_ArpeggioCycle, x
    lda var_ch_EffParam, x
    and #$0F
    bne :+
    lda var_ch_ArpeggioCycle, x
    cmp #$02
    bne :+
    inc var_ch_ArpeggioCycle, x
:   lda var_ch_ArpeggioCycle, x
    cmp #$03
    bne @DoneIncrement
    lda #$00
    sta var_ch_ArpeggioCycle, x
@DoneIncrement:
    jmp ft_post_effects

Then the following pattern data:

Code: Select all

     # : Pulse 1
ROW 00 : C-3 00 . 047
ROW 01 : ... .. . 947
ROW 02 : ... .. . 050
ROW 03 : ... .. . 905
ROW 04 : ... .. . 950
expands to:

Code: Select all

     # : Pulse 1
ROW 00 : C-3 00 . F01        ; 047
ROW 01 : E-3 && . ...
ROW 02 : G-3 && . ...
ROW 03 : C-3 && . ...
ROW 04 : E-3 && . ...
ROW 05 : G-3 && . ...
ROW 06 : G-3 && . ...        ; 947
ROW 07 : E-3 && . ...
ROW 08 : C-3 && . ...
ROW 09 : G-3 && . ...
ROW 0A : E-3 && . ...
ROW 0B : C-3 && . ...
ROW 0C : C-3 && . ...        ; 050
ROW 0D : F-3 && . ...
ROW 0E : C-3 && . ...
ROW 0F : F-3 && . ...
ROW 10 : C-3 && . ...
ROW 11 : F-3 && . ...
ROW 12 : F-3 && . ...        ; 905
ROW 13 : C-3 && . ...
ROW 14 : C-3 && . ...
ROW 15 : F-3 && . ...
ROW 16 : C-3 && . ...
ROW 17 : C-3 && . ...
ROW 18 : F-3 && . ...        ; 950
ROW 19 : C-3 && . ...
ROW 1A : F-3 && . ...
ROW 1B : C-3 && . ...
ROW 1C : F-3 && . ...
ROW 1D : C-3 && . ...
refactoring 0cc-famitracker

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

Re: Need Reverse Arpeggio Effect

Postby Stratelier » Sun Aug 02, 2015 6:17 am

So the only real difference in that is it starts on the high note of the arp and plays them in reverse order? I can get almost the same effect by specifying the arp parameters as 074 instead of 047.

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

Re: Need Reverse Arpeggio Effect

Postby HertzDevil » Sun Aug 02, 2015 9:04 am

What then is a reverse arpeggio effect if it is not one that can almost be replaced with the normal arpeggio effect? One that expands to {| 0 -x -y} does not count, since it can also be almost replaced with this effect, hence the stock 0xy effect. By that reasoning this thread does not need to exist in the first place if everyone posting here understands and accepts so, but apparently this is not the case.
refactoring 0cc-famitracker

User avatar
ollaxe
Posts: 736
Joined: Mon Apr 20, 2015 7:07 pm
Location: Sweden
Contact:

Re: Need Reverse Arpeggio Effect

Postby ollaxe » Sun Aug 02, 2015 10:04 am

Stratelier wrote:So the only real difference in that is it starts on the high note of the arp and plays them in reverse order? I can get almost the same effect by specifying the arp parameters as 074 instead of 047.

Almost, but not really. It doesn't start with the highest note if you do so, does it? Starting with the highest note can be really importand and really helpful in some situations, like when making orchestra hits, for example.
Hi! I'm not really active here anymore but I still make music. Nowadays I mostly make dubstep with emphasis on good melodies and chord progressions.
SoundCloud: soundcloud.com/ollaxe
Twitter: twitter.com/ollaxe
Discord server: dis.gd/tK7uRnc
I'm also on Spotify. Search "OllAxe" and you'll find me.


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests