Drum trigger controller
The problem is that you haven't accounted for the saturation voltage of the transistor you are using as a switch.  This is usually around 200 mV for a BJT.  These types of transistor aren't good for switching very low voltages, like your 40 mV.  To do that, use a FET instead.

However, are you really sure that your keyboard is looking for a switch closure, using only 40 mV to sense it?  That voltage sounds low.  I suspect the real problem is the keyboard doesn't work the way you think it does.  Buttons may not be just mechanical switches.  Some keyboards work on capacitive sensing, others magnetic, for example.