I give you simplified FM synthesizer.
Try the following program with various B and M.
ACLS
B=1:M=2
ST$=""
FOR I=0 TO 31
T=I/32
V=120*SIN(2*PI()*T+B*SIN(2*PI()*M*T))
V=ROUND(V+128)
ST$=ST$+HEX$(V,2)
NEXT I
WAVSET 255,127,127,127,127,ST$,69-48
BGMPLAY"@255O4CDEFGAB"