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
66 tMempool mempool;66 tMempool mempool;
67 // Underlying phasor67 // Underlying phasor
68 uint32_t phase;68 uint32_t phase;
69 uint32_t inc;69 int32_t inc;
70 float freq;70 float freq;
71 float invSampleRateTimesTwoTo32;71 float invSampleRateTimesTwoTo32;
72 uint32_t mask;72 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
137// Remove noteVal. return 1 if removed, 0 if not137// Remove noteVal. return 1 if removed, 0 if not
138int tStack_remove(tStack* const stack, uint16_t noteVal)138int tStack_remove(tStack* const stack, uint16_t noteVal)
139{139{
140
140 _tStack* ns = *stack;141 _tStack* ns = *stack;
141 142
142 uint8_t k;143 uint8_t k;
@@ -801,7 +802,7 @@ void tSimplePoly_deactivateVoice(tSimplePoly* const polyh, uint8_t voice) · 658 unmodified lines
801 //grab old notes off the stack if there are notes waiting to replace the free voice802 //grab old notes off the stack if there are notes waiting to replace the free voice
802 for (int j = 0; j < tStack_getSize(&poly->stack); ++j)803 for (int j = 0; j < tStack_getSize(&poly->stack); ++j)
803 {804 {
804 noteToTest = tStack_get(&poly->stack, j);805 noteToTest = tStack_get(&poly->stack, j); //note to check if it is waiting to be recovered
805 806
806 if (poly->notes[noteToTest][0] == -3) //if there is a stolen note waiting (marked inactive but on the stack)807 if (poly->notes[noteToTest][0] == -3) //if there is a stolen note waiting (marked inactive but on the stack)
807 {808 {
@@ -809,6 +810,8 @@ void tSimplePoly_deactivateVoice(tSimplePoly* const polyh, uint8_t voice) · 1 unmodified line
809 poly->voices[voice][1] = poly->notes[noteToTest][1]; // set the velocity of the voice to be the velocity of that note810 poly->voices[voice][1] = poly->notes[noteToTest][1]; // set the velocity of the voice to be the velocity of that note
810 poly->voices[voice][2] = noteToTest;811 poly->voices[voice][2] = noteToTest;
811 poly->notes[noteToTest][0] = voice; //mark that it is no longer stolen and is now active812 poly->notes[noteToTest][0] = voice; //mark that it is no longer stolen and is now active
813 //poly->notes[][0] = -1;
814 break;
812 }815 }
813 }816 }
814 }817 }

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