Anthman852's Wii GlovePIE scripts - ...for Guitar and DRUMS!

A collection of helpful posts
This topic is 7 years and 4 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Anthman852's Wii GlovePIE scripts - ...for Guitar and DRUMS!

Postby anthman852 » Mon May 12, 2008 4:20 pm

This will teach you everything you need to know about playing Frets on Fire with your wii controllers.


Before you start anything you are going to need to need a USB bluetooth dongle to connect your wiimote to your computer.

You can find a list of compatible devices on Wiibrew.

Once you have your bluetooth device you will have to connect your wiimote to your computer. To do this install the drivers your dongle came with and follow instructions. :D

The two ways to put your wiimote into discovery mode are:
1: Holding down the 1 and 2 buttons
2: Holding down the red sync button.

If you are still having trouble connecting your wiimote try searching google or youtube.

Once you have your wiimote connected you can move on to the GlovePIE scripts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




GlovePIE scripts

You can download GlovePIE here.

GlovePIE is a Programmable Input Emulator. It works by typing up a script which tells the program to map different motions or buttons on joysticks and irregular controllers to a key on the keyboard.

One thing you may see in some scripts are comments. These are for the person writing the script so he(or she) can show what the different parts in the script do or to just explain how to use the script. Comments are easily spotted because they have "//" in front of them and they are colored purple. Comments do not affect the way the code works at all. The reason I want to tell you this is because when I first saw a GlovePIE code/script I was like "What is with the 'regular' text in the code" and I thought it may mess up the actual code or something, but it doesn't.

So basically are you are going to do is copy everything from inside one of the code boxes into GlovePIE, follow the directions in the code, and hit the Run button. Once the script is running the wiimote buttons will become mapped to the keys they were assigned in the script.

That pretty much covers what you will need to know about GlovePIE. :D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Rednano12's Guitar script for the GH controller on the Wii. I debugged it and added killswitch. :D

Code: Select all

// 2-Player WiiGuitar script for Frets on Fire
// Made by rednano12(edited by anthman852)
// Based off of mdvalenz's scripts on the WiiLi Forums,
// You can change this script to use for Freetar Hero or any other app
// with WiiGuitar

// P1 Settings

// Change your settings to match these
// 1st Pick: Down
// Secondary Pick: Up
// Green Fret: 1
// Red Fret: 2
// Yellow Fret: 3
// Blue Fret: 4
// Purple/Pink/Orange Fret: 5
// Move Left: Left
// Move Right: Right
// Move Up: B
// Move Down: V
// Cancel: Escape
// Jurgen Power (If you have it): Q
// Killswitch: RightAlt

// Strumming
Key.Down = Wiimote1.Classic.Down
Key.Up = Wiimote1.Classic.Up

// Frets
Key.One = Wiimote1.Classic.a
Key.Two = Wiimote1.Classic.b
Key.Three = Wiimote1.Classic.x
Key.Four = Wiimote1.Classic.y
Key.Five = Wiimote1.Classic.ZL

//Analog Stick Controls (for menus)
Key.Left = Wiimote1.Classic.Joy1X <= -20%
Key.Right = Wiimote1.Classic.Joy1X >= 20%
Key.B = Wiimote1.Classic.Joy1Y <= -20%
Key.V = Wiimote1.Classic.Joy1Y >= 20%

//Escape
Key.Escape = Wiimote1.Classic.Plus

//Jurgen Power
Key.Q = Wiimote1.Classic.Minus
if |wiimote1.RelAcc| >= 5 and (not var.jurgen1) then
 var.jurgen1 = true
 press(Q)
 wait 100 ms
 release(Q)
 wait 100 ms
 var.jurgen1 = false
end if

// Home ends the program
Key.Shift+P+I+E = Wiimote1.Home

//Killswitch
Key.RightAlt = (0.52 < Wiimote1.Classic.R < 0.84)


Wiimote1.Leds = 1

// P2 Settings

// Change your settings to match these
// 1st Pick: F9
// Secondary Pick: F10
// Green Fret: F1
// Red Fret: F2
// Yellow Fret: F3
// Blue Fret: F4
// Purple/Pink/Orange Fret: F5
// Move Left: A
// Move Right: D
// Move Up: W
// Move Down: S
// Cancel: F8
// Jurgen Power (If you have it): Right Ctrl
// Killswitch: LeftAlt

// Strumming
Key.F9 = Wiimote2.Classic.Down
Key.F10 = Wiimote2.Classic.Up

// Frets
Key.F1 = Wiimote2.Classic.a
Key.F2 = Wiimote2.Classic.b
Key.F3 = Wiimote2.Classic.x
Key.F4 = Wiimote2.Classic.y
Key.F5 = Wiimote2.Classic.ZL

//Analog Stick Controls (for menus)
Key.A = Wiimote2.Classic.Joy1X <= -20%
Key.D = Wiimote2.Classic.Joy1X >= 20%
Key.W = Wiimote2.Classic.Joy1Y <= -20%
Key.S = Wiimote2.Classic.Joy1Y >= 20%

//Escape
Key.F8 = Wiimote2.Classic.Plus

//Jurgen Power
Key.Z = Wiimote2.Classic.Minus
if |wiimote2.RelAcc| >= 5 and (not var.jurgen2) then
 var.jurgen2 = true
 press(Z)
 wait 100 ms
 release(Z)
 wait 100 ms
 var.jurgen2 = false
end if

//Killswitch
Key.LeftAlt = (0.52 < Wiimote2.Classic.R < 0.84)

Wiimote2.Leds = 2

Key.Shift+P+I+E = Wiimote2.Home


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




My wiimote/nunchuk drum script(instructions in the code)

Code: Select all

  // anthman852's wii drum script for Frets on Fire!
    // Make sure your Nunchuk is connected BEFORE you start the script.
    // If you are not experienced with GlovePie set your keys to the ones below BEFORE you start the GlovePie script
    // If you set your keys correctly then you can start playing as soon as you start the script.


    // Drum Keys:
    // Drum #1 = Q
    // Drum #1 = A
    // Drum #2 = W
    // Drum #2 = S
    // Drum #3 = E
    // Drum #3 = D
    // Drum #4 = R
    // Drum #4 = F
    // Bass Drum = Space Bar

    // ALL OTHER SETTINGS SHOULD BE SET AT THE DEFAULT SETTINGS!!!!
    // This will ensure that your wiimote can conrol the menus and that no key settings are the same.

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // Here is how you will play:

    // To start, the bass drum will be the space bar so you will have to put the keyboard on the ground and step on your keyboard.

    // All the other notes will be activated by a "drum motion" of the wiimote or nunchuk. The wiimote and the nunchuk can each control every drum(expect the bass drum).
    // To change which drum your stick is hitting you have to push a button on that stick to make it change(see below) such as:

    // Wiimote swing = red note
    // B-Button + Wiimote swing = yellow note
    // A-Button + Wiimote swing = blue note
    // A-Button + B-Button + Wiimote swing = Orange note (green in Rock Band)

    // And for the Nunchuk:

    // Nunchuk swing = red note
    // Z-Button + Nunchuk swing = yellow note
    // C-Button + Nunchuk swing = blue note
    // Z-Button + C-Button + Nunchuk swing = Orange note (green in Rock Band)

    // Jurgen Power:
    // Plus button = Jurgen Power (The wiimote will rumble when you activate it)

    // Menus:
    // The d-pad on the wiimote controls the menus
    // Minus-Button = Escape/Cancel/Pause

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



    //~~
    // ^^^^^To ensure everything works properly DO NOT edit anything below this line^^^^^



    var.xOffset = 8
    var.yOffset = -37
    var.zOffset = 12

    var.xRot = Wiimote.RawForceX + var.xOffset
    var.yRot = Wiimote.RawForceY + var.yOffset
    var.zRot = Wiimote.RawForceZ + var.zOffset

    var.Nunchuk = Wiimote1.Nunchuk.RawForceY + var.yOffset

    // Debug
    debug = "X=" + var.xRot + "   Y=" + var.yRot and var.Nunchuk + "   Z=" + var.zRot

    // Wiimote script
    if var.yRot > 30 then
     Q = not(Wiimote.A or Wiimote.B)
     W = Wiimote.B and not (Wiimote.A)
     E = Wiimote.A and not (Wiimote.B)
     R = Wiimote.A and Wiimote.B
    else
    Q = false
    W = false
    E = false
    R = false
    endif

    // Nunchuck script
    if var.Nunchuk > 50 then
    A = not (Wiimote.Nunchuk.ZButton or Wiimote.Nunchuk.CButton)
    S = Wiimote.Nunchuk.ZButton and not (Wiimote.Nunchuk.CButton)
    D = Wiimote.Nunchuk.CButton and not (Wiimote.Nunchuk.ZButton)
    F = Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton
    else
    A = false
    S = false
    D = false
    F = false
    endif

    //Menus
    Key.Up = Wiimote.Up
    Key.Down = Wiimote.Down
    Key.Left = Wiimote.Left
    Key.Right = Wiimote.Right
    Key.Escape = Wiimote.Minus
    Key.Enter = Wiimote.A
    Key.RightControl = Wiimote.Plus

    if Wiimote.Plus then
    Wiimote.Rumble = true
    wait 750 ms
    Wiimote.Rumble = false
    endif

    Wiimote.Led1 = 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Rock Band Guitar fix

