Hello PJRC Community,
I have been spending the past few months building a .WAV sample play-back system for my band / tinkering interests.
The .WAV files are played using Pure Data. →https://puredata.info/
I am able to run Pd on both my laptop running OSX, and my iPhone 6 running the latest iOS. I am using MobMuPlat to run Pd on the iPhone. →http://mobmuplat.com/
I am using Teensy 2.0 as a MIDI controller.
inputs: 4x arcade buttons, 4x piezo-elements (drum triggers)
outputs: 12x 5mm LEDs
(there is a pdf version of the schematic also attached)
The Teensy interacts very simply with Pd, or that's the idea.
The Pd patch receives inputs from both the Aarcade Buttons and Piezo-Elements, which cues different .WAV files and LEDs to turn on/off.
Each song contains a different combination of WAV files and action/reactions to I/O from the Teensy.
The issue:
Mid-song, Pd and Teensy lose connection with one-another.
Unplugging the USB connection between Teensy & Macbook/iPhone get's things working again.
Teensy does not lose power in these moments, but more so seems "frozen".
Edit 2016-01-28:
If any LEDs are on when Teensy freezes, they will remain on, however the device is no longer able to communicate with Pd.
I have also attached my sketch. I believe there are some fundamental coding concepts missing from my Teensyduino sketch.
Currently I am using the Bounce objects for the Arcade Buttons and Piezo-Elements, seems to work fine for my purposes, as the Piezo-Elements should read 0 or 1. My Pd patch only "cares" about switches going from 0→1.
Another note on Piezo-Elements:
I am using a simple RC high-pass filter with each of them. I don't think this is enough. I read the following article yesterday and am very interested in modifying my Piezo circuits to match. The circuit uses 2-diodes, a resistor and capacitor to limit the peak voltage, decay time of each transient and also make the piezo's outputs "all-positive".
Link Here
All comments and advice are welcome, thank you!
Here are some photos of the "footswitches". I have built 2, they're basically identical and I am having the same issue with both.
on left: 3D printed drum trigger mount for snare (spring actuated)
on right: piezo-element sealed in heat shrink with 6.35mm jack
I have been spending the past few months building a .WAV sample play-back system for my band / tinkering interests.
The .WAV files are played using Pure Data. →https://puredata.info/
I am able to run Pd on both my laptop running OSX, and my iPhone 6 running the latest iOS. I am using MobMuPlat to run Pd on the iPhone. →http://mobmuplat.com/
I am using Teensy 2.0 as a MIDI controller.
inputs: 4x arcade buttons, 4x piezo-elements (drum triggers)
outputs: 12x 5mm LEDs
(there is a pdf version of the schematic also attached)
The Teensy interacts very simply with Pd, or that's the idea.
The Pd patch receives inputs from both the Aarcade Buttons and Piezo-Elements, which cues different .WAV files and LEDs to turn on/off.
Each song contains a different combination of WAV files and action/reactions to I/O from the Teensy.
The issue:
Mid-song, Pd and Teensy lose connection with one-another.
Unplugging the USB connection between Teensy & Macbook/iPhone get's things working again.
Teensy does not lose power in these moments, but more so seems "frozen".
Edit 2016-01-28:
If any LEDs are on when Teensy freezes, they will remain on, however the device is no longer able to communicate with Pd.
I have also attached my sketch. I believe there are some fundamental coding concepts missing from my Teensyduino sketch.
Currently I am using the Bounce objects for the Arcade Buttons and Piezo-Elements, seems to work fine for my purposes, as the Piezo-Elements should read 0 or 1. My Pd patch only "cares" about switches going from 0→1.
Another note on Piezo-Elements:
I am using a simple RC high-pass filter with each of them. I don't think this is enough. I read the following article yesterday and am very interested in modifying my Piezo circuits to match. The circuit uses 2-diodes, a resistor and capacitor to limit the peak voltage, decay time of each transient and also make the piezo's outputs "all-positive".
Link Here
All comments and advice are welcome, thank you!
Here are some photos of the "footswitches". I have built 2, they're basically identical and I am having the same issue with both.
on left: 3D printed drum trigger mount for snare (spring actuated)
on right: piezo-element sealed in heat shrink with 6.35mm jack
Attachments
Last edited: