Help Turn a toy Keyboard (piano) into a MIDI Device (Arduino uno)

I'm a newbie with arduino and i don't have enough knowledge for This sophisticated sketches

That is not a sophisticated sketch, it is very crude.

the notes aren't random, because every time i initialize the midi port, the note output still the same

They are random in that your code has no control over what is produced because your look up table is just using junk in the memory, that is uninitialised memory locations. You change your code and the notes it produces will probably change.

I dont know how to create a look up table!

Well it looks like your project comes to a full stop then because without one nothing can work. The problem is that you have not supplied enough information about the hardware that you have. In code terms the lookup table will look something like this:-

uint8_t keyToMidiMap[9][6] =   {  // note that these are not real values to use
                          30,31,32,33,34,35,       
                          45,44,43,42,41,40,      
                          50,51,52,53,54,55,
                          65,64,63,62,61,60,                          
                          71,72,74,73,71,72,        
                          82,83,85,84,82,85,
                          91,94,95,92,94,90,
                          100,104,102,103,105,106,                         
                          107,108,109,110,111,113,        
                         };

But those are not the real numbers to use in the body of that matrix. You have to work out what the real numbers are, either from examining and understanding your circuit, or from printing out the row and column numbers for each key and putting the MIDI note number you want in each corresponding matrix location.