Random Trigger Function for the MP3 Trigger

by robertsonics

Here’s an alternate version of the latest firmware for the MP3 Trigger that changes the behavior of TRIG17 and TRIG18. In this version:

TRIG17 is a sequential trigger. It will loop through all of the tracks on the flash card, one track per activation. (Same as the “Forward” navigation switch function.)

TRIG18 is a random trigger. It will play a random track from the flash card, one track per activation.

Here’s one example of how a combination of jumpering and buttons can be used to good effect: Let’s say that TRACK001.MP3 is background music, and all the other tracks are spoken messages. If you jumper TRIG01 and put a button on TRIG18, then as soon as the MP3 Trigger is powered up it will start looping the background music. Every time the button is pushed, you’ll get a random spoken message after which it will go back to looping the background music. (You could also do this with the button on TRIG17, in which case the spoken messages will cycle through in a particular order.)

UPDATE: If you grabbed this version before 8/21/2010 please reprogram your unit with this file. There was a bug in the random track generator algorithm that made it not work properly when there were only one or two tracks on your flash card. All fixed now. Sorry for any inconvenience.

MP3 Trigger V2 Firmware v2.23r 38.4k baud

This version is the same as the latest v2.23 in all other regards.

0

A New MP3 Trigger Filename Proposal

by robertsonics

I’m considering changing the filenaming conventions for the MP3 Trigger. Currently, the triggers require very restrictive 8.3 filenames in the form of “TRACKnnn.MP3″. The navigation switch and serial protocol will play all of the MP3 files on the card, regardless of names or namelengths, using simple directory offset index – the nth MP3 file in the directory.

Without getting into the FAT32 vs FAT16 issue, there are two major complaints about this arrangement: First, the trigger track names don’t allow any flexibility whatsoever. Second, the order in which the nav switch plays the tracks is by directory entry order, not by name, and you don’t have any control over this unless you format the flash card and copy the tracks in the order you want them played when you click “foward” or “reverse”.

I’m proposing the following change: All tracks that you want to play on the MP3 Trigger must start with a 3-digit number “nnn…”, such as “001horns.mp3″ or even “023 Train Whistle.mp3″. The triggers would map to the tracks starting with “001…” through “018…” (and up to “255…” over the serial control port). The navigation switch would play the tracks in numerical order, even if they weren’t consecutive”, but would not play or even recognize any file that did not start with a 3-digit number.

This method would support long filenames, since I would only be looking at the first 3 characters, but keep in mind that long filenames use multiple directory entries and reduce the total number of files that can fit on a FAT16 flash card.

The biggest downside to this idea is that if an unaware user copied a random mp3 file to the flash card without putting numbers in front of the filename, nothing would happen. The way it is now, the nav switch will play any mp3 file, but not in any controllable order.

Also, please keep in mind that features like full alphabetizing would add lots of overhead and make it much longer to start a track. This proposal is an attempt to strike a balance between ease of use and speed.

By the way, I also just recently added a feature whereby Trigger 18 starts a random track – basically a shuffle trigger. If you jumper it, then it shuffles continuously through all the files on the card. I’d be interested to hear if people think this is a worthwhile tradeoff for losing one dedicated trigger input. I think so.

I welcome feedback.

0

Yet Another MP3 Trigger Firmware Beta Release

by robertsonics

And I thought I was pretty much done with this a long time ago…

An observant user pointed out to me that there are dropouts when playing higher bitrate MP3 files on the V2 player. He was right, and I dug into it to discover that the overhead of scanning the additional trigger inputs was the culprit. I streamlined the input scanning code and fixed the problem.

So if you are hearing artifacts when playing 192kbps stereo MP3 files, this update should fix the problem. This is a beta release. When I’m satisfied that I didn’t affect anything else, I’ll issue a formal release in the various baud rates as before. Just wanted to get this out there in case anyone else is noticing the issue.

MP3 Trigger V2 Firmware v2.23 beta 38.4k baud

0

MP3 Trigger Firmware Version 2.22 release

by robertsonics

 

Fixes, Shorter Looping Gaps and New Features:

For some time I’ve been getting reports of users having issues with certain MP3 files, involving some kind of problem when the track finished – either hanging the MP3 Trigger or producing chirping or squeaking sounds. Finally, someone was helpful enough to email me one of these tracks and I was able to duplicate the problem here in the lab. As a result, I have not only fixed this issue but in the process also discovered the reason some folks were legitimately complaining about the length of the gap when looping sounds. There was indeed a bug in recognizing the end of MP3 files that produced a longer than necessary period of silence at the end of a track.

I have not yet measured it on the scope, but I would estimate that the audible gap when looping a track (that has no silence at the beginning or end) is now consistently around 100 msecs (a tenth of a second). It has similarly reduced the time it takes to send the “end-of-track” serial message following the completion of the track.

