Skip to main content

My first cut at this is to take a best guess at the maximum sound file size based on the size of the sound file and if the file contains any 24 bit big endian PCM clips (which indicates PS3 4MB).

I could just let the sound file grow without bounds and have the user keep track.

I could guess but then put in an override selection to limit size to 1MB, 2MB and 4MB (are those the right limits?)  Barry's 3ed appendix B says PS3 boards have 16 MB of memory.

I'm open to other suggestions and I'll put the change into the next release.

Skipping PS-3, MTH PS-2 5V Sound files are all less than 1Meg.  For PS-2 3V most sf are 1Meg, later releases are above 1MEG but less than 2Meg.  These files only load into PS-2 3V boards with 2Meg memory.  The ones with "Sharpe" memory.  I am just noting, if folks start adding data to a file and it goes from 9K to 1.1 M it no longer will load into their board.  G

I am a novice here, so please pardon the basic questions.

Why are some of the values in the data column highlighted in red? Also, is there a way to know whether the clip should be played with the 24bit vs. 4bit setting, because it is trial and error for me right now. I can guess by the size of the data in the length field.

Thanks!

George

1. If the "Data" column is red, that means my program has determined that the clip is 24 bit big endian PCM otherwise its 4 bit ADPCM. When you press the [Play] button, the program will play it that way. Be sure to turn on "[X] Automatic Settings" to have the program play the clip after taking its best guess at the format. (I should make this the default as the program has actually gotten pretty good at this guess.) You can always override the program by picking Level/Format/Rate explicitly using the radio buttons.

2. The engines are pretty smart, they can play any sound 1-255 if commanded to do so. Unfortunately, the M*H remote only has the ability to command some of them - for example, SXS is sound 42, the horn/whistle is sound 152, SFS is sound 43, S01-S10 are sounds 177-186.

My computer program, Remote Train Control (on my web site), can command all 255 sounds.

SanDiegoMark posted:

1. If the "Data" column is red, that means my program has determined that the clip is 24 bit big endian PCM otherwise its 4 bit ADPCM. When you press the [Play] button, the program will play it that way. Be sure to turn on "[X] Automatic Settings" to have the program play the clip after taking its best guess at the format. (I should make this the default as the program has actually gotten pretty good at this guess.) You can always override the program by picking Level/Format/Rate explicitly using the radio buttons.

2. The engines are pretty smart, they can play any sound 1-255 if commanded to do so. Unfortunately, the M*H remote only has the ability to command some of them - for example, SXS is sound 42, the horn/whistle is sound 152, SFS is sound 43, S01-S10 are sounds 177-186.

My computer program, Remote Train Control (on my web site), can command all 255 sounds.

Mark,

Perfect! That is what I assumed. So here is the issue I have: I posted this in another thread, but your program is helping me troubleshoot this. My engine sound clips S02 through S09 play static when I select them on the DCS remote. I downloaded the engine sound file from MTH and loaded it in your program. Those clips are highlighted red with data values of 0x93 for each. However, they play static with the 24 bit setting and play correctly with the 4 bit setting. It seems the engine is seeing this the same way your program is. Is there anything I can do to fix this? Another oddity is that those sound clips appear to be the clips that play for Passenger/Freight Announcements (PFA). PFA plays correctly on the engine. Also, S01 and S10 work correctly on the engine and in your program.

Thanks again for the help!

George

SanDiegoMark posted:

George, post the M*H stock number. I'll download the sound file and look at it.

If we can determine that the "Data" byte is wrong, my program will let you change it. I'd worry that we might break PFA if we do that.

Mark

 

Mark,

The engine is 11-1044-1.

Here is the link to the sound file: http://mthtrains.com/sites/def...160108af4x-cnsmr.zip

If we break it and it doesn't work, we should be able to set it back.

Thanks, 

George

SanDiegoMark posted:

George, post the M*H stock number. I'll download the sound file and look at it.

If we can determine that the "Data" byte is wrong, my program will let you change it. I'd worry that we might break PFA if we do that.

Mark

 

I think the Data byte 0x93 is categorizing those clips as PFA. I think they should have been recorded as 24 bit. I could try exporting and converting them to 24 bit. There are clips at index locations 248 through 251 with the same Data byte. Those clips are station announcements that would be used in a passenger version of the engine and are recorded in 24 bit audio. I am just trying to use deductive reasoning here, but you are right that this could break PFA.

George

George,

(Always work with a copy of the sound file, then if we break it, you can download the original).

Observations: 1. clips at 248-251 have the 0x93 Data and they play correctly.

2. clips at 10-11 are also 24 bit (Data 0x8F) and they play correctly.

3. by looking at the starting address, the clip at 178 also appears at 80 but with a correct Data of 0x1B. Clip 80 is where I usually see the PFA announcements. If you look at clips 80-96, you again see the same clips as 248-251 but with the correct Data of 0x1B. "Same Clips" means the two index locations are referencing the same sound in the sound file.

So I think its an error in the sound file. You can click on each clip 178-183 and press [Edit Index], click in the Data edit field, then use the arrow keys to select the correct Data byte value of 0x1B. Download the new sound file into the engine and it should work for both PFA (from clips 80-96) and S01-S10 (from clips 177-186).

This pointed out an incorrect error message when the Data byte is edited. Just press [OK] on the message box. I'll repair the error in the next release.

Mark

SanDiegoMark posted:

George,

(Always work with a copy of the sound file, then if we break it, you can download the original).

Observations: 1. clips at 248-251 have the 0x93 Data and they play correctly.

2. clips at 10-11 are also 24 bit (Data 0x8F) and they play correctly.

