Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Musical-scale/Locomotive-Basic/musical-scale.basic
Normal file
16
Task/Musical-scale/Locomotive-Basic/musical-scale.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
10 mode 1
|
||||
20 print "Note","Freq. (Hz)","Period"
|
||||
30 ' program loop:
|
||||
40 if sq(1)<128 then gosub 70 ' play next note if channel is inactive
|
||||
50 goto 40
|
||||
60 ' play next note
|
||||
70 read n
|
||||
80 if n<0 then end
|
||||
90 note=note+1
|
||||
100 ' calculation from chapter 7, page 26 of the CPC manual:
|
||||
110 f=440*(2^((n-10)/12))
|
||||
120 p=round(62500/f)
|
||||
130 print mid$("cdefgabc",note,1),round(f,2),p
|
||||
140 sound 1,p,100
|
||||
150 return
|
||||
160 data 1,3,5,6,8,10,12,13,-1
|
||||
Loading…
Add table
Add a link
Reference in a new issue