buzzchurch.com Forum Index The Buzz Congregation
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

buzz + wiimote

 
Post new topic   Reply to topic    buzzchurch.com Forum Index -> The Altar
View previous topic :: View next topic  
Author Message
groovelastig
Cardinal


Joined: 27 Jul 2008
Posts: 768
Location: duesseldorf, germany

PostPosted: Thursday May 28th, 2009 8:46    Post subject: buzz + wiimote Reply with quote

http://www.youtube.com/user/groovelastig

i'm actually not sure whether i posted a how-to, although i remember some thread tidbits about a) glovepie b) the overall artistic value of using novelty controllers Wink

here's what you do:

1. get a wiimote (and if you want, everything that hooks up to it - nunchuck, classic controller etc.)
no need for a wii console, and the sensor bar is a little fidgety for stage action b/c you'll have A LOT of IR distortion (stage lights).

2. you'll need a bluetooth adapter on your notebook. some notebooks come with built-in adapters, which are fine. anything from 2$ taiwan-import to 20$ fancy-dongle should work.

that's it on the hardware end.

concerning software, you'll need:

1. to install the drivers of the bluetooth adapter. windows comes with it's own bluetooth stack, which could possibly spare you the installation. there are, however, discussions about how performant it is in comparison to 'custom drivers'.

2. glovePIE, a free Programmable Input Emulator. it converts input from HID (Human Interface Devices) like mouse, keyboard, P5 data glove, wii controllers (also classic, balanceboard, wiitar etc.), xbox and playstation controllers (playstation > don't buy them for this! you'll not be able to use them wireless).
[url]carl.kenner.googlepages.com/glovepie_download[/url]

3. midiYoke for virtual MIDI I/O.
http://www.midiox.com/index.htm?http://www.midiox.com/myoke.htm

- setup a script -
.. in which you route the input from your controller to midiYoke1 Out.

the initial script that reeled me in was this, thanks to Kid Quaalude:
Code:
/*==============================================================================
Simple Wiimote to MIDI Script by Kid Quaalude
---------------------------------------------
link
KidQuaalude AT gmail.com
==============================================================================*/
/*==============================================================================
Note :
This script has some performance problems when using the nunchuk or classic
controller. The result is some note-ons may be lost. Hit the wiimote 'home'
button to disable CC processing if this occurs. Hopefully this problem will be
resolved in a future release of GlovePIE.
==============================================================================*/

//initialise (this 'if' part useful for code you only need to run once)
if (var.Init = 0) then

midi.DeviceOut = 0; // default midi device
midi.DefaultChannel = 1; //midi channel
Wiimote1.Leds = 9; //set 1 and 4 leds
var.CCEnabled = true; //ccs enabled?
var.Prog1 = 1; //instrument number
var.Init = 1; // initialised (do not run again)

end if

/*==============================================================================
Wiimote #1
==============================================================================*/

/*==============================================================================
CCs
==============================================================================*/

//only if ccs enabled
if (var.CCEnabled) then

midi.Control10=(EnsureMapRange(Wiimote1.gx,1,-1,0,1))
//decrease y sensitivity
midi.Control11=(EnsureMapRange(Wiimote1.gy,1,0,0,1))
midi.Control12=(EnsureMapRange(Wiimote1.gz, 1,-1,0,1))

if (Wiimote1.HasNunchuk) then
midi.Control20=(EnsureMapRange(Wiimote1.Nunchuk.gx,1,-1,0,1));
//decrease y sensitivity
midi.Control21=(EnsureMapRange(Wiimote1.Nunchuk.gy,1,0,0,1));
midi.Control22=(EnsureMapRange(Wiimote1.Nunchuk.gz,1,-1,0,1));
midi.Control23=(EnsureMapRange(Wiimote1.Nunchuk.JoyX,-1,1,0,1));
midi.Control24=(EnsureMapRange(Wiimote1.Nunchuk.JoyY,1,-1,0,1));
end if

