WAV Trigger firmware update

Haven’t posted in a while, so I thought I’d give a brief update. After seeing the appreciated, but rudimentary demo video for the WAV Trigger posted by SparkFun on the product page, which doesn’t even mention polyphony – the very same demo could have been done with the MP3 Trigger – I decided that I needed to put some effort into a killer demo of my own.

I won’t spoil the surprise, but suffice to say that my application requires seamless looping, so I’m currently working on providing this capability in the WAV Trigger firmware. I mention this here because a number of people have asked for it. I used to think it was too hard, given the architecture, but it turns out that some changes I made for sample rate conversion / pitch bending have quite possibly made it more achievable.

A number of people have made some perfectly valid requests for other new features. I’m not ignoring you, I just want to try this first.

Stay tuned…

Jamie

  • reply Jordan ,

    Interesting! Will we be able to select looping points that are not at the start/end of the WAV and allow the WAV to play out after the trigger is released? (Attack, Sustain/Loop, Release)

    I have a non-musical application I’ve been trying to work out how to implement and this would help immensely.

    • reply Jordan ,

      • reply Jeff ,

        That is very exciting!!! With seamless looping enabled, you can use voices as individual waveforms to simulate oscillators! And not limited to simple sines/squares either, but full wavetable-style synthesis. I am interested if you have any plans to implement ASDR/filters/etc as well . . . .

        • reply Kerry ,

          Can anyone advise if there is some sort of “active out” connection on Wavtrigger? I need something to drive a small relay when a wav file is playing. Can’t easily use the on board LED as it pulses when at rest. any thoughts appreciated.

          • reply jamie@robertsonics.com ,

            The pin labeled “PLO” is the Play Output Status. It’s low whenever at least one track is playing, high otherwise. Hope this helps.

          • reply Kerry ,

            That will do the trick perfectly! Thanks for that

            • reply paul ,

              how would you connect a relay from the PLO pins please.

            • reply Zinc ,

              Just found your page on the Wav Trigger while trying to figure out if I could do the same with an Arduino or something (though was not very encouraged with what I found). But seamless looping is a must for me, glad to read that feature is in process. With that, this would be just what I’m looking for… My app is to miniaturize/portableize a looping setup– now I’m using a loopstation stompbox for backing tracks (I don’t really need record, just playback), in stereo. And I want to integrate a reverb effect on my guitar, and the loop box into as tiny a package as I can come up with– the Wav Trigger once it has looping would be a great solution…

              One other suggestion in regards to looping– the absolute perfect solution for me would be to have it level triggered, so that when the trigger signal goes high (or low, don’t care about polarity), it starts the loop at the default volume, and plays continuously as long as the trigger level is present, then when the trigger level goes away, it fades out over several seconds, rather than just cutting off abruptly. My current looper, the JamMan SoloXT has that feature, and I love it, it’s a really nice touch.

              One question though– I’ll be combining this with a single battery-pack that’s driving all 9V *positive ground* devices, and I thought I saw the Wav Trigger is negative ground. Do you think there would be any issues with the signal-out ground being tied to the positive side of the supply voltage instead of the negative side?

              • reply Zinc ,

                The more I look at the specs on the Wav Trigger, the more awesome I’m realizing it is– you already list fades both in and out, and I’ve been wanting a simple stand alone single-shot sample trigger device for some time. The polyphonic feature wasn’t important for my backing-track application but for single shot samples, it’s perfect. Kudos for a great design. I’m still thinking up applications for this thing, I may have to get several of them…

                • reply boutzo ,

                  Is the seamless looping a reality yet? I cannot seam to find any diffinative info on that anywhere

                  • reply jamie@robertsonics.com ,

                    Unfortunately, I haven’t come up with a way to do this that doesn’t involve removing some other feature, like reducing the number of voices. It’s a memory issue, and there just isn’t enough memory in this CPU to pull it off in any general way. It is possible if you can create looped wave files of of specific lengths, but none of that audio editors I’ve found allow you to time-stretch to an exact number of samples. I’ve honestly looked at this from many different angles, but just haven’t found a way to do it.

                    I’m just beginning work on a new hardware version that uses the latest Atmel SAM 7 Cortex-M7, which is faster and has a lot more memory. Seamless looping is one of the design goals.

                  • reply boutzo ,

                    Also which hardware version is the latest ? Sparkfun has it listed as wig – 13660.

                    • reply jamie@robertsonics.com ,

                      Yes, it’s the latest. As I mentioned below, I just started work on a new hardware version with a different CPU that should allow for more voices and more features. No timeframe yet.

                    • reply boutzo ,

                      Not to pull you off the current project, but for me and I’m sure others I don’t need 14 simultaneous voices. It would be great if you could release a firmware version for the older models that supports loop. Less voices, so be it. I would think loop is a far more important selling point. I’ve looked at a lot of other boards and this is probably the number one feature request for most of them.

                      Thanks for responding.

                      • reply jamie@robertsonics.com ,

                        Fair enough. Can you tell me what you want in more detail? What is your application (modular synths by any chance?)

                        Would a simple seamless loop over the entire wav file be sufficient, or do you need to specify a loop point? If so, how? Please be as specific as you can.

                        And how many voices would be enough?

                        Thanks, -Jamie

                      • reply boutzo ,

                        Is it possible to do a crossfade to achieve a loop. I know it wont be exact but would this be a good workaround?

                        • reply boutzo ,

                          I’m using it as a sound effects board for a ghostbuster proton pack. I saw an example but I was looking to get a little more out of it. A startup wav that goes to a hum wav loop as long as the on switch is low. Same with the firing sequence initial fire wav that goes into a different loop wav. As long as the buttons pressed the loop continues, let go and it triggers another wav. Me personally I just need probably 8 or 10 so independent effects wavs with only 3 being used simultaneously just for good fading of sounds. All will done over serial.
                          Thanks again

                          • reply jamie@robertsonics.com ,

                            While it’s not what you are asking for, I can suggest two work-arounds: The first is the simplest, which is to loop and extend your sound in a editor like Audacity (free) or Audition and just make the wav file super long. It’s not like space on the SD card is an issue, and the WAV Trigger doesn’t care how long the file is. You’ll get perfect looping using the editor, and just make the file longer than you’d ever possibly need (unless you need infinite.)

                            The second is what you suggested. Using the serial protocol, you could start a track and before it reaches the end (by timing), start and fade-in a second track, and then fade out the first. Then just before that one ends, repeat the fades out/in back to the first track. You’d need to make two separate tracks with the same sound, since the fade commands use the track number and affect any voice playing that track.

                          • reply boutzo ,

                            I was thinking the same thing space definitely is not an issue. That is usually the issue with the other cards max 16MB of space with a flash. I tried the WT588D but just didn’t like the sound or the odd bitrates. The Adafruit Audio FX board has better sound based on the vs1000d chip but space is the issue for loops and no poly. Still loop would be nice (just thinking of others).

                            One last question:
                            I plan on using a different amp is there only mono out of the card or is the jack a stereo jack ? I’m a little confused. Accepts stereo files but only mono amp and only one speaker out pins on the board

                            • reply jamie@robertsonics.com ,

                              Line-out jack is stereo and the WAV Trigger only plays stereo wav files. The on-board mono amp is only connected to the left channel. It’s purpose is for low-volume battery powered applications where you don’t want/need a separate amplifier, often don’t require stereo. In those cases, you create a wav file with your content on the left channel.

                            • reply Fabrizio ,

                              Hello Jamie,
                              you did a really awesome job!
                              Some days ago I was looking for Mellotron sounds and infos, and I’ve found the Wav Trigger.
                              After a short read of your tutorial “Turn the Rock Band 3 keyboard into a a sampling instrument….” I bought it immediately.
                              It was late in the night, and I forgot to check if I’d need other items to interface it ^_^
                              Now I’m going to order a FTDI basic breakout to interface it with my PC.
                              The question is: do I need also the SparkFun Midi shield or to interface the WAV Trigger with a keyboard the few components you said to build the MIDI interface are enough?
                              I’ve been collecting for months Mellotron samples, and with the WAV Trigger now it’s possible for me to build a Mellotron emulator in a little box… Wonderful.
                              Thank you!!!

                              • reply jamie@robertsonics.com ,

                                You can either use the SparkFun MIDI Shield, or build your own interface as described in this post. You do not need both. Also, you only need the FTDI Basic if you want or need to update the WAV Trigger firmware.

                                Hope this helps.

                              • reply Jeff ,

                                I agree with boutzo. I will trade some polyphony for seamless looping capability. 14 voices is a great achievement but probably more than most will need. 6-8 voices would probably be sufficient. I would like to be able to use seamless looping to be usable as wavetable oscilators/sound sources for synthesis. If its possible to load different versions of firmware depending on the application that would go a long way towards being able to satisfy all comers. Want looping? Load version 6.2. Want greater polyphony? Use version 5.7!

                                • reply jamie@robertsonics.com ,

                                  These are good suggestions. For this type of application, how would you typically want to control? Are we talking CV and gate (i.e. for Eurorack applications,) or would you still use the digital triggers and/or serial control. Anything you can tell me about how you’d want to use it would be helpful.

                                • reply Norm ,

                                  Have just come across this device.. am developing an electronic melodeon & the device looks perfect for it. Have read the comments & would add that I’d need only 8 note polyphony (not enough fingers to handle more).
                                  Brilliant bit of work.

                                  • reply Leo Glz ,

                                    Hello Jamie, the wav trigger is a great job.
                                    I need to play 50+ sounds (mp3 music of 20 seconds each one, that I suppose should be converted to wav). Is it possible to select trough trigger inputs combination? for example with 111111, I could select until 63 sounds. If is it not possible, how can I do that? Thanks in advance

                                    • reply jamie@robertsonics.com ,

                                      I’m not sure I fully understand what you’re wanting to do. If the built-in trigger features don’t accommodate your needs, you can always use an Arduino to read your inputs, implement whatever logic you want and then control the WAV Trigger serially using the WAV Trigger’s Arduino library.

                                      Hope this helps.

                                    • reply inouk ,

                                      Hello Jamie,
                                      Just wondering if it might be possible to add a Shuffle feature under random playback, which would play all tracks without repetition. Thanks for the great product!

                                      • reply David G. ,

                                        Hi Jamie,
                                        Does the Play Output Status (PLO) pin output 3.3V or 5V?
                                        Thx,
                                        David

                                        • reply jamie@robertsonics.com ,

                                          3.3V, Active low (meaning that it goes LOW when sounds are playing).

                                        • reply David G. ,

                                          Hi Jamie,
                                          Could you please explain how the “Latched” trigger type works and how to implement a continuous “Next” function?
                                          Thx,
                                          D

                                          • reply jamie@robertsonics.com ,

                                            When a trigger type is set to “Latched”, a transition – either high-to-low or low-to-high, depending on the state of “Invert” – will latch the trigger into the active state, so that it will behave like a “Level Sensitive” trigger that is being held active. If the trigger function is “Next”, then tracks will continue to play sequentially, one after another, in the specified range. The only thing that will stop, or un-latch, it is another trigger that implements the “Stop” function.

                                            Hope this helps.

                                            • reply David G. ,

                                              Thx.
                                              So what’s the difference from the “Edge” type?

                                              • reply jamie@robertsonics.com ,

                                                An transition on an “Edge” type trigger only activates once per transition. So if the function is “Next”, a transition will cause the next track to play and then stop. Another transition is required to play the next track in the specified range.

                                                Practically speaking, with edge, you have to push the button to hear the next track. With latched, you press the button once and the tracks just keep playing.

                                                If you have a WAV Trigger, I suggest you just experiment.

                                                • David G. ,

                                                  I’m getting it tomorrow ๐Ÿ™‚
                                                  Last one – so how would “Level” work?
                                                  The reason I’m asking is that I need WAV Trigger to begin playing on power up w/o a SW generated trigger (preferably, on T1 button press). If I put a shunt on a trigger and define it in the .ini file as “Next” leve-triggered, would it work?
                                                  Thx,
                                                  D

                                                  • jamie@robertsonics.com ,

                                                    Yup. You don’t even have to put a shunt on it. Just set to “Level” and check “Invert”.

                                            • reply David G. ,

                                              Got my WAV Trigger, works nicely (V11 HW version, 1.28 FW version).
                                              Question regarding PLO behavior:
                                              I created a .ini file that plays all tracks in sequence as you suggested. That part worked flawlessly.
                                              However, I noticed that PLO doesn’t go to HIGH and then back to LOW again between tracks.
                                              It seems that it’s stuck at LOW.
                                              When operating the board manually (meaning giving manual triggers), PLO works as expected.
                                              When a track is looped, PLO doesn’t go to HIGH and then back to LOW when the track is looped.
                                              Shouldn’t PLO go to HIGH in between tracks even when Next and/or Loop are used?
                                              Thx,
                                              David

                                              • reply jamie@robertsonics.com ,

                                                The meaning of the PLO output is that audio is playing. When you have a continuous trigger, a new track starts as soon as the current track finishes, so technically audio is playing continuously. Similarly, if you have multiple tracks playing simultaneously (polyphonic) and one of them stops, the PLO output stays low, again because audio is still playing. It’s not a “track finished” output.

                                                • reply David G. ,

                                                  Thx.
                                                  In the continuous “Next” trigger scenario, does PLO go HIGH and then immediately LOW (i.e., a very SHORT pulse, detectable by e.g. an edge detector), OR does is stay (by design) LOW continuously?
                                                  Thx,
                                                  D

                                                  • reply jamie@robertsonics.com ,

                                                    It’s programmed to be low while any track is active, and I suspect that a continuous “Next” scenario means that it does not transition, because the next track starts playing immediately after the previous finishes. By design there is no intentional gap in the audio. Again, remember that the WAV Trigger is polyphonic, so a track can finish while others are still playing as a matter of course. The PLO output does not indicated “track finished” – it can’t when there can potentially be 14 tracks all playing and finishing independently.

                                                    There is a serial command that will return the numbers of all the tracks currently playing, which can be used to determine when a particular track finishes.

                                                    • David G. ,

                                                      Thx. I understand that.
                                                      Still, if I put an edge detector on PLO, would it detect a trigger in between tracks when only one track is playing? (a PIC has a change notification interrupt on some of its ports ๐Ÿ™‚ )

                                              • reply Darin Kadrioski ,

                                                Any chance of us seeing a ‘set pan per track’ feature in the future? Only thing missing in my life right now ๐Ÿ™‚

                                                • reply jamie@robertsonics.com ,

                                                  Please explain how you would want this to work. Of course you can adjust the pan in your wav file with a sound editor, so I assume you mean you want control over it dynamically. Serial control? An Arduino library function?

                                                  It’s actually not trivial to do correctly, and I’m concerned that doing it correctly will impact the number of voices I’m able to support, which is the main reason I haven’t done it yet.

                                                  • reply Darin Kadrioski ,

                                                    Personally would like to see it work via the Arduino library. Similar to `trackGain(trk, vol)` but perhaps as `trackPan(trk, center)` where zero is centered (i.e. unaltered from original), negative value for left and positive for right. Alternaltively could be thought of as `channelGain`.

                                                    As background, I’ve built a drum/percussion module and while I’m able to set the relative volume for individual tracks, it would be the bee’s knees if the user could also set the pan position for things like toms or cymbals rather than having it “hardcoded” into the wav file.

                                                    • reply Jamie ,

                                                      I can understand the desire for this, but the way the audio code is optimized, it would very likely affect the number of voices. All volume adjustments in the signal chain are done on a per sample basis, but assume stereo buffers. Because stereo audio is interleaved, it would require either splitting left and right into separate buffers and then recombining after the gain step, or severely reducing the efficiency of the function in order to apply different left/right gain. It’s certainly do-able, but would very likely reduce the total number of voices available.

                                                      While I’ve been busy on a new product development (coming soon) the last few months, I do have a list of enhancements to the WAV Trigger that I’ll get to soon. No promises, but I’ll review this then and see if there’s a way I can accommodate.

                                                • reply Steve ,

                                                  How do you upgrade the firmware? I have the 1.10 hex file, but no idea how to upgrade it. Thanks

                                                  • reply Steve ,

                                                    I meant 1.30…. not 1.10

                                                    • reply Jamie ,

                                                      Please see the Online User Guide.

                                                  Leave a comment