I usually add GPL licences to my repositories but I forgot this time. Thanks for reminding me. It's now attached.
Regarding the TPianoKeyboard class here is some helpful information. It's a TGraphicControl. It relies on the Music unit, also in the same project, to convert keys to frequencies and also to format note names as strings. You can define the number of keys on the piano by setting the KeyCount property. KeyCount ignores attempts to set its value to less than 1. You can change the on screen size of the piano by setting the ScaleFactor property. Setting Key[Index] := False/True turns the piano key from an released state to a pressed state (when true). You can listen to the OnKeyToggle event to take action when a piano key is pressed or released. The KeyToFrequency method gives you the frequency in hertz of the piano key by index. The piano does its best to keep middle C in the middle of its key layout when you change KeyCount. If you (or anyone really) have any improvement ideas for TPianoKeyboard or any other code in the project, let me know and I'll do my best to accommodate.
-- _______________________________________________ lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
