--- title: "The Entertainer" id: 72697 type: "computer_media" slug: "the-entertainer" url: "http://localhost/computer_media/the-entertainer/" markdown_url: "http://localhost/computer_media/the-entertainer.md" published_at: "2026-10-26T23:19:29+00:00" modified_at: "2026-10-26T23:19:29+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/entertainer-1.png" excerpt: "Scott Joplin's ragtime classic played as a BEEP melody over decaying sound-chip chords, introduced by an animated title screen and repeating at an adjustable tempo." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "James Smith" slug: "james-smith" taxonomy: "indiv" url: "http://localhost/indiv/james-smith/" genre: - name: "Music" slug: "music" taxonomy: "genre" url: "http://localhost/type/music/" media_type: "Program" programmers: - name: "James Smith" slug: "james-smith" taxonomy: "indiv" url: "http://localhost/indiv/james-smith/" download_url: "https://archive.org/download/timex-sinclair-software-archive/The%20Entertainer%20%281987%29%28Smith%2C%20James%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "The Entertainer (1987)(Smith, James)(TS2068)(US)(Program)/The Entertainer (1987)(Smith, James)(TS2068)(US)(Program).tap" mediadate: "1987" images: - url: "http://localhost/wp-content/uploads/2026/10/entertainer-1.png" - url: "http://localhost/wp-content/uploads/2026/10/entertainer-3.png" article_media: - id: 46164 title: "The Entertainer" type: "article" url: "http://localhost/article/the-entertainer/" media_type_tags: "Music" license: false --- # The Entertainer The Entertainer plays Scott Joplin’s rag on the TS2068. The melody is played with BEEP while the TS2068’s AY sound chip sounds three-note chords under it, so the piece has a simple accompaniment. An animated title drops the name down the screen and raises the credit line, with a flickering border, before the music starts; when the tune ends the program pauses and plays it again. The tempo is set in line 10, which the REM invites you to change. The REM reads “The Entertainer by Jim Smith 1987”. The program was published in the LISTing newsletter in October 1987. ## Program Analysis ### Program Structure - Lines 10–80 set note durations from the tempo (whole, half, quarter, eighth, sixteenth) and name the notes `c` to `b` as semitone numbers, with `o=12` for the octave above. - Lines 115–190 are chord subroutines from C to B; each loads three tone registers and calls line 190, which sets the mixer, volumes and envelope with one SOUND statement. - Lines 200–255 store the chord subroutine line numbers in variables (`cc`, `cf`, `cg`…), so the score can say `GO SUB cf`. - Lines 300–445 are the score; line 500 repeats it. ### Notable Techniques - Writing the score with named notes and durations (`BEEP ei,o+e`) makes it readable as music. - Volume registers set to 16 hand the chord over to the envelope generator, so each chord decays like a struck note. - The title routine flickers the border with `OUT 254`. ### Potential Issues - The variable `term` (line 255) points to a routine at 195 that silences the chip, but nothing calls it. - The title screen spells the name “The Entertainers”. This copy comes from a Larken disk, the TTSUC library disk “Music and Sound”. It was converted for tape (the disk command was removed from the save line, and the author’s phone number was removed from the opening REM) and tested in ZEsarUX. ## Source Code ``` 1 REM -=The Entertainer=- by Jim Smith 1987 2 PAPER 0: INK 7: BORDER 1: CLS 3 DRAW 255,0: DRAW 0,175: DRAW -255,0: DRAW 0,-175 5 GO SUB 700 6 BORDER 1 9 REM Change line 10 to any desired tempo 10 LET tempo=1.0 15 LET pause=60 20 LET w=tempo: LET wp=pause 25 LET h=tempo/2: LET hp=pause/2 30 LET q=h/2: LET qp=hp/2 35 LET ei=q/2: LET ep=qp/2 40 LET s=ei/2: LET sp=ep/2 45 LET o=12 50 LET c=0: LET cs=1 55 LET d=2: LET ds=3 60 LET e=4 65 LET f=5: LET fs=6 70 LET g=7: LET gs=8 75 LET a=9: LET as=10 80 LET b=11 90 GO SUB 200 95 GO TO 300 100 REM * Chords * 115 REM c=c=e=g 120 LET x=211: LET y=167: LET z=141: GO SUB 190: RETURN 125 REM c#=c#=f=g# 130 LET x=199: LET y=158: LET z=133: GO SUB 190: RETURN 135 REM d=d=f#=a 140 LET x=188: LET y=149: LET z=125: GO SUB 190: RETURN 145 REM d#=d#=g=a# 150 LET x=177: LET y=141: LET z=118: GO SUB 190: RETURN 155 REM f=f=a=c 157 LET x=158: LET y=125: LET z=105: GO SUB 190: RETURN 160 REM F#=F#-A#-C# 162 LET x=149: LET y=118: LET z=99: GO SUB 190: RETURN 165 REM G=G-B-D 167 LET x=141: LET y=112: LET z=94: GO SUB 190: RETURN 170 REM G#=G#-C-D# 172 LET x=133: LET y=105: LET z=89: GO SUB 190: RETURN 175 REM A=A-C#-E 178 LET x=125: LET y=99: LET z=84: GO SUB 190: RETURN 180 REM A#=A#-D-F 182 LET x=118: LET y=94: LET z=79: GO SUB 190: RETURN 185 REM B=B-D#-F# 187 LET x=112: LET y=89: LET z=74: GO SUB 190: RETURN 190 SOUND 0,x;1,0;2,y;3,0;4,z;5,0;7,56;8,16;9,16;10,16;12,120;13,9: RETURN 195 SOUND 8,0;9,0;10,0: RETURN 200 LET cc=115 205 LET ccs=125 210 LET cd=135 215 LET cds=145 220 LET cf=155 225 LET cfs=160 230 LET cg=165 235 LET cgs=170 240 LET ca=175 245 LET cas=180 250 LET cb=185 255 LET term=195 260 RETURN 300 REM * ENTERTAINER * 305 BEEP ei,d: BEEP ei,ds: GO SUB cc: BEEP ei,e: BEEP q,o+c: BEEP ei,e: BEEP q,o+c: BEEP ei,e: GO SUB cf: BEEP h+q,o+c 310 BEEP ei,o+c: BEEP ei,o+d: BEEP ei,o+ds 315 GO SUB cc: BEEP ei,o+e: BEEP ei,o+c: BEEP ei,o+d: GO SUB cg: BEEP q,o+e: BEEP ei,b: BEEP q,o+d 320 GO SUB cc: BEEP h+q,o+c: BEEP ei,d: GO SUB cg: BEEP ei,ds 325 GO SUB cc: BEEP ei,e: BEEP q,o+c: BEEP ei,e: BEEP q,o+c: BEEP ei,e: GO SUB cf: BEEP w-ei,o+c 330 BEEP ei,a: BEEP ei,g: GO SUB cd 335 BEEP ei,fs: BEEP ei,a: BEEP ei,o+c: BEEP q,o+e: BEEP ei,o+d: BEEP ei,o+c: BEEP ei,a: GO SUB cg 340 BEEP h+ei,o+d: BEEP ei,d: BEEP ei,ds: GO SUB cc 345 BEEP ei,e: BEEP q,o+c: BEEP ei,e: BEEP q,o+c: BEEP ei,e: GO SUB cf: BEEP h+q,o+c: BEEP ei,o+c: BEEP ei,o+d: BEEP ei,o+ds 350 GO SUB cc: BEEP ei,o+e: BEEP ei,o+c: BEEP ei,o+d: GO SUB cg: BEEP q,o+e: BEEP ei,b: BEEP q,o+d 355 GO SUB cc: BEEP h+ei,o+c: BEEP ei,o+d 360 BEEP ei,o+e: BEEP ei,o+c: BEEP ei,o+d: GO SUB cas: BEEP q,o+e: BEEP ei,o+c: BEEP ei,o+d: BEEP ei,o+c 365 GO SUB cf: BEEP ei,o+e: BEEP ei,o+c: BEEP ei,o+d: BEEP q,o+e: BEEP ei,o+c: BEEP ei,o+d: BEEP ei,o+c: GO SUB cc 370 BEEP ei,o+e: BEEP ei,o+c: BEEP ei,o+d: GO SUB cg: BEEP q,o+e: BEEP ei,b: BEEP q,o+d: GO SUB cc 375 BEEP h+ei,o+c: BEEP ei,o+c: BEEP ei,o+f: BEEP ei,o+fs: BEEP q,o+g: BEEP ei,o+a: BEEP q,o+g: BEEP ei,o+e: BEEP ei,o+f: BEEP ei,o+fs 380 BEEP q,o+g: BEEP ei,o+a: BEEP q,o+g: BEEP ei,o+e: BEEP ei,o+c: BEEP ei,g: GO SUB cf 385 BEEP ei,a: BEEP ei,b: BEEP ei,o+c: BEEP ei,o+d: BEEP ei,o+e: BEEP ei,o+d: BEEP ei,o+c: BEEP ei,o+d: GO SUB cc 390 BEEP ei,g: BEEP ei,o+e: BEEP ei,o+f: BEEP ei,o+g: BEEP ei,o+a: BEEP ei,o+g: BEEP ei,o+e: BEEP ei,o+f 395 BEEP q,o+g: BEEP ei,o+a: BEEP q,o+g 400 BEEP ei,o+e: BEEP ei,o+f: BEEP ei,o+fs 405 BEEP q,o+g: BEEP ei,o+a: BEEP q,o+g: BEEP ei,o+g: BEEP ei,o+a: BEEP ei,o+as: GO SUB cg 410 BEEP ei,o+b: BEEP q,o+b: GO SUB cd: BEEP q,o+b: BEEP ei,o+a: BEEP ei,fs+o: BEEP ei,o+d 415 GO SUB cg: BEEP h+ei,o+g: BEEP ei,o+e: BEEP ei,o+f: BEEP ei,o+fs: GO SUB cc 420 BEEP q,o+g: BEEP ei,o+a: BEEP q,o+g: BEEP ei,o+e: BEEP ei,o+f: BEEP ei,o+fs: BEEP q,o+g: BEEP ei,o+a: BEEP q,o+g: BEEP ei,o+e: BEEP ei,o+c: BEEP ei,g: GO SUB cf 425 BEEP ei,a: BEEP ei,b: BEEP ei,o+c: BEEP ei,o+d: BEEP ei,o+e: BEEP ei,o+d: BEEP ei,o+c: BEEP ei,o+d: GO SUB cc 430 BEEP h+ei,o+c: GO SUB cg: BEEP ei,g: GO SUB cc: BEEP ei,fs: BEEP ei,g: GO SUB cf 435 BEEP q,o+c: BEEP ei,a: BEEP q,o+c: BEEP ei,a: BEEP ei,o+c: BEEP ei,a: GO SUB cc 440 BEEP ei,g: BEEP ei,o+c: BEEP ei,o+e: BEEP q,o+g: BEEP ei,o+e: BEEP ei,o+c: BEEP ei,g: GO SUB cd 445 BEEP q,a: BEEP q,o+c: GO SUB cg: BEEP ei,o+e: BEEP q,o+d: GO SUB cc: BEEP h+ei,o+c 500 PAUSE 250: GO TO 10 700 FOR i=2 TO 10: PRINT AT i-1,4;" ";AT i,4;"-=-=The Entertainers=-=-": PAUSE 10: BEEP .01,20: NEXT i 715 FOR i=19 TO 13 STEP -1: PAUSE 5: PRINT AT i,5;" ";AT i-1,4;" by Jim Smith 1987": PAUSE 10: PRINT AT i,5;" ": BEEP .01,20: NEXT i 720 FOR i=2 TO 250 750 OUT 254,7: OUT 254,24: NEXT i 780 RETURN 8000 INK 0: PAPER 7: BORDER 7: CLS : STOP 8999 STOP 9000 SAVE "entert.B1" LINE 1 ```