Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on

by gods
on Feb 11, 2000 at 00:06 UTC ( #3333=superdoc: print w/replies, xml ) Need Help??
I've made 2 changes to your code, to randomly play any of these:
my $input; unless ( $input = shift ) { # read from DATA my @tunes = grep { $_ !~ /^#/ and /\S/ } <DATA>; chomp($input = $tunes[rand(@tunes)]); }
__DATA__ # Original: <75>[1]vV+|:{1(1)/1C/DEFG+ABCDEFG+ABCBAAbADCBAA-GF#GrG+E-GrF+E-FrF+D-F +rE+D-ErE+C-ErD+C-DrD+B-D^+Cr}:||:(.25)2G+CEDCBA-GFEDCBA-GF*E+EFF#G.E` +Dr:|=1vV-|:{2(2)1C/E~CF~CE+CAB-G#+A-FGCr}:||:(2)EDCB:|=2vV-|:{3(2)0C/ +ECFCE+CAB-G#+A-FGCr}:||:(2)GGGG:|=3 # Twinkle Twinkle Little Star (Main Theme) vV+[1]|:{aCCGG+AA-GGFFEED/D.E`^C/}:|GGFFEEDDGGFFE/E.F`*E~D=avV-[-1]|:{ +bC+CECFCECDBCA-FG*C/}:|+E-G+D-G+C-G+B-G+E-G+D-G+C/C.D`@n*C~B-=bvV-[-1 +]&n*G # TTLS Variation 1 vV+[1]_|:{aDCBCBCBC+A-GF#GF#GF#GG#+ACBDCBAA~-G+EDCBA-GG~F+DCBA-GFF~E+C +BA-GFE*D+A~-GB*Cr_}:|+A-GF#GF#G+A-GGFEFEFGFFED#ED#EFEEDC#DC#DED+A-GF# +G+ECA-GGFEF+DB-GFFED#E+C-GFE*G.~E`*D_=avV-[-1]{bC~+C~E~C~F~C@nE/r.C#` +*D/r.B`*C/r.A`*-FG/}+C-GEG*=b*+C-C+E~-G~+D~-G+C~-G~+F~-G*@o+ED/C/r.C` +E.C`*B[-2]=b*+C-CvV-[0]&nC&o*-GG/GrG # TTLS Variation 2 vV+[1]|:CCGG@nGFFEEDDCCB-Gr+:||:|:GG~FF/E.D`E.F`*E~D:|C~/CB`C`*GG~+AA~ +-GG~F#F~EE~DDCr:|vV-[1]|:*R+A-G/FFEEDDCr:||:CC~CB/C.D`E.F`^B/CC~CB/-G +.+D`E.F`^-G/Grr+C~CC~CBbAAb-G+A~A/-G.F`*Er+:|vV-[-1]|:_C+CBCDCBC-E+CB +CDCBC-F+CBCDCBC-C+CBCDCBC-A+AAbA-B+BBbB-C+CBC-A+AAbA--F+FEF-G+GF#G^-C ++C:||:_G+EEbEFEEbE-G+DDbDEDDbD-G+GF#G+A-GF#G-G+FEFGFEF-G+EEbEFEEbE-G+ +DC#DEDC#D-G+CBCDCBC-G+BBbBCBBbB-C+CBCDCBC-E+CBCDCBC-F+CBCDCBC-C+CBC-C +#+C#BC#-D+DC#D-B+BBbB-C+CBC-A+AAbA--F+FEF-G+GF#G^-C+C:| # TTLS Variation 5 vV+!40!+|:C/rC*G/rG*+A/rA-*G/rGrFrFrErErDrD*Cr:||:G/rG~*F#/rF~*E/rEb~* +D/r-G+*G/r/G~F#~^F/r/F~E~^Eb/r/F#~G~^D/r/F~D~^C/r/C~E~^G/r/G~E~+^A/r/ +A~C~^-G/r/E~GRG~F#RD~FRF~ERG~ERC#~DRF~DRB~C^r:|vV-!40!+|:RRRr/rErErDr +DrCrCrB*Cr:|vV-!40!|:/rCERECRFCRECrDrBrCrA-rFrGR+C-*C+:||:|:/rE-*G/r+ +D-*G/r+C-*G/r+B-*G+:|-/r/C~E~^G/r/+C~E~^G/r/F~+A~-^C/r/E~G~^C/DrBrCr- +ErFrGr+Cr-Cr+*:|
I'm sure you can work up the obfu magic.

Even better, add some "computer generated music" functionality, to get something harmonious and interesting, yet different every time.

Quantum Mechanics: The dreams stuff is made of

In reply to Re^2: A program that really makes waves by QM
in thread A program that really makes waves by liverpole

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (6)
    As of 2016-09-30 07:43 GMT
    Find Nodes?
      Voting Booth?
      Extraterrestrials haven't visited the Earth yet because:

      Results (562 votes). Check out past polls.