Musical scale: Difference between revisions

Content deleted Content added
initial draft
 
m ZX Spectrum Basic and Lilypond
Line 4: Line 4:


For languages that cannot utilize a sound device, it is permissible to output to a musical score or the task can be omitted.
For languages that cannot utilize a sound device, it is permissible to output to a musical score or the task can be omitted.

=={{header|Lilypond}}==

The lilypond tool produces musical score sheets and does not output notes to the sound device.

<lang lilypond>% Start at middle C
\relative c' {
c d e f
g a b c
}</lang>

=={{header|ZX Spectrum Basic}}==

<lang zxbasic>10 REM Musical scale
20 LET n=0: REM Start at middle C
30 LET d=0.2: REM Make each note 0.2 seconds in duration
40 FOR l=1 TO 8
50 BEEP d,n
60 READ i: REM Number of semitones to increment
70 LET n=n+i
80 NEXT l
90 STOP
9000 DATA 2,2,1,2,2,2,1,2:REM WWHWWWH</lang>



{{omit from|BASIC}}
{{omit from|BASIC}}