This is a fix for the strum issue that the Rock Band guitar has. All other buttons work fine by themselves. All you have to do is plug it in, run this script, and then set the keys in game.

Code: Select all

//Rock Band Guitar Fix by anthman852
//Tested with wii controller and should work with all Rock Band Guitars

Key.Up= Joystick.pov1up
Key.Down = Joystick.pov1down







Please note that the drums will not work with the guitar script. Drums are only for one player at the moment, but I am working on two player.


If I left anything out please tell me. :cool:

Now you can go ROCK OUT!!!
Last edited by anthman852 on Sat Jan 16, 2010 11:34 am, edited 3 times in total.
The Wiitard
User avatar
rednano12
Member
Posts: 1549
Joined: December 22nd, 2007
Location: http://www.youtube.com/watch?v=failedRickRoll
Reputation: 0
Contact:

Postby rednano12 » Mon May 12, 2008 4:55 pm

Awesome/epic man! You rock! I wish I could use GlovePIE and code as well as you!
Oct. 30th is Cama appreciation day!

Check out my first song: Snow (Hey Oh)
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Postby anthman852 » Mon May 12, 2008 5:01 pm

rednano12 wrote:Awesome/epic man! You rock! I wish I could use GlovePIE and code as well as you!

Thanks...maybe I will teach you. :cool:
The Wiitard
User avatar
rednano12
Member
Posts: 1549
Joined: December 22nd, 2007
Location: http://www.youtube.com/watch?v=failedRickRoll
Reputation: 0
Contact:

Postby rednano12 » Mon May 12, 2008 5:08 pm

Lol. I learn very slowly.
Oct. 30th is Cama appreciation day!



Check out my first song: Snow (Hey Oh)
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Postby anthman852 » Fri May 16, 2008 9:52 pm

rednano12 wrote:Lol. I learn very slowly.

we will see about that. :D

I am thinking about making a new GlovePIE script...I was thinking of making a Wiitar which would work by jiggling nunchuk for strumming and pressing buttons on the wiimote for fret buttons. This would only really work for supaeasy players and would just be something to use if you don't have a guitar hero guitar for the wii. Good idea or not??
GIRORTOISE.
User avatar
Inapprope
Member
Posts: 121
Joined: August 15th, 2007
Location: Flintshire, Wales
Reputation: 0
Contact:

Postby Inapprope » Sun May 18, 2008 11:00 am

Awesome! Thanks for the drums script.

About the Wiimote/Nunchuck guitar combo, it's already been done. There's a vid of someone playing Ace Of Spades using the method on YouTube, but I don't think his script includes things like Killswitch etc.
Last edited by Inapprope on Sun May 18, 2008 11:00 am, edited 1 time in total.
Image
The Wiitard
User avatar
rednano12
Member
Posts: 1549
Joined: December 22nd, 2007
Location: http://www.youtube.com/watch?v=failedRickRoll
Reputation: 0
Contact:

Postby rednano12 » Sun May 18, 2008 11:05 am

I've seen that, but anthman is talking about air guitar. That dude's didn't resemble air guitar at all!
Oct. 30th is Cama appreciation day!



Check out my first song: Snow (Hey Oh)
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Postby anthman852 » Sun May 18, 2008 11:07 am

Inapprope wrote:About the Wiimote/Nunchuck guitar combo, it's already been done. There's a vid of someone playing Ace Of Spades using the method on YouTube, but I don't think his script includes things like Killswitch etc.

hmm...I didn't see that before. Anyway you can't get the script on his site anymore so I will make my own. :D
artistic_anarchy
Member
Posts: 6
Joined: May 22nd, 2008
Location: Cali
Reputation: 0

Postby artistic_anarchy » Thu May 22, 2008 4:58 am

Hey guys. I managed to fully sync in my Wii Remote with bluetooth device. There's just one problem. It seems that none of the keys work when I post the code to GlovePIE. I don't know what I'm doing wrong. I've checked the connection and it's on "Good" so I know it's fully connected. Also, the led lights won't stop flashing eventhough it says it's connected. I'm running desperate here...I've also had the problem with the q's coming up out of nowhere. please assist! I'd greatly appreciate it. Thank you.
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Postby anthman852 » Thu May 22, 2008 6:27 am

