my program

mickey
mickey

August 2nd, 2009, 9:07 pm #1

here is my program that I have been asking for help on. I need it to run in qbasic and I need the output of the program to be modified in order to produce a notepad that can be entered directly into lilypond in order to transpose guitar tablature to saxophone sheet music. If anyone would be nice enough to help me it would be greatly appreciated because I only self taught myself enough to get the program as far as it is but I need the additional modifications in order for it to be efficient and usable.

print ""
print ""
print ""


print " Welcome to Tab Converter for Eb Alto Saxophone"
print " Created by Mickey Branscum"
print ""
print ""
print " This program assumes standard tuning of E A D G B e"
print ""
print ""
print " In order to find out what a note on a guitar is for your Eb Alto Saxophone:"
print " First type in the number of the string that the note is played on and hit ENTER."
print " E=1 A=2 D=3 G=4 B=5 e=6"
print " Next type in the fret # that the note is played on and hit ENTER. (Open = 0) "
print " To enter a rest type the letter R instead of the String # and hit ENTER twice."
print " To enter the length of a note or rest:"
print " 1=Whole Note, 2=Half Note, 4=Quarter Note, 8=Eighth Note, 16= Sixteenth Note "
print " (To skip the note length just hit enter.)"
print ""
print " For example, if I wanted to know what note the second fret of the E string is"
print " on my saxophone I would type: 1, ENTER 2, ENTER, ENTER."
print " And if I wanted to specify that it was an Eighth Note I would type:"
print " 1, ENTER, 2, ENTER, 8, ENTER."
print ""
print ""
print " START"
[start]
input " String #? "; amount1
input "Fret #? "; amount2
input "Length? "; amount3
if amount1 = 1 and amount2 = 0 then print " Low C#"
if amount1 = 1 and amount2 = 1 then print " Low D"
if amount1 = 1 and amount2 = 2 then print " Low D#"
if amount1 = 1 and amount2 = 3 then print " Low E"
if amount1 = 1 and amount2 = 4 then print " Low F"
if amount1 = 1 and amount2 = 5 then print " Low F#"
if amount1 = 1 and amount2 = 6 then print " Low G"
if amount1 = 1 and amount2 = 7 then print " Low G#"
if amount1 = 1 and amount2 = 8 then print " Middle A"
if amount1 = 1 and amount2 = 9 then print " Middle Bb"
if amount1 = 1 and amount2 = 10 then print " Middle B"
if amount1 = 1 and amount2 = 11 then print " Middle C"
if amount1 = 1 and amount2 = 12 then print " Middle C#"
if amount1 = 1 and amount2 = 13 then print " Middle D"
if amount1 = 1 and amount2 = 14 then print " Middle D#"
if amount1 = 1 and amount2 = 15 then print " Middle E"
if amount1 = 1 and amount2 = 16 then print " Middle F"
if amount1 = 1 and amount2 = 17 then print " Middle F#"
if amount1 = 1 and amount2 = 18 then print " High G"
if amount1 = 1 and amount2 = 19 then print " High G#"
if amount1 = 2 and amount2 = 0 then print " Low F#"
if amount1 = 2 and amount2 = 1 then print " Low G"
if amount1 = 2 and amount2 = 2 then print " Low G#"
if amount1 = 2 and amount2 = 3 then print " Middle A"
if amount1 = 2 and amount2 = 4 then print " Middle Bb"
if amount1 = 2 and amount2 = 5 then print " Middle B"
if amount1 = 2 and amount2 = 6 then print " Middle C"
if amount1 = 2 and amount2 = 7 then print " Middle C#"
if amount1 = 2 and amount2 = 8 then print " Middle D"
if amount1 = 2 and amount2 = 9 then print " Middle D#"
if amount1 = 2 and amount2 = 10 then print " Middle E"
if amount1 = 2 and amount2 = 11 then print " Middle F"
if amount1 = 2 and amount2 = 12 then print " Middle F#"
if amount1 = 2 and amount2 = 13 then print " High G"
if amount1 = 2 and amount2 = 14 then print " High G#"
if amount1 = 2 and amount2 = 15 then print " High A"
if amount1 = 2 and amount2 = 16 then print " High Bb"
if amount1 = 2 and amount2 = 17 then print " High B"
if amount1 = 2 and amount2 = 18 then print " High C"
if amount1 = 2 and amount2 = 19 then print " High C#"
if amount1 = 3 and amount2 = 0 then print " Middle B"
if amount1 = 3 and amount2 = 1 then print " Middle C"
if amount1 = 3 and amount2 = 2 then print " Middle C#"
if amount1 = 3 and amount2 = 3 then print " Middle D"
if amount1 = 3 and amount2 = 4 then print " Middle D#"
if amount1 = 3 and amount2 = 5 then print " Middle E"
if amount1 = 3 and amount2 = 6 then print " Middle F"
if amount1 = 3 and amount2 = 7 then print " Middle F#"
if amount1 = 3 and amount2 = 8 then print " High G"
if amount1 = 3 and amount2 = 9 then print " High G#"
if amount1 = 3 and amount2 = 10 then print " High A"
if amount1 = 3 and amount2 = 11 then print " High Bb"
if amount1 = 3 and amount2 = 12 then print " High B"
if amount1 = 3 and amount2 = 13 then print " High C"
if amount1 = 3 and amount2 = 14 then print " High C#"
if amount1 = 3 and amount2 = 15 then print " High D"
if amount1 = 3 and amount2 = 16 then print " High D#"
if amount1 = 3 and amount2 = 17 then print " High E"
if amount1 = 3 and amount2 = 18 then print " High F"
if amount1 = 3 and amount2 = 19 then print " High F#"
if amount1 = 4 and amount2 = 0 then print " Middle E"
if amount1 = 4 and amount2 = 1 then print " Middle F"
if amount1 = 4 and amount2 = 2 then print " Middle F#"
if amount1 = 4 and amount2 = 3 then print " High G#"
if amount1 = 4 and amount2 = 5 then print " High A"
if amount1 = 4 and amount2 = 6 then print " High Bb"
if amount1 = 4 and amount2 = 7 then print " High B"
if amount1 = 4 and amount2 = 8 then print " High C"
if amount1 = 4 and amount2 = 9 then print " High C#"
if amount1 = 4 and amount2 = 10 then print " High D"
if amount1 = 4 and amount2 = 11 then print " High D#"
if amount1 = 4 and amount2 = 12 then print " High E"
if amount1 = 4 and amount2 = 13 then print " High F"
if amount1 = 4 and amount2 = 14 then print " High F#"
if amount1 = 4 and amount2 = 15 then print " Too High G"
if amount1 = 4 and amount2 = 16 then print " Too High G#"
if amount1 = 4 and amount2 = 17 then print " Too High A"
if amount1 = 4 and amount2 = 18 then print " Too High Bb"
if amount1 = 4 and amount2 = 19 then print " Too High B"
if amount1 = 5 and amount2 = 0 then print " High G#"
if amount1 = 5 and amount2 = 1 then print " High A"
if amount1 = 5 and amount2 = 2 then print " High Bb"
if amount1 = 5 and amount2 = 3 then print " High B"
if amount1 = 5 and amount2 = 4 then print " High C"
if amount1 = 5 and amount2 = 5 then print " High C#"
if amount1 = 5 and amount2 = 6 then print " High D"
if amount1 = 5 and amount2 = 7 then print " High D#"
if amount1 = 5 and amount2 = 8 then print " High E"
if amount1 = 5 and amount2 = 9 then print " High F"
if amount1 = 5 and amount2 = 10 then print " High F#"
if amount1 = 5 and amount2 = 11 then print " Too High G"
if amount1 = 5 and amount2 = 12 then print " Too High G#"
if amount1 = 5 and amount2 = 13 then print " Too High A"
if amount1 = 5 and amount2 = 14 then print " Too High Bb"
if amount1 = 5 and amount2 = 15 then print " Too High B"
if amount1 = 5 and amount2 = 16 then print " Too High C"
if amount1 = 5 and amount2 = 17 then print " Too High C#"
if amount1 = 5 and amount2 = 18 then print " Too High D"
if amount1 = 5 and amount2 = 19 then print " Too High D#"
if amount1 = 6 and amount2 = 0 then print " High C#"
if amount1 = 6 and amount2 = 1 then print " High D"
if amount1 = 6 and amount2 = 2 then print " High D#"
if amount1 = 6 and amount2 = 3 then print " High E"
if amount1 = 6 and amount2 = 4 then print " High F"
if amount1 = 6 and amount2 = 5 then print " High F#"
if amount1 = 6 and amount2 = 6 then print " Too High G"
if amount1 = 6 and amount2 = 7 then print " Too High G#"
if amount1 = 6 and amount2 = 8 then print " Too High A"
if amount1 = 6 and amount2 = 9 then print " Too High Bb"
if amount1 = 6 and amount2 = 10 then print " Too High B"
if amount1 = 6 and amount2 = 11 then print " Too High C"
if amount1 = 6 and amount2 = 12 then print " Too High C#"
if amount1 = 6 and amount2 = 13 then print " Too High D"
if amount1 = 6 and amount2 = 14 then print " Too High D#"
if amount1 = 6 and amount2 = 15 then print " Too High E"
if amount1 = 6 and amount2 = 16 then print " Too High F"
if amount1 = 6 and amount2 = 17 then print " Too High F#"
if amount1 = 6 and amount2 = 18 then print " Double Too High G"
if amount1 = 6 and amount2 = 19 then print " Double Too High G#"
if amount3 = 1 then print " Whole Note"
if amount3 = 2 then print " Half Note"
if amount3 = 4 then print " Quarter Note"
if amount3 = 8 then print " Eighth Note"
if amount3 = 16 then print " Sixteenth Note"
if amount1 = r then print " Rest"
goto [start]






