Piano “Glissando” in WPF?

0 votes
asked Jul 21 in WPF by Fred

Can’t get “Glissando” to work.
I have coded a piano Keyboard, put together programmatically in c# (no controls on the XAML – only a “Grid”).
I can make it do a lot of things i.e. change colour to simulate key press, display corresponding note mnemonic, produce the note pitch, etc., as long as folks single-click on any of the 21 white or 15 black keys.
I need to introduce a “glissando” function – click on any note and drag the mouse left or right – I’m stuck.
I have tried several mouse events (MouseMove, Enter etc.) to no avail. What is working now are a MouseDown event, where the bulk of the tasks are done and a MouseUp event to terminate these activities.
A glissando is a very common function; every decent sequencer I have come across are capable of such (most likely music SW is written in C/C++) so it must be a way to doit even in C#.
Does anyone have any idea how I might be able to accomplish this?

Piano Keyboard Screenshot


Your answer


Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
site design / logo / content © 2013 - 2015 pinfaq.com