History

Fix Oscillators FM

Davis Polito committed 4 years ago

Commit 1dfd63f1 parent a45c0282 files · +5 −2Browse files

Unified · Split

2 files
  1. leaf/Inc/leaf-oscillators.h +1 −1
  2. leaf/Src/leaf-midi.c +4 −1
leaf/Inc/leaf-oscillators.h+1−1
@@ -66,7 +66,7 @@ extern "C" { · 65 unmodified lines
6666 tMempool mempool;
6767 // Underlying phasor
6868 uint32_t phase;
69− uint32_t inc;
69+ int32_t inc;
7070 float freq;
7171 float invSampleRateTimesTwoTo32;
7272 uint32_t mask;
leaf/Src/leaf-midi.c+4−1
@@ -137,6 +137,7 @@ int tStack_addIfNotAlreadyThere(tStack* const stack, uint16_t noteVal) · 136 unmodified lines
137137 // Remove noteVal. return 1 if removed, 0 if not
138138 int tStack_remove(tStack* const stack, uint16_t noteVal)
139139 {
140+
140141 _tStack* ns = *stack;
141142
142143 uint8_t k;
@@ -801,7 +802,7 @@ void tSimplePoly_deactivateVoice(tSimplePoly* const polyh, uint8_t voice) · 658 unmodified lines
801802 //grab old notes off the stack if there are notes waiting to replace the free voice
802803 for (int j = 0; j < tStack_getSize(&poly->stack); ++j)
803804 {
804− noteToTest = tStack_get(&poly->stack, j);
805+ noteToTest = tStack_get(&poly->stack, j); //note to check if it is waiting to be recovered
805806
806807 if (poly->notes[noteToTest][0] == -3) //if there is a stolen note waiting (marked inactive but on the stack)
807808 {
@@ -809,6 +810,8 @@ void tSimplePoly_deactivateVoice(tSimplePoly* const polyh, uint8_t voice) · 1 unmodified line
809810 poly->voices[voice][1] = poly->notes[noteToTest][1]; // set the velocity of the voice to be the velocity of that note
810811 poly->voices[voice][2] = noteToTest;
811812 poly->notes[noteToTest][0] = voice; //mark that it is no longer stolen and is now active
813+ //poly->notes[][0] = -1;
814+ break;
812815 }
813816 }
814817 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t