Quote
Share

Joined: February 2nd, 2006, 10:38 pm

August 2nd, 2009, 10:44 pm #2

* Sorry I don't know anything about LilyPond.......
Quote
Like
Share

aoeu
aoeu

August 2nd, 2009, 11:24 pm #3

here is my program that I have been asking for help on. I need it to run in qbasic and I need the output of the program to be modified in order to produce a notepad that can be entered directly into lilypond in order to transpose guitar tablature to saxophone sheet music. If anyone would be nice enough to help me it would be greatly appreciated because I only self taught myself enough to get the program as far as it is but I need the additional modifications in order for it to be efficient and usable.

print ""
print ""
print ""


print " Welcome to Tab Converter for Eb Alto Saxophone"
print " Created by Mickey Branscum"
print ""
print ""
print " This program assumes standard tuning of E A D G B e"
print ""
print ""
print " In order to find out what a note on a guitar is for your Eb Alto Saxophone:"
print " First type in the number of the string that the note is played on and hit ENTER."
print " E=1 A=2 D=3 G=4 B=5 e=6"
print " Next type in the fret # that the note is played on and hit ENTER. (Open = 0) "
print " To enter a rest type the letter R instead of the String # and hit ENTER twice."
print " To enter the length of a note or rest:"
print " 1=Whole Note, 2=Half Note, 4=Quarter Note, 8=Eighth Note, 16= Sixteenth Note "
print " (To skip the note length just hit enter.)"
print ""
print " For example, if I wanted to know what note the second fret of the E string is"
print " on my saxophone I would type: 1, ENTER 2, ENTER, ENTER."
print " And if I wanted to specify that it was an Eighth Note I would type:"
print " 1, ENTER, 2, ENTER, 8, ENTER."
print ""
print ""
print " START"
[start]
input " String #? "; amount1
input "Fret #? "; amount2
input "Length? "; amount3
if amount1 = 1 and amount2 = 0 then print " Low C#"
if amount1 = 1 and amount2 = 1 then print " Low D"
if amount1 = 1 and amount2 = 2 then print " Low D#"
if amount1 = 1 and amount2 = 3 then print " Low E"
if amount1 = 1 and amount2 = 4 then print " Low F"
if amount1 = 1 and amount2 = 5 then print " Low F#"
if amount1 = 1 and amount2 = 6 then print " Low G"
if amount1 = 1 and amount2 = 7 then print " Low G#"
if amount1 = 1 and amount2 = 8 then print " Middle A"
if amount1 = 1 and amount2 = 9 then print " Middle Bb"
if amount1 = 1 and amount2 = 10 then print " Middle B"
if amount1 = 1 and amount2 = 11 then print " Middle C"
if amount1 = 1 and amount2 = 12 then print " Middle C#"
if amount1 = 1 and amount2 = 13 then print " Middle D"
if amount1 = 1 and amount2 = 14 then print " Middle D#"
if amount1 = 1 and amount2 = 15 then print " Middle E"
if amount1 = 1 and amount2 = 16 then print " Middle F"
if amount1 = 1 and amount2 = 17 then print " Middle F#"
if amount1 = 1 and amount2 = 18 then print " High G"
if amount1 = 1 and amount2 = 19 then print " High G#"
if amount1 = 2 and amount2 = 0 then print " Low F#"
if amount1 = 2 and amount2 = 1 then print " Low G"
if amount1 = 2 and amount2 = 2 then print " Low G#"
if amount1 = 2 and amount2 = 3 then print " Middle A"
if amount1 = 2 and amount2 = 4 then print " Middle Bb"
if amount1 = 2 and amount2 = 5 then print " Middle B"
if amount1 = 2 and amount2 = 6 then print " Middle C"
if amount1 = 2 and amount2 = 7 then print " Middle C#"
if amount1 = 2 and amount2 = 8 then print " Middle D"
if amount1 = 2 and amount2 = 9 then print " Middle D#"
if amount1 = 2 and amount2 = 10 then print " Middle E"
if amount1 = 2 and amount2 = 11 then print " Middle F"
if amount1 = 2 and amount2 = 12 then print " Middle F#"
if amount1 = 2 and amount2 = 13 then print " High G"
if amount1 = 2 and amount2 = 14 then print " High G#"
if amount1 = 2 and amount2 = 15 then print " High A"
if amount1 = 2 and amount2 = 16 then print " High Bb"
if amount1 = 2 and amount2 = 17 then print " High B"
if amount1 = 2 and amount2 = 18 then print " High C"
if amount1 = 2 and amount2 = 19 then print " High C#"
if amount1 = 3 and amount2 = 0 then print " Middle B"
if amount1 = 3 and amount2 = 1 then print " Middle C"
if amount1 = 3 and amount2 = 2 then print " Middle C#"
if amount1 = 3 and amount2 = 3 then print " Middle D"
if amount1 = 3 and amount2 = 4 then print " Middle D#"
if amount1 = 3 and amount2 = 5 then print " Middle E"
if amount1 = 3 and amount2 = 6 then print " Middle F"
if amount1 = 3 and amount2 = 7 then print " Middle F#"
if amount1 = 3 and amount2 = 8 then print " High G"
if amount1 = 3 and amount2 = 9 then print " High G#"
if amount1 = 3 and amount2 = 10 then print " High A"
if amount1 = 3 and amount2 = 11 then print " High Bb"
if amount1 = 3 and amount2 = 12 then print " High B"
if amount1 = 3 and amount2 = 13 then print " High C"
if amount1 = 3 and amount2 = 14 then print " High C#"
if amount1 = 3 and amount2 = 15 then print " High D"
if amount1 = 3 and amount2 = 16 then print " High D#"
if amount1 = 3 and amount2 = 17 then print " High E"
if amount1 = 3 and amount2 = 18 then print " High F"
if amount1 = 3 and amount2 = 19 then print " High F#"
if amount1 = 4 and amount2 = 0 then print " Middle E"
if amount1 = 4 and amount2 = 1 then print " Middle F"
if amount1 = 4 and amount2 = 2 then print " Middle F#"
if amount1 = 4 and amount2 = 3 then print " High G#"
if amount1 = 4 and amount2 = 5 then print " High A"
if amount1 = 4 and amount2 = 6 then print " High Bb"
if amount1 = 4 and amount2 = 7 then print " High B"
if amount1 = 4 and amount2 = 8 then print " High C"
if amount1 = 4 and amount2 = 9 then print " High C#"
if amount1 = 4 and amount2 = 10 then print " High D"
if amount1 = 4 and amount2 = 11 then print " High D#"
if amount1 = 4 and amount2 = 12 then print " High E"
if amount1 = 4 and amount2 = 13 then print " High F"
if amount1 = 4 and amount2 = 14 then print " High F#"
if amount1 = 4 and amount2 = 15 then print " Too High G"
if amount1 = 4 and amount2 = 16 then print " Too High G#"
if amount1 = 4 and amount2 = 17 then print " Too High A"
if amount1 = 4 and amount2 = 18 then print " Too High Bb"
if amount1 = 4 and amount2 = 19 then print " Too High B"
if amount1 = 5 and amount2 = 0 then print " High G#"
if amount1 = 5 and amount2 = 1 then print " High A"
if amount1 = 5 and amount2 = 2 then print " High Bb"
if amount1 = 5 and amount2 = 3 then print " High B"
if amount1 = 5 and amount2 = 4 then print " High C"
if amount1 = 5 and amount2 = 5 then print " High C#"
if amount1 = 5 and amount2 = 6 then print " High D"
if amount1 = 5 and amount2 = 7 then print " High D#"
if amount1 = 5 and amount2 = 8 then print " High E"
if amount1 = 5 and amount2 = 9 then print " High F"
if amount1 = 5 and amount2 = 10 then print " High F#"
if amount1 = 5 and amount2 = 11 then print " Too High G"
if amount1 = 5 and amount2 = 12 then print " Too High G#"
if amount1 = 5 and amount2 = 13 then print " Too High A"
if amount1 = 5 and amount2 = 14 then print " Too High Bb"
if amount1 = 5 and amount2 = 15 then print " Too High B"
if amount1 = 5 and amount2 = 16 then print " Too High C"
if amount1 = 5 and amount2 = 17 then print " Too High C#"
if amount1 = 5 and amount2 = 18 then print " Too High D"
if amount1 = 5 and amount2 = 19 then print " Too High D#"
if amount1 = 6 and amount2 = 0 then print " High C#"
if amount1 = 6 and amount2 = 1 then print " High D"
if amount1 = 6 and amount2 = 2 then print " High D#"
if amount1 = 6 and amount2 = 3 then print " High E"
if amount1 = 6 and amount2 = 4 then print " High F"
if amount1 = 6 and amount2 = 5 then print " High F#"
if amount1 = 6 and amount2 = 6 then print " Too High G"
if amount1 = 6 and amount2 = 7 then print " Too High G#"
if amount1 = 6 and amount2 = 8 then print " Too High A"
if amount1 = 6 and amount2 = 9 then print " Too High Bb"
if amount1 = 6 and amount2 = 10 then print " Too High B"
if amount1 = 6 and amount2 = 11 then print " Too High C"
if amount1 = 6 and amount2 = 12 then print " Too High C#"
if amount1 = 6 and amount2 = 13 then print " Too High D"
if amount1 = 6 and amount2 = 14 then print " Too High D#"
if amount1 = 6 and amount2 = 15 then print " Too High E"
if amount1 = 6 and amount2 = 16 then print " Too High F"
if amount1 = 6 and amount2 = 17 then print " Too High F#"
if amount1 = 6 and amount2 = 18 then print " Double Too High G"
if amount1 = 6 and amount2 = 19 then print " Double Too High G#"
if amount3 = 1 then print " Whole Note"
if amount3 = 2 then print " Half Note"
if amount3 = 4 then print " Quarter Note"
if amount3 = 8 then print " Eighth Note"
if amount3 = 16 then print " Sixteenth Note"
if amount1 = r then print " Rest"
goto [start]





