Hey, I have a question. I'm trying to program a theremin of sorts with scratch and my picoboard, however I'm a little stuck on on aspect. I'm trying to use the light sensor to control pitch, so you can hover your hand over the picoboard to change pitch . . . however, I have no clue how I would go about programming something like that in scratch. any suggestions? thank you!
Offline
Maybe something like ([light] sensor value)? That'll give you a number that varies depending on how much light the PicoBoard senses.
Offline
Will you be using the [play note ( ) for ( ) secs] block or a lot of different sound files, each one a slightly different pitch?
If you're using the block: Try something like [play note ([light] sensor value) for ( ) secs]. If the notes aren't quite right, use the math blocks to alter the number so it fits - for example, [play note (([light] sensor value) / (2)) for ( ) secs].
If you're using sound files, number them (ie. 1, 2, 3) and use [play sound ([light] sensor value) until done]. If the notes aren't right, use the math blocks like shown above.
Is that okay?
Last edited by Jonathanpb (2010-12-06 23:08:41)
Offline