Tsunami plays 6 tracks in polyphony, one for each trigger, the tracks should start synced everytime

Hello,

my project needs to connect 6 reed switches to the Tsunami, a track is played everytime a reed switch is turned on;

everytime I activate a trigger, the sound played should start synchronized to the tracks already playing.

As I understood, there must be an Arduino managing this task;

is there any link to help, or do you have solved this kind of issue?

Federico

Hello Federico.

Unfortunately I don’t think you’re going to be able to do that. As far as I know, the Tsunami doesn’t keep track of where it is in a playing track and unless you have a micro controller that’s somehow timing things and is able to know where a playing track is in time, getting things to sync up might not be very easy.

The Tsunami plays wav files which have no tempo or time-signature information, so it has no knowledge about musical content of the audio being played. The only possible way to synchronize is to start tracks at exactly the same time, which is taken care of by the “Synced Set” Trigger function. This allows for up to 8 tracks to start simultaneously with a single trigger, and if the tracks happen to be all at the same tempo, they will be in sync. But as TS-Chris says above, there’s no way to synchronize the start of one track to the musical content of another which is already playing.

Thanks for your reply,

Having the songs with the same tempo and the same duration, played in a loop, would it be possible to start each song synchronized, but muted, and increase the volume by activating other triggers?

Not directly, since Tsunami volume trigger functions only increment and decrement the volume on each activation. However, this would be very easy to implement using an Arduino and the Tsunami Arduino Library. You would connect your reed switches to the Arduino inputs, use the library to start all the tracks looping in sync, and control the individual track volumes based on the switch inputs. Tsunami has built-in fader capability so you can just send library commands to create smooth fade-ins and fade-outs. Just make sure that all the wav files are exactly the same length (number of samples) so that they will stay in sync while looping.

Hope this helps.

Thanks for your help,

following your suggestion, I bought an Arduino uno clone (Elegoo uno R3)

