The online racing simulator
"Interactive Auditory Display" - University Assignment
Hi everyone, one of my subjects at Uni is 'Advanced Interactive Media', and what I would like to do for the major project is using a car as an music instrument, okay sounds nuts right? Well let me explain (very briefly though! because I havent actually go right down to the research bits yet, just brain storming).

Okay, instead of using a real car (which would be stupid due to money and time and technical constraints), I thought maybe I can use Live for Speed, which can simulate everypart of a car's movement that I need. Basically the idea is that, each component of the cars movement, such as:

Revs, Gear, Suspension Travel, Wheel Speed, Camber Roll, Angle, Acceleration, Decleration, Speed

will have an effect on certain components of sound, such as pitch, volume, tone

So as a result of driving the car, you can create music! it could be making sounds from scratch, or kind of 'remixing' (excuse the lack of technical words) existing music.


My question is, how feasible is it to do this kind of thing with LFS? I know that these .raf files contains every one of these car movement components I mentioned, but is there a way to generate all this data in real time? So as the user is driving, the sounds could be generated, which gives them instant feedback on how their driving is effecting the music. I have not actually looked into programming in LFS, so any help will be appreciated. Like I said, I am still in prelimenary concepts stage, but if I decide to do this, I'll prob be needing alot more help hehe!

Thanks

William

P.S I will be using Max/Msp to do the actual sound making, incase any of you would like to know.
You can use outsim for that.
thanks, is there somewhere I can find some more information about it? Im willing to do some reading!
Outsim uses UDP to transmit packets of data to an external program. Here is the section in docs\InSim.txt

OutSim - Motion Simulator Support
=================================

The user's car in multiplayer or the viewed car in single player or
single player replay can output information to a motion system while
viewed from an internal view.

This can be controlled by 5 lines in the cfg.txt file :

OutSim Mode 0 :0-off 1-driving 2-driving+replay
OutSim Delay 1 :minimum delay between packets (100ths of a sec)
OutSim IP 0.0.0.0 :IP address to send the UDP packet
OutSim Port 0 :IP port
OutSim ID 0 :if not zero, adds an identifier to the packet

Each update sends the following UDP packet :

unsigned int :time in milliseconds (to check order)
Angular Velocity :3 floats
Orientation :3 floats Heading, Pitch, Roll
Acceleration :3 floats X, Y, Z
Velocity :3 floats X, Y, Z
Position :3 ints X, Y, Z (metres x 65536)
Game ID :1 int (optional ID - if specified in cfg.txt)

Note 1 : X and Y axes are on the ground, Z is up.

Note 2 : Motion simulators can be dangerous. The developers of the
Live for Speed racing simulator do not support any motion systems in
particular and cannot accept responsibility for any injuries or death
connected with the use of such machinery.


is it possible to extract any other data? like engine revs, gears, wheel spin etc. Thanks
OutGauge - External Dashboard Support
=====================================

The user's car in multiplayer or the viewed car in single player or
single player replay can output information to a dashboard system
while viewed from an internal view.

This can be controlled by 5 lines in the cfg.txt file :

OutGauge Mode 0 :0-off 1-driving 2-driving+replay
OutGauge Delay 1 :minimum delay between packets (100ths of a sec)
OutGauge IP 0.0.0.0 :IP address to send the UDP packet
OutGauge Port 0 :IP port
OutGauge ID 0 :if not zero, adds an identifier to the packet

Each update sends the following UDP packet :

unsigned int Time; // time in milliseconds (to check order)
char Car[4]; // Car name
word Flags; // Combination of OG_FLAGS, see below
byte Gear; // Reverse:0, Neutral:1, First:2...
byte SpareB;
float Speed; // M/S
float RPM; // RPM
float Turbo; // BAR
float EngTemp; // C
float Fuel; // 0 to 1
float OilPress; // BAR
float Spare1;
float Spare2;
float Spare3;
float Throttle; // 0 to 1
float Brake; // 0 to 1
float Clutch; // 0 to 1
char Display1[16]; // Usually Fuel
char Display2[16]; // Usually Settings
int ID; // (optional ID - if specified in cfg.txt)

#define OG_SHIFTLIGHT 1
#define OG_FULLBEAM 2
#define OG_HANDBRAKE 4
#define OG_PITSPEED 8
#define OG_TC 16
#define OG_HEADLIGHTS 32
#define OG_SIGNAL_L 64
#define OG_SIGNAL_R 128
#define OG_REDLINE 256
#define OG_OILWARN 512
#define OG_1 1024
#define OG_2 2048
#define OG_3 4096
#define OG_4 8192
#define OG_KM 16384
#define OG_BAR 32768
Lola, you might want to take a look at LFS\docs\InSim.txt - it will give you full details on InSim, OutSim and OutGauge
Cool project, sounds fun. I'm curiously what sorts of noises you're going to get out of it!

And the question on everyone's mind... will the BF1 still sound the worst?
the basic idea is to have two computers.

computer 1: will contain LFS, and hopefully will have attached steering wheel and pedals. While the user is driving, realtime data will be sent to a second computer.

computer 2: this computer will be running Max/MSP, and my own developed software, which will transform the realtime vehicle data from LFS, into something my program can read, which will in turn equate to different sounds, and sound distortions

obviously most of the sound will be coming from computer 2, that can be attached to the surround sound speaker systems that is in the room (we are presenting our work in this hi-tech room at uni, with lots of cool gadgets and tech!). computer 1 probably should have some sound coming from it, so the driver can get feedback on what is happening with the car.

there are alot of interesting possibilities with all this, such as...how would a drifter sound compare to a racer? hehe! other stuff like .raf files generated from replays, these can be fed into the software and churn out interesting music too, it would be like putting a cd into a cd-drive, and wolaah! u hav music! eventually you might have a collection of LFS created music hehe, different cars, on different tracks....the possibilities are endless!
Will be very interested to hear the result - in another life I used Pure Data a lot... very similar to Max/Msp
This sounds awesome. Hurry up and finish it, I want to see it now.
hi guys, just wondering, as of right now, are there any existing programs written for LFS that can read or receive the UDP packets sent my LFS? For example, read the information sent and then save it as a txt file. The reason is...first obviously it would save me alot of time, secondly, even if its just a very basicaly program, I can use while demonstrate LFS during the prelim report presentation!

Will
Check out the insim/outsim example programs RayOK made. They're buried around this forum somewhere, I think in the programmers forum.
So how is it going ?

FGED GREDG RDFGDR GSFDG