SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By nickrbrewer
#180051
With the addition of pitch bend in v1.05, is it possible to hook up something like a flex sensor to create the same effect?

Basically I'm going to put a WAV Trigger in a Nintendo Power Glove and use the buttons to fire the sound triggers, I'd like to use the flex sensors in the fingers to pitch bend those sounds.
User avatar
By robertsonics
#180070
Yes, though not directly. The WAV Trigger doesn't currently have any analog inputs, so you'll need to use a small Arduino - anything with at least 1 analog input and a serial port - and control the WAV Trigger using the serial protocol. There's a new "SAMPLERATE" serial command that lets you pitch up/down up to 2X. The latest Remote Control app demonstrates this.

Note that you can still use the trigger inputs to fire the sounds from buttons, and just use the serial control port to do the pitch bending.

Now that the WAV Trigger does sample-rate control, it may make sense to have an analog input capability for trigger inputs. I'll have a look.

The latest v1.08 firmware improves pitch bend - fixes some distortion in the earlier version.
By nickrbrewer
#180075
Thanks for the quick response! I was actually going to throw either an arduino micro or a trinket in there for some other functions, and this makes total sense!
By nickrbrewer
#180615
Sorry, this is a follow up to the pitch bend question.

It took some time, but I finally got the power glove all wired up to a Teensy 3.1. I've been using the arduino serial library to get everything up and running, but I've found some audio issues. When I fire the trigger through the glove/teensy, I get a very distorted sound, but when I test it with the on board button, it comes out nice and clean.

So far I haven't been doing anything fancy with my code, just using a modified version of the button example sketch with the wtrigger instead of the LED.

I made a little video of it here. Sorry it's sideways, but you can hear the difference.
https://www.youtube.com/watch?v=WR10cZ-uUTE

Any help would be greatly appreciated.
User avatar
By robertsonics
#180636
If I had to guess - which is all I can do - I'd say that your button is not debounced and that you are starting multiple copies of the track. Remember that by default, the triggers are polyphonic - each activation will start a new copy of the track even if one is already playing. That sounds to me like volume distortion, which can happen if you mix multiple versions of the same track so that the resulting level is clipped. Sounds like you're over-driving the speaker.