This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-12-04 12:39:13

beirut1
New Scratcher
Registered: 2010-12-04
Posts: 3

PicoBoard theremin help

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

 

#2 2010-12-04 17:24:56

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: PicoBoard theremin help

Maybe something like ([light] sensor value)? That'll give you a number that varies depending on how much light the PicoBoard senses.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-12-04 17:33:54

beirut1
New Scratcher
Registered: 2010-12-04
Posts: 3

Re: PicoBoard theremin help

thank you, I'll try this in a bit and report back what I achieve.

Offline

 

#4 2010-12-05 11:56:49

beirut1
New Scratcher
Registered: 2010-12-04
Posts: 3

Re: PicoBoard theremin help

that makes sense, and I see how it makes the value vary, but I'm just confused on how to use that to vary the pitch... I should've mentioned I'm very beginner.

Offline

 

#5 2010-12-06 23:08:31

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: PicoBoard theremin help

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)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

Board footer