SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By DaveC_nz
#197009
I am trying to use an arduino via serial with the library etc to control playback out of all 8 outputs. I have flashed the mono firmware (several times) and when I just do a simple test with the trigger pins playing a sample out each output I have all 8 working just fine but when trying to get use the arduino I can't get any output past the first 4. If I use an output number greater than 4 it loops back to one as instructions suggest it would do past 8. Really not sure what I have missed, any ideas?


Cheers
Dave
By DaveC_nz
#197016
tsunami.trackPlayPoly(int t, int out, bool lock), so tsunami.trackPlayPoly(1, 5, false). Everything else works as expected but outputs 5, 6 , 7, and 8 come out 1, 2, 3, and 4 respectively. This was with the latest mono firmware but I also tried the previous version in hope it might work but no joy.
User avatar
By robertsonics
#197017
I see it. In the Tsunami Arduino Library, open the Tsunami.cpp file with a text editor and scroll down to line 299, in the routine called "trackControl()".

Change the first line of that routine from:

o = out & 0x03;

To:

o = out & 0x07;

That should do it. I'll make this fix along with some new additions to the library that I've been meaning to get to for awhile.

Sorry for the inconvenience.
By DaveC_nz
#197020
That fixed the playback problem but there seem to be a bunch of other things that aren't working right. The track stop and stop all commmands don't seem to do anything, the tracks keep playing regardless. The master gain settings seemed a bit hap hazard and would never work on output 8.
User avatar
By robertsonics
#197024
Many of the things you mention are demonstrated in the example sketches that comes with the library, and are known to work without issue, so I suspect something else is going on. If you haven't done so already, please try the example sketch. There's a link in the Library readme to the sound files I use for the examples. Of the things you mention, the inability to control the gain on output 8 seems like it could possibly be another library bug, and I'll take a quick look.