piezo to midi code help wanted !

I am planning to do the same kind of thing. does the same data that is transmitted to the serial Tx pin also get sent via the usb serial?
I plan on attaching my device (when i make it) to cubase via the usb (using usb serial midi port drivers)

i'm also a noob at this and dont know how to code it yet.. how would i make it into switches instead of peizos for a mini keyboard device?

Yes, the USB connection works great for serial input and output

To use switches instead of piezo devices is easy. You would replace:

  val = analogRead(piezo1)/4;   
  if (val >= THRESHOLD) 
    noteOn (144 , 10, 100);

With

  If(digitalRead(switch1) )
     noteOn (144 , 10, 100);

And as has been mentioned above, make sure that you add braces {} as needed.