Open grasuth opened 5 years ago
When using PCM output, use the carrier key (16 bits) to determine an offset frequency for the reproduced tone. Human hearing can easily hear 5hz diff, so use 5hz offsets.
For example: -8 420Hz -1 495Hz sidetone freq: 500 0 505Hz +1 510Hz ... +8 545Hz
So algorithm like (python example): keys = [ 1, 101, 202, 456, 102, 103 , 104, 105 ]
for k in keys: ... print k, ((k & 0x000f)*7 ^ ((k & 0xf000) >> 12) ^ ((k & 0x0f00) >> 8) ^ ((k & 0x00f0) >> 4)) & 0x000f
produces: 1 7 101 5 202 10 456 5 102 12 103 7 104 14 105 9
When using PCM output, use the carrier key (16 bits) to determine an offset frequency for the reproduced tone. Human hearing can easily hear 5hz diff, so use 5hz offsets.
For example: -8 420Hz -1 495Hz sidetone freq: 500 0 505Hz +1 510Hz ... +8 545Hz
So algorithm like (python example): keys = [ 1, 101, 202, 456, 102, 103 , 104, 105 ]
produces: 1 7 101 5 202 10 456 5 102 12 103 7 104 14 105 9