Home BSS User Forum BSS Archive Threads Discussion London Architect with Soundweb London
Options

Set% how is this calculated ?

Hi,

what's the algorithm (code) used to calculate % to hex in Audio Architect Third-Party controller for N-Gain Input (Master Gain) ?

So far I have been hard coding these into a string table but I am sure there is a smarter way to do this.

volumebuff[0] = \"\\x00\\x00\\x00\\x00\"; // 0%
volumebuff[1] = \"\\x00\\x00\\xFF\\xFD\"; // 1%
volumebuff[2] = \"\\x00\\x01\\xFF\\xFA\"; // 2%
volumebuff[3] = \"\\x00\\x1B\\x83\\x00\\x08\"; // etc
volumebuff[4] = \"\\x00\\x04\\x00\\x1B\\x86\";
volumebuff[5] = \"\\x00\\x05\\x00\\x1B\\x83\";
volumebuff[6] = \"\\x00\\x1B\\x86\\x00\\x00\";
volumebuff[7] = \"\\x00\\x1B\\x86\\xFF\\xFD\";
volumebuff[8] = \"\\x00\\x07\\xFF\\xFA\";
volumebuff[9] = \"\\x00\\x09\\x00\\x08\";
volumebuff[10] = \"\\x00\\x0A\\x00\\x05\";
volumebuff[11] = \"\\x00\\x0B\\x00\\x1B\\x82\";

https://www.dropbox.com/s/po2hr2899sksbon/percent.png?dl=0

Also, how is the check sum calculated. I am using C# .Net 3.5.

Thanks

Comments

Sign In or Register to comment.