ScratchData LogoScratchData
Back to alexruthmann's profile

Alex Music pitch and volume by loudness and x-y

ALalexruthmann•Created June 17, 2009
Alex Music pitch and volume by loudness and x-y
0
0
79 views
View on Scratch

Description

This app takes input from the microphone and X/Y position of the Cat sprite. If the loudness of the microphone is above the threshold of 4, a continuous loop ensues: 1. The Y position of the Cat is scaled to a value between 0 and 100 (give or take) and assigned to the variable y_scale. This value is then passed to the "set instrument" function. 2. The X position of the Cat is scaled to a value between 0 and 100 (give or take) and assigned to the variable x_scale. This value is then passed to the "set volume" function. * These parameters are stored in the y_scale and x_scale variablesso that the scaled values can be displayed on the Stage. This allows the user to know the MIDI number for the selected instrument and volume level. 3. The loudness value of the microphone input is then scaled and passed to the "play note" function. The pitch of the notes will rise as the loudness value of the microphone (amplitude) rises. * While the loudness value is above 4, notes will be generated every 0.1 beats. Once the loudness volume drops below 4, the notes stop and the program waits for a value above 4 to begin playing notes again.

Project Details

Project ID573611
CreatedJune 17, 2009
Last ModifiedJune 17, 2009
SharedJune 17, 2009
Visibilityvisible
CommentsAllowed