Hello,
I plan to build a 3 keyboards console for a virtual pipe organ (I'm not a player myself), using 3 Fatar TP/8 keyboards and Teensy to "midify" them. It seems that I'm not the first one (great!), and it has already been mentionned here.
Paul in another thread has suggested that I start from the Keypad library. Good hint, since I'm a beginner!
Is there anyone here having developped a solution for this? Because I still have questions before moving on: (here I repeat things posted in the previous thread, but this forum section seems a better fit)
One thing I do not understand with the keypad libraryis the debounce time of 10ms. Does it imply a sort of wait(10ms)? If so when a keyboard needs multiple scans (large number of keys), do we have to sum up all those times for a total scan time. For instance, the keyboard I'd like to use is a 61-keys, organize as 8x8 matrix. Does it result in 80ms++ for a total scan? And actually, it is even larger because each key is a double one to express velocity, so it's 2x8x8, so 160ms. And it is even worse since I'd like to have 3 keyboards (this is for a virtual pipe organ), but here if one controller is not enough, I will just make 3 of them.
I then have to add timing info to estimate the key velocity:
Any comment or suggestion?
[EDIT]After reading Keypad.cpp source for Keypad lib, I think I can forget about the total time question: the debounce time is the minimal time taken by the full scan, so here after the 2x8 scans. So it's not adding this time for each scan.[/EDIT]
Thanks!
I plan to build a 3 keyboards console for a virtual pipe organ (I'm not a player myself), using 3 Fatar TP/8 keyboards and Teensy to "midify" them. It seems that I'm not the first one (great!), and it has already been mentionned here.
Paul in another thread has suggested that I start from the Keypad library. Good hint, since I'm a beginner!
Is there anyone here having developped a solution for this? Because I still have questions before moving on: (here I repeat things posted in the previous thread, but this forum section seems a better fit)
One thing I do not understand with the keypad libraryis the debounce time of 10ms. Does it imply a sort of wait(10ms)? If so when a keyboard needs multiple scans (large number of keys), do we have to sum up all those times for a total scan time. For instance, the keyboard I'd like to use is a 61-keys, organize as 8x8 matrix. Does it result in 80ms++ for a total scan? And actually, it is even larger because each key is a double one to express velocity, so it's 2x8x8, so 160ms. And it is even worse since I'd like to have 3 keyboards (this is for a virtual pipe organ), but here if one controller is not enough, I will just make 3 of them.
I then have to add timing info to estimate the key velocity:
- scan the upper part of the keyboard (8x8, or 4x16 if I can afford 2 bytes for reading and the 20 required pins it implies [actually 4x16 won't bring any value since we cannot read 16 bits in a raw]) and record the times
- scan the lower part
- derive the velocity for each pressed key using time difference
Any comment or suggestion?
[EDIT]After reading Keypad.cpp source for Keypad lib, I think I can forget about the total time question: the debounce time is the minimal time taken by the full scan, so here after the 2x8 scans. So it's not adding this time for each scan.[/EDIT]
Thanks!
Last edited: