KB343: Sound Project Files
This article was last updated on Jan. 18, 2012, 5:06 p.m. | Print Article | Leave Feedback
Fred Miller has been an invaluable resource for information about Digitrax sound.
Here are some of his thoughts about the sound project files, from the Yahoo Digitrax Sound discussion group:
There seems to be confusion over what is a SPJ.
It is not surprising since it is a very complicated subject matter probably best left to programmers.
The SDL (Sound Definition Language) that AJ developed allows for building the code that is running inside the microcontroller (computer) in the sound decoders.
As a result, fantastic capabilities are there for anyone who can jump into the pond.
Perhaps a few words about the SPJ would help put this into perspective:
The Digitrax Sound Project files (SPJ) cannot be viewed or downloaded from a sound decoder.
Many of the original SPJ files are, however, available from the Digitrax web site.
The SPJ "file" actually contains a bunch of files:
(1) The actual sound clips (in a specific WAV format)
(2) A MAP file which matches the sound clips (in the sequence shown by the SoundLoader) to the identification in the SDF code.
(3) The SDF code, which makes it all run, is compiled into a HEX file from an Assembly Language (ASM) file using a MacroAssembler such as is available from MicroChip Technologies (and included in their free MPLAB IDE).
Note this whole process is developing the code which is loaded into the micro controller within the sound decoder.
Yes, it is PROGRAMMING.
(4) A descriptive Text file (TXT) which serves two purposes:
(a) readable documentation of the SPJ
(b) descriptive information which pops up when using the Sound Loader software, e.g., the pop up descriptions of the F keys and the default CV values.
In order to make Sound clip substitutions, the SPJ for the specific sound decoder purchased must be downloaded from the website, and then the sound clips can be viewed/changed using the Sound Loader software In order to make logical changes in how the sound clips are played, e.g., relating to F keys, timings, etc., the uncompiled SDF code (in Assembly Language format) must be loaded into some sort of text editor, then changed, then compiled using the MacroAssembler.
The resultant compiled code (now a HEX file) is what is used in Sound Loader software when you "import SDF".
The MAP files from a SPJ can be exported using Sound Loader and then viewed in text editor like NOTEPAD.
The Descriptive Files can be viewed directly in Sound Loader (View pull down menu) and can also be exported for modification.
So SPJ files can be acquired from the Digitrax website and a few are also in the Files Section of this user group.
However, none of the above gives access to the actual SDF code.
Some of the original ones were available by special request to AJ.
However, he wanted to be sure that anyone receiving them was indeed capable of using them, e.g., programming.
Anyone interested in viewing a (typical) SDF code can take a peek at several .ASM files available in the Files section of the Yahoo Digitrax Sound user group.
For example the .ASM file for my Traction project is available.
Now with all of this said, remember, when you do have the SPJ project and loaded into Sound Loader talking to a decoder through a PR2, you CAN make sound substitutions WITHOUT getting into the SDF.
Fred Miller, MMR