if (Wiimote1.HasClassic) then
midi.Control20=(EnsureMapRange(Wiimote1.Classic.Joy1X,-1,1,0,1));
midi.Control21=(EnsureMapRange(Wiimote1.Classic.Joy1Y,1,-1,0,1));
midi.Control22=(EnsureMapRange(Wiimote1.Classic.Joy2X,-1,1,0,1));
midi.Control23=(EnsureMapRange(Wiimote1.Classic.Joy2Y,1,-1,0,1));
end if

end if

/*==============================================================================
Midi Notes
==============================================================================*/

if Wiimote1.A then
//fix for multiple note-ons
if (not midi.C3) then
midi.C3 = true;
end if
else
midi.C3 = false;
end if

if Wiimote1.B then
//fix for multiple note-ons
if (not midi.D3) then
midi.D3 = true;
end if
else
midi.D3 = false;
end if

if Wiimote1.Up then
//fix for multiple note-ons
if (not midi.E3) then
midi.E3 = true;
end if
else
midi.E3 = false;
end if

if Wiimote1.Down then
//fix for multiple note-ons
if (not midi.F3) then
midi.F3 = true;
end if
else
midi.F3 = false;
end if

if Wiimote1.Left then
//fix for multiple note-ons
if (not midi.G3) then
midi.G3 = true;
end if
else
midi.G3 = false;
end if

if Wiimote1.Right then
//fix for multiple note-ons
if (not midi.A3) then
midi.A3 = true;
end if
else
midi.A3 = false;
end if

if Wiimote1.One then
//fix for multiple note-ons
if (not midi.B3) then
midi.B3 = true;
end if
else
midi.B3 = false;
end if

if Wiimote1.Two then
//fix for multiple note-ons
if (not midi.C4) then
midi.C4 = true;
end if
else
midi.C4 = false;
end if


//if classic controller connected
if (Wiimote1.HasClassic) then

if Wiimote1.Classic.a then
//fix for multiple note-ons
if (not midi.D4) then
midi.D4 = true;
end if
else
midi.D4 = false;
end if

if Wiimote1.Classic.b then
//fix for multiple note-ons
if (not midi.E4) then
midi.E4 = true;
end if
else
midi.E4 = false;
end if

if Wiimote1.Classic.x then
//fix for multiple note-ons
if (not midi.F4) then
midi.F4 = true;
end if
else
midi.F4 = false;
end if

if Wiimote1.Classic.y then
//fix for multiple note-ons
if (not midi.G4) then
midi.G4 = true;
end if
else
midi.G4 = false;
end if

if Wiimote1.Classic.Up then
//fix for multiple note-ons
if (not midi.A4) then
midi.A4 = true;
end if
else
midi.A4 = false;
end if

if Wiimote1.Classic.Down then
//fix for multiple note-ons
if (not midi.B4) then
midi.B4 = true;
end if
else
midi.B4 = false;
end if

if Wiimote1.Classic.Left then
//fix for multiple note-ons
if (not midi.C5) then
midi.C5 = true;
end if
else
midi.C5 = false;
end if

if Wiimote1.Classic.Right then
//fix for multiple note-ons
if (not midi.D5) then
midi.D5 = true;
end if
else
midi.D5 = false;
end if

if Wiimote1.Classic.LFull then
//fix for multiple note-ons
if (not midi.E5) then
midi.E5 = true;
end if
else
midi.E5 = false;
end if

if Wiimote1.Classic.RFull then
//fix for multiple note-ons
if (not midi.F5) then
midi.F5 = true;
end if
else
midi.F5 = false;
end if

if Wiimote1.Classic.ZR then
//fix for multiple note-ons
if (not midi.G5) then
midi.G5 = true;
end if
else
midi.G5 = false;
end if

if Wiimote1.Classic.ZL then
//fix for multiple note-ons
if (not midi.A5) then
midi.A5 = true;
end if
else
midi.A5 = false;
end if

if Wiimote1.Classic.Minus then
//fix for multiple note-ons
if (not midi.B5) then
midi.B5 = true;
end if
else
midi.B5 = false;
end if

