More intro music, skippable now

This commit is contained in:
stevenhowes
2021-02-20 16:30:45 +00:00
parent f294d6f333
commit 48f7a03edf
3 changed files with 112 additions and 27 deletions
Binary file not shown.
+112 -27
View File
@@ -1,10 +1,79 @@
MODE 4 MODE 28
OFF OFF
CLS CLS
sprite_area% = FNload_sprites("Spr") sprite_area% = FNload_sprites("Spr")
PROCdraw_sprite("intro_28",320,400)
DIM Notes$(12)
Notes$() = "A","A#","B","C","C#","D","D#","E","F","F#","G","G#"
MaxComp% = 999
DIM CompositionStart%(MaxComp%)
DIM CompositionNote%(MaxComp%)
DIM CompositionVolume%(MaxComp%)
DIM CompositionChannel%(MaxComp%)
DIM CompositionLength%(MaxComp%)
PRINT "Loading composition"
CurrentNote% = 0
CurrentStart% = 0
REM DUn, dun, daan duhhn
PROCAddNote(CurrentStart%,1,"A4#",200)
PROCAddNote(CurrentStart%,2,"A5#",200)
CurrentStart% += 200
PROCAddNote(CurrentStart%,1,"F3",200)
PROCAddNote(CurrentStart%,2,"F4",200)
CurrentStart% += 200
PROCAddNote(CurrentStart%,1,"G3#",200)
PROCAddNote(CurrentStart%,2,"G4#",200)
CurrentStart% += 200
PROCAddNote(CurrentStart%,1,"C3",200)
PROCAddNote(CurrentStart%,2,"C4",200)
CurrentStart% += 200
REM DUn, dun, daan duhhn
PROCAddNote(CurrentStart%,1,"A3#",200)
PROCAddNote(CurrentStart%,2,"A4#",200)
CurrentStart% += 200
PROCAddNote(CurrentStart%,1,"F2",200)
CurrentStart% += 200
PROCAddNote(CurrentStart%,2,"G2#",200)
CurrentStart% += 200
PROCAddNote(CurrentStart%,1,"C2",200)
CurrentStart% += 250
REM Duh
PROCAddNote(CurrentStart%,3,"A3#",300)
PROCAddNote(CurrentStart%,4,"A2#",300)
CurrentStart% += 200
REM Dun De Da
PROCAddNote(CurrentStart%,1,"F1",20)
CurrentStart% += 50
PROCAddNote(CurrentStart%,2,"A2#",5)
CurrentStart% += 20
PROCAddNote(CurrentStart%,1,"D2#",200)
CurrentStart% += 180
PROCAddNote(CurrentStart%,2,"D2",50)
CurrentStart% += 50
PROCAddNote(CurrentStart%,1,"A2#",30)
CurrentStart% += 30
PROCAddNote(CurrentStart%,2,"G1",50)
CurrentStart% += 50
PROCAddNote(CurrentStart%,1,"C2",50)
CurrentStart% += 50
PROCAddNote(CurrentStart%,3,"A2#",100)
PROCAddNote(CurrentStart%,4,"F2",100)
CurrentStart% += 100
PRINT "Loaded"
PROCdraw_sprite("intro_25",320,256)
SOUND ON SOUND ON
VOICES 4 VOICES 4
@@ -13,39 +82,55 @@ VOICE 2,"WaveSynth-Beep"
VOICE 3,"WaveSynth-Beep" VOICE 3,"WaveSynth-Beep"
VOICE 4,"WaveSynth-Beep" VOICE 4,"WaveSynth-Beep"
SOUND 1,-10,189,200 StartCents% = TIME
SOUND 2,-10,141,200
SOUND 3,-10,169,200,200 FOR NoteID%=0 TO CurrentNote%
SOUND 4,-10,121,200,200 IF CompositionChannel%(NoteID%) > 0 THEN
WHILE CompositionStart%(NoteID%) > (TIME - StartCents%)
SOUND 1,-10,133,200,400 ENDWHILE
SOUND 2,-10,181,200,400 PRINT STR$(CompositionChannel%(NoteID%)) + " " + STR$(CompositionVolume%(NoteID%)) + " " + STR$(CompositionNote%(NoteID%)) + " " + STR$(CompositionLength%(NoteID%))
SOUND CompositionChannel%(NoteID%),CompositionVolume%(NoteID%),CompositionNote%(NoteID%),CompositionLength%(NoteID%)
SOUND 3,-10,149,200,600 Key% = INKEY(0)
SOUND 4,-10,101,200,600 IF Key% >= 0 END
ENDIF
NEXT NoteID%
SOUND 1,-10,93,200,825 PROCDelay(300)
SOUND 2,-10,141,200,825
SOUND 3,-10,73,200,1025
SOUND 4,-10,85,200,1225
SOUND 1,-10,53,200,1425
PROCdelay(1700)
PRINT "Press any key"
A = INKEY(1000)
END END
DEF PROCAddNote(Start%,Channel%,RealNote$,Length%)
CompositionStart%(CurrentNote%) = Start%
CompositionNote%(CurrentNote%) = FNEncodeNote(RealNote$)
CompositionVolume%(CurrentNote%) = -10
CompositionChannel%(CurrentNote%) = Channel%
CompositionLength%(CurrentNote%) = Length%
CurrentNote% += 1
ENDPROC
DEF FNEncodeNote(Note$)
Octave% = VAL(MID$(Note$,2,1))
IF LEN(Note$) = 3 THEN
Note$ = LEFT$(Note$,1) + RIGHT$(Note$,1)
ELSE
Note$ = LEFT$(Note$,1)
ENDIF
NoteByte% = -1
FOR NoteCount% = 0 TO 12
IF Notes$(NoteCount%) = Note$ THEN
NoteByte% = NoteCount%
ENDIF
NEXT NoteCount%
NoteByte% = 41 + (4 * NoteByte%) + ((Octave% - 2) * 48)
IF NoteByte% < 0 THEN
NoteByte% = 0
ENDIF
=NoteByte%
REM Delay routine - thanks Sophie REM Delay routine - thanks Sophie
DEF PROCdelay(n) DEF PROCDelay(n)
T%=TIME+n:REPEAT UNTIL TIME > T% T%=TIME+n:REPEAT UNTIL TIME > T%
ENDPROC ENDPROC
Binary file not shown.