Want more than 8 stereo voices from your WAV Trigger?

For those of you interested in trying to get more than 8 stereo voices, there is a so-far undocumented init file command that will let you experiment with more. “#VOIC n”, where n is desired number of voices, allows you to increase the number up to a maximum of 16. You’ll need to add this command to an existing init file using a text editor, since the WT-InitMaker app does not support it. You can confirm the setting using the WT-Remote app – the “Get Info” button reports the number of available stereo voices.

In most cases, it’s probably safe to increase the number of voices to at least 10. 8 was chosen as the default to be compatible with the slowest microSD card I’ve encountered. Without a scope, you’ll know when you’ve hit the limit for your card when you start to hear crackling or pops after layering the max number of tracks. For those of you with a scope, PC15 (pin 4 on the STM32F4) duty cycle indicates the amount of time taken by the mixer. 100% is bad.

The limiting factor for the number of voices is what I call the “access time” of the microSD media, which is different than the sustained bitrate used for the speed ratings. Unlike sequentially reading a single file, mixing WAV tracks involves reading a small number of sectors from files spread all over the FAT disk. The critical issue is the time it takes between asking for a new sector read and when the card actually starts providing that data. I’ve not found this parameter to be documented by the microSD card manufacturers, so you’ll just have to experiment with it.

WAV Trigger fix for DC offset on speaker output

UPDATE 5/18/2015: This post only applies to the original WAV Trigger version, WIG-12000, which was replaced with WIG-12897 about 8 months ago. If you have any doubts as to which version you have, see this post.

The initial run of the WAV Trigger is missing a capacitor on the input to the on-board speaker amplifier, causing a DC offset on the speaker output connector. At a minimum, this causes a click on enabling the amp and clipping for high volume output signals, and in some cases interferes with operation of the WAV Trigger when certain speakers are connected. The board design has already been updated and the fix will make it’s way into the production pipeline soon. In the meantime, for those of you utilizing the on-board speaker amp, here’s the fix. You do not need to do this if you aren’t planning to enable the on-board amplifier (it’s disabled by default.)

You’ll need to add a series 0.39uF non-polarized capacitor to the to the input of the LM4990 amp, between LOUTL and R9. The easiest way to do this is to cut a single trace on the back of the board, scrape away the solder mask from the ends of the trace near the cut, and solder the cap across the resulting gap. See photos below. I apologize for the inconsistent PCB color (green) in the second photo – I wanted to post this ASAP.

First, a photo showing the location of the trace on a production board:

wtpatch01

And here’s a photo of the capacitor, in this case a ceramic SMT cap, soldered across the gap in the trace. If you happen to have a through-hole cap available, you can solder the leads to the vias at either end of the trace (after you cut it.)

wtpatch02

Adding this capacitor completely fixes the issue, eliminating any popping when the amplifier is enabled or disabled, and allowing you to get the full audio volume range from your speaker.

WAV Trigger Arduino library and first example

I’ve posted an initial release of a WAV Trigger Arduino library on GitHub, along with a sample sketch for the YUN that demonstrates use of the library and a very basic browser based interface.

The picture below shows how I can start, stop and control the volume of a track over wifi from my phone. The YUN is only plugged in for power, and the WAV Trigger is powered from the YUN, using the on-board amp to drive the speaker.  The UI is just an html page so it’ll work with any device/browser. The only reason I don’t have multi-track control is my limited knowledge of html/CSS coding and lack of time.

 

WAVTrig-YUN-02sm

 

Both the library and the sample sketch currently have lots of limitations, but I thought it would be helpful to get something out there sooner than later. I’ll keep the GitHub repositories updated as I go.

WAV Trigger Arduino library on GitHub.

Arduino YUN sample sketch on GitHub.

If any of you html-savvy folks want to speed things along, the most helpful thing would be to look at “index.html”, located in the www folder of the YUN sketch. This is the file that creates the YUN’s browser UI. If someone can come up with a more functional version, providing the ability to control multiple tracks, I’d love to improve this example.

 

 

WAV Trigger Firmware and Apps update

This update adds serial commands for controlling individual track volumes as well and for enabling/disabling the on-board audio amplifier. The serial remote control app has also been updated to demonstrate these capabilities – see the screenshot below.

Also, the WAV Trigger firmware update utility has been updated to v1.01, the main difference being speed. The firmware update process went from taking about a minute and a half to around 15 seconds!

All these updates can be found on the WAV Trigger Downloads page.

 

WT-Remote_022

 

Product Launch!

WAVTrigger_250

I’m very pleased to announce that, after a lot of hard work, the WAV Trigger goes live on the SparkFun site tomorrow. I’m excited because I think this is a unique product that’ll hopefully inspire a lot of cool ideas.

Please bear with us as we iron out the documentation and details. The most up-to-date and accurate info will be found here for the time being, simply because I can update things myself, without having to go through proper “channels”.

The firmware shipping with the units from SparkFun is pretty much complete, although I do plan to add features and enhancements in the near future. Unlike the MP3 Trigger, the WAV Trigger’s firmware update process uses the serial control port, which happens to be pin-compatible with the FTDI Basic 5V. If you plan to take advantage of upcoming firmware releases, I suggest you get one of these handy devices.

Some things I plan to do:

WAV file compatibility: At the moment, the WAV Trigger supports only 16-bit, stereo, 44.1kHz WAV files with no meta-data. These are easy to create using a sound editor such as Audacity, so it’s not a big deal. But I do plan to support at least 22.05kHz sample rate in the future – although it will be a global setting – no mixing of sample rates. I also plan to make it more forgiving with respect to there being non-audio (meta) data in the file.

Signal Processing & Effects: The CPU is, after all, a DSP. I plan to add a 3-band EQ to the output stage, with settings from the init file. I’d also like to see if I could manage a nice reverb algorithm with the available RAM.

MIDI functionality: It’s pretty cool already, being able to map an entire keyboard range of notes to stereo WAV files, but it would be even cooler to use MIDI Control Change messages, or even a trigger input, to map to an entirely different set of sounds. Right now, you can do this by changing the MIDI Channel number on your controller, but not having to change channels would be even easier.

Serial control: The WAV Trigger’s serial control protocol is already more sophisticated than the MP3 Trigger’s simple protocol, with the ability to control individual track transport functions and volumes. I plan to add things like the ability to export track filenames. Significantly, I also plan to develop and publish an Arduino WAV Trigger Control Library to simplify using the serial control features for those of you in the Arduino world.

 

 

New Website

Over the weekend, I transferred the old MakerJam website to a new host, and a new look. I’ll continue to work on moving over much of the old content, blog posts, etc, but in the meantime things may seem a little sparse.

I don’t plan on having a forum this time around. Most of the activity in the MakerJam forum was related to SparkFun product support, and since they already have a forum, it was confusing having two places to post. I monitor the SparkFun forums on a regular basis anyway. Unfortunately, that leaves me with no place to put the old MakerJam forum posts. I’ll look into what the possibilities are.

Bionx Electric Bike Conversion

Just finished converting my Specialized Rockhopper mountain bike to electric with a BionX PL350 kit. Check it out:

Bike_Commute_01

The system provides a very natural assist, using a torque sensor in the hub to apply 4 different levels of amplification to your peddling. It makes pretty much any hill feel like level ground without changing gears.

Took about 2 days to install and bring my bike up to commuter-worthiness.