The Stress Relief Flower enables the user to channel his/her stress, anger and other negative emotions into creating a beautiful new flower. The application takes the user's unique sound and generates a rose from the sound's pitch. Since each sound is unique, every rose will be unique as well.
ml5.js' Pitch Detection model: audio analysis
I think this code snippet can be useful for anyone. This function creates smooth transitions between 0 and 1. The input should be a float between 0 and 1.