1960 年左右,在邮政编码出现之前,在购物中心出现之前,祖母与其他几个人共用一条电话线。电话公司提供了每个顾客都有自己的铃声,请不要偷听,这是不礼貌的。 这是北卡罗来纳州首府,有 90,000 人。 几年之内,她成为了派对线路上的最后一位,但电话公司被要求继续向现有客户提供派对线路费率。 几年后,电话公司开始提供按键式拨号来取代圆形旋转拨号盘(滴答-滴答-滴答-滴答-滴答......滴答-滴答-滴答......),但多年来爸爸一直保留着旋转电话,这样他就不必为更快的拨号支付 3 美元的附加费。 含有大量零的号码拨打起来特别慢。 按键音速度很快。
按键音有双音多频(双音多频)信号由人类语音范围内的两个同时正弦波产生,因此电话系统可以轻松传输它们。 有八种可用的音调,排列在 4 x 4 网格中。 您可能从未见过第四列。
| |
1209赫兹 |
1336赫兹 |
1477赫兹 |
1633赫兹 |
| 697赫兹 |
1 |
2 |
3 |
A |
| 770赫兹 |
4 |
5 |
6 |
乙 |
| 852赫兹 |
7 |
8 |
9 |
C |
| 941赫兹 |
* |
0 |
# |
D |
(Hz 是替换的单位消费者保护计划1960 年。)
在这篇文章的末尾附有一个 DTMF3.wav 文件;它是用电脑麦克风压在电话听筒上制成的,声音有点安静。 下载下面的脚本;把你的扬声器调大一点就能听到。
该脚本通过在 wav 文件中加载样本矩阵来恢复按键操作时域从文件中,然后运行 JMP快速傅里叶变换对时域数据的短部分进行函数将其转换为频域。 在此图中,每个垂直的点列代表在该时隙内哪些频率特别响亮。 左下角的额外点可能是敲击耳机上的麦克风造成的;尖锐的咔哒声有很多频率。

第一个数字有大量 1477 Hz 能量和大量 852 Hz 能量。 这是一个 9。 如果您想检查其余数字的工作,请将您的答案与 JMP US 进行比较技术支持号码。
2016 年 12 月 20 日更新:JSL 在无法从旧博客格式转换后恢复。 如果过去几个月您有空表且没有图表,请重试。 此外,这对于读取 WAV 文件来说并不是一个很好的模型;中的例子使用 WAV 文件速度更快,更有可能完成您将来需要的事情。
x = Load Text File( "$DESKTOP/DTMF3.wav", blob ); // this file must be 22050 16 bit 1 channel
// because the following code makes zero effort to handle anything else
x = Hex( x ); // doubles the size of the data, but the hex characters are easy to parse
If( Pat Match( x, Hex( "RIFF" ) + Pat Arb() + Hex( "data" ), "" ), // found the data chunk
grab = 2048; // samples per timeslice
period = grab / 22050; // seconds
binwidth = 1 / period; // 1 cycle in the bin's width is the lowest frequency the bins resolve
timeslice = 0; // count through the time slices
dt = New Table("sound",New Column("time"),New Column("frequency"),New Column("amp"));
dt << begin data update; // load the table without updating each time
While( Length( x ) > (grab) * 2 * 2, // grab samples * 2 bytesPerSample * 2 hexCharsPerByte
samples = J( grab, 1, 0 ); // an array to hold the samples; will be sent to the fft below
nsamples = 0; // grab counter
timeslice++; // each time we grab samples is a new time slice
Pat Match( x, // scan the hex data for pairs of hex digits
Pat Repeat(
Pat Len( 2 ) >> left1 + Pat Len( 2 ) >> left2 + // two pairs
// the following Expr evaluates to PatFence(), eventually, so it can be
// concatenated onto the preceding match. But before it does that, it
// stores the preceding match into the samples[ ] matrix
Expr( nsamples++; // index into the sample array
q = Hex To Number( left2 || left1 ); // build the 16 bit integer
If( q > 32767, q = q - 65536 ); // make it signed, +/-32K
samples[ Nsamples ] = q; // keep it
Pat Fence(); ), // make matching faster by fencing off completed work
grab, grab // min,max number of repeats
), "" // replace everything matched for this grab with nothing
);
freq = FFT( {samples} ); // run the fft. freq is a list: { real, imag }
amplitude = Sqrt( freq[1] :*</img> freq[1] + freq[2] :*</img> freq[2] ); // just the amplitude
For( f = 1, f < grab / 2, f++, // write data table
// throw out small amplitude responses and out-of-interest frequencies
// a different file might need some tweaking of these values
If( amplitude[F] > 10000 & f > 50 & f < 150, // roughly 500 to 1500 Hz
dt << addrows( 1 );
dt:time = timeslice * period;
dt:frequency = (f - 1) * binwidth; // bin 1 is really frequency 0, DC
dt:amp = amplitude[F];
)
);
);
dt << end data update;
// the pretty picture
dt << Graph Builder( Size( 664, 470 ), Show Control Panel( 0 ),
Variables( X( :time ), Y( :frequency ) ), Elements( Points( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch( {}, "time", ScaleBox, {Min( 0.5 ), Max( 9 ), Inc( 1 ),
Minor Ticks( 1 ), Label Row Nesting( 1 )} ),
Dispatch( {}, "frequency", ScaleBox,
{Min( 250 ), Max( 1750 ), Inc( 2000 ), Minor Ticks( 0 ), Label Row Nesting( 1 ),
Add Ref Line( 697, "Solid", "Black", "697Hz", 1 ),
Add Ref Line( 770, "Solid", "Black", "770Hz", 1 ),
Add Ref Line( 852, "Solid", "Black", "852Hz", 1 ),
Add Ref Line( 941, "Solid", "Black", "941Hz", 1 ),
Add Ref Line( 1209, "Solid", "Black", "1209Hz", 1 ),
Add Ref Line( 1336, "Solid", "Black", "1336Hz", 1 ),
Add Ref Line( 1477, "Solid", "Black", "1477Hz", 1 ),
Add Ref Line( 1633, "Solid", "Black", "1633Hz", 1 )}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "DTMF Analyzer" )} )
)
);
, // else...
Print( "not a wav file" )
);
20 世纪 80 年代初,The Phone Company 拆分为一家一群小公司拥有自己的电话变得合法。
请注意,祖母的聚会线路独特铃声(可以告诉谁正在呼叫谁)与今天的铃声(可以告诉谁正在呼叫)之间的奇怪关系。
我还有固定电话。