Dn-Programming-Core-Management / Dn-FamiTracker

modifications and improvements for 0CC-FamiTracker (based on j0CC-FamiTracker 0.6.3)
Other
386 stars 23 forks source link

DPCM echo buffer does not respect new instrument sample layout in NSF export? #292

Open Gumball2415 opened 3 months ago

Gumball2415 commented 3 months ago

echo buffer tests.zip in the nsf export, echo buffer on DPCM does not seem to play the respective instrument's sample layout, instead playing the older instrument.

Gumball2415 commented 3 months ago

due to the way the pattern compiler abstracts DPCM instruments and notes into DPCM sample indices, this cannot be fixed unless the method of DPCM pattern processing is rewritten entirely.

https://github.com/Dn-Programming-Core-Management/Dn-FamiTracker/blob/2c997736c1bd87bcee634d1225299fb0f4420617/Source/Compiler.cpp#L65C1-L67C14

DPCM instruments + note + octave gets translated into a sample index type via CPatternCompiler::FindSample() then storing the result in the note parameter, thus making echo buffer commands possible, but not instrument changes.

the only alternative is "baking" in echo buffer commands at compile time, but this may be impractical.