Forums > MaxMSP

Bicycle as a Max/MSP interactive controller

December 2, 2006 | 2:40 pm

Hi all,

I am currently undertaking a project whereby I am converting a normal bicycle into an interactive controller for a Max/MSP piece. I am going to attach a mouse tachometer to the back wheel to detect the pace the user is peddling at, and will have components on the brake handles (there are 4, as it is a racing bike. They do work in pairs, but I am going to make it so they move independantly). 3 of the brakes will be used as controllers for an aspect of the music (currently unsure what) ands the other will remain in use on the back wheel, meaning the user can slow down the wheel RPM, and therefore the music’s BPM. I’m also hoping to attach a potentiometer to the front wheel via a belt so that I can use the tilting of the handlebar as a control device too. These components will be fed into Max/MSP using an Arduino board (www.arduino.cc).

So that’s the plan for the physical aspect of the piece. But as far as the music goes, I am a little more unsure. If anyone has any ideas or suggestions I’d be happy to hear them. Also, if you have any ideas about the physical setup I have described, I’ll hapilly read your comments or suggestions for that, too.

PS. The back wheel is intended to be raised, so that the bike is static.

Many thanks.


December 2, 2006 | 4:29 pm

Hi,

As for the hardware part I once made a virtual environment in which a cycler had to properly engage in traffic problems. The user was placed on a bicycle and actually drove through a 3D world. To do this I used a Tacx virtual trainer device, that reports a lot of information and also provides force feedback. Have a look at

http://www.tacx.com/producten.php?language=EN&lvlMain=16&lvlSub=57&ttop=Cycletrainers

Btw I wrote a new driver to communicate with the device via usb and output the data in OSC format. If you’d like to have the source of that, let me know.

Cheers,
Mattijs


December 2, 2006 | 4:31 pm

We did exactly that about 5 years ago, which was before I had discovered Max/MSP; I had to program everything myself. The brakes and gear-shift levers were set up to be contacts (triggering note-on events) and I added a circuit to a normal bicycle-generator to get a 0-5v CV signal which was converted to controllers and pitch-bend. Back then, we used Doepfer equipment, now I use a Crumb-Board (which is connected wirelessly to the computer; a big improvement.) The music? Sample-loops triggered and stopped by the contact-switches and modified by the controllers and pitch-bend. If you succeed with the tachometer, you could easily control the BPM and add that element if the music is sequencer-driven.


December 3, 2006 | 12:49 pm

On 2-Dec-2006, at 14:40, Stuart Penman wrote:

> But as far as the music goes, I am a little more unsure.

Motives from "Bicycle Built for Two", "The Pushbike Song", Queen, …

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


December 3, 2006 | 1:18 pm

Quote: Peter Castine wrote on Sun, 03 December 2006 13:49
—————————————————-
> On 2-Dec-2006, at 14:40, Stuart Penman wrote:
>
> > But as far as the music goes, I am a little more unsure.
>
> Motives from "Bicycle Built for Two", "The Pushbike Song", Queen, …

LOL..


December 3, 2006 | 2:21 pm

Hi Mattijs,

The whole idea of having a cvyclist trying to negotiate traffic problems is a good one. I did consider having some kind of 3D world projected infront of the cyclist, and then give them the choice of whether or not to follow that path or go off on an abstract journey of their own. The Tacx cycle trainer is exactly what I’m looking for really, it’s ben surprisingly difficult to figure out how to raise the back wheel whilst not blocking any access to the peddles or the chain/gears. Only thing is, I am doing this for a uni project and am concerned about the cost of these devices, as well as the fact that my project seems to be expanding day-by-day, I have to make sure I can do it all in time (as well as all my other projects, too). As such I think I might have to give the Tacx a miss for this project, but will consider adding it after the project has actually been completed for uni. Thanks for the offer of the driver, if I get around to doing the projector with the Tacx then I’ll let you know. Many thanks.


December 3, 2006 | 2:33 pm

Hi Dayton,

Doing a project like that without Max/MSP must have been a real hassle. Mind you, even with max it is proving to be a bit of a hassle for me. lol. I like the idea of the brake handles triggering and manipulating samples. It made me think I could also use the brakes in conjunction with granular synthesis, using one brake to add a stream, and another to remove a stream. The pitch-bend aspect I was thinking of controlling with the steering mechanism, but I was considering using the peddles to control the sample play-back rate, which in turn would affect the pitch of the sample, but it would be possible to control both the play-back rate and the transposition using the gizmo~ object. I have done this in a previous project and it worked quite nicely. You are able to transpose in real-time without affecting the formants of the sound. I hadn’t considered the possibility of using the peddles to drive a sequencer, that’s a good idea. Thanks for getting in touch!


December 3, 2006 | 5:30 pm

