VidLii
Upload

Random tune generator for BBC Micro

DIM P(2),N$(2): N=RND(17)-1: a=-15: I=-2
P(0)=&C740: N$(0)="ACEFHJL":
P(1)=&C730: N$(1)="ACDFHIK":
P(2)=&B720: N$(2)="ACEHJLO":
D$="GEGEGEGE"
R$="73111137"
FORi=0TO3
SOUNDi,0,0,16-4*(i=3)
NEXT
REPEAT
R=19+RND(12)*4
H=RND(3)-1
FORj=-15 TO 0 STEP 4
FORk=0TO1
IFRND(2)-1:N=FNn(RND(5)-3+N):a=-15:ELSEa=a+2
b=R+4*(ASCMID$(N$(H),N MOD7+1,1)-65)+(N DIV7*48): SOUND2,a,b,4: SOUND3,a*0.5,b-1,4
NEXT
FORi=0TO3
SOUND 1,j,R+(P(H)DIV(16^i)AND15)*4,2
NEXT
I=I+2:FORi=0TO1:D=(I+i AND7)+1:SOUND0,-13,ASCMID$(D$,D,1)-65,1:SOUND0,0,0,VALMID$(R$,D,1):NEXT
NEXT
UNTIL FALSE
DEFFNn(N)IFN<0:=-N
IFN>16:=16-(N-16)
=N
More From: dusthillresident
Related Videos
2 ratings
31 views
Want to add this video to your favorites?
Sign in to VidLii now!
Want to add this video to your playlists?
Sign in to VidLii now!
Video Responses (0) Sign in to make a video response
This video doesn't have any video responses!
Text Comments (3) Sign in to post a comment
dusthillresident (6 months ago)
dusthillresident
0
Yes, this is BBC BASIC, on the BBC Microcomputer system (1983)
shingo (6 months ago)
shingo
0
@dusthillresident pretty cool
shingo (6 months ago)
shingo
1
is that a dialect of BASIC?
Sign up for a free account, or sign in to post a comment.
Date: Sep 26, 2025 Views: 31 Ratings: 2
Time: Comments: 3 Favorites: 1