wiiconnectInstrument Control:Sensing and Controlwiiconnectwiiconnect
Reads data from a number of external Nintendo Wiimote controllers.
DescriptionPlugin opcode in wiimote. This opcode is part of the plugin repository and has to be installed separately.
The plugin repository can be found here: https://github.com/csound/plugins
Opens and at control-rate polls up to four external Nintendo Wiimote controllers.
Syntaxires wiiconnect [itimeout, imaxnum]Initializationitimeout -- integer number of seconds the
system should wait for all Wiimotes to be connected. If not
given it defaults to 10 seconds.
imaxnum -- maximum number of Wiimotes to locate. If not
given it defaults to 4.
Initially each Wiimote has its numeric allocation indicated by
lighting one of the four LEDs.
ires -- return value is 1 if sucess or zero
on failure.
Performance
Please note that these opcodes are currently only supported on
Linux.
Every control cycle each Wiimote is polled for its status and
position. These values are read by
the wiidata opcode. The result returned is
1 in most cases, but will be zero if a Wiimote disconnects,
Example
Here is an example of the wii opcodes. It uses the file wii.csd.
Example of the wii opcodes.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See Alsonon-MIDI DevicesCreditsAuthor: &namejohn;Codemist Ltd2009New in version 5.11