TactileAudio Project Configurator

This page generates an Arduino "sketch" for the TactileAudio project. Use this app to configure the settings for your project, then see the "Create Sketch" button and directions at the bottom of this page.

After you create your configuration, you can save it to a file. If you previously saved a configuration, you can restore it and continue working on it.

Configure channels identically
If selected, all channels are configured identically from the choices on Channel 1.
If you are not using a channel, disable it here to prevent it from confusing other operations. There are four "channels", each with its own sensor, audio output, and vibrator control.

Sensor Options (1)

This specifies how the sensors will control the output:
  • Touch mode: Audio plays when the sensor is touched, and stop when released.
  • Proximity mode: Track when your hand gets near the sensor, volume increases as hand gets closer.
Note: fade-in, fade-out, volume, and touch-to-stop don't apply when using Proximity mode and will be hidden when "Proximity mode" is selected.
How strong the touch signal needs to be to start and stop your audio track. Range is 0 to 100.
  • Touch mode: values 85 and 65 typically work well.
  • Proximity mode: values of 15 and 10 typically work well.
Lower values mean more sensitivity, higher values mean less sensitivity. Release threshold MUST be lower than the touch threshold.
Sensor Options Channel 2 go here
Sensor Options Channel 3 go here
Sensor Options Channel 4 go here

Audio Options (1)

Enable audio
Click on the switch at the left to enable/disable audio ouput for this channel.
Volume control, range is 0 to 100. You'll typically leave this at 100, but there may be applications for which lower values are appropriate. (Note: this is hidden when "Proximity mode" is selected above.)
By default a track starts playing at full volume, and stops immediately when the sensor is released. If you specify a fade-in and/or fade-out time, then the track's volume fades in and/or out for the specified time (in milliseconds, e.g. 1500 is 1.5 seconds). (Note: this is hidden when "Proximity mode" is selected above.)
If this is enabled, then each time a sensor is touched, the audio track resume where it left off the last time. If disabled, the audio track starts from the beginning each time the sensor is touched. (Note: this only applies when "Single-track" mode is selected below, and will be ignored for random or shuffled tracks.)
When an audio track reaches the end, it stops. If this is enabled, the track loops back to the beginning and continues playing as long as the sensor is touched.
Touch-start / touch-stop mode. Normally your audio plays while you're touching the sensor and stops when you release. With this enabled, a touch starts the audio, which keeps playing until you touch again. (Note: this is hidden when "Proximity mode" is selected above.)
Each sensor can be associated with multiple (up to 100) tracks in a corresponding folder on the micro-SD card, which must be named E1, E2, E3, and E4, corresponding to sensors 1-4. Click here for more info.
  • Single-track mode: The "normal" mode: A single audio track is played when the sensor is touched.
  • Shuffle tracks: The audio tracks in the folder are "shuffled" (like a deck of cards) and played in that order when a sensor it touched.
  • Reshuffle tracks: Like "Shuffle", but the list is reshuffled each time through.
  • Play random tracks: A randomly selected track from the folder is played when the sensor is touched.
Audio Options Channel 2 go here
Audio Options Channel 3 go here
Audio Options Channel 4 go here

Haptic Options (1)

Enable haptics
Click on the switch at the left to enable/disable haptic (vibration) ouput for this channel.
Select vibrator type:
Specifies the type of vibrator you are using:
vibrator-types
  • Motor vibrators are small motors with an eccentric (out of balance) weight. They are powered by a DC voltage.
  • Linear vibrators are like a small speaker, but without the speaker cone. They usually have a resonant frequency (e.g. 150 Hz) where they operate best, and should be driven by an AC voltage at or near that frequency.
Select vibration envelope:

Vibrators' intensity can modulate over time. That is, the software can increase and decrease the strength of the vibration over time. The pattern of vibration intensity is called a "vibration envelope". There are five built-in amplitude patterns, and you can additionally create up to four custom patterns.

Sensor-Proximity action:
Proximity is not enabled. To use this feature, select "Proximity Mode" in the Sensor Options above.
Controls how "proximity" (of your hand to a sensor) affects the vibration:
  • Fixed intensity/speed: Proximity only determines on/off; the vibration's intensity and speed are fixed.
  • Proximity controls intensity: As proximity decreases (your hand gets closer to the sensor), the intensity of vibration increases.
  • Proximity controls speed: As proximity decreases (your hand gets closer to the sensor), the speed of the vibration pattern increases. For this option, you'll also select a "speedup" factor. For example, if you're using a vibration pulses that are normally one second apart with a speedup of 100%, then when proximity gets to zero (your hand touches the sensor), the pulses will be twice as fast, or 1/2 second apart.
Haptic Options Channel 2 go here
Haptic Options Channel 3 go here
Haptic Options Channel 4 go here

Global Options

These options apply to all channels, audio and vibrations.
If you enable continue-track mode (above), then the inactivity timeout specifies an idle time; if that time passes with no activity (no sensors touched), then all tracks are reset and will start playing from the beginning the next time a sensor is touched (rather than resuming where it left off). Time is in seconds. A value of zero means no timeout.
Enables multiple simultaneous tracks; that is, if you touch two or more sensors, the associated audio files and/or vibrations will play simultaneously. If disabled, only one channel plays at a time.

Advanced Options

Click on the switch at the left to show/hide advanced options
Advanced options output are hidden. Click on the switch above to show advanced options.
Amount of detail in the Arduino app's "serial monitor" window. This is mostly for developers, or when trying to diagnose problems.
  • No logging: nothing is printed to the serial monitor
  • Activity logging: Ordinary events (touch/release, audio start/stop, etc.) is logged
  • Extensive logging: Produces a lot of information. Should only be used by C++ developers.

NOTE: THIS FEATURE IS EXPERIMENTAL, and may change or be removed in future versions.

The proximity-multiplier feature can be used to make the sensor more or less sensitive. Each sensor is specified separately. A value greater than 1 increases sensitivity, and less than one decreases it. For example 2.0 will double sensitivity; 0.5 will cut sensitivity in half. NOTE: reducing sensitivity also reduces the total volume you'll ever get, e.g. a multiplier of 0.5 means you'll never get more than 50% volume.

Note that the multiplier also affects touch mode and the touch/release threshold.

You probably don't need to modify this. This is the number of sensor readings that are averaged together to get the sensor's value. Higher numbers mean more smoothing, but also mean a slower response time. Lower numbers mean less smoothing (noiser signal) and faster response. Only change this if you have a noisy situation, usually indicated if your audio tracks "stutter" (start and stop rapidly).

Create your sketch...

Directions:
  • Click the "Create Sketch" button.
  • Click in the text area below with the sketch and type Command-A (Macintosh) or Cntl-A (Windows) to select all text.
  • Select Command-C (Mac) or Cntl-C (Windows) to copy the text.
  • Paste the text into the sketch window of your Arduino app.
You can edit the sketch directly in the Arduino app, but be careful not to change the syntax (especially "punctuation").

After you create your configuration, you can save it to a file. If you previously saved a configuration, you can restore it and continue working on it.

Copyright ©2025, Craig James

This file is part of of the "Tactile" library. TactileAudio is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. TactileAudio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for more details. You should have received a copy of the LGPL along with Tactile. If not, see https://www.gnu.org/licenses/.