The specification of cadence and dial tones seems inexorably linked. The dial tone specification is composed of one or more signal generator fields, followed by a single cadence field. When used on it's own, as in the case of ringer cadence, cadence specification is necassarily slightly more limited. We'll look at this case first, and then expand the cadence field to cope with it's use in a full dial tone specification string.
The cadence strings are used to specify a square wave signal, where the signal varies in time, and can have one of two states, on or off. This is useful for specifying things like ringer patterns, where the sound made by the ringer cannot be controlled, but the ringing state can. For the purposes of this section we'll assume that the cadence string is controlling a bell.
A typical example of a cadence string is given as;
In this example the default state of the bell is assumed to be off. There is no explicit mechanism for defining this default state but as far as I am aware, there is no case where this default condition is varied. All of the values in the cadence string are in units of seconds.
In this case the period of time when the ringer is actively controlled, instead of being left to default is 60 seconds. That's the 60 in red. Then, there are the on/off times. These parts are the .4 and .2 in green and blue respectively. In this case the bell is on for 400ms and off for 200ms. It's that simple. The simplest cadence strings always take three arguments and the overall period is always outside the parenthesis. Inside, the on/off times are always in that order, and separatd by a forward slash.
For the purposes of producing patterns, more than one on/off pair can be supplied separated by commas. An example of this follows;
In this case, the cadence pattern specifies ringing for a total of 30 seconds, with a pair of on/off sequences where the first has more emphasis. For a period of 30 seconds, every other ring is slightly longer. Like in the first example, the pattern in the brackets is repeated for the period specified outside.
In some cases it will be necassary to implement continuous cadences. Typically this allows a bell to ring permenantly. Using the * value one can specify an always on characteristic, and this can be done in two ways, as shown in the first two examples below;
Although it is the suggestion in the first example above, clearly the bell will not ring forever. This reveals the important issue of precedence. The pattern inside the brackets is overriden by the time period specified outside. In the same way the whole specification is subject to whatever it is that is controlling the cadence pattern. In the first example the bell is intermittent all the time that the hardware is requesting the bell. In the second example the bell is continuous for 30 seconds and while the hardware requests it. In the final example the bell is continuous while the hardware is making the request.
Dial Tone Specification
A typical example of a dial tone string is given as;
In this example the cadence part (in blue) is separated from the tone parts, in red and green, by a semicolon. The tone part is simple enough, but we'll visit it shortly. For the moment it is sufficient to understand that the tones are generated by tone specification strings. Each of these tone specifications is monotonic, but more than one tone can be specified and can play simultaneously. In the example above, there two different tones playing and these are the red and green parts separated by a comma.
From the perspective of the cadence, it is important that the cadence specification be able to select from the supplied tone specifications to create sound patterns. On closer inspection the cadence specification part of a complete dial tone specification string has an additional field when compared with the simple cadence specification string. This is shown in bold;
This additional field selects from the red and green tone specifications of the first example, by reading order. In all other respects the dial tone string cadence specification is the same as the simple cadence specification. The cadence parameters can be built up and separated by commas, to yield repeating patterns with emphasis. In the example above the plus sign is used to sound two tones simultaneously, but one tone at a time is equally valid.
A zero tone selector "0" can be used, and this is to signify a null tone generator, i.e. no sound plays. Such a selector will override any on/off distinction, but the sum of the two periods still represents the overall period for which no sound plays.
The final aspect of the dial tone specification string is the actual tone generators. We've already seen how multiple tone generators can be be specified and selected, so the example below shows just a single tone specification on it's own;
These are quite straightforward. Above we see a frequency in red, followed by a sound level in green. The frequencies are specified in Hz, and the sound levels in dBm.
It is possible to implement more than one cadence pattern in a dial tone specification. This makes it easier to describe sequences that follow other sequences. It is not clear if such a capability is available in the simple cadence case, but it is certainly possible for a dial tone string to be specified in this way. The following example demonstrates this point;
In this example two tones play simultaneously, at the same level. For two seconds there is an even mark/space ratio, and then for ten seconds both tones play continuously.