song(a, b) = 0
octave(i) = 2
NLS(i) = 0
NLS(2) = 1
'assigning notes
notes$(1) = "C"
notes$(2) = "C#"
notes$(3) = "D"
notes$(4) = "D#"
notes$(5) = "E"
notes$(6) = "F"
notes$(7) = "F#"
notes$(8) = "G"
notes$(9) = "G#"
notes$(10) = "A"
notes$(11) = "A#"
notes$(12) = "B"
'mouse on window
'menu
menu:
LINE (328, 120)-(329, 20), 15, BF
LINE (420, 300)-(420, 200), 15 LINE (520, 275)-(520, 175), 15 LINE (420, 220)-(520, 195), 15 LINE (120, 100)-(120, 25), 15
help:
PRINT "Welcome to the Melody Creator! This a program where you can create melodies." PRINT "To start, click on the 'Editor' button, or click 'Quit' to exit the program." PRINT "Within the editor you can click the -'s and #'s to toggle notes on and off." PRINT "A - means a note is off, and a # means a note is on." PRINT "Down at the bottom there's a section labled 'Oct.' This stands for octave." PRINT "Click the arrows at the top and bottom to increase or decrease the octave." PRINT "Below the octave section is 's N l.'" PRINT "This stands for stacatto, normal note length, and legatto." PRINT "These buttons change the length of notes." PRINT "Finally is the play button, click this button to play the melody." PRINT "There is also the Save and Load buttons which can save, and load, melodies." PRINT "Simply give them the path towards a place to save, or load, a melody." PRINT "Back to Main Menu"
' UI
editor:
PRINT " 11111111112222222222333333333344444444445" PRINT " 12345678901234567890123456789012345678901234567890" PRINT "________________________________________________________" PRINT " C | --------------------------------------------------|" PRINT " C#| --------------------------------------------------|" PRINT " D | --------------------------------------------------|" PRINT " D#| --------------------------------------------------|" PRINT " E | --------------------------------------------------|" PRINT " F | --------------------------------------------------|" PRINT " F#| --------------------------------------------------|" PRINT " G | --------------------------------------------------|" PRINT " G#| --------------------------------------------------|" PRINT " A | --------------------------------------------------|" PRINT " A#| --------------------------------------------------|" PRINT " B | --------------------------------------------------|" PRINT "_______________________________________________________|" PRINT " | 22222222222222222222222222222222222222222222222222|" PRINT "________________________________________________________" PRINT "Back to Main Menu" 'mouse tracking
'LOCATE 25, 1
'PRINT mx, my
'LOCATE 26
'PRINT octave(1), octave(2), octave(3)
'PRINT octave(23), octave(24), octave(25)
'Note Chooser
IF song
(mx
- 5, my
- 3) = 0 THEN song(mx - 5, my - 3) = 1
song(mx - 5, my - 3) = 0
'octave up
octave(mx - 5) = octave(mx - 5) + 1
'octave down
octave(mx - 5) = octave(mx - 5) - 1
'Staccato
NLS(i) = 0
NLS(1) = 1
'Normal
NLS(i) = 0
NLS(2) = 1
'Legato
NLS(i) = 0
NLS(3) = 1
'play song
'LOCATE 30, 1
'PRINT "test"
symbol$ = ""
symbols$ = stringy$ + "V25 MB "
'Note Length
symbols$ = symbols$ + " MS"
symbols$ = symbols$ + " ML"
total = 0
symbols$
= symbols$
+ " O" + RIGHT$(STR$(octave
(i
)), 1) + " " 'LOCATE 24, i
' PRINT RIGHT$(STR$(octave(i)), 1)
symbols$ = symbols$ + ", " + notes$(j)
symbols$ = symbols$ + " " + notes$(j)
thing = 1
total = total + 1
symbols$ = symbols$ + " P4"
total = 0
thing = 0
' CLS
' R = R + 1 'number of runnings
' PRINT R
' LOCATE 29, 1
'PRINT symbols$
'PRINT stringy$
'PRINT octave
'save
'load
'back to menu
save:
PRINT " ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ?" PRINT " 3 Enter A Path To Save The File Or Type 'Cancel' 3x To Go Back: 3" PRINT " AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU" PRINT "Please enter a valid path. " PRINT "You should be pointing to a valid folder, and then end with a valid file." PRINT "A valid file ends with .dat or .txt." PRINT "Press Any Key To Continue"
load:
PRINT " ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ?" PRINT " 3 Enter A Path To Load The File Or Type 'Cancel' 3x To Go Back: 3" PRINT " AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU" PRINT "Please enter a valid path. " PRINT "You should be pointing to a valid folder, and then end with a valid file." PRINT "A valid file ends with .dat or .txt." PRINT "Press Any Key To Continue"