Updated 5/31/2011
There have been many good suggestions for improvements and features over the past year. One reason they haven’t been incorporated is simply that I’ve been extremely busy with other work. The second reason is that each time I add a new feature or improve performance, I’ve had to make multiple version for different baudrates, alternate trigger functions, etc. A big pain. Clearly, what’s been missing is a way to set these options at run time.
So here is a beta release of a new version of MP3 Trigger firmware with the following features:
- An MP3TRIGR.INI file (optional) that allows setting the baud rate and individual options for all 18 triggers, including regular, random, next and previous triggering functions as well as a restart lockout feature.
- The ability to reprogram trigger inputs to control volume up and down.
- A modified trigger file naming scheme that allows for more flexible track names.
- Increased compatibility with SDSC (2GB or less) microSD cards.
New File Names
Previous firmware versions required that tracks associated with triggers be named “TRACKnnn.MP3″, where nnn was the trigger number. Beginning with version 2.40, the only requirement is that the track names begin with nnn. So the following are both valid file names for trigger number 14:
“014Track.mp3″
“014 Breaking Glass.mp3″
The old style file names will no longer be associated with trigger inputs beginning with this version.
Flash Card Follies
I’ve spent a fair amount of time studying the microSD flash card situation. There are currently two basic types now available: SDSC cards (2GB or less), and SDHC cards (greater than 2GB). Before the industry acceptance of SDHC, some manufacturers made larger capacity (>2GB) cards that were not SDHC compliant, and I’m discounting those in this discussion.
SDHC cards are only formatted FAT32 and cannot be formatted FAT16. Currently the MP3 Trigger V2 does not support FAT32, nor does it recognize the SDHC card during initialization. So don’t even think about trying to use one for the time being.
SDSC cards are only formatted FAT16 and these are what the current firmware is designed to use. In this new version, I have found and fixed an issue that prevented certain SDSC cards from being recognized. (The Master Boot Record can sometimes be in sector 0 and sometimes not. I did not know that!) Also, I have found some PNY 2GB cards which are simply too slow to play 192kbps mp3 audio. File access measurements indicate that these cards are around 8% slower than “normal”, enough to introduce clicks and pops at the higher bits rates. Encoding the same audio at 128kbps allowed these cards to work.
So the message here is this: Use SDSC cards, and if you have trouble with 192kbps you probably have a slow card. In that case, either get another card or use a lower bitrate encoding. If you find an SDSC card that is not recognized, please let me know.
Init File
The init file must be named “MP3TRIGR.INI” and must, like all the mp3 files, be in the root directory. The file is optional. If it does not exist, then the MP3 Trigger defaults to normal operation at 38.4Kbaud and all triggers starting their respect tracks (with the new names!).
Init file commands must begin with the “#” character and be followed by a space. Currently, the following three commands are supported:
#BAUD N where N can be 2400, 9600, 19200, 31250 or 38400
#RAND N where N can be 1 to 255
This function excludes the first N MP3 files from the random trigger function
#TRIG N, F, L where N = trigger number (1 – 18), F = function type, and L = restart lockout enable
The allowable function types are as follows: F = 0 Normal trigger operation, F = 1 Next (same as nav forward), F = 2 Random, F = 3 Previous (same as nav back), F = 4 Start, F = 5 Stop, F = 6 Volume Up, F = 7 Volume Down.
The lockout feature, when enabled (L = 1), will prevent the trigger from doing anything while audio is playing. This allows you to have tracks which cannot be restarted until they have completed.
For example, the following line will set trigger number 7 to be a random select, with restart lockout enabled:
#TRIG 07, 2, 1
All commands are optional. If you want 38.4Kbaud, you don’t need the #BAUD command. If you don’t want to change the behavior of a trigger input, you don’t need an entry for that trigger. So for example, I use a single line in the init file to make trigger 18 be sequential (next), then I jumper that trigger and my MP3 Trigger powers up and continuously loops through all the tracks on the card:
#TRIG 18, 1, 0
Here is a sample MP3TRIGR.INI file that includes all of the documentation for the commands.
#BAUD 38400
#RAND 2
#TRIG 01, 0, 0
#TRIG 02, 0, 0
#TRIG 03, 0, 0
#TRIG 04, 0, 0
#TRIG 05, 0, 0
#TRIG 06, 0, 0
#TRIG 07, 0, 0
#TRIG 08, 0, 0
#TRIG 09, 0, 0
#TRIG 10, 0, 0
#TRIG 11, 0, 0
#TRIG 12, 0, 0
#TRIG 13, 0, 0
#TRIG 14, 0, 0
#TRIG 15, 0, 0
#TRIG 16, 0, 0
#TRIG 17, 0, 0
#TRIG 18, 0, 0
*********************** ALL INIT COMMANDS THIS LINE ************************
This is a sample init file for the MP3 Trigger V2, firmware version 2.40.
The init file is optional. If not present, the default parameters will be
in effect: 38.4Kbaud, and all triggers will start their corresponding
tracks with restart lockout disabled. If it is present, it must be named
MP3TRIGR.INI and be located in the root directory.
Only the first 512 bytes of the file are examined for commands, and the first
occurrence of the '*' character is treated as the end of file by the parser.
Comments are not allowed in the command section, but there is no restriction
on the length of the comments that follow the first '*'.
All commands must begin with the '#' character and be followed by a space,
then the command parameters separated by commas. White space is ignored. All
parameters are decimal numbers. Leading zeros are acceptable. See the above
examples - which are redundant since they are all default values.
The following commands are supported in firmware version 2.40:
#BAUD N
where N is one of the following: 2400, 9600, 19200, 31250 or 38400
#RAND N
where N is from 1 to 255
The default behavior of the random trigger function is to play a random
track from all the MP3 files on the flash card. The #RAND function will
exclude the first N tracks (in the directory) from the random trigger
function. So if there are 18 MP3 files on the card and N=4, then the
first 4 MP3 files will be excluded from the random trigger function.
#TRIG N, F, L
where: N is the trigger number (1 - 18)
F is the trigger function type (see below)
L is the restart lockout enable
The defined trigger function types (F) are as follows:
F = 0: Normal operation
F = 1: Next (same as the forward Nav switch)
F = 2: Random
F = 3: Previous (same as the back Nav switch)
F = 4: Start (restarts the current track)
F = 5: Stop
F = 6: Volume Up
F = 7: Volume Down
The restart lockout feature, if enabled, will prevent that trigger
from working if audio is currently playing. Use this if you want
to prevent restarts before the track has reached the end. This
feature does not apply to function types 5 - 7.
L = 0: Restart lockout disabled (default)
L = 1: Restart lockout enabled
You only need to include entries for triggers that are to be non-default.
As an example, I use the following single-line init file to make trigger
18 be a "Next" function, then hard-wire the trigger so that my MP3 Trigger
powers up and loops continuously through all the tracks on the card.
#TRIG 18, 1, 0
I’m currently working on updating the user manual for the new features and will post it here once the new firmware version is officially released. I wanted to get a beta release version out there to solicit some testing and feedback.