Is it possible to interact with a MIDI device built from an arduino?

Hello,

I am new to psychopy (currently migrating from Eprime), and for a research project I am building a sonification device what produces 3 sound when cube of 3 weights are lifted. I thought of creating and conduct the experiment in Psychopy.

I can l create and upload the sound code directly from the arduino IDE, but I am wondering whther it is possible to trigger and signal the arduino what sound to play from the psychopy experiment?

I hope I made a good job explaining myself, but happy to provide further details.

Thank you in advance
Fabio