Page 5 of 29

Re: Version 0.5 preview

Posted: Tue May 26, 2015 11:31 pm
by HertzDevil
You cannot; although Vortex Tracker uses "E" for enabling the modulation in instruments, and FamiTracker's 5B mode sequences still have one bit to spare (0CC-FamiTracker uses this bit instead of relying on Hxy effects depending on whether y equals 0), the beta does not allow one to use "e" in the MML field.

One may even allow another bit of the 5B Vxx effect to turn on/off the modulation.

Re: Version 0.5 preview

Posted: Wed May 27, 2015 3:41 pm
by Stratelier
ImATrackMan wrote:EDIT: Also, the 5B seems to be using the same volume "scheme" as the rest of the channels. Seeing as it's a logarithmic chip, it'd probably be best to have things like the volume column and Axx affect volume in a subtractive manner rather than a miltuplicative one.

But Axx isn't multiplicative with channel volume at all, Axx "is" channel volume -- it literally just slides that setting up or down.

Re: Version 0.5 preview

Posted: Thu May 28, 2015 2:59 am
by betasword
I just checked, and it looks like the 64 DPCM sample limit is still in place. Is that by any chance going to be lifted for this version, or perhaps a later one? Other than that, I haven't really had a chance to look into the new stuff, but I'm looking forward to checking out 5B!

Re: Version 0.5 preview

Posted: Thu May 28, 2015 7:34 pm
by ollaxe
I'm working on a 5B song, and I noticed that the Qxx-, Rxx- and 3xx-effects does not work. Why is this?

Re: Version 0.5 preview

Posted: Sat May 30, 2015 1:39 am
by w7n
128 instruments when?

Re: Version 0.5 preview

Posted: Sat May 30, 2015 1:49 am
by jrlepage
ollaxe wrote:I'm working on a 5B song, and I noticed that the Qxx-, Rxx- and 3xx-effects does not work. Why is this?

I managed to get 3xx to work on 5B channels, but not Qxy or Rxy.

Re: Version 0.5 preview

Posted: Sat May 30, 2015 2:36 am
by HertzDevil
0CC-FamiTracker used to have the same issue until 0.3.9 before a bit of refactoring, and I believe this oversight remains in 0.5.0 beta.

In FamiTracker, CChannelHandler::SetupSlide(int, int) is called from each virtual override of CChannelHandler::HandleNoteData(stChanNote*, int). Every time the channel handler reads note data from the current row, SetupSlide is called to set up the speed of the note slide, the destination note, and the destination period of Qxy and Rxy effects, if these exist on that row. For example, VRC6 does this:

Code: Select all

void CChannelHandlerVRC6::HandleNoteData(stChanNote *pNoteData, int EffColumns)
{
   m_iPostEffect = 0;
   m_iPostEffectParam = 0;

   CChannelHandler::HandleNoteData(pNoteData, EffColumns);

   if (pNoteData->Note != NONE && pNoteData->Note != HALT && pNoteData->Note != RELEASE) {
      if (m_iPostEffect && (m_iEffect == EF_SLIDE_UP || m_iEffect == EF_SLIDE_DOWN))
         SetupSlide(m_iPostEffect, m_iPostEffectParam);
      else if (m_iEffect == EF_SLIDE_DOWN || m_iEffect == EF_SLIDE_UP)
         m_iEffect = EF_NONE;
   }
}

For the Sunsoft 5B the code simply calls the base method:

Code: Select all

void CChannelHandlerS5B::HandleNoteData(stChanNote *pNoteData, int EffColumns)
{
   CChannelHandler::HandleNoteData(pNoteData, EffColumns);
}

The 3xx effect sets this up directly in CChannelHandler::CheckCommonEffects(unsigned char, unsigned char), therefore works in Sunsoft 5B:

Code: Select all

...
case EF_PORTAMENTO:
   m_iPortaSpeed = EffParam;
   m_iEffect = EF_PORTAMENTO;
   if (!EffParam)
      m_iPortaTo = 0;
   break;
...

As for instruments: Modify MAX_INSTRUMENTS, then increase the version number of the PATTERNS block, and after reading the instrument index from the FTM in CFamiTrackerDoc::ReadBlock_Patterns(CDocumentFile), set it to the new MAX_INSTRUMENTS if it equals its old value (0x40). The NSF driver already supports up to 128 instruments, but FamiTracker imposes limit on the amount of instrument data in exported NSFs, so further edits in the ASM source may be required to allow bankswitching some instrument data, such as longer sequences or waveforms.

