Non-Interfering DPCM option
- graypesoda
- Posts: 47
- Joined: Wed May 13, 2015 7:34 pm
- Location: United States
Non-Interfering DPCM option
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?
- ZeroJanitor
- Posts: 65
- Joined: Sat Dec 19, 2015 5:49 pm
- Contact:
Re: Non-Interfering DPCM option
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
Obviously doesn't work in-sequence, I dunno how you'd do that
- graypesoda
- Posts: 47
- Joined: Wed May 13, 2015 7:34 pm
- Location: United States
Re: Non-Interfering DPCM option
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 

Re: Non-Interfering DPCM option
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
if you want fakebit then use a fucking fakebit program
famitracker is not obligated to emulate any non-hardware features
- Stratelier
- Posts: 378
- Joined: Sun Apr 26, 2015 7:46 pm
Re: Non-Interfering DPCM option
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.
- HertzDevil
- Posts: 475
- Joined: Thu Apr 23, 2015 7:39 pm
- Location: Hong Kong SAR
- Contact:
Re: Non-Interfering DPCM option
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.
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.
refactoring 0cc-famitracker
- iYamWhatIYam
- Posts: 432
- Joined: Wed Jul 08, 2015 8:19 pm
- Location: Fort Wayne, IN
Re: Non-Interfering DPCM option
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.
she/they. 20. do not perceive me
- ZeroJanitor
- Posts: 65
- Joined: Sat Dec 19, 2015 5:49 pm
- Contact:
Re: Non-Interfering DPCM option
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.
- graypesoda
- Posts: 47
- Joined: Wed May 13, 2015 7:34 pm
- Location: United States
Re: Non-Interfering DPCM option
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
- graypesoda
- Posts: 47
- Joined: Wed May 13, 2015 7:34 pm
- Location: United States
Re: Non-Interfering DPCM option
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
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