Non-Interfering DPCM option - FamiTracker

# FamiTracker

FamiTracker Support Forums

Skip to content

## Non-Interfering DPCM option

Post about feature requests here.
Post Reply

- Print view

11 posts

- 1
- 2
- Next

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

### Non-Interfering DPCM option

- Quote

Post by 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?
Top

ZeroJanitor
  Posts: 69
  Joined: Sat Dec 19, 2015 5:49 pm
  Contact:
  Contact ZeroJanitor
  Website Twitter Skype YouTube
  Google+

### Re: Non-Interfering DPCM option

- Quote

Post by 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
http://youtube.com/user/ZeroJanitor
Top

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

### Re: Non-Interfering DPCM option

- Quote

Post by 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
Top

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

### Re: Non-Interfering DPCM option

- Quote

Post by 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

if you want fakebit then use a fucking fakebit program
famitracker is not obligated to emulate any non-hardware features
Main Channel
Top

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

### Re: Non-Interfering DPCM option

- Quote

Post by 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.
Top

HertzDevil
  Posts: 475
  Joined: Thu Apr 23, 2015 7:39 pm
  Location: Hong Kong SAR
  Contact:
  Contact HertzDevil
  Website Facebook Twitter Skype
  YouTube

### Re: Non-Interfering DPCM option

- Quote

Post by 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.
refactoring 0cc-famitracker
Top

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

### Re: Non-Interfering DPCM option

- Quote

Post by 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 am the minestrone bottom | roxanne | she/they, 22
Top

ZeroJanitor
  Posts: 69
  Joined: Sat Dec 19, 2015 5:49 pm
  Contact:
  Contact ZeroJanitor
  Website Twitter Skype YouTube
  Google+

### Re: Non-Interfering DPCM option

- Quote

Post by 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.
http://youtube.com/user/ZeroJanitor
Top

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

### Re: Non-Interfering DPCM option

- Quote

Post by 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
Top

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

### Re: Non-Interfering DPCM option

- Quote

Post by 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
Top

Display posts from previous:
Sort by

Post Reply

- Print view

11 posts

- 1
- 2
- Next

Return to “Feature Requests”

Jump to

- Rules
- Wiki
- FamiTracker
- General Talk
- Bug Reports
- Feature Requests
- Source and development
- Music
- Original Music
- Cover Music
- Other
- Site Issues & Suggestions