Triggering Audio

OK finally you are ready to play some audio. You can use the board in two ways, either in 'Trigger mode' (default) or 'Serial mode' (more advanced usages, see the next page)

This page will talk only about using it in trigger mode since that's what we think most people will do.

How many triggers are there?

There are eleven trigger pins - named #0 thru #10

You don't have to use them all! We just had lotsa pins so we made them all available.

Each trigger bin is an input that we recommend using with a pushbutton or tactile button or other kind of switch. When the # pin is connected to GND for more than about 125 milliseconds it will trigger! There is a 100K pull up resistor on each one, so you do not need any extra resistors or pullups.

Remember, you don't have to use a mechanical button or switch - you can use conductive thread, tilt switches, two pieces of tinfoil, the output from some other electronic thingy, just anything that will send a ground signal to the pin.

How long does it take for audio to play once I've triggered the pin?

Good question! It matters whether you are using WAV or OGG. Compressed audio takes a little more time to get going.

From the moment the SFX board sees a ground level on the pin, it takes ~120ms to play a WAV file and ~200ms to play an OGG file. These are within 'instant feedback' expectation

If 'repeating' a file by keeping the button hend down, or doing a latching trigger type, theres a ~20ms delay (imperceptable) between WAV replays and ~120ms between OGG replays (noticable if the audio is meant to perfectly loop)

Trigger Types

There's a lot of different ways you may want to play your sound effects. Normally a microcontroller would be required to get exactly what you want, but the Sound Board is pretty smart and has the ability to play audio a couple different ways depending on the file name

There's no code or firmware involved, only the file name of the audio file!

Let's understand this by going through the five types:

Basic trigger - Tnn.WAV or Tnn.OGG

The first type is the 'basic trigger' - when the button is pressed, audio plays. The entire file is played from beginning to end once.

To enable this trigger, name the file Tnn.WAV or Tnn.OGG where nn is the trigger #. For example, if you want to use pin #0, the file could be called T00.WAV (that's two zeros after the T), if you want to use pin #6, T06.OGG - all the way up to T11.WAV

Hold Looping Trigger - TnnHOLDL.WAV or TnnHOLD.OGG

This is a more complex trigger. Instead of pressing once the button to play, it plays ONLY when the button is held down. Great for "hold the button down to play the ray gun blaster sound effect" Call the file T02HOLDL.WAV for example

As long as the trigger pin is connected to ground, it will continue to play the same track on repeat. If you want a perfectly smooth transition between the end and beginning, we suggest WAV files, as OGG decompression takes a few milliseconds and has a noticable delay.

Latching Loop Trigger - TnnLATCH.WAV or TnnLATCH.OGG

This is a little like the Hold Looping trigger but you do not need to keep the button held down. Instead, press the button once to start the looping effect, then press it again to stop.

This is maybe good for if you want a continuous effect without having to keep the pin held down. Call the audio file T08LATCH.OGG for example

If you want a perfectly smooth transition between the end and beginning, we suggest WAV files, as OGG decompression takes a few milliseconds and has a noticable delay.

Play Next Trigger - TnnNEXT#.WAV or TnnNEXT#.OGG

Lets say you want to have one button but many different sound effects. For example, a stuffed animal that has a squeeze sensor trigger. It would say different things each time it is squeezed. For this kind of effect, use the Play Next Trigger.

This trigger is basically like the basic trigger, one button press per play, but you can have multiple effects on one pin

You can have up to 10 audio files triggered on one pin, they will play in order. For example, if you're using pin #3, the files would be named T03NEXT0.WAV, T03NEXT1.WAV, T03NEXT2.OGG etc. up to T03NEXT9.WAV

Just make sure it starts with #0, and put as many as you like up to #9. You do not need to use all 10 '# slots' up. If a number is missing, like T03NEXT3.WAV doesn't exist, it will automatically play #0 again.

Play Random Trigger- TnnRAND#.WAV or TnnRAND#.OGG

OK so you like the Play Next mode but you don't want to have it always in the same order? Use Play Random mode. You can have up to 10 audio effects, from say T07RAND0.OGG uo to T07RAND9.OGG

When the button is pressed, a 'random' track will be played.

Please note, this is not 'cryptographic quality' randomness :) In fact, itwill play through all of the tracks at least once (but in any order) before repeating.

Wire up Buttons

If you grabbed the demo tracks from the "how to upload files" page, you can try each of the different kinds of trigger modes

For this demo, I am using a breadboard and small 6mm tactile buttons, but you can use a wire to touch from a trigger pin to GND with headphones plugged into the audio jack

You can see each button connects to the trigger pin, and then the other side to ground. For this demo I'm using the Lipoly backpack but you can power any other way. When buttons are pressed, the audio files on the board get triggered!

Last updated on 2016-12-02 at 01.05.32 PM Published on 2014-09-23 at 06.09.39 PM