robertsonics / Tsunami-Arduino-Serial-Library

Arduino Serial Control Library for Arduino
11 stars 9 forks source link

Line-in gain #4

Closed dkadrios closed 6 months ago

dkadrios commented 5 years ago

Is there any chance in the future there being a way to control the line-in gain via the serial library? I'm considering adding a digital pot to the project I'm working on, but I don't have the available pins. I could skip it altogether if there was a way to control the volume directly on the Tsunami.

robertsonics commented 5 years ago

This certainly seems like a reasonable request. I'll see what I can do the next time I'm working on the code. Are you wanting gain or attenuation? All of the other playback gain adjust ranges are -70 to +10 dB. Would that suffice?

dkadrios commented 5 years ago

Personally all I would need is attenuation, though making it match the other gain adjusts probably makes the most sense

via mobile

On Thu, Aug 29, 2019, 1:37 PM robertsonics notifications@github.com wrote:

This certainly seems like a reasonable request. I'll see what I can do the next time I'm working on the code. Are you wanting gain or attenuation? All of the other playback gain adjust ranges are -70 to +10 dB. Would that suffice?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robertsonics/Tsunami-Arduino-Serial-Library/issues/4?email_source=notifications&email_token=AAJKXK3G4ULUF7GMESP4MHTQHAXRBA5CNFSM4IR3BMC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5PXZXI#issuecomment-526351581, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJKXK44GILPM2JQNDXSGADQHAXRBANCNFSM4IR3BMCQ .

laplacier commented 6 months ago

Is this feature implemented in the firmware? I grabbed a Tsunami Super and I was hoping to have background music routed through Audio In and adjust its gain when needed (playing show audio off the SD card). Playing with all the output gains doesn't seem to affect the Audio In gain; only the tracks playing through the output.

Loving the board though. Makes adjusting timings and gains on audio clips a breeze.

robertsonics commented 6 months ago

Ah... no, not yet, sorry. It kind of slipped off my todo list. My bad. I still believe it's a great request. I will try to implement this within the next couple of weeks.

laplacier commented 6 months ago

That would be fantastic. Would eliminate some circuit complexity and save cabinet space for sure.

robertsonics commented 6 months ago

Which Tsunami version are you using - original, Qwiic or 25-voice Qwiic? I assume you're using the serial library and not the Qwiic library...

laplacier commented 6 months ago

I'm not sure how to confirm the difference between the Qwiic or 25-voice Qwiic visually, but the model number from the purchase order is WIG-18159 which appears to be the Tsunami Super WAV Trigger (Qwiic).

I'm using the serial library on a board hosting an ESP32-S2. If it's easier to implement with I2C and the pins are exposed on the Tsunami PCB somewhere (don't have a Qwiic connector) I can improvise.

robertsonics commented 6 months ago

Okay... please give it a try. This repo has been updated with a new command to set the input gain - see the README. You'll also need to go the Robertsonics website and grab the latest Tsunami Qwiic firmware v2.03. I wrote a quick Arduino sketch to test, and both the mono and stereo firmware versions seem to work properly. This adjusts the gain at the input, so it will affect any output that you have the input routed to equally. Please let me know if it works for you.

laplacier commented 6 months ago

Uploaded the stereo firmware and gave it a go. It worked on my board without any issues. Now I can fade in/out the audio between announcements and shows without messing with a digital pot. Thank you so much for the firmware update and accompanying serial command! Absolutely fantastic.