are you kidding me?

This commit is contained in:
tildearrow 2021-05-17 00:36:09 -05:00
parent bbd175e8f6
commit 0caaa1629c
3 changed files with 7 additions and 5 deletions

View file

@ -1,4 +1,5 @@
#include "dummy.h"
#include <stdio.h>
#include <math.h>
void DivPlatformDummy::acquire(int& l, int& r) {
@ -16,6 +17,7 @@ void DivPlatformDummy::tick() {
}
int DivPlatformDummy::dispatch(DivCommand c) {
printf("command: %d %d %d %d\n",c.cmd,c.chan,c.value,c.value2);
switch (c.cmd) {
case DIV_CMD_NOTE_ON:
chan[c.chan].freq=16.4f*pow(2.0f,((float)c.value/12.0f));

View file

@ -15,7 +15,7 @@ void DivPlatformSMS::tick() {
if (chan[i].std.hadVol) sn->write(0x90|(i<<5)|(15-((chan[i].vol*chan[i].std.vol)>>4)));
if (chan[i].std.hadArp) {
if (chan[i].std.arpMode) {
chan[i].baseFreq=round(1712.0f/pow(2.0f,((float)(chan[i].std.arp-12)/12.0f)));
chan[i].baseFreq=round(1712.0f/pow(2.0f,((float)(chan[i].std.arp)/12.0f)));
} else {
chan[i].baseFreq=round(1712.0f/pow(2.0f,((float)(chan[i].note+chan[i].std.arp-12)/12.0f)));
}