mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
PowerNoise: and now implement it
This commit is contained in:
parent
3548226e46
commit
bf3353ebb8
3 changed files with 18 additions and 1 deletions
|
@ -206,6 +206,7 @@ void DivPlatformPowerNoise::tick(bool sysTick) {
|
|||
|
||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,true,0,chan[i].pitch2,chipClock,CHIP_DIVIDER);
|
||||
chan[i].freq>>=chan[i].octaveOff;
|
||||
|
||||
if (chan[i].freq<0) chan[i].freq=0;
|
||||
if (chan[i].freq>0x7ffffff) chan[i].freq=0x7ffffff;
|
||||
|
@ -268,6 +269,9 @@ int DivPlatformPowerNoise::dispatch(DivCommand c) {
|
|||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
}
|
||||
if (chan[c.chan].insChanged) {
|
||||
chan[c.chan].octaveOff=ins->powernoise.octave;
|
||||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) {
|
||||
|
|
|
@ -46,7 +46,7 @@ class DivPlatformPowerNoise: public DivDispatch {
|
|||
struct Channel: public SharedChannel<signed char> {
|
||||
int fNum;
|
||||
unsigned short initLFSR;
|
||||
unsigned char octave, pan, tapA, tapB;
|
||||
unsigned char octave, pan, tapA, tapB, octaveOff;
|
||||
bool slope, am, tapBEnable, keyOn, keyOff;
|
||||
SlopePortion slopeA, slopeB;
|
||||
|
||||
|
@ -58,6 +58,7 @@ class DivPlatformPowerNoise: public DivDispatch {
|
|||
pan(255),
|
||||
tapA(1),
|
||||
tapB(2),
|
||||
octaveOff(0),
|
||||
slope(false),
|
||||
am(false),
|
||||
tapBEnable(false),
|
||||
|
|
|
@ -7295,6 +7295,18 @@ void FurnaceGUI::drawInsEdit() {
|
|||
drawMacros(macroList,macroEditStateMacros);
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ins->type==DIV_INS_POWERNOISE) {
|
||||
if (ImGui::BeginTabItem("PowerNoise")) {
|
||||
int pnOctave=ins->powernoise.octave;
|
||||
if (ImGui::InputInt("Octave offset",&pnOctave,1,4)) { PARAMETER
|
||||
if (pnOctave<0) pnOctave=0;
|
||||
if (pnOctave>15) pnOctave=15;
|
||||
ins->powernoise.octave=pnOctave;
|
||||
}
|
||||
ImGui::Text("go to Macros for other parameters.");
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
if (ins->type==DIV_INS_NES ||
|
||||
ins->type==DIV_INS_AY ||
|
||||
ins->type==DIV_INS_AY8930 ||
|
||||
|
|
Loading…
Reference in a new issue