I have not been able to find any literature on the subject.
views:
225answers:
3
A:
"DTMF "Touch" Tones are defined in CCITT Volume VI: General Recommendations on Telephone Switching and Signalling Recommendation Q.23: Technical Features of Push-Button Telephone Sets.". This document and its related standard documents will tell you more than you would ever want to know about DTMF tones. "
This quote is from here. That webpage covers all the basics.
JonnyBoats
2009-04-18 22:44:50
A:
Well the following function will generate a 16-bit, signed, linear PCM, DTMF tone in Java.
public byte[] generateTone(float a, float b)
{
byte samples[] = new byte[16000]; // Tone data buffer.
int frames = samples.length / 2; // Number of frames that fit in the buffer.
/* Fill the buffer with the tone data. */
for(int i = 0; i < frames; i++)
{
/* The 8000 value is the sample rate. */
short value = (short)(32768 + 63 * Math.sin(i * 2 * Math.PI * a / 8000) + 63 * Math.sin(i * 2 * Math.PI * b / 8000));
samples[i + i] = (byte)(value >>> 8);
samples[i + (i + 1)] = (byte)value;
}
return samples;
}
I hope this helps... Just plug in the two frequencies as parameters a and b and out you get a tone. For example number one would be generated as:
byte tone[] = generateTone(697, 1209);
Thomas Quintana
2009-10-01 15:29:58