Locomotive Sound Question

Discussion about computers: Hardware, Problems, etc.

Locomotive Sound Question

Unread postby RadarJamming » Mon Feb 09, 2015 4:52 pm

Hello,

I was wondering anybody could provide some input, I am new to this so please forgive any holes in my knowledge.

I am working on a project where we have a C# based app that is going to set up like a rail sim cab. We have a C# to Linux library completed. We have a Linux based CPU which will run the program with the goal of using the C# UI as the interface. The guy helping me with this has done Trainz scripts. I am wondering though if moving to LUA might be better. Really what I looking for is the sound code that could be modified to run on Linux first. Second would be the can controls. I am using a WiFi device to replace DCC, our CPU runs Linux 2.6 so I want to set it up so it's more like driving a train versus trying to figure out a 30 year old satellite TV remote.

I arrange the deck chairs, my partner does the coding. Just wondering if anybody had some insight based in their experiences and if there is a file for code examples for Locomotive sound we could reference outside of Trainz. Thanks.
RadarJamming
 

Re: Locomotive Sound Question

Unread postby Chacal » Tue Feb 10, 2015 12:51 pm

Hello,
I'm a fairly technical guy but your post is more confusing than Japanese porn.
I guess it's partly a vocabulary problem, and partly a lack of context. What is it you are doing? You seem to be building a simulation of a locomotive cab, for controlling something (a train simulation, a model railroad?).

Trainz, deck chairs, Linux, satellite TV remote... I can't figure out what all this has to do with Railworks.

Also please define or explain the following:
- a rail sim cab
- a C# to Linux library (C# is a language, Linux is an OS)
- a Linux based CPU (a CPU is a chip, it's not based on any OS)
- the sound code
- a WiFi device (a router? a network interface? a device for doing what, where?)
- using a WiFi device to replace DCC (DCC would imply model trains)

For the parts I do understand:
- LUA is a scripting language that is used as an interface to an application. The Railworks developers have chosen to provide a LUA interface to the core game engine, so that users can script complex logic, get and set game variables, using LUA. If you are not interfacing with Railworks, then you don't need to use LUA.

- sounds used in train simulators are recorded from live trains into common formats such as .wav. They are played back by the game's core engine. If you are using Railworks, you don't have to write any code for playing sounds. If you are building your own train simulator, you just use a library for playing .wav files.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6636
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Locomotive Sound Question

Unread postby _o_OOOO_oo-Kanawha » Tue Feb 10, 2015 1:05 pm

If the original poster is referring to ProTrain Pro 2, a German Trainz 2010 clone?

German locomotives have this display called EBuFa or something, which essentially is an electronic interactive drivers timetable. In PTP2 this Ebufa is powered by a small Linux virtual computer running under PTP. It probably needs to interface with the main program, but how and what, I don't know.

If the same Ebufa is wanted for Railworks, it is perhaps best to start studying how it is done in PTP.
Otherwise ask Havner, the author of the excellent joystick and overlay interface how to hook up say this Linux virtual machine through lua.
Here lies Havners Trainsim Helper program. His source code is available too, but I've lost the address.
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: Locomotive Sound Question

Unread postby RadarJamming » Wed Feb 11, 2015 10:32 am

Sorry for the verbal diarrhea

1) If I wanted to build my own locomotive model and created a sound file that covers everything from start up to shut down, where would I find the reference code and libraries?

2) To build the cab, where would I find the reference code and libraries?

That's the main question, I want to build a computer model, then use it to control an actual model using a WiFi device. I have working code in C# for the control app, mesh, and Linux is used in the running model. I would like to run a Railworks like program where manipulating cab controls runs the locomotive.

Thanks
RadarJamming
 


Return to Geek Speak

Who is online

Users browsing this forum: No registered users and 1 guest