I didn’t think about using the steering-wheel as a controller; I might add that the next time we do the piece. The generator (actually an alternator) to CV turned out to be a great effect because it responds to the speed of the wheel and not the pedal-revolutions, making shifting allow a different way of manipulating the data. As for raising the bike off the ground, any stationary trainer (the kind that use fans or magnets to create friction and are like a small pair of triangles whose peaks support the rear axle) should do the trick, and are relatively inexpensive.
In other pieces, I use gizmo quite alot, usually three or four at the same time in order to create harmonies. In the bicycle piece (called "Der Komet") it proved more interesting to use normal pitch-bend (besides the fact that for the premier I had no access to fft-routines) because the samples being controlled are texts, and speeding up and down the flow of words can be quite comical.
In the work I do, I use contrasting and conflicting time-lines which often change their tempo, so it isn’t necessary to maintain synchronization or to keep a constant (danceable) beat. In all of the workshops I’ve given, however, the participants are mostly interested in just that; to create and manipulate danceable beats. For this, gizmo is a great tool, as well as .rcy, .rx2 and .rex files. Take a look at the ModSquadRedux patch in the example folder; it also offers a rex-file sort of approach to modifying samples. Other than that, I usually use controllers to drive flanger-type (filter modulation) effects or delay-effects in order to create accents which the performer (in your case the cyclist) can intuitively steer from the stage.

Good luck!


December 3, 2006 | 5:30 pm

I didn’t think about using the steering-wheel as a controller; I might add that the next time we do the piece. The generator (actually an alternator) to CV turned out to be a great effect because it responds to the speed of the wheel and not the pedal-revolutions, making shifting allow a different way of manipulating the data. As for raising the bike off the ground, any stationary trainer (the kind that use fans or magnets to create friction and are like a small pair of triangles whose peaks support the rear axle) should do the trick, and are relatively inexpensive.
In other pieces, I use gizmo quite alot, usually three or four at the same time in order to create harmonies. In the bicycle piece (called "Der Komet") it proved more interesting to use normal pitch-bend (besides the fact that for the premier I had no access to fft-routines) because the samples being controlled are texts, and speeding up and down the flow of words can be quite comical.
In the work I do, I use contrasting and conflicting time-lines which often change their tempo, so it isn’t necessary to maintain synchronization or to keep a constant (danceable) beat. In all of the workshops I’ve given, however, the participants are mostly interested in just that; to create and manipulate danceable beats. For this, gizmo is a great tool, as well as .rcy, .rx2 and .rex files. Take a look at the ModSquadRedux patch in the example folder; it also offers a rex-file sort of approach to modifying samples. Other than that, I usually use controllers to drive flanger-type (filter modulation) effects or delay-effects in order to create accents which the performer (in your case the cyclist) can intuitively steer from the stage.

Good luck!



PQE
December 4, 2006 | 6:40 pm

I did some pieces like this in the 80s using analog technology and an exercise bicycle. The bike itself is a great source of sounds, from contact mics attached to the frame in various places, including playing cards brushing the spokes and a bell on the handlebar.
pqe


December 4, 2006 | 6:42 pm

Hi. I’m not really looking to create danceable beats. I’m aiming to create more of an atmospheric soundscape to which different electro-acoustic textures and timbres are added as the user/cyclist uses the bike interface. It would be nice to create something a bit musically avant-garde and have it be controlled by something as common as cycling a bicycle. I’m aiming to do this in a similar way to the one you described:

"I usually use controllers to drive flanger-type (filter modulation) effects or delay-effects in order to create accents which the performer (in your case the cyclist) can intuitively steer from the stage."

I think that sounds cool. I’m a fan of delay effects and am planning on including them. I’ll have to check out the ModSquadRedux and se what that is like too, though.

Cheers


December 4, 2006 | 6:50 pm

80′s analog technology would be nice right now! Would save me doing all of the A/D convertion. Was planning on using a mouse tachometer, dismantling it and placing the Y axis on the bike wheel. However, Max/MSP will only allow movement of the mouse within the boundaries of the computer screen, meaning the bike could only be cycled for a really short time. Back to the dynamo idea now!

Contact mics are a nice idea. The bike I’m using has quite a noisey chain on it, and this could sound very good if it were played back at a really slow rate and run through delay and or reverb, accenting the clunks of the chain. I haven’t got any contact mics, so I’ll have to make do with a Shure C606 strapped to the bike frame for now. This bike will look rediculous by the time if finished with it! lol


December 4, 2006 | 8:41 pm

If you’re on osx, you could use object ‘hi’ to get mouse relative movements
and ignore cursor position.

> using a mouse tachometer, dismantling it and placing the Y axis on the
> bike wheel. However, Max/MSP will only allow
> movement of the mouse within the boundaries of the computer screen,
> meaning the bike could only be cycled for a


December 4, 2006 | 8:54 pm

Hi nesa,

I’m not on OSX, I’m using Windows XP. I’ve tried using the ‘hi’ object before with little/no success. I know other on XP who suffer the same problem. I managed to get a gamepad to appear in the device menu, but was never able to get an output from it. I’ve just tried seeing if I could find a mouse as a device but nothing is coming up in the menu. This is a shame as your advice sounds like a very good solution to my problem. Does anyone know if this is an XP issue, or how to get around it? Perhaps there’s a 3rd party patch that will do it. I should check out maxobjects.com


