Author Topic: A small BASIC tune  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.694
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 917
A small BASIC tune
« on: 19:20, 04 June 18 »
Felt like looking into BASIC music again today, and before I knew it, I'd made this little thing.
Code: [Select]
10 RELEASE 7
20 tempo=15::' Smaller = faster
30 ENV 1,7,-1,tempo-5,4,-1,5:ENV 2,0,-3,1,7,-1,7,4,-1,50:ENV 3,0,-3,1,3,-1,1,3,-1,2:ENV 4,1,-10,1,5,1,7,5,-1,20
40 READ b1:IF b1=-1 THEN RESTORE:GOTO 40
50 READ b2,b3,c1,c2,c3,t1,t2,t3,t4,t5,s1,s2
60 SOUND 1,s1,tempo*4,15,4:SOUND 2,b1,tempo*3,15,1:SOUND 4,b1*2,tempo*2,15,1:SOUND 4,t1,tempo*2,15,3
70 SOUND 2,b1,tempo*1,15,1:SOUND 2,c1,tempo*2,15,2:SOUND 1,c2,tempo*4,15,2:SOUND 4,c3,tempo,15,2
80 SOUND 1,s2,tempo*4,15,4:SOUND 2,b1,tempo*2,15,1:SOUND 4,t2,tempo*3,15,3
90 SOUND 2,b2,tempo*3,15,1:SOUND 4,t3,tempo*3,15,3:SOUND 4,t4,tempo,15,3
100 SOUND 2,b2,tempo*1,15,1:SOUND 2,c1,tempo*2,15,2:SOUND 1,c2,tempo*4,15,2:SOUND 4,c3,tempo*2,15,2
110 SOUND 2,b3,tempo*4,15,1:SOUND 4,t5,tempo*2,15,3
120 READ b1,b2,b3,c1,c2,c3,t1,t2,t3,t4,t5,s1,s2
130 SOUND 1,s1,tempo*4,15,4:SOUND 4,b1*2,tempo*2,15:SOUND 4,t1,tempo*2,15,3
140 SOUND 2,b1,tempo*2,15,1:SOUND 2,c1,tempo,15,2:SOUND 1,c2,tempo*4,15,2:SOUND 4,c3,tempo,15,2
150 SOUND 1,s2,tempo*4,15,4:SOUND 2,b1,tempo*3,15,1:SOUND 4,t2,tempo*3,15,3
160 SOUND 2,b2,tempo*2,15,1:SOUND 4,t3,tempo*3,15,3
170 SOUND 2,b2,tempo*2,15,1:SOUND 4,t4,tempo,15,3
180 SOUND 2,c1,tempo*2,15,2:SOUND 1,c2,tempo*4,15,2:SOUND 4,c3,tempo*2,15,2
190 SOUND 2,b3,tempo*2,15,1:SOUND 4,t5,tempo*2,15,3
200 GOTO 40
210 DATA 568,426,379,284,239,190,0,0,0,0,0,0,0
220 DATA 568,426,379,284,239,190,0,0,0,0,0,0,0
230 DATA 716,478,716,284,239,190,0,0,0,0,0,0,0
240 DATA 758,506,638,319,253,190,0,0,0,0,0,0,0
250 DATA 568,426,379,284,239,190,0,0,0,0,0,0,0
260 DATA 568,426,379,284,239,190,0,0,0,0,0,0,0
270 DATA 716,478,716,284,239,190,0,0,0,0,0,0,0
280 DATA 758,506,638,319,253,190,0,0,0,0,0,0,0
290 DATA 568,426,379,284,239,190,95,95,106,95,142,0,0
300 DATA 568,426,379,284,239,190,95,95,80,95,106,0,0
310 DATA 716,478,716,284,239,190,119,119,119,95,127,0,0
320 DATA 758,506,638,319,253,190,127,127,127,159,142,0,0
330 DATA 568,426,379,284,239,190,95,95,106,95,142,0,0
340 DATA 568,426,379,284,239,190,95,95,80,80,71,0,0
350 DATA 716,478,716,284,239,190,60,63,80,80,95,0,0
360 DATA 758,506,638,319,253,190,63,63,60,63,71,0,0
370 DATA 568,426,379,284,239,190,0,0,0,0,0,71,71
380 DATA 568,426,379,284,239,190,0,0,0,0,0,71,71
390 DATA 716,478,716,284,239,190,0,0,0,0,0,71,71
400 DATA 758,506,638,319,253,190,0,0,0,0,0,80,95
410 DATA 568,426,379,284,239,190,0,0,0,0,0,71,71
420 DATA 568,426,379,284,239,190,0,0,0,0,0,71,71
430 DATA 716,478,716,284,239,190,0,0,0,0,0,71,71
440 DATA 758,506,638,319,253,190,0,0,0,0,0,80,95
450 DATA 568,426,379,284,239,190,95,95,106,95,142,71,71
460 DATA 568,426,379,284,239,190,95,95,80,95,106,71,71
470 DATA 716,478,716,284,239,190,119,119,119,95,127,71,71
480 DATA 758,506,638,319,253,190,127,127,127,159,142,80,95
490 DATA 568,426,379,284,239,190,95,95,106,95,142,71,71
500 DATA 568,426,379,284,239,190,95,95,80,80,71,71,70
510 DATA 716,478,716,284,239,190,60,63,80,80,95,71,71
520 DATA 758,506,638,319,253,190,63,63,60,63,71,80,95
530 DATA -1
I made it on my CPC464. Then copied to PC to play in CPCinaJAR. There I notice audio-volumes are off. They are too low with the emulator than on my CPC464.Haven't tested on other emulators.
Anyway, enjoy.  :)

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 772
  • Country: gr
    • Parts from the past.
  • Liked: 344
Re: A small BASIC tune
« Reply #1 on: 19:30, 04 June 18 »
Aaahh that generator!!!


Great job my friend.
To blit, or not to blit?
Amiga 1200 Black Project

Offline XeNoMoRPH

  • CPC6128
  • ****
  • Posts: 160
  • Country: es
  • Liked: 256
Re: A small BASIC tune
« Reply #2 on: 21:17, 06 June 18 »
Tested on  JavaCPC Desktop emulator , works fine  :D

Offline Andrew Musson

  • CPC464
  • **
  • Posts: 7
  • Country: gb
  • Liked: 11
Re: A small BASIC tune
« Reply #3 on: 01:36, 02 July 18 »
Tested on WinAPE 2.0 Beta 2 works fine  :)