| View previous topic :: View next topic |
| Author |
Message |
DAud_IcI
Joined: 19 Jan 2008 Posts: 4
Digg It |
Posted: Mon Mar 31, 2008 7:17 pm Post subject: "Key to Internal Speaker" script |
|
|
Hi!
I've just made that as a funny(at least for me:)) experiment. This lets you to control the internal speaker of the Wiimote via the keyboard. I know it sounds really sh177y, but c'mon, it's handling simple constant frequency vawes...
Here are the controls:
| Code: |
S D F G H J K L as
C D E F G A G C
and
E R Z U I as
C# D# F# G# A#
|
Here's the code:
| Code: |
Debug = Wiimote.Volume * 100 + " % "
////////////////////////////////////////
// Volume Settings //
////////////////////////////////////////
if Wiimote.Home then
Wiimote.Volume = 0%
wait(60ms)
end if
if Wiimote.Plus then
var.Volume += 0.05
Wiimote.Volume = var.Volume
wait(60ms)
end if
if Wiimote.Minus then
var.Volume -= 0.05
Wiimote.Volume = var.Volume
wait(60ms)
end if
////////////////////////////////////////
if NOT key.AnyKey then
Wiimote.Frequency = 000.000 Hz
end if
if key.S then // 1C
Wiimote.Frequency = 261.626 Hz
end if
if key.E then // 1C#
Wiimote.Frequency = 277.183 Hz
end if
if key.D then // 1D
Wiimote.Frequency = 293.665 Hz
end if
if key.R then // 1D#
Wiimote.Frequency = 311.127 Hz
end if
if key.F then // 1E
Wiimote.Frequency = 329.628 Hz
end if
if key.G then // 1F
Wiimote.Frequency = 349.228 Hz
end if
if key.Z then // 1F#
Wiimote.Frequency = 369.994 Hz
end if
if key.H then // 1G
Wiimote.Frequency = 391.995 Hz
end if
if key.Y then // 1G#
Wiimote.Frequency = 415.305 Hz
end if
if key.J then // 1A
Wiimote.Frequency = 440.000 Hz
end if
if key.I then // 1A#
Wiimote.Frequency = 466.164 Hz
end if
if key.K then // 1H
Wiimote.Frequency = 493.883 Hz
end if
if key.L then // 1C
Wiimote.Frequency = 523.251 Hz
end if
|
Please annoy your friends, parents and neighbours with it to hell. And of course plz comment. |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Sat Apr 19, 2008 2:27 am Post subject: |
|
|
That's fun
Well done. |
|
| Back to top |
|
 |
xaanaax

Joined: 07 May 2008 Posts: 12
Digg It |
Posted: Tue Jun 10, 2008 3:25 pm Post subject: |
|
|
| Haha cool, but the sound could be better;) |
|
| Back to top |
|
 |
makah
Joined: 28 Jun 2008 Posts: 2
Digg It |
Posted: Sat Jun 28, 2008 10:34 pm Post subject: |
|
|
| how do i put my speaker to work. My grovepie is working, but i cant listen anything |
|
| Back to top |
|
 |
|