Max Wii remote examples

A collection of Wiimote patches

download

https://github.com/tkzic/max-projects

folder: wii

patches:

  • wiimote_read.maxpat
  • wii_vizzie_rotate.maxpat
  • ir5.maxpat
  • wiimote_ir_xy_synth2.maxpat
  • wiimote_pry_synth4.maxpat
  • bicycle speed sensor folder (under construction)
Osculator config file: wii3.oscd

installation (Osculator)

  • Download and install Osculator: http://www.osculator.net
  • Run the Osculator config file: wii3.oscd
  • Pair a Wiimote with Osculator (by pressing the red button)
  • Set Wiimote Osc output port to 9000
Other helpful tips:
  • Use a real Wii remote, not the Nyko. If you do get the Nyko, get the one with motion-plus.
  • update Osculator to the latest version
  • Under parameters (in osculator) press + to add the little pacman symbol labeled “same address”, and set the the OSC URL to whatever you’ll be using like 9000 for Max
  • remember to add the Event type (OSC routing) and value (pacman thing) for every wiimote event you’ll be using
  • remember to enter checkbox on the wiimote window for every type of data you want to send

Wiimote read patch

The patch: wiimote_read.maxpat is a common patch for reading data from Osculator into Max.

Load this patch and keep it running in the background for all of the other patches. You will know if the wiimote is working, if the data in the number boxes responds to movement of the Wiimote.

projects:

vizzie rotation effect

Rotates the video input from built in camera.

patch: wii_vizzie_rotate.maxpat

infra-red (IR) musical light painting

Paint using an IR transmitter.

patch: ir5.maxpat

helpful suggestions:

  • Make sure wii is transmitting raw IR data in Osculator
  • Turn on audio and turn up volume
  • Turn on [qmetro] for jitter

IR xy synth

A synthesizer that responds to IR xy data

patch: wiimote_ir_xy_synth2.maxpat

helpful suggestions:

  • turn on audio
  • turn up volume
  • make an audible adsr envelope by turning up the adsr dials
  • increase lfo rate
  • check the wii-mode updreceive port (should match Osculator output)
  • experiment with the ‘gate’ toggle in the middle of the patch

Pitch, roll, yaw (PRY) synth

A synth that responds to pitch, roll, and yaw data

patch: wiimote_pry_synth4.maxpat

bicycle engine simulation

synthesizes engine sounds based on RPM of bicycle wheel with Wiimote in the spokes

5/2014 : under construction – note – this patch not compatible with wiimote_read

  • waveguide_engine2c-bike.maxpat
  • wheelspeed.maxpat
  • bicycle2.maxpat

need to be running Osculator and tracking PRY stuff from Wii – need to adjust scale in engine patch. Also, select 3rd preset for engine sound.

So basically this setup needs to get standardized – use metro to send a steady stream of wheel data. Use the up to date car engine patch, etc., etc.,

A few problems with this concept – for example when the wheel is stopped the signal rate revs up to over 300  – I think because it rotates backwards for a second. Also when the wheel gets really fast, the pulses just stop!  – its like the wii-mote is overloaded or something? 4/3/2013 – I have it running so it tracks speed when the bicycle is upside down, as long as you don’t crank it too fast. but as mentioned above – the patch could be cleaned up and simplified.

 

 

Using a Wiimote with Osculator in Max

Update 6/2014: The Max patch is available from the max-projects archive: https://reactivemusic.net/?p=11130

original post

I had a difficult day with wiimotes…

Here’s a general purpose Max patch to read Wiimote Osc data from Osculator:

Located in tkzic/max teaching examples/wiimote/wiimote_read.maxpat

<code>
----------begin_max5_patcher----------
1412.3oc2ZsrjahCEcs8WgJVSr06GYWlY0rJUMyxolJEFqzMorAW.ticmJ+6
iPxNF2sMPm1Hn7hz.JXw4dz8w4J3GSmDrHamtH.7Qv+BlL4GSmLwNT0.SNb8
jf0Q6hWEUXusfT82yV7sfP2+UodWoc3O+O+4Gxy1VpAygf4Hvb7waYSTY7iI
oO7kbcbo6Iww7YbNiSUg.DGMCZN.kUGvvYPv+c3WltcsYFWoKsOY5gQ+ZVZY
Qxy5pwPXyOxMr6NK2uQ6dFAAg092ulyjkV3ZLgOfYA0lxzn01eYvmxShVEbB
BIoGQ.pZreNcZ0eBeezUgNcIHIeeCjDBBYyXHjjhL7ByROLRKjDrYRpt0SGb
qeWCVuBo9kKROX7DOX7wYqWqSKek0GEGqWoyiJSxR+HXW39vm6XrBVQswJtC
XQ6LQ9CKrWO6hbi7hbCdfcLhZhNjF+h9Kn.w8fs+0UYl4nq1ncQBHbYGIW0F
wWxFoyDJnRH90iJ2XQk57unSiVrRWmadU5SCJiJqxctHJ8gS4OW7Pb1prb2M
AmoXbAkYbIqfGz3nJ4Jt8xKkwEIFZWqlR3Jv39z0RNz19ttlk41a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gh+Vt5BdPb+4N2kDzUe0o9BOntfGkmCuH
slfl5YD0ZFQOim1Vx33QFAI7GfrOpVcg7nGDsKwXdrhQmxA4uRpJbGvi+RIJ
6R7k+7djcpBleCtZS9ixyA6sk7Qp7KdZ0Y1e544cge3b+hmV62gf7KfZsZAV
4W.0dKpROVfuKEvTiM.I7LdZMH62DOtMEJZylmz4EGlRKTBVG8M2l3wCsWlj
5tzNiA45mRNd+xoUy1Om9+nVZpDJ
-----------end_max5_patcher-----------
</code>

Some tips…

  • Use a real Wii remote, not the Nyko. If you do get the Nyko, get the one with motion-plus.
  • update Osculator to the latest version
  • Under parameters (in osculator) press + to add the little pacman symbol labeled “same address”, and set the the OSC URL to whatever you’ll be using like 9000 for Max
  • remember to add the Event type (OSC routing) and value (pacman thing) for every wiimote event you’ll be using
  • remember to enter checkbox on the wiimote window for every type of data you want to send