Re: [chuck-users] Bluetooth and Wiimote: a long-term feature request
Thanks for the responses. I appreciate your thoughts, but have a different plan in mind. I am not going to do the tracking with the IR camera of the Wiimote, but rather with the 3-axis accelerometer inside the Wiimote. Normally one would use two 3-axis accelerometers and some signal processing to get a full 6-DOF (Degree Of Freedom) tracker, but there is a simple trick that uses only one. What you do is you obtain pitch, roll, and yaw from the gravity vector, or low-pass-filtered component, and the X, Y, and Z from the dynamic acceleration, or high-pass-filtered component. It isn't perfect but it does save you a sensor. Although it is possible to use OSC to get at a Bluetooth HID sensor, that sounds a bit over my head and would require a lot of effort and knowledge. It would be simpler to build a custom USB accelerometer using the Ultimark A-PAC Version 2 USB interface and one or two ADXL330Z accelerometers, on breakout boards from SparkFun Electronics. On the bright side, while exchanging posts with Kassen on the forum, we both separately noticed that there is a trend in the gaming industry, and we are expecting many new 3D mice and joysticks that are based on the now-inexpensive 3-axis accelerometer chips that are available from a few manufacturers. Kassen identified one for only $20 that hooks up to USB, looks like a joystick, and detects pitch, roll, and yaw. That's today, and in a few months there should be many to choose from. So my game plan is to wait a little while. Cash-wise, I am broke any way due to a massive car repair, so this will be a nice exercise in patience and careful planning, lol. What am I planning to do with a guitar tracker? Why, lots of stuff! I'm sure you can imagine the many things that could be done, and here are some of them. 1. Add increasing amounts of negative feedback as the guitar is pointed down to the ground, and positive feedback as it is pointed up to the sky. 2. Add reverb as the guitar is rotated toward the audience and echo as it is rotated back away from the audience. 3. Vary the feedback delay duration according to the player's leaning forward or back. That does something with all three orientation axes of pitch, roll, and yaw. Now that we've got the performer gyrating around on stage like Angus Young of AC/DC to access all of the tonal possibilities, let's deal with walking around on stage. If the player walks back to center, rear of the stage where the drummer would normally be in a typical rock band setup, the computer recognizes this and substitutes drums for the guitar notes that are being played. This is done with an FFT and a peak tracker, set up so that new fundamental frequencies trigger synthesized drum beats as they arise. The player may then record a drum loop by smacking the guitar, playing the loop, and smacking the guitar again. Now that drums are playing, the player walks to stage front, right where the bass guitar would normally be and ChucK's pitch shifter kicks in, making the six-string sound like a bass. Executing the same looping trick, the player initiates a repeating bass guitar riff. Now moving to stage front, left or stage front, center the player can then play the lead guitar part of the song as well as sing. To add to the tricks, singing in stage front, left creates a talk-box or vocoder type effect for those "Mr. Roboto" moments! that w e all enjoy. Finally, when the player jerks back on the guitar creating a gun-recoil motion as if something just shot out of the headstock of the guitar, that tells the computer to switch between modes. Planned modes are "normal", "thunderstorm", and "war". In these modes, the guitar plays through but each new note initiates a ChucK-based sound effect such as thunder or rain, else bombs, machine guns, and explosives. I'd like to pretend I'm Angus Young playing "Thunderstuck" with real thunderstorm sounds under guitar control. The angular and positional features previously described are available in all modes. Also, I should probably mention that my secret motivation for doing this is to create some kind of exercise machine that I will actually use. If I need to bend over or walk around to achieve various guitar effects, I'll probably actually do it and get a mild workout. Then I will become a leaner, meaner, guitar-playing ChucKist, or so I hope. Do you have any other wild ideas for what to do with an instrument tracker? As always, I welcome your comments and suggestions. "Forget all about that macho stuff and learn how to ChucK guitar!" Les (Inventor) p.s. I sent an email to Fender, the famous guitar manufacturer, suggesting the above. Who knows, maybe they'll make a guitar tracker product for us to enjoy.
On 17/04/2008, Inventor-66@comcast.net
What you do is you obtain pitch, roll, and yaw from the gravity vector, or low-pass-filtered component, and the X, Y, and Z from the dynamic acceleration, or high-pass-filtered component. It isn't perfect but it does save you a sensor.
I would personally be greatly in favour of a 12db state-variable filter for ChucK with some sort of method to get HP, BP and LP as separate outputs. Maybe following the system set by Pan2 to ChucK multiple outputs to various Ugens? Do beware of noise from cheap sensors as that will wreck your plan, if my new joypad is any indication.
On the bright side, while exchanging posts with Kassen on the forum, we both separately noticed that there is a trend in the gaming industry, and we are expecting many new 3D mice and joysticks that are based on the now-inexpensive 3-axis accelerometer chips that are available from a few manufacturers.
My personal favourite philosopher Sun Tzu made some commentary about it not being hard to hear thunder. This is generally taken to mean that one should by all means do so but that it's typically a thank-less job :¬) (I warmly recommend Samuel Griffith's translation and steering clear of the more fashionable commentary's) And thanks.
p.s. I sent an email to Fender, the famous guitar manufacturer, suggesting the above. Who knows, maybe they'll make a guitar tracker product for us to enjoy.
Weren't they also somehow involved with Guitar Hero? Or was that Gibson? GH, BTW, also uses a tilt-sensor and according to my own research (to use a euphemism) tends to result in a rather active engagement as well. Sadly GH controllers are quite expensive for a few buttons and a tilt-sensor and are a bit small especially if the performer would be -say- 2 meters tall. Good plans, do keep it up! Kas.
Although it is possible to use OSC to get at a Bluetooth HID sensor, that sounds a bit over my head and would require a lot of effort and knowledge. It would be simpler to build a custom USB accelerometer using the Ultimark A-PAC Version 2 USB interface and one or two ADXL330Z accelerometers, on breakout boards from SparkFun Electronics.
Actually, I tried sending Midi from Osculator (osculator.net) once (using my wiimote to control the pitch of a Nord Modular), and that wasn't very hard at all. For me at least, it is several orders of magnitude easier than the hardware stuff you suggest :) And since the site says Osculator supports OSC forwarding (gotta try that out later), and receiving OSC messages in ChucK is a breeze, that should be worth checking out. That is, if you use a Mac :/ /Stefan -- Release me, insect, or I will destroy the Cosmos!
glovepie seems to be a popular choice for Windows; as long as you're not in
a military base or Isreal... Using that to produce OSC is probably the most
straightforward method currently.
A friend of mine has related plans for using Wii to augment his Cello
playing. Wii -> synth silliness from him:
http://www.youtube.com/watch?v=jfM4vkc8dys
On Fri, Apr 18, 2008 at 8:21 AM, Stefan Blixt
Although it is possible to use OSC to get at a Bluetooth HID sensor, that sounds a bit over my head and would require a lot of effort and knowledge. It would be simpler to build a custom USB accelerometer using the Ultimark A-PAC Version 2 USB interface and one or two ADXL330Z accelerometers, on breakout boards from SparkFun Electronics.
Actually, I tried sending Midi from Osculator (osculator.net) once (using my wiimote to control the pitch of a Nord Modular), and that wasn't very hard at all. For me at least, it is several orders of magnitude easier than the hardware stuff you suggest :) And since the site says Osculator supports OSC forwarding (gotta try that out later), and receiving OSC messages in ChucK is a breeze, that should be worth checking out. That is, if you use a Mac :/
/Stefan
-- Release me, insect, or I will destroy the Cosmos! _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Back to the old thread.. I would be interested in a more precise description of that simple trick actually... or is there a paper or some reading ??? How do you calculate the exact x-y-z position from that ?? Thanks Luigi Am 17.04.2008 um 22:52 schrieb Inventor-66@comcast.net:
Normally one would use two 3-axis accelerometers and some signal processing to get a full 6-DOF (Degree Of Freedom) tracker, but there is a simple trick that uses only one. What you do is you obtain pitch, roll, and yaw from the gravity vector, or low-pass- filtered component, and the X, Y, and Z from the dynamic acceleration, or high-pass-filtered component. It isn't perfect but it does save you a sensor
---------------------------------------<
Luigi Rensinghoff luigi.rensinghoff@freenet.de skype:gigischinke ichat:gigicarlo
Yeah me too. It would be interesting to see how you calculate orientation by using two accelerometers as well. Having messed around a little bit (but not that much) with accelerometers, I get the feeling that you would need some kind of gyroscope to make this work perfectly. For instance, how do you differ the case when you're holding the item upside down, from the case where you're pushing the item towards the floor at twice the acceleration of gravity (1G - 2G = -1G)? OK a gyroscope might not solve that either :/ /Stefan On Mon, Apr 21, 2008 at 3:13 PM, Luigi Rensinghoff < luigi.rensinghoff@freenet.de> wrote:
Back to the old thread.. I would be interested in a more precise description of that simple trick actually...
or is there a paper or some reading ???
How do you calculate the exact x-y-z position from that ??
Thanks
Luigi
Am 17.04.2008 um 22:52 schrieb Inventor-66@comcast.net:
Normally one would use two 3-axis accelerometers and some signal processing to get a full 6-DOF (Degree Of Freedom) tracker, but there is a simple trick that uses only one. What you do is you obtain pitch, roll, and yaw from the gravity vector, or low-pass-filtered component, and the X, Y, and Z from the dynamic acceleration, or high-pass-filtered component. It isn't perfect but it does save you a sensor
---------------------------------------<
Luigi Rensinghoff luigi.rensinghoff@freenet.de skype:gigischinke ichat:gigicarlo
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Release me, insect, or I will destroy the Cosmos!
On 21/04/2008, Luigi Rensinghoff
Back to the old thread.. I would be interested in a more precise description of that simple trick actually...
or is there a paper or some reading ???
I used to have a print-out of a old paper describing how a state-variable filter with separate outputs for HP, BP and LP could emulate a moving spring with attached mass, getting the position from one output, the movement from another and so on. Basically the same phenomenon and that might help you search? Yours, Kas.
Am 21.04.2008 um 17:33 schrieb Kassen:
On 21/04/2008, Luigi Rensinghoff
wrote: Back to the old thread.. I would be interested in a more precise description of that simple trick actually...
or is there a paper or some reading ???
I used to have a print-out of a old paper describing how a state- variable filter with separate outputs for HP, BP and LP could emulate a moving spring with attached mass, getting the position from one output, the movement from another and so on.
Basically the same phenomenon and that might help you search?
nope..sorry....
Yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
---------------------------------------<
Luigi Rensinghoff luigi.rensinghoff@freenet.de skype:gigischinke ichat:gigicarlo
On 21/04/2008, Luigi Rensinghoff
nope..sorry....
Hmmm, I couldn't quickly find a good one either. The trick is that if we have some signal representing a "position" then the first derivative will be "movement". If we sense the gravity acting on the Wiimote as it's "position" (orientation, in this case) then any changes in that will represent the forces acting on the Wiimote. For one thing; it's clear the thing won't move unless some force is acting on it, right? Ok, I'm not the greatest digital filter wizzard but if we have this signal and pull it through a SVF we know for sure that the DC component of the signal and other very low ones (representing the orientation of the object at rest) will end up on the LP output. Once the orientation starts changing, assuming the change is in the range of the filter's frequency, this will make the change in the value appear in some way on the other outputs. Where it gets hazy for me too is how that results in the derivative and that's where I hope somebody like Perry will help us but that's the rough outline of how I understand it works. Admittedly a vague outline in dimly-lit smoke but filters are hard stuff (at least for me). Maybe I can re-find that printout I had. Apologies to the real filter wizards around here that are no doubt gnashing their teeth in frustration at this crude explanation :¬). Kas.
participants (5)
-
Inventor-66@comcast.net
-
Kassen
-
Luigi Rensinghoff
-
Peter Todd
-
Stefan Blixt