Non-Interfering DPCM option

Post about feature requests here.
User avatar
graypesoda
Posts: 47
Joined: Wed May 13, 2015 7:34 pm
Location: United States

Non-Interfering DPCM option

Postby graypesoda » Tue Jun 14, 2016 3:48 pm

As much as I love famitracker's authenticity when emulating the NES's sound capabilities, some quirks are a little bit too limiting in my opinion. One example is the DPCM interfering with the triangle and noise channel's volume, and I'd really love to see an option to keep that from happening, if even possible! What do you all think?

User avatar
ZeroJanitor
Posts: 54
Joined: Sat Dec 19, 2015 5:49 pm
Contact:

Re: Non-Interfering DPCM option

Postby ZeroJanitor » Tue Jun 14, 2016 7:45 pm

One really roundabout way of doing it (at least for WAV) is exporting the DPCM separately from the triangle and noise and mix accordingly

Obviously doesn't work in-sequence, I dunno how you'd do that

User avatar
graypesoda
Posts: 47
Joined: Wed May 13, 2015 7:34 pm
Location: United States

Re: Non-Interfering DPCM option

Postby graypesoda » Wed Jun 15, 2016 1:45 am

But then again, that is a roundabout way to do it. I'm looking for a simple option for those times where you want some fakebit rather than true 8-bit :D

Threxx
Posts: 343
Joined: Wed Apr 22, 2015 2:34 pm
Location: Brooklyn, NY
Contact:

Re: Non-Interfering DPCM option

Postby Threxx » Wed Jun 15, 2016 3:03 pm

graypesoda wrote:But then again, that is a roundabout way to do it. I'm looking for a simple option for those times where you want some fakebit rather than true 8-bit :D


if you want fakebit then use a fucking fakebit program

famitracker is not obligated to emulate any non-hardware features

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

Re: Non-Interfering DPCM option

Postby Stratelier » Wed Jun 15, 2016 5:28 pm

Threxx wrote:famitracker is not obligated to emulate any non-hardware features

That attitude has always kind of bugged me, but I'm having a hard time describing just why.

I, too, would like the occasional option for FT to ignore some of the NES's hardware quirks/bugs (like the phase reset) in-tracker.

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

Re: Non-Interfering DPCM option

Postby HertzDevil » Wed Jun 15, 2016 9:32 pm

Edit APU/Mixer.cpp as follows, then recompile FamiTracker with LINEAR_MIXING defined, which causes all the 2A03 channels to be mixed linearly, not just DPCM:

Code: Select all

void CMixer::MixInternal1(int Time)
{
#ifdef LINEAR_MIXING
   // SumL = ((m_iChannels[CHANID_SQUARE1].Left + m_iChannels[CHANID_SQUARE2].Left) * 0.00752) * InternalVol;
   // SumR = ((m_iChannels[CHANID_SQUARE1].Right + m_iChannels[CHANID_SQUARE2].Right) *  0.00752) * InternalVol;
   double Sum = ((m_iChannels[CHANID_SQUARE1] + m_iChannels[CHANID_SQUARE2]) * 0.00752) * InternalVol;
#else
   double Sum = CalcPin1(m_iChannels[CHANID_SQUARE1], m_iChannels[CHANID_SQUARE2]);
#endif
   // ...
}

void CMixer::MixInternal2(int Time)
{
#ifdef LINEAR_MIXING
   // SumL = ((0.00851 * m_iChannels[CHANID_TRIANGLE].Left + 0.00494 * m_iChannels[CHANID_NOISE].Left + 0.00335 * m_iChannels[CHANID_DPCM].Left)) * InternalVol;
   // SumR = ((0.00851 * m_iChannels[CHANID_TRIANGLE].Right + 0.00494 * m_iChannels[CHANID_NOISE].Right + 0.00335 * m_iChannels[CHANID_DPCM].Right)) * InternalVol;
   double Sum = ((0.00851 * m_iChannels[CHANID_TRIANGLE] + 0.00494 * m_iChannels[CHANID_NOISE] + 0.00335 * m_iChannels[CHANID_DPCM])) * InternalVol;
#else
   double Sum = CalcPin2(m_iChannels[CHANID_TRIANGLE], m_iChannels[CHANID_NOISE], m_iChannels[CHANID_DPCM]);
#endif
   // ...
}

As can be seen in the source code, jsr planned to allow stereo channel mixing at some point. Similar code has existed in all source code releases since 0.2.2, where there was even much more code related to stereo mixing.
Last edited by HertzDevil on Wed Jun 15, 2016 9:38 pm, edited 1 time in total.
Constructing Chiptune; Construing 8-Bit. Makes 0CC-FamiTracker and MEGA ZUN.

Join my forum for 0CC-FamiTracker discussion and more

User avatar
iYamWhatIYam
Posts: 422
Joined: Wed Jul 08, 2015 8:19 pm
Location: Fort Wayne, IN

Re: Non-Interfering DPCM option

Postby iYamWhatIYam » Wed Jun 15, 2016 9:38 pm

If you want inaccurate music, then use a VST. JSR, the developer of FamiTracker, has no obligation to add features that break hardware limitations, as that goes against the philosophy of FamiTracker itself.
I have permanently switched to 0CC-FamiTracker. If and when JSR decides to update vanilla FamiTracker at this point is entirely out of the question for me.
YouTube
Twitter

User avatar
ZeroJanitor
Posts: 54
Joined: Sat Dec 19, 2015 5:49 pm
Contact:

Re: Non-Interfering DPCM option

Postby ZeroJanitor » Thu Jun 16, 2016 3:50 am

Stratelier wrote:
Threxx wrote:famitracker is not obligated to emulate any non-hardware features

That attitude has always kind of bugged me, but I'm having a hard time describing just why.

That sums up my relationship with the FT community for the last 5 years

I like that FT has all the same limits that a true NES would, but sometimes, I just wanna break free of those limits within the context of FamiTracker's interface. It's probably selfish, but it'd be nice.

User avatar
graypesoda
Posts: 47
Joined: Wed May 13, 2015 7:34 pm
Location: United States

Re: Non-Interfering DPCM option

Postby graypesoda » Thu Jun 16, 2016 4:19 pm

HertzDevil wrote:Edit APU/Mixer.cpp as follows, then recompile FamiTracker with LINEAR_MIXING defined, which causes all the 2A03 channels to be mixed linearly, not just DPCM...As can be seen in the source code, jsr planned to allow stereo channel mixing at some point. Similar code has existed in all source code releases since 0.2.2, where there was even much more code related to stereo mixing.


Dude holy crap thank you endlessly! You're a genius! I owe you one

User avatar
graypesoda
Posts: 47
Joined: Wed May 13, 2015 7:34 pm
Location: United States

Re: Non-Interfering DPCM option

Postby graypesoda » Fri Jun 24, 2016 5:58 pm

Well, update.

I have no idea what I'm doing apparently, do you think you could explain exactly how I make this change...? Where do I edit the code and how would I go about running it? I'm sorry I'm very nooby with this kinda stuff so bear with me


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests