From BlueMelon
This patch demonstrates the use of BM7102 Bluesense mobile telephone DTMF kit. This hardware can be used to interface a mobile telephone. When a user calls the telephone the connection is detected by Max MSP. When the caller presses one or more buttons on his/her phone the corresponding pressed numbers are displayed by Max.
The top block is needed to establish the connection between Max MSP(tm) and the BlueSense usb (wireless) router.
The middle block contains the analog input module. The first argument of the "analog input" module is its identification number. Every BlueSense module has its own identification number which never changes. The id can be found on the module itself, and can also be found by checking the module table of the BlueSenseMaster component. The module is configured for 10 bits resolution at a sample rate of 50 samples/second.
The patcher object below contains a subpatch which converts the received digital values into a dtmf number representation. Strictly it would be more logical to do this part with a digital input. However we also sample the audio output of telephone, which allows us to detect when the call started and ended.
The first four inputs receive a binary coded representation of the dtmf number. The fifth input indicates when a valid dtmf tone is being received. The sixth input receives the audio input samples. When a sample is received above the threshold (>=3) then a timer (delay) is started. If the timer ends the call is deemed ended. If a new sample above the threshold is received before the timer ends the timer is reset.
With the this building block all kinds of remote control become possible. Some ideas:
- Voice response system. Present menu based questions to the used based upon their selection.
- Switching lights via remote control by telephone.
- Create interactive art: Publicly present a phone number to by passers. They can control your art installation when they call the number!