Re: Version 0.5 preview

Posted: Sat May 30, 2015 3:59 am
by w7n
After looking into the code, I guess I'd better just manually assemble stuff after all. Such project is too much for me.

Re: Version 0.5 preview

Posted: Sat May 30, 2015 6:59 pm
by ollaxe
jrlepage wrote:
ollaxe wrote:I'm working on a 5B song, and I noticed that the Qxx-, Rxx- and 3xx-effects does not work. Why is this?

I managed to get 3xx to work on 5B channels, but not Qxy or Rxy.


Oh, 3xx did work! I think I used a too quick 3xx-effect before, so I didn't hear it. Sorry! :)


HertzDevil wrote:0CC-FamiTracker used to have the same issue until 0.3.9 before a bit of refactoring, and I believe this oversight remains in 0.5.0 beta.

In FamiTracker, CChannelHandler::SetupSlide(int, int) is called from each virtual override of CChannelHandler::HandleNoteData(stChanNote*, int). Every time the channel handler reads note data from the current row, SetupSlide is called to set up the speed of the note slide, the destination note, and the destination period of Qxy and Rxy effects, if these exist on that row. For example, VRC6 does this:

Code: Select all

void CChannelHandlerVRC6::HandleNoteData(stChanNote *pNoteData, int EffColumns)
{
   m_iPostEffect = 0;
   m_iPostEffectParam = 0;

   CChannelHandler::HandleNoteData(pNoteData, EffColumns);

   if (pNoteData->Note != NONE && pNoteData->Note != HALT && pNoteData->Note != RELEASE) {
      if (m_iPostEffect && (m_iEffect == EF_SLIDE_UP || m_iEffect == EF_SLIDE_DOWN))
         SetupSlide(m_iPostEffect, m_iPostEffectParam);
      else if (m_iEffect == EF_SLIDE_DOWN || m_iEffect == EF_SLIDE_UP)
         m_iEffect = EF_NONE;
   }
}

For the Sunsoft 5B the code simply calls the base method:

Code: Select all

void CChannelHandlerS5B::HandleNoteData(stChanNote *pNoteData, int EffColumns)
{
   CChannelHandler::HandleNoteData(pNoteData, EffColumns);
}

The 3xx effect sets this up directly in CChannelHandler::CheckCommonEffects(unsigned char, unsigned char), therefore works in Sunsoft 5B:

Code: Select all

...
case EF_PORTAMENTO:
   m_iPortaSpeed = EffParam;
   m_iEffect = EF_PORTAMENTO;
   if (!EffParam)
      m_iPortaTo = 0;
   break;
...

As for instruments: Modify MAX_INSTRUMENTS, then increase the version number of the PATTERNS block, and after reading the instrument index from the FTM in CFamiTrackerDoc::ReadBlock_Patterns(CDocumentFile), set it to the new MAX_INSTRUMENTS if it equals its old value (0x40). The NSF driver already supports up to 128 instruments, but FamiTracker imposes limit on the amount of instrument data in exported NSFs, so further edits in the ASM source may be required to allow bankswitching some instrument data, such as longer sequences or waveforms.


I don't know code so well, but I think I get the basic idea of what you're saying. Thanks for taking your time to explain! :)

Re: Version 0.5 preview

Posted: Sun May 31, 2015 5:20 pm
by Stratelier
HertzDevil wrote:The absolute pitch sequence overrides the fixed arpeggio sequence. In other words, the fixed part no longer needs to begin at the first frame of the instrument, as shown in the attached FTM. I do not know if this is an intended behaviour, since the pitch offset should be applied after acquiring the fixed note; otherwise the fixed arpeggio sequence should use a special constant like -1 to indicate that the instrument uses the current note from the pattern data (so every fixed sequence of the form {x} becomes equivalent to {x | -1}).

This is not unique to 0.5; it occurs in 0.4.6 as well. I have a particular instrument for Triangle where the intended note is prefixed by a basskick. I would like the kick to be as close to 120Hz as possible (because 60Hz engine speed), i.e. B-2 + P7B; the corresponding instrument definition should be fixed arpeggio {35} + relative pitch {5} but the pitch tuning is ignored in favor of arpeggio (so I get a straight B-2 with no tuning). The end result as is is close enough to work already, it just ... y'know, causes my OCD to flare up. :)