Check out example codes for "processing library cassette". It will help you in understanding the concepts better.
Code Example 1
import cassette.audiofiles.SoundFile;
SoundFile sound;
void setup()
{
sound = new SoundFile(this, "sound.wav");
}
void draw()
{
if(playSound)
{
sound.Play();
}
}
Learn ReactJs, React Native from akashmittal.com