[comp.sys.atari.8bit] Music demo program

jhs@MITRE-BEDFORD.ARPA (02/02/87)

Here is a silly little program that plays random music on the Atari 8-bit
computers.  It demonstrates some principles of music theory, such as the
use of the twelfth root of two as the ratio between halftones in the
"tempered diatonic scale".  The algorithm picks a random step up or down
from the current "base note", then picks some other more or less harmonious
notes to go with the base note and make a chord.  The result is (to my ears)
usually pleasing, sometimes a little dissonant -- but then so are a lot of
modern pieces of so-called music.  There is also a bit of logic to vary the
tempo occasionally by holding a note two or perhaps four times as long as
the minimum.

You can probably learn from the basic program and make interesting
modifications on your own.  Enjoy, or ignore, as the case may be.

If you have uudecode on your host system you can uudecode this file there
and then download it to your Atari.  You should use 8-bit transfer mode
as the uudecoded file will contain ATASCII characters such as end of line,
and is a tokenized BASIC (not .LST) file.

If you don't have uudecode on your host, you can download this file as
a normal ASCII file, letting your terminal emulator translate into ATASCII
and then use the uudecode I posted on the net to decode it on your Atari.
If anyone lacks the uudecode program, I can post it again.

-John Sangster / jhs@mitre-bedford.arpa

jhs@MITRE-BEDFORD.ARPA (02/02/87)

Oops -- I forgot to attach the program to the previous message!

Here is a silly little program that plays random music on the Atari 8-bit
computers.  It demonstrates some principles of music theory, such as the
use of the twelfth root of two as the ratio between halftones in the
"tempered diatonic scale".  The algorithm picks a random step up or down
from the current "base note", then picks some other more or less harmonious
notes to go with the base note and make a chord.  The result is (to my ears)
usually pleasing, sometimes a little dissonant -- but then so are a lot of
modern pieces of so-called music.  There is also a bit of logic to vary the
tempo occasionally by holding a note two or perhaps four times as long as
the minimum.

You can probably learn from the basic program and make interesting
modifications on your own.  Enjoy, or ignore, as the case may be.

If you have uudecode on your host system you can uudecode this file there
and then download it to your Atari.  You should use 8-bit transfer mode
as the uudecoded file will contain ATASCII characters such as end of line,
and is a tokenized BASIC (not .LST) file.

If you don't have uudecode on your host, you can download this file as
a normal ASCII file, letting your terminal emulator translate into ATASCII
and then use the uudecode I posted on the net to decode it on your Atari.
If anyone lacks the uudecode program, I can post it again.

-John Sangster / jhs@mitre-bedford.arpa
------------------c-u-t---h-e-r-e---f-o-r---MUSIC.BAS---(uuencoded)-----------
begin 600 music.bas
M     1P!'0%U 8@%G 54J-+)0T5.5$72RE135$%2U%2P5+%4LE2S5D_, $$ 
M   Q  $   $_E#AT,E0  L &       #0&,       1 !       !4 D    
M   &0!D       = (@      "$ B       )0"(       I !1,Q*$!D " @
M $%,14%43U))0R!-55-)0R!%6%!%4DE-14Y4FVX 'Q\ 2BX@4T%.1U-415(@
M(#(V($I53%D@,3DX-IMX  8& )MZ !\? %-%5"!54"!2051)3U,@*#0@3T-4
M059%4RF;@@ 0$!2 .0Y 2      L%HP (B(V@2T.0 (     (RLV#D !    
M "<.0!(     +!:6 !@8-H X#@       "PM#D $     !:@ #$7"((M#D !
M     !D.0$@     %"TV@#B"+"V .((F#D !     "PD@10Q"8(6R  9&0!3
M150@55 @04-454%,($Y/5$53F\T #P\V@RT.0&,     %M( 0!<(@BT.    
M    &0Y 2      4)3: .((L+8 X@BPD@Q0\-H X@BPM4#J .((L)0X_4   
M   L%$ )@A8L 08& )LM 2(B %!)0TL@4D%.1$]-($)!4T4@3D]412!4,"!!
M3D2;+@$B(@!.3U1%4R!4,2!4,B!4,R!43R!-04M%($-(3U)$FS8!%0\VA2T.
M0"0     %!4VABV%%D !)24V@BU0.@Y "      D2#H.        +"8.0 -0
M    +!9" 288!T@Z#@       "PA#C^      !LF-H(M@B0.0 (     %DH!
M"PLVABV&)8(63 $?$0>&((4F#D %     !L?-H8MAB4.0 (     %DX!'Q$'
MAB&%)0Y !0     ;'S:&+88F#D "     !94 2\O-H<MAB50.@Y  @     D
M2#H.        +"4./U      +"4.0 (     %EX!)R<VB"V')0Y  P     D
M4#I(.@X        L)0X_4      L%F@!)R<VB2V()0Y !0     D4#I(.@X 
M       L)0X_4      L%G$!#P\VBBT.0 @     %G(!%Q<'B1T.0$@     
M&PY!!      6<P$M$3:)+8DF#D 2     !0?-H@MB"8.0!(     %"TVARV'
M)@Y $@     6D $,#D$$,    !:: 0H.004     %JX!'!PR#@       !* 
M.(8L$@Y $      2BA:X 1P<,@Y  0     2@#B'+!(.0!      $HH6P@$<
M'#(.0 (     $H XB"P2#D 0     !**%LP!'!PR#D #     !* .(DL$@Y 
M$      2BA;6 08&)!;T 3,7"(0M#D !     !D.0!      %"4VBBV*) X_
MB5     4+PP.000P    %#,)A!;Y 1<7!XH@#C\0     !L.00,@    %OX!
M(A@'2#H.        +"$./W4     &R(*#D$%     !8( @H.00,@    %@" 
2%!09#PQ$.DU54TE#,RY"05,6
 
end