change chan osc range - PLEASE READ

as of now the range is ~32768, either from -16384 to 16383, or 0 to 32767.
it previously was -32768 to 32767 (~65536).

this change was made to better suit chips that only output a positive value.
if you are working on a new chip, update your code and shift right by one if necessary.
This commit is contained in:
tildearrow 2023-06-16 17:30:11 -05:00
parent ad9981fdea
commit 29dfeccfe7
48 changed files with 126 additions and 129 deletions

View file

@ -68,7 +68,7 @@ void DivPlatformOPLL::acquire_nuked(short** buf, size_t len) {
unsigned char nextOut=cycleMapOPLL[fm.cycles];
if ((nextOut>=6 && properDrums) || !isMuted[nextOut]) {
os+=(o[0]+o[1]);
if (vrc7 || (fm.rm_enable&0x20)) oscBuf[nextOut]->data[oscBuf[nextOut]->needle++]=(o[0]+o[1])<<6;
if (vrc7 || (fm.rm_enable&0x20)) oscBuf[nextOut]->data[oscBuf[nextOut]->needle++]=(o[0]+o[1])<<5;
} else {
if (vrc7 || (fm.rm_enable&0x20)) oscBuf[nextOut]->data[oscBuf[nextOut]->needle++]=0;
}
@ -76,7 +76,7 @@ void DivPlatformOPLL::acquire_nuked(short** buf, size_t len) {
if (!(vrc7 || (fm.rm_enable&0x20))) for (int i=0; i<9; i++) {
unsigned char ch=visMapOPLL[i];
if ((i>=6 && properDrums) || !isMuted[ch]) {
oscBuf[ch]->data[oscBuf[ch]->needle++]=(fm.output_ch[i])<<6;
oscBuf[ch]->data[oscBuf[ch]->needle++]=(fm.output_ch[i])<<5;
} else {
oscBuf[ch]->data[oscBuf[ch]->needle++]=0;
}