Unlike most home computers the QL has a very limited noise making capability. What there is can only be dragged out by using the enigmatic BEEP command. This has 8 arguments, all of which are obscure. The only way to produce something vaguely melodic is by trial and error. The following quickie allows you to do exactly this.
100 REMark **** QL User -Beep experiment
110 REMark **** Rob Miles 1985
120 duration=5000:pitch=100:pitch_2=0:grad_x=0:grad_y=0:wrap=0:fuzzy=0:random=0
130 REPeat sounder
140 CLS
150 set "Duration (-32768..32767) ?",duration,2
160 set "Pitch (0..255) ?",pitch,4
170 set "Pitch_2 (0..255) ?".pitch 2,6
180 set "Grad_x (-32768..15) ?".grad_x,8
190 set "Grad_y (-8..7) ?",grad_y,10
200 set "Wrap (0..32767) ?".wrap,12
210 set "Fuzzy (0..15) ?",fuzzy,14
220 set "Random (0..15) ?",random.16
230 AT 18,0:PRINT "Beep ":duration:",":pitch:",":pitch_2:",":grad_x:",";grad_y:",";wrap:",";fuzzy:",":random
240 BEEP duration,pitch,pitch_2,grad_x,grad_y.wrap.fuzzy,random
250 dum$=INKEY$(-1)
260 END REPeat sounder
270 DEFine PROCedure set (name$,var.position)
280 LOCal buf$
290 AT position,0:PRINT name$:" ":var
300 AT position,0:PRINT name$;" ";
310 INPUT buf$
320 IF buf$<>"" THEN var=buf$
330 AT position,0:PRINT name$:" ":var:"
340 END DEFine set
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.