How do you track sound file size? At some point if you get it larger than 1Meg it will only work in PS-2 3V boards with 2Meg chips. Not all engines have 2Meg memory. In fact all the early production 3V engines use 1Meg memory. G
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
George, if it doesn't load, I think it's not that big a deal, they obviously can just load the stock file and get going again.
Here is what I will do to the program : it will take its best guess as to the size of the sound file memory - 1MB - 2MB - 4MB but add a menu item which, when checked, will disable any file size checking but show the size and let the user determine what is correct.
Do any PS3 engines have more than 4 MB? - What is the maximum?
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
Another question, in my sound file I found some neat audio clips in locations 248 through 251, but my engine never plays these. Is there a way to get the engine to play those?
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
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
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
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 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.
Thanks Mark. I think I will hold off on the whistle project for now. The engine is running nicely.
I'm j u st trying to download ps2 sound files from mth and it won't work. I'm using windows 10.. what's the trick.
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?
Oh wow. I knew it had to be something simple.. the hyroglifics means it's not being read.. I will try chrome tge Firefox .
Severn, the 'save link as' works in Chrome, just tried it, thanks! I don't think of 'files' as 'links', but whatever works is good!
Well things Arnt as complicated as we think. I'm a robotics techician and it's just a load of processor's telling another plc to tell forks to extend out and belts to turn. . A high school kid could do it!
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
I've made a few videos showing how I've been able to edit the sound file using the ADPCM program. I posted it in a new thread:
Went to the Embarcader0+++ site - but can not find the ADPCM zip file. How?
bruce
bruce benzie posted:Went to the Embarcader0+++ site - but can not find the ADPCM zip file. How?
bruce
Bruce, I had the same problem at first. Its in this link but nearer to the bottom. Look for "V1.4.1" with the "new" flashing. The link is not the same format the GRJ posted earlier.
Mark, incredible work.
Pete
ADPMC has nothing to do with embarcadero, except that this the company that produces the programming language compiler the programmer used...
As others have said, the program you may want to run is on this webpage --http://www.silogic.com/trains/ADPCM.html
http://www.silogic.com/trains/RTC/ADPCM_1.4.1.zip
BUT certainly at least skim through the page and learn about it...
I finally downloaded this and can see hours of time invested. My day is shot. lol
Mark,
Thank you for writing this!
Dave
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
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:Is there a way to get this to work on Linux?
Virtual Box with Windows running in the VM.
yeah but you have to have a windows license... be nice to see the port. i was hoping he might have the interest.
An OEM Windows can be had dirt cheap, you don't need to get fancy to run a VM.
For instance, here's one on eBay: 292166408220
Windows 7 Professional 32/64-Bit COA Product Key Code License w/ Disc
Last I checked, Windows 10 was still free. You just need to find the download site. I installed it on a couple of Macs inside VirtualBox.
George
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.
By the way, what are your goals here? The DCS programs only run on Windows, so you can't be using this to do anything with DCS if you don't have Windows. It sounds like you don't even have DCS or MTH engines?
George
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.