note names are in lower case, rests are represented by r. 1, 2, 4, 8 after the letter for a whole, half, quarter, etc note. From your program, it looks like the easiest thing to use would be absolute pitches for every note, which is done by adding quotes or commas after the pitch name:

c' up to b' for middle c up to the b above middle c,
c'' for high up to high b which is b''
c for low c up to the b below middle c which is b
etc.

http://lilypond.org/doc/v2.10/Documenta ... note-names

A sharp is formed by adding -is to the end of a pitch name and a flat is formed by adding -es. The input d e f is interpreted as “print a D-natural, E-natural, and an F-natural,” regardless of the key signature.

Instead of using print to stdout for the values, OPEN "foobar" for output AS #1 and use PRINT #1, "whatever"
Also, don't put brackets around the line labels in QuickBASIC, instead put a colon after it like this:

foo: PRINT "hello"
GOTO foo

Tutorial:
http://lilypond.org/doc/v2.10/Documenta ... l#Tutorial
Quote
Share

Joined: February 2nd, 2006, 10:38 pm

August 2nd, 2009, 11:32 pm #4

* Good catch on the line label! I missed that....
Quote
Like
Share

Joined: March 24th, 2004, 5:02 am

August 3rd, 2009, 8:12 am #5

here is my program that I have been asking for help on. I need it to run in qbasic and I need the output of the program to be modified in order to produce a notepad that can be entered directly into lilypond in order to transpose guitar tablature to saxophone sheet music. If anyone would be nice enough to help me it would be greatly appreciated because I only self taught myself enough to get the program as far as it is but I need the additional modifications in order for it to be efficient and usable.

