Hoping for some inspiration here so feel free to chip in (sorry) with any ideas.
Currently I have a full note table in Nijuu - 80-or-so 16 bit entries, the index into the table being the current note number. Familiar stuff I'm sure.
Couple of things bug me with this approach though;
1 - Pitch sweeping. I currently have to calculate (real time) the fractional step size to get from one note to another in a given number of frames. This involves a few 16-bit maths operations. It works but it's clumsy.
2 - Vibrato. Currently I just add an 8-bit value to the value pulled from the note table, in a cyclic fashion (add for one frame, subtract for 2, add for 1, repeat). Again, it works but the obvious flaw is that the effect is not uniform over all octaves.
3 - Arpeggio. I attempted to implement arpeggio in combination with pitch sweeping by working out the 16-bit difference between the root note and each arpeggio offset (+/- from the root) and then adding that to the current 16-bit value that gets written to the 02/03 registers. I got it working (of sorts) but there was a flaw in it (I could explain in a separate post) and it was a horrible mess of code so it's currently in the commented-out-graveyard.
So I've been trying to figure out if there's a better way. An older thread discussing pitch tables and (I think it was Bregalad) the idea of having intermediate steps in between each note value (a figure of 31 steps in between was discussed) got me thinking along those lines. But for me that would generate a ridiculously large look-up table (80 notes x 32 intermediate steps x 2 bytes = 5120 byte table!) so I've given up with that thinking.
Any ideas?
Currently I have a full note table in Nijuu - 80-or-so 16 bit entries, the index into the table being the current note number. Familiar stuff I'm sure.
Couple of things bug me with this approach though;
1 - Pitch sweeping. I currently have to calculate (real time) the fractional step size to get from one note to another in a given number of frames. This involves a few 16-bit maths operations. It works but it's clumsy.
2 - Vibrato. Currently I just add an 8-bit value to the value pulled from the note table, in a cyclic fashion (add for one frame, subtract for 2, add for 1, repeat). Again, it works but the obvious flaw is that the effect is not uniform over all octaves.
3 - Arpeggio. I attempted to implement arpeggio in combination with pitch sweeping by working out the 16-bit difference between the root note and each arpeggio offset (+/- from the root) and then adding that to the current 16-bit value that gets written to the 02/03 registers. I got it working (of sorts) but there was a flaw in it (I could explain in a separate post) and it was a horrible mess of code so it's currently in the commented-out-graveyard.
So I've been trying to figure out if there's a better way. An older thread discussing pitch tables and (I think it was Bregalad) the idea of having intermediate steps in between each note value (a figure of 31 steps in between was discussed) got me thinking along those lines. But for me that would generate a ridiculously large look-up table (80 notes x 32 intermediate steps x 2 bytes = 5120 byte table!) so I've given up with that thinking.
Any ideas?