if Wiimote1.Classic.Home then
//fix for multiple note-ons
if (not midi.C6) then
midi.C6 = true;
end if
else
midi.C6 = false;
end if

if Wiimote1.Classic.Plus then
//fix for multiple note-ons
if (not midi.D6) then
midi.D6 = true;
end if
else
midi.D6 = false;
end if

wait 30ms; //poll at less regular intervals

end if

//if nunchuck controller connected
if (Wiimote1.HasNunchuk) then
//remmed due to this method causing multiple note-ons on button press
//midi.G4 = Wiimote1.Nunchuk.CButton;
//midi.A4 = Wiimote1.Nunchuk.ZButton;
if Wiimote1.Nunchuk.CButton then
//fix for multiple note-ons
if (not midi.D4) then
midi.D4 = true;
end if
else
midi.D4 = false;
end if

if Wiimote1.Nunchuk.ZButton then
//fix for multiple note-ons
if (not midi.E4) then
midi.E4 = true;
end if
else
midi.E4 = false;
end if

wait 30ms; //poll at less regular intervals

end if



/*==============================================================================
Custom
==============================================================================*/

//
if (Wiimote1.Home) then
//switch
var.CCEnabled = not var.CCEnabled;

//show which mode we are in
if (var.CCEnabled) then
Wiimote1.Leds = 9; //set 1 and 4 leds
else
Wiimote1.Leds = 6; //set 2 and 3 leds
end if

//stop multiple calls while button held
wait 250ms;
end if

//program change
if Wiimote1.Plus then
if var.Prog1 < 128 then
var.Prog1 = var.Prog1 + 1;
midi.Instrument = var.Prog1;
wait 150ms;
end if
end if
if Wiimote1.Minus then
if var.Prog1 > 1 then
var.Prog1 = var.Prog1 - 1;
midi.Instrument = var.Prog1;
wait 150ms;
end if
end if

//display program
debug = "Program : " & var.Prog1


glovePIE is sparse on grouped handling of I/O events, so, you're going to wind up with a lot of copy and paste depoinding on what you do. it is actually really helpful to read mr. kenner's documentation.

- setup buzz to receive midi input -

Cool http://xlutop.com/buzz/ (especially http://xlutop.com/buzz/pvstdocs/main.html#33 )

have fun! Very Happy
_________________
www.groovelastig.de/ - www.groovelastig.de/blog - www.myspace.com/groovelastig - www.last.fm/music/groovelastig - www.twitter.com/groovelastig - www.myspace.com/betaRavR
Back to top
View user's profile Send private message Visit poster's website
sparschäler
Priest


Joined: 31 Aug 2004
Posts: 224
Location: zurich, switzerland

PostPosted: Thursday May 28th, 2009 22:03    Post subject: Reply with quote

ah, that's YOU in this vid! grrreeat!
_________________
You're just jealous because the voices only talk to me.
Back to top
View user's profile Send private message
JoaCHIP
Galileo Galilei


Joined: 12 Aug 2004
Posts: 334

PostPosted: Thursday May 28th, 2009 22:27    Post subject: Awesome. Reply with quote

Hahahaha god dammit, you beat me to it! LOL

That is fucking great. But thanks for posting the script. Those are a bitch to figure out yourself.
_________________
www.robotplanet.dk/audio/ | www.makemusic.net
Back to top
View user's profile Send private message Visit poster's website
szaszhareen
Priest


Joined: 22 Jul 2008
Posts: 193
Location: deep beneath the earth's crust

PostPosted: Tuesday June 2nd, 2009 5:44    Post subject: Reply with quote

definitely the COOLEST THING I HAVE EVER SEEN EVER!!!!!!11 and i though hacking a wii with homebrew was the shit. u just owned me hard man.
_________________
Miyata was supposed to meet me in Ginza the evening he died. He went to Waga's house after he left the theater. I assumed that he was shut up in that oval shaped studio and subjected to weird electronic music which caused psychological confusion...
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    buzzchurch.com Forum Index -> The Altar All times are GMT + 1 Hour
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, 2002 phpBB Group