--- title: "AY_ets!" id: 79518 type: "computer_media" slug: "ay_ets" url: "http://localhost/computer_media/ay_ets/" markdown_url: "http://localhost/computer_media/ay_ets.md" published_at: "2026-11-22T19:36:03+00:00" modified_at: "2026-11-22T19:36:03+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/ay-ets-2.png" excerpt: "Builds, plays and saves equal-tempered tuning tables for the TS2068 sound chip." 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: "Peter Ross" slug: "peter-ross" taxonomy: "indiv" url: "http://localhost/indiv/peter-ross/" genre: - name: "Music" slug: "music" taxonomy: "genre" url: "http://localhost/type/music/" media_type: "Program" programmers: - name: "Peter Ross" slug: "peter-ross" taxonomy: "indiv" url: "http://localhost/indiv/peter-ross/" download_url: "https://archive.org/download/timex-sinclair-software-archive/AY_ets%21%20%281986%29%28Ross%2C%20Peter%29%28TS2068%29%28Program%29.zip" tsrun_member: "AY_ets! (1986)(Ross, Peter)(TS2068)(Program)/AY_ets! (1986)(Ross, Peter)(TS2068)(Program).tap" mediadate: "1986" images: - url: "http://localhost/wp-content/uploads/2026/11/ay-ets-2.png" - url: "http://localhost/wp-content/uploads/2026/11/ay-ets-3.png" - url: "http://localhost/wp-content/uploads/2026/11/ay-ets-1.png" article_media: - id: 45987 title: "Sound: Exploring the PSG" type: "article" url: "http://localhost/article/sound-exploring-the-psg/" media_type_tags: "Music" license: false --- # AY_ets! Calculates coarse and fine tuning values for eight octaves of the equally tempered scale on the TS2068’s AY sound chip, plays the 96 notes with a table of their values, and can save the two arrays for use in music programs. RUN it and wait a few seconds. When it stops, GO TO 9999 saves the arrays as PSG_ets (coarse, v) and PSG_ets#2 (fine, u). Element 37 is middle C. Published in LISTing March 1986 ([Sound: Exploring the PSG](https://timexsinclair.com/article/sound-exploring-the-psg/)). The issue’s contents page credits the program to Peter Ross. ## Source Code ``` 1 PAPER 6: INK 0: BORDER 6: BRIGHT 0: FLASH 0: CLS : DIM v(96): DIM u(96): LET z=-40: DIM n(96) 10 LET x=1764000/16 20 LET b=27.5: LET s=2↑(1/12) 30 FOR i=3 TO 98 40 LET a=(b*s↑i) 70 LET a=x/a: LET c=INT (a/256) 80 LET f=INT (a-(c*256)+.5) 90 LET a=x/(c*256+f) 95 LET z=z+1: LET n(i-2)=z: LET u(i-2)=f: LET v(i-2)=c 100 PRINT AT 0,5;"EQUALLY TEMPERED SCALE";AT 11,11; INK 2; BRIGHT 1; FLASH 1;"PLEASE WAIT": NEXT i 105 RESTORE : LET Z=1: CLS : PRINT AT 0,0; BRIGHT 1; PAPER 7;" OCTVE NOTE FINE CRSE VAL#": LET L=0: FOR f=1 TO 96: LET L=L+1: FOR n=15 TO 0 STEP -2: SOUND 8,n;9,n;10,n: NEXT n: PAUSE 5: SOUND 8,15;9,15;10,15;7,56;2,u(f);3,v(f);4,u(f);5,v(f);1,v(f);0,u(f) 110 IF L>12 THEN LET Z=Z+1: LET L=1: RESTORE 180 115 READ N$: PRINT AT 1,3;" ";AT 1,3;Z;AT 1,9;" ";AT 1,9;N$;AT 1,15;" ";AT 1,15;U(F);AT 1,22;" ";AT 1,22;V(F);AT 1,28;" ";AT 1,28;F 120 PAUSE 5: NEXT F 180 DATA "C","C#","D","D#","E","F","F#","G","G#","A","A#","B" 199 PAPER 6: INK 0: BORDER 6: CLS : PRINT AT 2,1;"This program sets up two arraysto hold the coarse and fine tune values for the equally tempered scale."'"Array-u holds the value for the fine tune register."'"Array-v holds values for coarse tune reg."'' 200 PRINT " The complete 8-octave range is set. This will allow the pro-grammer to easily create music programs in a similer fashion to using the British BEEP but with the sophistication of our PSG." 201 PRINT '" Simply GOTO 9999 to save the arrays";AT 20,0; BRIGHT 1; INK 4;"PSG ARRAY VAL OF 37=mid C = BEEP VAL OF 0" 300 STOP 9999 SAVE "PSG_ets" DATA v(): SAVE "PSG_ets#2" DATA u() ```