Custom DTMF generator

Share your Audacity/Nyquist plug-ins here, or test drive the latest plug-ins submitted by Audacity users.

After testing a plug-in from this forum, please post feedback for the plug-in author.
Post Reply
aliask
Posts: 2
Joined: Tue May 16, 2017 10:17 am
Operating System: Windows 10

Custom DTMF generator

Post by aliask » Tue May 16, 2017 10:39 am

This plug-in is a generalisation of the built-in DTMF generator, allowing a user to generate DTMF tones not present on a telephone's dialpad.

Usage is exactly the same as the original DTMF generator, but instead of specifying a series of digits to play, two arbitrary frequencies may be entered.
As with the original, the volume is set to 80%, and allows a settings of tone duration and an optional period of silence after the generated tone, which can be useful when tone sets are being generated.

I made this plugin because I needed to generate some DTMF tones to demonstrate an aviation SELCAL tone set, but I'm sure there are other uses. Hopefully someone uses it!
Attachments
custom-dtmf.ny
Custom DTMF Generator
(1.33 KiB) Downloaded 118 times

steve
Site Admin
Posts: 49421
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Custom DTMF generator

Post by steve » Tue May 16, 2017 11:34 am

Thanks for your contribution aliask.
I don't think this plug-in is sufficiently mainstream to be part of the standard Audacity bundle, but no doubt it will be useful for some, so I'd like to put it into our 'official' on-line library http://wiki.audacityteam.org/wiki/Downl ... st_Plugins

As you will see in the "Tone Generators" section, there are already a couple of DTMF plug-ins.

Could you write a bit of text in similar fashion, to describe your plug-in. In particular, it needs a brief description of the overall effect, which in this case should include the fact that it creates a single beep rather than a sequence, and a brief description of each of the controls. Don't worry too much about formatting, it's just to help me get the description right and I'll sort out the formatting on the wiki.

I think the links that you provided on GitHub will also be useful, so that information can go in.


Some comments about the code:

It's recommended that new plug-ins should conform to the most recent "version", which is currently version 4. This doesn't make much difference in this case other than the ";version 4" header.

There is now an ";author" header for the name of the programmer.
The ";info" header is no longer used and is just treated by Audacity as a comment. The ";author" header may be used if effects are sorted into groups (http://manual.audacityteam.org/man/effe ... ences.html)

More info about headers here: http://wiki.audacityteam.org/wiki/Nyqui ... -in_Header

The correct link for the GPL v2 license is: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

For LISP based languages, there are certain conventions for indentation and new lines. This becomes quite important for readability with larger programs. There's a good guide here: http://dept-info.labri.fr/~idurand/ense ... ation.html


I've made these tweaks to your plug-in in this version, so if you're happy with it, this is the version that I shall upload to the wiki.
custom-dtmf.ny
(1.42 KiB) Downloaded 61 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

cyrano
Posts: 1304
Joined: Fri Apr 17, 2015 11:54 pm
Operating System: OS X 10.9 Mavericks

Re: Custom DTMF generator

Post by cyrano » Tue May 16, 2017 11:39 am

Thx, man. Definitely one I don't have any use for now, but I'll keep it in my toolbox. Dual tones are still used for all kinds of selective call systems and I'm sure it'll be of use one day.

aliask
Posts: 2
Joined: Tue May 16, 2017 10:17 am
Operating System: Windows 10

Re: Custom DTMF generator

Post by aliask » Sat May 20, 2017 7:07 am

cyrano wrote:Thx, man.
No problems!

steve wrote: I don't think this plug-in is sufficiently mainstream to be part of the standard Audacity bundle, but no doubt it will be useful for some, so I'd like to put it into our 'official' on-line library http://wiki.audacityteam.org/wiki/Downl ... st_Plugins
Awesome. I agree it's not really a common use, so glad to have it included on the Wiki rather than in the Git repo. Cheers!
steve wrote: Could you write a bit of text in similar fashion, to describe your plug-in. In particular, it needs a brief description of the overall effect, which in this case should include the fact that it creates a single beep rather than a sequence, and a brief description of each of the controls. Don't worry too much about formatting, it's just to help me get the description right and I'll sort out the formatting on the wiki.
Custom DTMF generator
Generates a single DTMF tone of customisable frequencies. Useful for generating other telephony DTMF tones, and SELCAL tones for radio communication.
Parameters:
  1. Tone Duration: [1 ms - 10000 ms (10s), default 100ms]
  2. Silence Duration: [0 ms - 10000 ms (10s), default 100ms]
  3. Frequency 1: [1 Hz - 10 kHz, default 425 Hz]
  4. Frequency 2: [1 Hz - 10 kHz, default 25 Hz]
  5. Volume: [1% - 100%, default 80%]
steve wrote: I've made these tweaks to your plug-in in this version, so if you're happy with it, this is the version that I shall upload to the wiki.
Thanks for the updates, I'm happy for these to be put up on the Wiki as-is.

Cheers!
Will

lucky225
Posts: 2
Joined: Thu Jun 07, 2018 5:49 am
Operating System: Windows 10

Re: Custom DTMF generator

Post by lucky225 » Thu Jun 07, 2018 5:56 am

Thanks for making this, it is a life saver! I've been generating custom DTMF since 1996 when Cool Edit 96 had it out of the box. I use Audacity for most things but always downloaded Cool Edit's latest bloatware to do this simple task when needed. The fact that this is NOT part of the regular Audacity install is mind boggling to me, it's very useful for me for creating quick tones on the fly (I'm a phone phreak, so the old MF bluebox tones are a quick example, but there are various DTMF tones that are used for all kinds of things -- as of right now I was demoing Emergency Alert System's tone that you hear before a warning is flashed on tv/radio etc, I wanted to whip it up quick, don't have Cool Edit on this computer, googled audacity custom DTMF and landed here). IMHO This should just come with the Audacity installation as a default thing. Sad that Cool Edit has had it for 22 years, and it's only been an Audacity plugin for the last year or so.

steve
Site Admin
Posts: 49421
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Custom DTMF generator

Post by steve » Thu Jun 07, 2018 10:07 am

lucky225 wrote:IMHO This should just come with the Audacity installation as a default thing.
Audacity has included a DTMF generator for many years: https://manual.audacityteam.org/man/dtmf_tones.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

lucky225
Posts: 2
Joined: Thu Jun 07, 2018 5:49 am
Operating System: Windows 10

Re: Custom DTMF generator

Post by lucky225 » Thu Jun 07, 2018 9:14 pm

steve wrote:
lucky225 wrote:IMHO This should just come with the Audacity installation as a default thing.
Audacity has included a DTMF generator for many years: https://manual.audacityteam.org/man/dtmf_tones.html
This is true, but the ability to create your own DTMF of different frequencies has not, which Cool Edit has offered since their release.

steve
Site Admin
Posts: 49421
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Custom DTMF generator

Post by steve » Fri Jun 08, 2018 12:41 am

lucky225 wrote:but the ability to create your own DTMF of different frequencies has not
Arguably it has, but not labelled as such.
Audacity has the "Nyquist Prompt" effect which can be used for generating tones.
For example. this code will create a tone containing two frequencies, 1000Hz and 230Hz

Code: Select all

(mult 0.4 (sum (hzosc 1000)(hzosc 230)))
How it works:
  • (mult 0.4
    scales the generated sound. As we will be adding two full-scale sounds, the result will have a peak amplitude of 0.8.
  • (sum
    Adds the generated tones
  • (hzosc 1000)
    Generates a 1000 Hz sine tone.
  • (hzosc 230)
    Generates a 230 Hz sine tone.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply