From a conversation with @Anaaa080 on a different channel, I gather the following:
- there are 12 actuators TEAX19C01-8, each driven by one TDA7498-based power amplifier.
- each actuator is fed frequencies between 1 and 100 Hz
- they want to create an illusion of movement so that the vibration starts from the first actuator when the file playback starts and passes through all the others till it reaches the last one
- however, sometimes all 12 actuators play at once
- using C++
It's unclear to me:
- what is the relationship between the file and the signal that is sent through the speakers: is it a 12-track audio file or is it a stereo file that is processed and sent to the various speakers?
- whether the audio / analog inputs are in use
In the case of using two Belas, if the file has a small number of tracks (up to six tracks, really, depending on how many unused I/O channels are available), and assuming that spare inputs are available, the easiest way to combine two Belas would be to play back the audio from the first into the second; the first acts on the audio it is playing back from disk and the second one acts on the audio it receives from the inputs. One or more control voltages could also be sent, either via the analog I/O or via the digital I/Os. This would allow to achieve the tightest synchronization between the two boards. If the synchronization can be a bit looser, i.e.: if it's OK to be out of sync of a few ms, then sure you can use UART or whatever other non sample-accurate method to synchronise.
However, I would first look at running this all on a single Bela if at all possible. The OP says that frequencies 1 to 100Hz are all that's needed and I'll assume that 16 bit depth is not necessary. One could leverage some soft PWM channels to achieve decent performance in that frequency range, using only a passive RC filter on each PWM output. The example Extras/pru_pwm makes available 8 PWM outputs with a frequency of about 24kHz and about 8 and a half bits of precision. The easiest way to control this with decent timing accuracy from the audio code is to write a new PWM value for each audio procesing block. At the default block size of 16 samples per block, that means you'll be writing your signal with a sampling rate of 44100Hz/16 = 2756Hz. You would then apply a low pass filter at about 1kHz or lower to each of your signals and write them once per block using set_widths(). On the analog side, a 2k2 resistor in series and a 470nF capacitor in parallel gives you a cutoff frequency of 153 Hz which may be good enough for your application. This cutoff attenuates the frequency of the PWM wave by 42dB, but as that's already likely beyond the passband of your power amplifer and your actuator, that should be good enough.