artistic_anarchy wrote:Hey guys. I managed to fully sync in my Wii Remote with bluetooth device. There's just one problem. It seems that none of the keys work when I post the code to GlovePIE. I don't know what I'm doing wrong. I've checked the connection and it's on "Good" so I know it's fully connected. Also, the led lights won't stop flashing eventhough it says it's connected. I'm running desperate here...I've also had the problem with the q's coming up out of nowhere. please assist! I'd greatly appreciate it. Thank you.

did you click "run" in GlovePIE??
artistic_anarchy
Member
Posts: 6
Joined: May 22nd, 2008
Location: Cali
Reputation: 0

Postby artistic_anarchy » Sat May 24, 2008 4:37 am

Yeah, I did. When I run it, it would just type a bunch of q's when I'd be chatting with a friend in a Private Message. From the other thread before this one, another member also had the same problem and suggested that if you were to delete something from the scrypt where it had 'q' that it'd go away which it did but I still can't get it to get to work on Frets on Fire.
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Postby anthman852 » Sat May 24, 2008 5:55 am

So do the other buttons work?? Have you restarted your computer??
coolguy567
Member
Posts: 417
Joined: February 20th, 2008
Reputation: 0

Postby coolguy567 » Tue May 27, 2008 12:47 pm

I think a better way for the drums would be to have the left two "frets" on the nunchuck controller and the right two on the wiimote. So:

Hold left-most button on nunchuck and flick it to play the left-most fret (not sure what the colours are).
Right-most button on nunchuck + flick = 2nd fret
Left-most and right-most together on nunchuck and flick = 1st and 2nd together
Hold left-most button on wiimote and flick it to play the fret 3
Right-most button on wiimote + flick = 4th fret
Left-most and right-most together on wiimote and flick = 3rd and 4th together

I think this would be more intuitive. It's your script though so you decide.

Spoiler:

OzzyOzrock wrote:
Electro Tomato wrote:
Sealclubber wrote:I believe the proper term for these notes are "EPIC NOTES" due to the fact that they are EPIC!!!!


Memes are so funny hahaha I'm splitting with laughter I can't control this laughter at this meme which uses a word incorrectly oh hahaha

:glare:

That was EPIC.

My songs. All made in EOF, beat-synced and note-synced, not very many missed notes.
Switchfoot - Meant to Live (now with drums)
Delirious? - Investigate (Live)
Awesome Drum Charter
User avatar
anthman852
Member
Posts: 2144
Joined: February 24th, 2008
Location: Ann Arbor, Michigan
Reputation: 0

Postby anthman852 » Tue May 27, 2008 5:46 pm

coolguy567 wrote:I think a better way for the drums would be to have the left two "frets" on the nunchuck controller and the right two on the wiimote. So:

Hold left-most button on nunchuck and flick it to play the left-most fret (not sure what the colours are).
Right-most button on nunchuck + flick = 2nd fret
Left-most and right-most together on nunchuck and flick = 1st and 2nd together
Hold left-most button on wiimote and flick it to play the fret 3
Right-most button on wiimote + flick = 4th fret
Left-most and right-most together on wiimote and flick = 3rd and 4th together

I think this would be more intuitive. It's your script though so you decide.

It is possible to set it up that way...you just have to set your keys differently. :D
Notyu1459
Member
Posts: 105
Joined: December 14th, 2007
Location: Earth
Reputation: 0

Postby Notyu1459 » Sat May 31, 2008 3:19 pm

coolguy567 wrote:I think a better way for the drums would be to have the left two "frets" on the nunchuck controller and the right two on the wiimote. So:

Hold left-most button on nunchuck and flick it to play the left-most fret (not sure what the colours are).
Right-most button on nunchuck + flick = 2nd fret
Left-most and right-most together on nunchuck and flick = 1st and 2nd together
Hold left-most button on wiimote and flick it to play the fret 3
Right-most button on wiimote + flick = 4th fret
Left-most and right-most together on wiimote and flick = 3rd and 4th together

I think this would be more intuitive. It's your script though so you decide.

z=1
=swing nunchuck
c=2

swing both/either one - no button=bass pedal

a=3
=swing wiimote
b=4

something like this i believe?

it could also work for guitar like

z=1
=swing nunchuck
c=2

b=3
=swing wiimote
a=4
dpad down=5
FRETS ON FIRE SHOULD BE 4 PLAYER OR MORE WITH ONLINE PLAY!
I KNOW NOTHING ABOUT PYTHON EXCEPT THAT IT IS A SNAKE!
Frets on Fire lagging?

Return to “Tutorials and Tools”

Who is online

Users browsing this forum: No registered users and 1 guest