print ""
print ""
print ""


print " Welcome to Tab Converter for Eb Alto Saxophone"
print " Created by Mickey Branscum"
print ""
print ""
print " This program assumes standard tuning of E A D G B e"
print ""
print ""
print " In order to find out what a note on a guitar is for your Eb Alto Saxophone:"
print " First type in the number of the string that the note is played on and hit ENTER."
print " E=1 A=2 D=3 G=4 B=5 e=6"
print " Next type in the fret # that the note is played on and hit ENTER. (Open = 0) "
print " To enter a rest type the letter R instead of the String # and hit ENTER twice."
print " To enter the length of a note or rest:"
print " 1=Whole Note, 2=Half Note, 4=Quarter Note, 8=Eighth Note, 16= Sixteenth Note "
print " (To skip the note length just hit enter.)"
print ""
print " For example, if I wanted to know what note the second fret of the E string is"
print " on my saxophone I would type: 1, ENTER 2, ENTER, ENTER."
print " And if I wanted to specify that it was an Eighth Note I would type:"
print " 1, ENTER, 2, ENTER, 8, ENTER."
print ""
print ""
print " START"
[start]
input " String #? "; amount1
input "Fret #? "; amount2
input "Length? "; amount3
if amount1 = 1 and amount2 = 0 then print " Low C#"
if amount1 = 1 and amount2 = 1 then print " Low D"
if amount1 = 1 and amount2 = 2 then print " Low D#"
if amount1 = 1 and amount2 = 3 then print " Low E"
if amount1 = 1 and amount2 = 4 then print " Low F"
if amount1 = 1 and amount2 = 5 then print " Low F#"
if amount1 = 1 and amount2 = 6 then print " Low G"
if amount1 = 1 and amount2 = 7 then print " Low G#"
if amount1 = 1 and amount2 = 8 then print " Middle A"
if amount1 = 1 and amount2 = 9 then print " Middle Bb"
if amount1 = 1 and amount2 = 10 then print " Middle B"
if amount1 = 1 and amount2 = 11 then print " Middle C"
if amount1 = 1 and amount2 = 12 then print " Middle C#"
if amount1 = 1 and amount2 = 13 then print " Middle D"
if amount1 = 1 and amount2 = 14 then print " Middle D#"
if amount1 = 1 and amount2 = 15 then print " Middle E"
if amount1 = 1 and amount2 = 16 then print " Middle F"
if amount1 = 1 and amount2 = 17 then print " Middle F#"
if amount1 = 1 and amount2 = 18 then print " High G"
if amount1 = 1 and amount2 = 19 then print " High G#"
if amount1 = 2 and amount2 = 0 then print " Low F#"
if amount1 = 2 and amount2 = 1 then print " Low G"
if amount1 = 2 and amount2 = 2 then print " Low G#"
if amount1 = 2 and amount2 = 3 then print " Middle A"
if amount1 = 2 and amount2 = 4 then print " Middle Bb"
if amount1 = 2 and amount2 = 5 then print " Middle B"
if amount1 = 2 and amount2 = 6 then print " Middle C"
if amount1 = 2 and amount2 = 7 then print " Middle C#"
if amount1 = 2 and amount2 = 8 then print " Middle D"
if amount1 = 2 and amount2 = 9 then print " Middle D#"
if amount1 = 2 and amount2 = 10 then print " Middle E"
if amount1 = 2 and amount2 = 11 then print " Middle F"
if amount1 = 2 and amount2 = 12 then print " Middle F#"
if amount1 = 2 and amount2 = 13 then print " High G"
if amount1 = 2 and amount2 = 14 then print " High G#"
if amount1 = 2 and amount2 = 15 then print " High A"
if amount1 = 2 and amount2 = 16 then print " High Bb"
if amount1 = 2 and amount2 = 17 then print " High B"
if amount1 = 2 and amount2 = 18 then print " High C"
if amount1 = 2 and amount2 = 19 then print " High C#"
if amount1 = 3 and amount2 = 0 then print " Middle B"
if amount1 = 3 and amount2 = 1 then print " Middle C"
if amount1 = 3 and amount2 = 2 then print " Middle C#"
if amount1 = 3 and amount2 = 3 then print " Middle D"
if amount1 = 3 and amount2 = 4 then print " Middle D#"
if amount1 = 3 and amount2 = 5 then print " Middle E"
if amount1 = 3 and amount2 = 6 then print " Middle F"
if amount1 = 3 and amount2 = 7 then print " Middle F#"
if amount1 = 3 and amount2 = 8 then print " High G"
if amount1 = 3 and amount2 = 9 then print " High G#"
if amount1 = 3 and amount2 = 10 then print " High A"
if amount1 = 3 and amount2 = 11 then print " High Bb"
if amount1 = 3 and amount2 = 12 then print " High B"
if amount1 = 3 and amount2 = 13 then print " High C"
if amount1 = 3 and amount2 = 14 then print " High C#"
if amount1 = 3 and amount2 = 15 then print " High D"
if amount1 = 3 and amount2 = 16 then print " High D#"
if amount1 = 3 and amount2 = 17 then print " High E"
if amount1 = 3 and amount2 = 18 then print " High F"
if amount1 = 3 and amount2 = 19 then print " High F#"
if amount1 = 4 and amount2 = 0 then print " Middle E"
if amount1 = 4 and amount2 = 1 then print " Middle F"
if amount1 = 4 and amount2 = 2 then print " Middle F#"
if amount1 = 4 and amount2 = 3 then print " High G#"
if amount1 = 4 and amount2 = 5 then print " High A"
if amount1 = 4 and amount2 = 6 then print " High Bb"
if amount1 = 4 and amount2 = 7 then print " High B"
if amount1 = 4 and amount2 = 8 then print " High C"
if amount1 = 4 and amount2 = 9 then print " High C#"
if amount1 = 4 and amount2 = 10 then print " High D"
if amount1 = 4 and amount2 = 11 then print " High D#"
if amount1 = 4 and amount2 = 12 then print " High E"
if amount1 = 4 and amount2 = 13 then print " High F"
if amount1 = 4 and amount2 = 14 then print " High F#"
if amount1 = 4 and amount2 = 15 then print " Too High G"
if amount1 = 4 and amount2 = 16 then print " Too High G#"
if amount1 = 4 and amount2 = 17 then print " Too High A"
if amount1 = 4 and amount2 = 18 then print " Too High Bb"
if amount1 = 4 and amount2 = 19 then print " Too High B"
if amount1 = 5 and amount2 = 0 then print " High G#"
if amount1 = 5 and amount2 = 1 then print " High A"
if amount1 = 5 and amount2 = 2 then print " High Bb"
if amount1 = 5 and amount2 = 3 then print " High B"
if amount1 = 5 and amount2 = 4 then print " High C"
if amount1 = 5 and amount2 = 5 then print " High C#"
if amount1 = 5 and amount2 = 6 then print " High D"
if amount1 = 5 and amount2 = 7 then print " High D#"
if amount1 = 5 and amount2 = 8 then print " High E"
if amount1 = 5 and amount2 = 9 then print " High F"
if amount1 = 5 and amount2 = 10 then print " High F#"
if amount1 = 5 and amount2 = 11 then print " Too High G"
if amount1 = 5 and amount2 = 12 then print " Too High G#"
if amount1 = 5 and amount2 = 13 then print " Too High A"
if amount1 = 5 and amount2 = 14 then print " Too High Bb"
if amount1 = 5 and amount2 = 15 then print " Too High B"
if amount1 = 5 and amount2 = 16 then print " Too High C"
if amount1 = 5 and amount2 = 17 then print " Too High C#"
if amount1 = 5 and amount2 = 18 then print " Too High D"
if amount1 = 5 and amount2 = 19 then print " Too High D#"
if amount1 = 6 and amount2 = 0 then print " High C#"
if amount1 = 6 and amount2 = 1 then print " High D"
if amount1 = 6 and amount2 = 2 then print " High D#"
if amount1 = 6 and amount2 = 3 then print " High E"
if amount1 = 6 and amount2 = 4 then print " High F"
if amount1 = 6 and amount2 = 5 then print " High F#"
if amount1 = 6 and amount2 = 6 then print " Too High G"
if amount1 = 6 and amount2 = 7 then print " Too High G#"
if amount1 = 6 and amount2 = 8 then print " Too High A"
if amount1 = 6 and amount2 = 9 then print " Too High Bb"
if amount1 = 6 and amount2 = 10 then print " Too High B"
if amount1 = 6 and amount2 = 11 then print " Too High C"
if amount1 = 6 and amount2 = 12 then print " Too High C#"
if amount1 = 6 and amount2 = 13 then print " Too High D"
if amount1 = 6 and amount2 = 14 then print " Too High D#"
if amount1 = 6 and amount2 = 15 then print " Too High E"
if amount1 = 6 and amount2 = 16 then print " Too High F"
if amount1 = 6 and amount2 = 17 then print " Too High F#"
if amount1 = 6 and amount2 = 18 then print " Double Too High G"
if amount1 = 6 and amount2 = 19 then print " Double Too High G#"
if amount3 = 1 then print " Whole Note"
if amount3 = 2 then print " Half Note"
if amount3 = 4 then print " Quarter Note"
if amount3 = 8 then print " Eighth Note"
if amount3 = 16 then print " Sixteenth Note"
if amount1 = r then print " Rest"
goto [start]





