I have nearly finished my FATAR based digital piano. It is working with the code kindly written by TK with some minor work by me with on the soft and sustain pedals. The case and stand are complete. The piano works well with two exceptions.
As suggested by TK, I want the Keyboard Max and Min delay variables to be defined by two Hex switches.
There is an unused section of the scan matrix that I have used successfully to control the pedals referred to above. I have also tried to use the “empty” switch positions of the matrix with the hex switches and although it works to some extent, it is not convenient.
I want to program to read the two hex switches immediately after switch-on. I don’t need them to be variable during normal operation.
Is it feasible to incorporate the relevant code into the initialisation section where it can be read and used by the system.?
Incidentally it is very difficult to decide on suitable values. At present I am using a fast delay of 4 and a slow delay of 60. My current thinking is that I may need to reduce the latter(perhaps to 30).
I am thinking of using the IO’s of J5B and J5C for the 2 X 4 inputs from the hex switches. I believe that the main problem in trying to use the scan matrix is that that the switches are only read when the values change.
System speed.
The resolution of the delay referred to in 1) above is 1 mS. I would like reduce this value progressively. I have looked in the repository to find where the frequency is pre-scaled without success. There may be several other changes needed to speed up the application. Any pointers would be appreciated.
Regards Robin