Python encode piano notes in 88 bits - int too large to convert to C long The piano keyboard has 88 keys:


I would like to encode one note or one chord in 88 bit array. I do this, for example:
A4 is 0000000000000000000000000000000000000000000000000000000001000000000000000000000000000000

Next I convert this number to decimal. When I have chord the final number is really big. The problem is when I put this big number into array from NumPy I gets: 

note_data = np.array(note_data, dtype=np.int64)
OverflowError: Python int too large to convert to C long


My point is to feed recurrent neural netowrk this kind of data or maybe is better representation on music notes into numbers? 

EDIT:

Another example of encode C3 note:

C3 = np.array([0000000000000000000000000001000000000000000000000000000000000000000000000000000000000000], dtype=int)

and error sitll the same:

OverflowError: Python int too large to convert to C long


It's possible to reduce this error?
That seems like a bad way to encode the information. A C chord and a C7 chord would be very different numbers even though they are similar conceptually. 

I would take your idea, but instead of smashing the information into a single int, make your input a binary vector of length 88 created in the way you describe. In this way, a C and C7 will have similar inputs, differing in only one location of the vector. 

As a simplified one octave example going from C to B:

C : [1,0,0,0,1,0,0,1,0,0,0,0]
C7: [1,0,0,0,1,0,0,1,0,0,1,0]


This kind of encoding is making use of “dummy variables”. It is like the “Bag of Words” encoding used a lot in Natural Language Processing.