ΣSigmaStudio Ask AI Русский Log in

Sigma Studio Volume Control Parameter

SigmaDSP & SigmaStudio Ron Sep 18, 2019 00:00 2 replies Original on forum ↗
Subscribe
Ron Question
Sep 18, 2019 00:00

I have a product that uses a number of volume controls which I have been controlling using a small table of pre-set gain values.

The table values were obtained using the capture window in Sigma Studio.

The requirement has changed and I now need to control the same Sigma Studio project with a much larger range of gain

values which would indicate to me that I need to be able to calculate the correct values to write to the volume controls

since capturing them 1 by 1 would be a laborious process.

What is the format of the "gain" value that needs to be written to SS volume controls?

KJBob Reply
Sep 18, 2019 00:00

Hello Ron,

The volume control parameter is a four-byte binary word corresponding to the desired linear gain. When you adjust the control's dB slider, SigmaStudio converts the dB gain to linear gain, then converts the result to binary. To perform this yourself:

Convert your dB setting to linear gain G: G = 10 ^ (dB/20)

This gives you the Value figure shown in the Capture Window, For example, at -10 dB, G computes to 0.316227. This matches the Capture Window's value, as shown below:

To convert the value into data bytes, follow this tutorial.

Best regards,

Bob

Vol-param.png
Vol-param.png
Ron Reply
Oct 1, 2019 00:00

Hi. Thanks for the reply. I did a quick spreadsheet to calculate the hex values and found that they differed in a predictable manner from the values which are in my (very old) code which were obtained by simply capturing writes in Sigma Studio years ago.

I see 5 bytes being loaded into the safeload data register. From my spreadsheet and the datasheet for the AD194x I see that using your

-10db example the bytes would be: 0x00, 0x00, 0x28, 0x7A, 0x26

The data being written in my old code which was captured is: 0x01, 0x70, 0x28, 0x7A, 0x26

I read in another post that the high nibble of the 2nd byte is do not care so while I don't know why Sigman Studio made them "7" instead of "0" is

a mystery but probably not really relevant to the work at hand.

The 1st byte is, I believe, a "dummy" byte so my question is, does it matter if 0x00 is written in that byte or is that also a do not care condition

where any dummy byte would suffice?

It is entirely possible that I knew the answer to this 10 years ago but back then the documentation for SS was a lot less "refined" so much of

the project was accomplished using SS captures and calls to support. Wow. 10 years goes fast.