Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( #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)]); }
and
__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.

-QM
--
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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-12-09 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?