December 4, 2006 | 8:58 pm

For that matter, you could just use a typical bicycle tachometer (or more easily, a stick in the spokes which brushes by a switch of the type used on doors) to measure the frequency of revolutions, and connect this to your favorite contact-to-MIDI device or a hacked Joystick. This approach, incidentally, can be used to create your own "endless MIDI controller", which tend to be rather expensive and inflexible. A simple Max-Patch can convert the frequency of a contact-switch operation into the relevant controller data and the only question is the scaling necessary.


December 4, 2006 | 9:21 pm


December 4, 2006 | 10:11 pm

> I’m not on OSX, I’m using Windows XP. I’ve tried using the ‘hi’ object
> before with little/no success.

Yes, you can’t use hi on windows to get data from mouse&keyboard. It’s
entirely XP issue.

But, here’s an old hack that might work: when the mouse cursor reaches the
edges of the desktop, you can set cursor position to center, or opposite
side(sending ‘pupdate’ message to max, checkout annoying patch below)

#P window setfont Geneva 9.;
#P window linecount 1;
#P newex 214 255 79 9961481 pack 320 240;
#P newex 283 229 65 9961481 random 600;
#P newex 214 229 65 9961481 random 800;
#P toggle 214 159 15 0;
#P newex 214 188 62 9961481 metro 1000;
#P window linecount 2;
#P message 214 278 94 9961481 ; max pupdate $1 $2;
#P connect 1 0 3 0;
#P fasten 1 0 4 0 219 221 288 221;
#P connect 4 0 5 1;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P connect 2 0 1 0;
#P window clipboard copycount 6;


December 4, 2006 | 10:28 pm

Wow, that’s cool! I was exploring the mousestate object yesterday trying to see if there was a way to do this. I couldn’t find any way. The only thing I could do was reset the values for the mouse position temporarily, but not move the actual cursor. Just had a quick try of the hack you posted, and it looks promising. It would be easy to create a logic system that sent the cursor to the center of the screen every time it hit the edge of the screen, thus giving me unlimited mousr range. Thanks nesa!


December 4, 2006 | 10:29 pm

Sounds like a cool project. Ever think about honing it and turning it into a video game for kids to use as part of a Physical Education class? There are examples out there that I’m sure are overpriced. They would eat that up…. as would adults, for that matter! (imagine putting custom videos in there too…)

For the tachometer dealie, that mouse hack described below (with pupdate message) seems good. Also you can get inexpensive rotary encoders. Probably a cheapo one with only like 8 or 10 clicks per turn would be best as the rpms will be high. A bit of a trick to read them in time (more java and some speed issues), but the circuitry (and the USB) can certainly keep up. Since the wheel won’t be going backward (or will it?) you’d only need one digital pin, or two if you want backward. You’d get bangs in which could be used for inc/dec or whatever you like.

Yes, rotary encoders are rather rare in MIDI controllers, alas… they solve all parameter-jump issues!

–CJ


December 4, 2006 | 10:36 pm

Hi seejayjames,

Thanks. I hadn’t really considered any use for the bike beyond my project, but there is potential for that kind of use I suppose. Part of the requirement for this course is that I include some Jitter. As yet I haven’t used Jitter so I need to get down to some of that. I thought of attaching a video camera (maybe just a cheap webcam would do) to the handlebars. I could try directing the camera either at the cyclists face or pointing forwards (like a bike light). I could then use the visual data to process the video and link some of the parameters to the audio as well. This is also a possible solution to tracking the movement of the handle bar, rather than using a potentiometer.

I’m not familiar with the rotary encoders, but will look into them as they sound like an interesting possibility. Thanks for the recommendation.


December 4, 2006 | 11:58 pm


December 5, 2006 | 12:17 am

Yeah, I guess if i could get some suitable neodynium magnets or something similar then i’d have a lot more magnetic force then on the cheapy ones I was using previously. I had to check out wikipedia to find out about Hall sensors, they look ideal. The thing that caused me to think of magnets on the wheel originally was the old spedometer i used to have on my bike, which was probably operated in the way you mentioned, though I did not know quite how it worked. Thanks mz, that’s good advice.


December 5, 2006 | 1:50 am


December 5, 2006 | 11:39 am

Hi Dan,

I like the idea of the dashboard, that’s a nice touch. People probably would like to know how far they traveled, and at what speed. By the end of it they’ll be able to tell their friends "I cycled 3.4 Km at an average speed of 19 Kph and made a composition in the process". Classic!


December 5, 2006 | 10:30 pm

It must be something in the air – this in from CDM (createddigitalmusic)

http://createdigitalmusic.com/2006/12/04/music-for-bicycles-ensembles-
symphonies-and-bikelophones/

david


December 6, 2006 | 12:10 am

Nice URL David. Thanks! Those bikes look somewhat more elegant than I imagine mine will look, it’s good to see what could be done with more time though!


Viewing 26 posts - 1 through 26 (of 26 total)