Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 17 Apr 2014, 15:03
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
DTMF tone generator for Puppy (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Author Message
mouldy


Joined: 04 May 2005
Posts: 482

PostPosted: Mon 30 Jan 2012, 15:31    Post subject:  DTMF tone generator for Puppy (Solved)  

Used to be a linux program way back called dtmfdial or dialfix or something like that. Googling, just finding ancient references to it or that it was dropped from repositories or whatever.

Is there a modern program that does this? Site search here for dtmf just found skype type threads. Dtmfdial or dialfix just generated dtmf tones from computer speaker and I think had little gui dialpad on screen, but may have been command line, dont remember anymore. There is a windows program out there with name dtmfdial, but this was linux.

I am still using 4.3.1 though shouldnt matter for little application like this.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Mon 30 Jan 2012, 16:54    Post subject:  

Hi mouldy.

Audiacity can do this trick.
There's Generate -> DTMF Tones submenu.
You can enter there 1234567890*#ABCD + additionaly all lower case corresponding to the digits.
The string will be converted to the sound wave and then you can do with this anything you want.

HTH
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mouldy


Joined: 04 May 2005
Posts: 482

PostPosted: Mon 30 Jan 2012, 19:21    Post subject:  

I'd prefer smaller program that does nothing else. But will try Audacity. Thanks.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Mon 30 Jan 2012, 20:18    Post subject:  

mouldy wrote:
I'd prefer smaller program that does nothing else. But will try Audacity. Thanks.

Actually, I think the same way, and I've found this idea interesting, so I wrote a simple shell app for playing DTMF tones.
Also I made examplary .wav files with those tones (in Audiacity), but you can make your own library of samples.

It's enough to unpack the attached archived folder (the tool is included, too), open terminal window within it, and type, f.e.:
Code:
./dtmf 1234567890XYABCD

(X=* and Y=#)

It's not fancy stuff, but works quite decent...

Hope this helps a bit more, until you'll find better tool Wink
And thanks for giving me a challenge Very Happy
BTW, I wrote this tool in Lupu-528 and hopefully it will work in your 4.3.1.

Greetings!

Code:
#!/bin/sh

# DTMF Tone Player by SFR'2012
#
# Syntax: dtmf <string>
# <string> can be 1234567890XYABCD [ where X=* and Y=# ]
#
# Requires "wavplay" and *.wav files (16-bit, MONO, 11025Hz) as shown below:

t[1]="1.wav"
t[2]="2.wav"
t[3]="3.wav"
t[4]="4.wav"
t[5]="5.wav"
t[6]="6.wav"
t[7]="7.wav"
t[8]="8.wav"
t[9]="9.wav"
t[0]="0.wav"
t[10]="X.wav"
t[11]="Y.wav"
t[12]="A.wav"
t[13]="B.wav"
t[14]="C.wav"
t[15]="D.wav"

STRING=$@
LEN=$(( ${#STRING} - 1 ))
[ $LEN -eq -1 ] && echo "Null string, exiting!" && exit


for i in `seq 0 $LEN`; do
CONV=`echo ${STRING:$i:1}`
TEMP=${t[$CONV]}
[ "$CONV" == "X" ] && TEMP=${t[10]}
[ "$CONV" == "Y" ] && TEMP=${t[11]}
[ "$CONV" == "A" ] && TEMP=${t[12]}
[ "$CONV" == "B" ] && TEMP=${t[13]}
[ "$CONV" == "C" ] && TEMP=${t[14]}
[ "$CONV" == "D" ] && TEMP=${t[15]}
GEN=$GEN" "$TEMP
done

echo ""
echo "Playing DTMF tone of:" $STRING

wavplay -q -s 11025 -M -b 16 $GEN

exit

# END
dtmf.tar.gz
Description  DTMF tones player + Samples
gz

 Download 
Filename  dtmf.tar.gz 
Filesize  54.68 KB 
Downloaded  278 Time(s) 

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mouldy


Joined: 04 May 2005
Posts: 482

PostPosted: Wed 01 Feb 2012, 16:07    Post subject:  

Cool, works as advertised. Big thanks. It will meet my needs as is.

However, if you want to go further and bundle it with a small telephone keyboard gui frontend..... so I could click the numbers individually with mouse like I was dialing a phone....

Nobody is every completely satisfied...
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Wed 01 Feb 2012, 16:17    Post subject:  

mouldy wrote:
Cool, works as advertised. Big thanks. It will meet my needs as is.

However, if you want to go further and bundle it with a small telephone keyboard gui frontend..... so I could click the numbers individually with mouse like I was dialing a phone....

Nobody is every completely satisfied...

I've been thinking about it also Smile
I'll try to implement it, when I'll find a some time.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mouldy


Joined: 04 May 2005
Posts: 482

PostPosted: Wed 01 Feb 2012, 16:38    Post subject:  

EUREKA! Its crude but I did it myself. I simply created 12 executable files. Each for a different key, made them executable and set each one to call up your script and play that particular tone. Then moved all to corner of desktop. I hit the number one button and it plays the tone and so on. A crude keyboard. BUT IT WORKS and does exactly what I want it to do.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Wed 01 Feb 2012, 17:05    Post subject:  

Cool! Original approach - that's what I like Very Happy

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mouldy


Joined: 04 May 2005
Posts: 482

PostPosted: Wed 01 Feb 2012, 23:24    Post subject:  

Alas not sure if its my speakers, the telephone mike in handset, or something little off with tone on one or more numbers. But cant dial telephone with it. Phone company cuts in that call cant be completed as dialed. So I assume its detecting some of tones but not all???

My whole thing with this is that I live on top of big hill and lightening keeps knocking out electronic phones. I have couple old electro-mechanical dial phones, that are pretty immune to lightening unless it hits the line very close to home. So instead of buying yet another electronic phone, got to thinking of generating tones and just putting handset of dial phone next to speaker. Only really need it to interact with the now obligatory automated switchboards. "Press ONE NOW for Swahili!" or whatever. Dial phone still can dial original connection number. And dialing a number doesnt bother me, grew up with it.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Thu 02 Feb 2012, 06:11    Post subject:  

I suppose it might be because of low frequency of the samples, or their shortness.
I can't test it - I have no landline phone...
Best, if you try to dial few numbers directly from Audiacity (to adjust its freq and lenght), and then save them separately.
In the script, the frequency is set up through "-s <freq>":
wavplay -q -s 11025 -M -b 16 $GEN

HTH

EDIT: by "frequency" I meant "sample rate" of course...

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mouldy


Joined: 04 May 2005
Posts: 482

PostPosted: Thu 02 Feb 2012, 10:50    Post subject:  

I found both a downloadable flash tone generator, works offline (just open the swf file with browser) and an online one. Neither have any better result. So probably either my speaker distorts it or the phone mike distorts it just enough it doesnt work. One of these days I'll hunt up the other phone and try it with that. And I have more computer speakers too.....

That flash tone generator was nice find! http://www.mediacollege.com/audio/tone/files/touchtones.swf

And I still have landline cause for me out in boonies, its either dialup or satellite. Satellite is WAY overpriced for what they offer. Though dialup is dieing at fast pace so may not have choice soon enough.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Sat 04 Feb 2012, 18:55    Post subject:  

Hi mouldy.

Any progress?
If you're still interested, I wrote the GUI at last.
http://www.murga-linux.com/puppy/viewtopic.php?t=75757
And the sample rate is increased to 22050Hz now.

BTW, very nice tool you have found, but to my ear the quality of its sound is very close to those 11025Hz samples I created before...
So, again, maybe this is the problem..?

Anyway, I wish you luck with this. Smile

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
ariel


Joined: 03 Jul 2009
Posts: 92

PostPosted: Sun 05 Feb 2012, 15:57    Post subject: Re: current dtmf tone generator.  

mouldy wrote:
Used to be a linux program way back called dtmfdial or dialfix or something like that. Googling, just finding ancient references to it or that it was dropped from repositories or whatever.


did you look in the ubuntu repo? it's just one package

hope that helps
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sun 05 Feb 2012, 16:19    Post subject:  

Thanks ariel.

dtmfdial is tiny and works like a charm in Lucid.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 879

PostPosted: Sat 18 Feb 2012, 06:42    Post subject: Re: current dtmf tone generator.  

ariel wrote:
did you look in the ubuntu repo? it's just one package

Nice find!
...and here's simple GUI for this.
I've implemented only 4 (crucial, IMHO) parameters in "Settings" window;
'--bits' is set to '16' and others (volume, channels, device, bufsize, etc.) are default.

Greetings!
dtmfdial_GUI.png
 Description   screenshot
 Filesize   38.16 KB
 Viewed   1089 Time(s)

dtmfdial_GUI.png

dtmfdial_GUI.tar.gz
Description  Unpack & click to launch ("dtmfdial" must be installed first).
gz

 Download 
Filename  dtmfdial_GUI.tar.gz 
Filesize  1.55 KB 
Downloaded  239 Time(s) 

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0710s ][ Queries: 13 (0.0048s) ][ GZIP on ]