3. by looking at the starting address, the clip at 178 also appears at 80 but with a correct Data of 0x1B. Clip 80 is where I usually see the PFA announcements. If you look at clips 80-96, you again see the same clips as 248-251 but with the correct Data of 0x1B. "Same Clips" means the two index locations are referencing the same sound in the sound file.

So I think its an error in the sound file. You can click on each clip 178-183 and press [Edit Index], click in the Data edit field, then use the arrow keys to select the correct Data byte value of 0x1B. Download the new sound file into the engine and it should work for both PFA (from clips 80-96) and S01-S10 (from clips 177-186).

This pointed out an incorrect error message when the Data byte is edited. Just press [OK] on the message box. I'll repair the error in the next release.

Mark

Mark,

Thank you! I made the changes to a copy of the file. Later today I will set up my TIU and test track to load the file onto my engine and test the changes out. I will report back.

Best,

George

I was able to load the updated file and it fixed the engine sounds problems. Thank you! I even replaced one of the engine sounds with a 24 bit station stop sound clip. Unfortunately, I replaced one that I need, so I will need to edit the file again to put that one back and change out another. 

In the process, I also reconfigured an old PC that I can use as a dedicated loader, unless I get my Windows 10 PC working well with a USB serial port adapter.

George

George S posted:

Mark,

Have you figured out if it is possible to add a quillable whistle (SPW) from a steam sound file that has the feature to a steam sound file that does not have the feature? Is this only a sound file modification, or would the chain file need to be modified too?

Thanks!

George

George, Glad you were able to use the program.  I think (really don't know for sure) that the quillable whistle requires code support in addition to the sound file. In sound files of engines with the SPW, I found that clip 3 must be that sound. Clip 3 is composed of 5-6 separate whistle sounds, whistle on, whistle getting louder, whistle slightly changing pitch, etc. The code probably strings these sounds end to end depending on how you twirl the thumbwheel.

For example, go here:  http://mthtrains.com/20-3280-1

Click on the "Support" tab.

Then you will see among other things a bunch of icons.   One says "protosound".

I'm using firefox.  If I left click that icon with firefox, I get a dialog pop up to save the .mth file to a local file.

However, you can also "right click" and follow the "save link as" option.  I believe this is what works under chrome also.

It's similar I believe for other engines but the protosound3 isn't one file -- it is (usually) a .zip file and contains both the .mth and .crec files.... if memory serves.

Working for you?

I've made a minor release of ADPCM with a few fixes and enhancements (V1.3.5):

1. Made "[X] Automatic Settings" default to checked. The program has actually gotten pretty good at this guess. You can always override the program by picking Level/Format/Rate explicitly using the radio buttons.

2. Fixed an incorrect error message when using [Edit Index] to change the data byte from 24 bit PCM to 4 bit ADPCM setting in PS3 sound files that were less than 2MB in size.

3. The Hex Editor code that I used in the [Edit Index] window, written by Jacek Szumigaj <szumi@users.sourceforge.net> was not working quite right. I tried to repair it and now it functions a little better.

You can download V1.3.5 from the web page:

http://www.silogic.com/trains/ADPCM.html

Mark,

Thank you again for the awesome program. Maybe you can help me out. I'm running ADPCM on a Mac thru Virtual Box, I can get the MP3 clips I have thru Audacity into the 24 bit PCM file, but I can't find anything that works for me to get that file to the big-endian version. SoX crashes anytime I try to boot it up in my windows environment. Any other suggestions for getting big-endian files that I could insert into the .mth file?

Thanks!

Andrew

Last edited by metsno1fan

Which engine sound file did you download?

Try an older version of SOX to see if it will run. I see on this web page:

https://sourceforge.net/projects/sox/files/sox/

There are a dozen, at least, older versions. Sometimes the older versions work.

Here is the bug posting web page for SOX:
http://sox.sourceforge.net/Docs/Bugs

I don't know any other program to do the little endian to big endian
conversion. There might be others around but since SOX worked for
me, I didn't look further.

I believe an option there would be to port it to the GNU C++ compiler and use the Qt GUI library for the gui part.   In fact that was my original idea but instead I wrote a Java version.  But my Java version is no longer in sync with the one Mark produces, it's missing all the "edit" features principally.  I was thinking of just putting it into the public domain but got lazy & then someone else could take that on.

AmeenTrainGuy posted:
Severn posted:

I believe an option there would be to port it to the GNU C++ compiler and use the Qt GUI library for the gui part.   In fact that was my original idea but instead I wrote a Java version.  But my Java version is no longer in sync with the one Mark produces, it's missing all the "edit" features principally.  I was thinking of just putting it into the public domain but got lazy & then someone else could take that on.

This is a bit confusing but I see what you mean, but I don't exactly know how to do that. 

gunrunnerjohn posted:
AmeenTrainGuy posted:

Is there a way to get this to work on Linux?

Virtual Box with Windows running in the VM.

I am very sure my system had trouble running virtual box last time I tried. 

Does anyone have a Linux version even if it is slightly out of date? 

Best thing to do is contact SanDiegoMark. He wrote it. I doubt he ever created a Linux version. 

Here try this -- it's a zip file with my compiled java version less all the stuff he added for editing the sounds and things. there are some sound files in it but you can get more from MTH. 

Run the "jar" file with:

prompt> java -jar jadpcm.jar

You'll need to install Java.  I'm not sure the "open java" that's on many linux's will work.   If you can't get that to work, try the one from Oracle.

Attachments

No editing in the Java version.  Mark went too fast for me to keep up in his original.  I helped him move the original to Embarcadero from Borland so had some familiarity with the code.  First I had the idea of going to GNU-C++/Qt ... but somehow did this Java thing instead.  Then I got side tracked...  But intended to go back to it, or the GNU-C++ version at some point and align them.

 

Add Reply

Post
The DCS Forum is sponsored by
×
×
×
×
Link copied to your clipboard.
×
×