TUCoPS :: Phreaking Boxes - Red :: macredbx.txt

Red Box: Using Mathematica for the Mac to make Redbox tones!


From: luebkejs@steam.engin.umich.edu (Jeff Luebke)Subject: Re: generating red 
box tonesDate: 2 Feb 1994 18:50:00 GMT



OK.  Quite a few people emailed me about the program for generating red box
tones for the Mac, so I'm posting it.  A little explanation first:  The program
that I wrote this program on <department of redundancy department...> is a
package called Mathematica.  It's a symbolic equation manipulator, and it is
*very* cool for doing math and calculus.  It's not public domain however, and
it is quite expensive (the full fledged version sells for around $800.  
OUCH!).  If you're in college, chances are fairly good that it may be 
supported by the engineering department on their network.  Check around.  OK,
enough of the preamble, here's the program:

        p=0.033;
        f1=1700;
        f2=2200;
        s[t_]:=Which[0<=t<p, 1, p<=t<2p, 0,
                     2p<=t<3p, 1, 3p<=t<4p, 0,
                     4p<=t<5p, 1, 5p<=t<6p, 0,
                     6p<=t<7p, 1, 7p<=t<8p, 0,
                     8p<=t<9p, 1, t>=9p, 0];
        tone=(Sin[2Pi f1 t]+Sin[2Pi f2 t])s[t];
        Play[tone,{t,0,9p}];

That's it.  The variable p is the timing of the tones (in seconds).  
f1 and f2 are the two frequencies (in Hz).  
The nice thing about this is that this tone is exact, unlike many RS 
conversions which depend on what crystal you use.  My suggestion:  go get a
sappy recordable valentine card from Hallmark and record these tones to carry
around with you.

Have fun!

Jeff Luebke
luebkejs@engin.umich.edu

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH