LSTM neural network for music generation
These are some suggestions you can try:


Just use 1 LSTM layer instead of 2, there might be less problem of vanishing gradient for shallower networks. In fact the dense layer of 4 is optional, since return_sequences = True. 
Find a way to normalize the input in the range 0 to 1. 
Try different optimizers like SGD or Adam.
Reduce your learning rate, the default learning rate might be too large for an input dimension of 4. 
The loss should not be categorical_crossentropy, since this is a regression problem. The loss should mean squared error. 


In order of importance 4 > 5 > 3 > 1 > 2 (i.e point 4 is most important)