The following program attempts to further automate the conversion process. The advantage of doing things this way is that you don't have to edit a hundred lines to convert it from printing note names to producing Lilypond output. Of course you will need to modify this program to suit your needs.

The program works by converting the note to a simple number (based on a semitone scale), then converting back into octave/note notation. If you would like anything explained please say so.

DIM NoteNames$(0 TO 11)

NoteNames$(0) = "A"
NoteNames$(1) = "Bb"
NoteNames$(2) = "B"
NoteNames$(3) = "C"
NoteNames$(4) = "C#"
NoteNames$(5) = "D"
NoteNames$(6) = "D#"
NoteNames$(7) = "E"
NoteNames$(8) = "F"
NoteNames$(9) = "F#"
NoteNames$(10) = "G"
NoteNames$(11) = "G#"

DIM StringPitch(1 TO 6)

'E A D G B e
StringPitch(1) = 7
StringPitch(2) = 0 + 12
StringPitch(3) = 5 + 12
StringPitch(4) = 10 + 12
StringPitch(5) = 2 + 12 * 2
StringPitch(6) = 7 + 12 * 2

INPUT "String # "; stri
INPUT "Fret # "; fret

'Deduce the pitch number
pitch = StringPitch(stri) + fret

'Calculate octave and note
octave = pitch \ 12
note = pitch MOD 12

PRINT "Guitar note: Octave"; octave; "note "; NoteNames$(note)

'tranpose to E flat
saxpitch = pitch + 9

'Calculate octave and note
saxoctave = saxpitch \ 12
saxnote = saxpitch MOD 12

PRINT "Sax note: Octave"; saxoctave; "note "; NoteNames$(saxnote)
Quote
Like
Share