In part 1 of this limited “How To” series we discussed how to add startup and shutdown sounds to a version 5 LokSound decoder. In part 2 we demonstrated doing the same thing for sound files that did not have the sound we wanted to add (an alarm bell in this case). In part 3 we will wrap up these tutorials by creating a sound slot, saving it so it can be reused whenever we want, adding it to a sound file and assigning it to a function key.
The
pre-requisite for this exercise is that you have completed part 2 of this
series. This means you have the necessary alarm files downloaded and
installed in the list of project sound files. Also, you have the ESU template files
installed. If you have completed part
2, this will be a relatively easy exercise.
Open any sound file that has an empty sound slot contained in
it. For this exercise we’ll load our v4 sound file 74767. Once it’s loaded, go
to the sound pane and in the upper left quadrant you’ll see Fig 1.
Notice
the two unused sound slots. We’ll use sound slot 9 for this exercise. Double
click slot 9 and you’ll be taken to its sound schedule shown in Fig 2. In the
Sound Slot properties give it a name like “Start Alarm”. With a few differences
we will add and connect the three alarm sound files in a similar manner to the
methods we used in part 2.
We going to create an alarm sound schedule similar to what was done in part 2. First, drag and drop the three alarm .wav files onto the schedule as in Fig 3.
Next
let’s add the connectors and this is where the differences are applied. Click
on transition in the upper left, click on the Mute state, drag the connector to the
alarmStart8 box and click. This gives you the non-conditional [true] transition that we are
used to but now click on the + sign in the condition box on the left and you’ll
be presented with selection boxes shown in Fig 4.
In
Register, select Function. In Operation select
= and in Value select true. Click OK and then click on a blank area of the
schedule and you’ll see the change shown in Fig 5.
This starts the alarm sounding when its function key is pressed (we
haven’t assigned a function button yet).
Now
add a non-conditional true transition from the start to the loop and
then add an F = false conditional transition between the loop and the end. Next,
add a non-conditional true transition from the end back to Mute. Lastly,
click the loop state and check the
loop box under Repeat playback in the state properties. This is shown in Fig 6. This keeps the alarm sounding for as long as the function is on. Once released it will return to Mute.
Using
the simulator, test your sound schedule. Click the Overview tab and you’ll see
that the sound slot is now called by the name you gave it.
Saving Your Work and Finishing Up
We are just about done now. Click on the Overview tab and you will notice that sound slot 9 is now labeled Start Alarm or whatever you named it. Make sure the sound slot is highlighted. In the Sound Library on the right side navigate to the directory where you will store your sound slot files and highlight that directory. Notice that the right-facing blue arrow will light up. Click that arrow and your sound slot sound file will be copied to the highlighted directory. You just saved your work!
As an exercise, if you click on sound slot ten on the left and then your saved sound slot sound file on the right the left-facing arrow will light up. This is how you add a sound slot you have created to any sound project. It can even overwrite a sound already there! Mapping this sound slot to a function key in the Function Mapping sheet of the Decoder Pane is a matter of choosing a function key in the Conditions column and then choosing this sound slot in the Sounds column. You then have a function key controlled sound. Remember, though, because we made changes to the sound pane it will be necessary to burn the sound file to the decoder to have these changes take effect.
Important!
Sound slot files created for version 4 sound files and version 5 sound files are different and are separated by the Lok Programmer software. If you have created a version 4 sound slot file and saved it to your templates location then you open a version 5 sound file and try to add it, you won't be able to. In fact, you won't even be able to see that v4 file in your templates. The software prevents this. So based on what you need you may have to create two different sound slot files. One for v4 and one for v5.
Conclusion
This wraps up the three part tutorial on the various ways to
add sounds to projects. However, there will be more sound projects to come in
the not too distant future. As always have
fun!
If you have an idea for a blog post here, let me know. If I can comment on it, I will or I'll see if someone else can and post it.
No comments:
Post a Comment