WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"Key to Internal Speaker" script

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts
View previous topic :: View next topic  
Author Message
DAud_IcI



Joined: 19 Jan 2008
Posts: 4

Digg It
PostPosted: 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. Twisted Evil Very Happy And of course plz comment.
Back to top
View user's profile Send private message
CarlKenner
Site Admin


Joined: 29 Nov 2006
Posts: 614

Digg It
PostPosted: Sat Apr 19, 2008 2:27 am    Post subject:

That's fun Smile
Well done.
Back to top
View user's profile Send private message Send e-mail
xaanaax



Joined: 07 May 2008
Posts: 12

Digg It
PostPosted: Tue Jun 10, 2008 3:25 pm    Post subject:

Haha cool, but the sound could be better;)
Back to top
View user's profile Send private message
makah



Joined: 28 Jun 2008
Posts: 2

Digg It
PostPosted: 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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group