but I am unable to install the library (https://github.com/robertsonics/Tsunami … al-Library)

into Arduino editor online; after trying to follow the instructions on the website, a popup window appears:

"Libraries that could not be imported:

parse library.properties: library.properties not found"

Do you know how to get an updated library I could easily install?

You’re probably going to want to use the downloadable version of the Arduino IDE rather than the online version. The library will work with version 1.8.10 of the downloadable IDE.

Thanks for your support, now I understand a bit more how arduino libraries work.

But I’m afraid to damage the Tsunami board with the arduino uno. Is it safe to connect the tsunami with the arduino uno as described here (http://robertsonics.com/2015/04/25/ardu … -tutorial/)?

It’s not clear to me when you say:

"Tsunami can be powered either with 5 – 15VDC applied to the VIN/GND header or through the onboard USB Micro-B connector.

IMPORTANT: Tsunami is 3.3V device and the Atmel SAM S70 processor’s inputs are not 5V tolerant! Please keep this in mind when you connect signals from other powered devices, such as Arduinos and gate signals from modular synths."

Hi fedev.

The diagram you linked is for the WAV Trigger and that can accept a 5 volt serial signal. I believe the Tsunami is 3.3 volt only though so you can’t connect a 5 volt Arduino directly to it without causing damage.

What you’re going to need to do is use a logic level converter like [BOB-12009 to convert the 5 volt serial signal from the Arduino down to a 3.3 volt signal that the Tsunami will be able to work with.](https://www.sparkfun.com/products/12009)

You can also use a 3.3V Arduino, such as a Teensy, directly.

Thanks for your help,

I have connected the wires using a logic level converter, Tsunami board is still working.

I tried to test the tsunami demo sketch, after installing the tsunami library and the metro library.

I think I should change the Tsunami.h file, but I dont’k now how,

the TsunamiDemo sketch contains this instructions:

"If you’re using an Arduino with at least one extra hardware serial port,

such as an M0 or Teensy, the Tsunami library is already set to use

Serial1. If you need to change that, or want to use AltSoftSerial, you

must make a small edit in the Tsunami.h file, according the instructions in that file."

Can I ask you which is the small change in the tsunami.h file?

Federico

Hi,

I tried to use AltSoftSerial Library to connect the tsunami to the the Arduino Uno:

digital ports 8 for RX and 9 for TX, as indicated by AltSoftSerial website;

I tried to launch the TsunamiDemo sketch,

so I included AltSoftSerial and Tsunami-Arduino-Serial-Library-master and Metro libraries;

I got this message:

"

Arduino:1.8.11 (Windows 10), Scheda:“Arduino Uno”

In file included from C:\Users\sotax\Documents\Arduino\libraries\Tsunami-Arduino-Serial-Library-master/Tsunami.h:69:0,

from C:\Users\sotax\Documents\Arduino\libraries\Tsunami-Arduino-Serial-Library-master\examples\TsunamiDemo\TsunamiDemo.ino:46:

c:\users\sotax\documents\arduino\libraries\altsoftserial\altsoftserial.h: In constructor ‘AltSoftSerial::AltSoftSerial(uint8_t, uint8_t, bool)’:

c:\users\sotax\documents\arduino\libraries\altsoftserial\altsoftserial.h:64:24: warning: unused parameter ‘rxPin’ [-Wunused-parameter]

AltSoftSerial(uint8_t rxPin, uint8_t txPin, bool inverse = false) { }

^~~~~

c:\users\sotax\documents\arduino\libraries\altsoftserial\altsoftserial.h:64:39: warning: unused parameter ‘txPin’ [-Wunused-parameter]

AltSoftSerial(uint8_t rxPin, uint8_t txPin, bool inverse = false) { }

^~~~~

c:\users\sotax\documents\arduino\libraries\altsoftserial\altsoftserial.h:64:61: warning: unused parameter ‘inverse’ [-Wunused-parameter]

AltSoftSerial(uint8_t rxPin, uint8_t txPin, bool inverse = false) { }

^~~~~

c:\users\sotax\documents\arduino\libraries\altsoftserial\altsoftserial.h: In static member function ‘static void AltSoftSerial::enable_timer0(bool)’:

c:\users\sotax\documents\arduino\libraries\altsoftserial\altsoftserial.h:69:33: warning: unused parameter ‘enable’ [-Wunused-parameter]

static void enable_timer0(bool enable) { }

^~~~~~

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `update’:

C:\Users\sotax\Documents\Arduino\libraries\Tsunami-Arduino-Serial-Library-master/Tsunami.cpp:66: undefined reference to `AltSoftSerial::available()’

C:\Users\sotax\Documents\Arduino\libraries\Tsunami-Arduino-Serial-Library-master/Tsunami.cpp:67: undefined reference to `AltSoftSerial::read()’

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `flush’:

c:\users\sotax\documents\arduino\libraries\altsoftserial/altsoftserial.h:55: undefined reference to `AltSoftSerial::flushOutput()’

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `write’:

c:\users\sotax\documents\arduino\libraries\altsoftserial/altsoftserial.h:54: undefined reference to `AltSoftSerial::writeByte(unsigned char)’

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_TsunamiDemo.ino.cpp.o.1940’:

:(.text.startup+0x68): undefined reference to `vtable for AltSoftSerial’

:(.text.startup+0x6a): undefined reference to `vtable for AltSoftSerial’

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `AltSoftSerial::begin(unsigned long)':

c:\users\sotax\documents\arduino\libraries\altsoftserial/altsoftserial.h:47: undefined reference to `AltSoftSerial::init(unsigned long)’

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `flush’:

C:\Users\sotax\Documents\Arduino\libraries\Tsunami-Arduino-Serial-Library-master/Tsunami.cpp:52: undefined reference to `AltSoftSerial::available()’

C:\Users\sotax\Documents\Arduino\libraries\Tsunami-Arduino-Serial-Library-master/Tsunami.cpp:53: undefined reference to `AltSoftSerial::read()’

C:\Users\sotax\AppData\Local\Temp\ccHkGXQe.ltrans0.ltrans.o: In function `AltSoftSerial::~AltSoftSerial()':

c:\users\sotax\documents\arduino\libraries\altsoftserial/altsoftserial.h:46: undefined reference to `vtable for AltSoftSerial’

c:\users\sotax\documents\arduino\libraries\altsoftserial/altsoftserial.h:46: undefined reference to `vtable for AltSoftSerial’

c:\users\sotax\documents\arduino\libraries\altsoftserial/altsoftserial.h:46: undefined reference to `AltSoftSerial::end()’

collect2.exe: error: ld returned 1 exit status

exit status 1

"

Should I get an arduino mega instead?

Federico

Hello,

I used an arduino mega, deleted AltSerialSoft library, now everything works!

I don’t know how to play the tracks using the tsunami demo sketch. Should I use a switch, or it should play automatically?

I managed to use the tsunami demo sketch, now the serial connection is working.

I don’t know how to use the Arduino pins as a input to control tre Tsunami triggers.

Do you have any example or sketch I could use?