I am very new to arduino so please excuse my inexpertise.
I have been working on a project in which i used some code from "mad-science.com" to make a polygraph which could "read" a plants resistance, in other words when i plug it into the plant it gives off readings i believe its measuring the resistance.
what i want to do is convert those readings into musical tones, in other words "the plant plays music"
It’s easy enough to make music vary when a variable varies once you’ve learned about loops, conditional branching (if-statements, etc), and variables.
But, the Arduino’s “music” capability is limited by the lack of a DAC and limited memory. I suggest you start with the Play Melody Example](https://www.arduino.cc/en/Tutorial/PlayMelody), which sounds like one of those musical greeting cards. With that type of sound, you can change the pitch of the notes or the timing, so to some extent the computer can “compose” randomized music based on the variables. But, you can’t change the “character” of the sound.
If you want to play MP3s or WAV files, you’ll need an add-on audio shield. In that case you can’t compose music on-the-fly, you can only play the saved files. (For example, you can play a different song when the resistance changes.)