Arduino DAC sound + PS2 controler delay problem (multithreading)

Hi,

I worked in a Arduino projet with DAC sound generated by Playstation 2 controler.

It's work (when i press a button, a wave signal come out) but i have a time lag due to the read function of the library PS2x (PlayStation 2 Controller Arduino Library v1.0 « The Mind of Bill Porter).

I try to use the library timer (Arduino Playground - Timer Library) for multitreading but it's not work.

I try to use Tone() function because of Tone() function use another timer : it's work but sounds are bad and can't be add up (multiple press button)

Is someone have a idea to solve my problem ?

Thanks

Kenny (from France)

You could try this timer based synth but replace the two analog reads with calls to the playstation library -

Duane B

rcarduino.blogspot.com

Thanks for your reply DuaneB,

I can find the Illutron B projet ... code source so i will try ArduinoSynth : GitHub - Illutron/ArduinoSynth

arduino-dds-sinewave-generator : http://interface.khm.de/index.php/lab/experiments/arduino-dds-sinewave-generator/ can also help me i think.

I'll let you know

Hi,
Thats the original version, the refactored, optimised, documented etc version will be available there sometime soon, in the meantime you can get it by sending me a PM with your email address.

Duane B

Hi,

Thanks Duane B for this library ArduinoSynth it's works fine (kill the problem of the delay).

Great library (4 voices, différents type of signals, echo, etc.)

Check your PM :slight_smile:

It's working thank you for Help ...

First release :

Hi,

Is the demo using the Illutron or Illutron B Code ?

If its ok with you, I will put a link on the Illutron B Post and also the Illutron facebook group.

Let me know.

Duane.