This latest version also incorporates “Quiet Mode”, an option that can be enabled via the serial control port. In this mode, the triggers don’t start tracks directly but instead produce a serial message indicating which triggers were activated. A host microcontroller (Arduino, for example) can thus monitor the trigger inputs and then start any track or sequence of tracks via the serial control port, making the triggers much more flexible. An updated User Guide includes the details of this new feature.

So here is the new firmware in the different baudrate versions. Please note that these updates are only for the MP3 Trigger V2.

MP3 Trigger V2 Firmware v2.22 38.4k baud
MP3 Trigger V2 Firmware v2.22 9600 baud
MP3 Trigger V2 Firmware v2.22 2400 baud

Instructions on how to update your V2 firmware are in the datasheet, but here’s a quick review:

1) Download and unzip one of the files above.

2) Copy the resulting hex file to a microSD card and rename it to: “MP3TRIGR.HEX”. It does not need to be the only file on the card – it just needs to have that precise filename.

3) Insert the microSD card into your MP3 Trigger V2 and turn the power on while holding down the center navigation switch.

4) Wait for the Status LED to go solid, then cycle the power. You’re now running the new firmware.

Please refer to the datasheet for a more detailed description of the Status LED indications when running the bootloader.

0

Beta version of latest MP3 Trigger firmware

by robertsonics

As of today, SparkFun is shipping MP3 Triggers with version 2.10 firmware at 38.4k baud. There are a few reports of units having a problem with certain MP3 rates, wherin a long track will only play for some number of seconds and then restart. This is likely caused by a mechanism added to detect and fix an earlier issue that the VLSI MP3 decoder IC very occasionally does not power up correctly.

Version 2.22 should fix this restart issue. The new version also contains a new feature called Quiet Mode, which can be set using the serial control port. In Quiet Mode, the MP3 Trigger will send a serial message whenever one or more of the trigger inputs goes active, but will not start tracks. This effectively decouples the trigger inputs from the tracks, and allows an external computer or micro the ability to do whatever it wants with the triggers. Think of it as a digital input expander that can also play MP3 audio.

Version 2.22  is available below. If you are experiencing an issue with tracks restarting prematurely, or if you want to experiment with Quiet Mode, then help yourself to the download below. Please let me know through the forum if this a) solves a problem you were having before, or b) you find any anomalies with this release.

Update: Found and fixed a problem that explains rare occurences of certain MP3 files hanging up at the end. Also should shorten the gap when looping files.

MP3 Trigger V2 Firmware v2.22 38.4k baud

Information on how to use the bootloader to update your V2 firmware, as well as the details of how to use the new Quiet Mode, can be found in this preliminary update of the MP3 Trigger User’s Manual.

0

Short film “Steeples” now up on vimeo

by robertsonics

Here’s the short film by Bryan Papciak of Handcranked Films, for which I supplied the music.

Steeples from Bryan Papciak on Vimeo.

0

Firmware Updates for the MP3 Trigger V2

by robertsonics

If you purchased an MP3 Trigger V2 before May 1, 2010, please update your firmware to version 2.10 below. This update addresses an issue with the serial control port baud rate. Please note that I’ve provided three different downloads: One for the standard serial baud rate of 38.4 kbaud, as well as one each for 9600 baud and 2400 baud.

NOTE: These files are only for MP3 Trigger V2, not for the older original model, which does not require an update.

MP3 Trigger V2 Firmware v2.10 38.4k baud
MP3 Trigger V2 Firmware v2.10 9600 baud
MP3 Trigger V2 Firmware v2.10 2400 baud

Instructions on how to update your V2 firmware are in the datasheet, but here’s a quick review:

1) Download and unzip one of the files above.

2) Copy the resulting hex file to a microSD card and rename it to: “MP3TRIGR.HEX”. It does not need to be the only file on the card – it just needs to have that precise filename.

3) Insert the microSD card into your MP3 Trigger V2 and turn the power on while holding down the center navigation switch.

4) Wait for the Status LED to go solid, then cycle the power. You’re now running the new firmware.

Please refer to the datasheet for a more detailed description of the Status LED indications when running the bootloader.

0

Motion Feedback Music Player

by robertsonics

I’m a little late on this one, but thought it certainly deserved mention here at MakerJam. Polymythic is one of the first hackers I know of to make use of the real-time volume control capability of the MP3 Trigger. This capability was the primary reason I developed the MP3 Trigger so it’s nice to see someone making good use of it.

Polymythic created a music player that detects motion and dynamically controls the volume  – you have to keep moving to hear the music. He posted step-by-step set of instructions over at Instructables.

0