MIILKDROP (Wii Milkdrop) 0.1.0 (3/22/08)
Wii-adaptation of Milkdrop visualisation plugin for Winamp
by Davor Magdic, (c) 2008 inDaViz, Inc.
For more info visit inDaViz.com or search for inDaViz on YouTube.
The Latest (and possibly more accurate) version of this document you can find
at indaviz.com/miilkdrop
What is MiilkDrop?
------------------------
Miilkdrop is a visualization program that lets you use two Wii remotes to
create fast, colorful, mind-bending images with a flick of your wrist.
Using Wii remotes to draw images with Miilkdrop is like playing a visual
instrument: the images react to the force and direction of your movements.
Especially so if you hook up a projector to your computer: the feeling of
drawing huge fantastic shapes on a wall instantly by moving your hands is like
being a wizard.
Miilkdrop is used best with some music playing in the background. You can
play the music through your computer, or iPod, or a DJ can be playing it. Then
you move to make the shapes in rhythm with the music.
I don't take credit for the awesomeness of the images drawn. It originally comes
from a program called Milkdrop (one-i), which is a graphical engine for drawing
these images, and hundreds of scripts that tell Milkdrop how to draw images.
These scripts, called "presets", are a unique form of art and Miilkdrop is
luckily able to use many of them with minimal changes or none at all.
For those familiar with the original Milkdrop, I have modified it to turn off all sound
analysis and changed so that presets think they are reacting to music but really
they are reacting to how you moved the Wiimotes.)
Miilkdrop 0.1.0 is just a start; the options for making body-reactive visuals
are endless. But crude as it is now, it still is a lot of fun. You can use it for
performance -- sort of live VJ-ing -- in a club, or in your room: just sit
back, play the music, and make some eye-candy as you go.
Section Listing
-----------------------
1. what you need
2. bluetooth dongle
3. bluetooth setup
4. miilkdrop installation
5. verifying your wiimote bluetooth connection (optional)
6. starting miilkdrop
7. configuring framerate
8. writing wii-specific presets
9. special thanks
9. version history
1. What you need
-----------------------
1. Windows XP or Vista PC or laptop.
2. Two Wii remote controllers.
3. A bluetooth USB "dongle" and bluetooth software. See section
bluetooth below.
4. Winamp music player, any version is fine, even really old ones. Winamp
is there only to run Miilkdrop, but you can use it to play music as well.
Download from winamp.com.
5. (Optional) A DLP projector. There are some relatively cheep ones, under
$600, superbright. They can have low resolution (800x600) and not great
constrast, and still be perfect for Miilkdrop.
2. Bluetooth dongle
-----------------------
Bluetooth setup may be tricky, but it's doable. If you haven't mucked with
bluetooth on PC before, and just want to get Miilkdrop working, the fastest
way would be to get the exact same USB bluetooth I have and follow setup
instructions in a video I made for this purpose. It also helps if you have
Windows XP, but instructions should work with Vista as well.
But many people are playing with Wiimotes on their PCs, so you should have
plenty of good options.
If your laptop or PC is bluetooth enabled, that won't help. You'll still
need to buy a USB bluetooth "dongle" and install software that comes with
it.
There are numerous bluetooth dongles out there, with different software,
and some of them won't work with Wiimotes. (Still, Nintendo didn't design
it for PC, and it's quite amazing that people have figured out how to use
it on a PC. It's great that you can still find many combos that work.)
This web page maintains a list of bluetooth USB dongles known to work with
Wiimotes:
http://www.wiili.org/index.php/Compatible_Bluetooth_Devices.
My own experience has been that I found one that looked good, got it from
Amazon.com, eventually made it work, but then every other time I plugged it
in, Windows was reinstalling some drivers and refused to connect to my
Wiimotes.
Eventually I got another one, a no-name USB dongle that other people have
reported works fine, and it really works well for me too. Only ocasionally
do I have to reboot the laptop to connect. It has worked well on three
different laptops I tried (a Dell, a ThinkPad, and a Vaio, all of them
running Windows XP).
The adapter I got was from Sparkfun Electronics:
http://www.sparkfun.com/commerce/product_info.php?products_id=150.
So I've tried one on my own, didn't work, tried another, that other people
have used successfully, and it did work. I'm sure there are many others
that do work, too.
3. Bluetooth Setup
-----------------------
Connecting two Wiimotes to your Bluetooth software, after you have insterted
the bluetooth dongle, can be easy or frustrating, depending on your luck.
But in general, once you do it a couple of times, you'll get a hang of it
and be able to connect quickly.
I have recorded a youtube video that gives step-by-step instructions, for
bluetooth software that comes with the dongle I mentioned above. To find
the video, go to youtube and search for
indaviz bluetooth
current link is http://youtube.com/watch?v=39ZHo7P6a14
If you use different software, check out
http://www.wiili.org/index.php/HowTo:BlueSoleil
http://www.wiili.org/index.php/How_To:_Widcomm
or search google for
how to connect wiimote pc video
4. Miilkdrop Installation
------------------------------
If you have Winamp, simply run the Miilkdrop installation program.
If you don't have Winamp, install it first and close it before installing
Miilkdrop.
5. Verifying your bluetooth connection (optional)
------------------------------------------------------
The first couple of times you connect your Wiimotes to the PC, you may
not know if the connection is OK.
A fastest way to test it is to find your Winamp directory (usually
c:\Program Files\Winamp, and run (from DOS or double-click on it) a
program called
wiiuseexample.exe
that was added after Miilkdrop installation.
You should see text that looks exactly like this:
wiiuse v0.11 loaded.
By: Michael Laforest
http://wiiuse.net http://wiiuse.sf.net
[INFO] Connected to wiimote [id 1].
[INFO] Connected to wiimote [id 2].
Connected to 2 wiimotes (of 2 found).
--- CONTROLLER STATUS [wiimote id 1] ---
attachment: 0
speaker: 0
ir: 0
leds: 1 0 0 0
battery: 0.475000 %
--- CONTROLLER STATUS [wiimote id 2] ---
attachment: 0
speaker: 0
ir: 0
leds: 0 1 0 0
battery: 0.390000 %
Only if you see text exactly as above (except for battery status) can you
be sure that your Wiimote-PC connection works so far. If you see "Connected
to 2 wiimotes" but no "CONTROLLER STATUS" beneath it, or if you see less
than 2 wiimotes reported, it's no good. In that case, double-check your
Bluetooth connection, or unplug and replug the USB dongle, or reboot your
computer.
Those drastic steps are usually not necessary, I typically do them only
one out of 20 times I connect.
To further be absolutely sure the Wiimotes work and send the data as
they should, press the (+) button on one controller. You should see
a flood of data that looks like this:
--- EVENT [id 1] ---
wiimote roll = 16.598118 [19.093493]
wiimote pitch = 18.376287 [21.277090]
wiimote yaw = 0.000000
--- EVENT [id 1] ---
wiimote roll = 16.662037 [16.850760]
wiimote pitch = 18.956751 [21.277090]
wiimote yaw = 0.000000
--- EVENT [id 1] ---
wiimote roll = 16.245867 [16.212807]
wiimote pitch = 19.490492 [20.498066]
wiimote yaw = 0.000000
... and it changes as you move the controller.
Press the (-) to stop the streaming data. Then repeat the (+) and (-)
procedure with the other controller. Press Ctrl-C to exit the program.
Now that you are absolutely sure your controllers are hooked up correctly,
you can move on to Miilkdrop.
(The procedures I described above are useful for any Wiimote-PC program,
not just Miilkdrop.)
5. Staring Miilkdrop!
-----------------------
Having verified that your two Wiimotes are properly connected to your
PC, you can now finally run the program.
There is a Youtube video describing the procedure, you can see it
if you search youtube for
indaviz startmiilkdrop
current link is http://youtube.com/watch?v=Su2ELRUGMlk
First, run Winamp.
Second, play an MP3 (or a Wav) file. It is necessary for Winamp to be in
"song playing" mode for the visuals to show.
If you want to play music from an iPod or some other source, turn
Winamp volume to zero.
Third, make sure the "repeat song/all" option is selected. You want Winamp
to keep playing the song forever -- even if it's in complete silence --
so that Miilkdrop can run.
Fourth, press Ctrl + Shift + K to activate Miilkdrop.
If you have just installed Miilkdrop, it is set as your default
visualization plugin. If not, you can press Ctrl-K to select Miilkdrop
and then click "Start".
The Miilkdrop has now opened, and it shows a picture resembling a gray
tunnel. You'll also notice the Wiimotes rumbling briefly. That's the sign
they are alive and well.
Now you can start playing:
6. Using the Wiimotes
-----------------------
The first thing to do is press the (+) button on the Wiimote you're holding
in your RIGHT hand.
Then, press the (+) button on the Wiimote you're holding in your LEFT
hand. The last Wiimote to have its (+) button pressed is the LEFT one.
If you shake the Wiimotes, you'll notice that they control the two plasma
balls on the screen, one each.
To switch between different visuals, press the B button on the RIGHT
Wiimote to go to the next visual, and B on the LEFT Wiimote to go to the
previous visual (preset).
Initially the presets are ordered alphabetically. Having them all played
in the same order every time gets old, so you can press the RIGHT button
(1) to shuffle the list. That will put the presets in random order, and
you can still go to the next and the previous one by pressing the B keys,
but you won't know what comes next.
To re-order the list alphabetically, press (1) on the RIGHT. To re-shuffle
the list, in a different order, press (1) on the RIGHT again.
You can use the L key on the keyboard to load a specific preset, or to
change the directory.
You should be able to use any standard Milkdrop preset, but not all will
look good with this. I have hand-picked some 170+ ones and put them in
the top Miilkdrop directory, and a couple hundred more in the "more"
subdirectory.
Other keys you may want to use are:
- RIGHT Wiimote arrows change Wiimotes' sensitivity. 1.00 is normal, that's
the left arrow button (on the right Wiimote controller).
- (-) key turns of acceleration reading from a Wiimote. That saves
battery, but also allows you to have more than two Wiimotes at the time.
So if you have connected 4 wiimotes to your PC, you have used two with
Miilkdrop for a while, and now you want to let your friend play, who is
holding the other two Wiimotes, turn off your Wiimotes by pressing the
(-) buttons and let your friend turn on his or her Wiimotes by pressing
the (+) button on his/hers.
The last Wiimote to have its (+) button pressed will be the LEFT Wiimote.
- Left (1) button adds the name of the current preset to file list1.txt
in the current preset directory; Left (2) button stores the name of the
current preset to file list2.txt.
This is useful if you're picking presets for a song and want to pick
ones you like best, or ones that are good for slow parts of the song
and ones that are good for the fast parts and so on.
- Get the help on Wii buttons by pressing the F1 key on the keyboard.
7. Configuring framerate
-------------------------
Before you start Miilkdrop you can configure the framerate you want it
to try to achieve. By default it's set to "infinite", which will likely
slow down your computer considerably, at the expense of making the fastest
visualizations.
To change the framerate, press Alt+K from Winamp when Miilkdrop is not
active.
8. Writing Wii-specific presets
-------------------------------
Miilkdrop 0.1.0 comes with only one preset that directly reads the Wiimote
readings. All the other presets think they are reading the bass or middle
volume and so on that in reality Miilkdrop has wired to the Wiimote readings.
But the best Miilkdrop presets are yet to be written.
The one that reads Wiimotes directly is called
[] A Wii example -- Zylot - Wisps (Wii remix).milk
Milkdrop preset writes will notice that it uses variables like wii_l_f and
wii_r_x that don't exist in regular Milkdrop presets.
These are the new input variables introduced by Miilkdrop:
wii_l_x -- acceleration on the Left Wiimote X axis (-3.0 .. 3.0)
see http://www.wiili.org/Wiimote to see what X,Y,Z axis on
a Wiimote are
wii_l_y -- acceleration on the Left Wiimote Y axis (-3.0 .. 3.0)
wii_l_z -- acceleration on the Left Wiimote Z axis (-3.0 .. 3.0)
Acceleration for X,Y,Z is "room-reference based" i.e. it's 0
for all X, Y, Z if the Wiimote is not moving. (It subtracts
the gravity component.)
wii_l_f -- the force of the movement along the movement vector of the
Left Wiimote (0.0 .. 6.0). f = sqrt(x^2 + y^2 + z^2). It's 0.0
when there is no movement.
wii_l_g -- same as f, but with gravity component included (0.0 .. 6.0).
It's 1.0 when there is no movement. (In other words, if
gx, gy, gz, are the original accelerometer readings for X,Y,Z,
without the gravity component substracted, then
g = sqrt( gx^2 + gy^2 + gz^2 ).
wii_l_r -- the "roll" value of the left Wiimote angle in radians
(-3.1415 .. 3.1415)
wii_l_p -- the "pitch" value of the left Wiimote angle in radians
(-3.1415 .. 3.1415)
wii_l_b -- indication whether the "A" button on the left wiimote is
pressed (0.0 if not, 1.0 if it is). A preset that reads buttons
could make some nice cool effects when the user presses the
button.
wii_l_m -- indication whether the Wiimote is moving or is still.
(0.0 if still, 1.0 if moving.) In v0.1.0 this value is very
crude.
wii_r_* -- the same, for the Right wiimote
fWiiSensitivity -- (0.1 - 3.0, 1.0 normal, 3.0 high, 0.1 low) If you see
that an unmodified preset is too sensitive or too insensitive
to Wiimote movements, you can set this variable to adjust
the preset's sensitivity.
9. Special thanks
-----------------------
- to Ryan Geiss who wrote this amazing software, the original Milkdrop
- to Nullsoft, makers of Winamp, who made Milkdrop open source
- to Milkdrop preset artists who cooked up some incredible visualizations:
Rovastar, fiShbRaiN, Zylot, and others
- to Michael Laforest who made Wiiuse, a great lightweight C library
for connecting to Wiimotes. Speed is critical for Miilkdrop so Wiiuse
was the perfect choice.
- to Nintendo for designing such a great device and deciding to go with
a standard (Bluetooth)
- to countless people who reverse-engineered the Wiimote protocol
10. Version History
-----------------------
0.1.0 24 March 2008
- first version
return to top