Deeestrukto's Guitar Solo Generator v2.0

Deeestrukto's Guitar Riff Generator v1 was written in late 2009 and unleashed on the Internet on January 1, 2010.

Deeestrukto's Guitar Riff Generator v2 was written in 2013 and unleashed on the Internet on May 7, 2023. Deeestrukto's Guitar Solo Generator was written in 2023.

import random def main(): print("Hello World!") print("I am a very simple random guitar solo generator designed by K. Patola!") ## My main function #define_chords() # define the chords i can play #create_random_chords() # define the random chords that will be in this riff #print_my_tab() # print out the random chords that were created #def define_chords(): #define my note lists and add them to a list of lists called list_1 #solo will be in the key of G/Em #here is a G scale on guitar: # low_e = ["---", "---", "---", "---", "---", "12-"] # low_fsharp = ["---", "---", "---", "---", "---", "14-"] # low_g = ["---", "---", "---", "---", "---", "15-"] # low_a = ["---", "---", "---", "---", "12-", "---"] # low_b = ["---", "---", "---", "---", "14-", "---"] # low_c = ["---", "---", "---", "---", "15-", "---"] # low_d = ["---", "---", "---", "12-", "---", "---"] mid_e = ["-------", "-------", "-------", "14-----", "-------", "-------"] ##mid_fsharp = ["---", "---", "---", "16-", "---", "---"] mid_g = ["---", "---", "12-", "---", "---", "---"] mid_a = ["---", "---", "14-", "---", "---", "---"] mid_b = ["---", "12-", "---", "---", "---", "---"] mid_c = ["---", "13-", "---", "---", "---", "---"] mid_d = ["---", "15-", "---", "---", "---", "---"] high_e = ["12-----", "-------", "-------", "-------", "-------", "-------"] #14 below high_fsharp = ["13-", "---", "---", "---", "---", "---"] high_g = ["15-", "---", "---", "---", "---", "---"] high_a = ["17-", "---", "---", "---", "---", "---"] high_b = ["19-", "---", "---", "---", "---", "---"] high_c = ["20-", "---", "---", "---", "---", "---"] high_d = ["22-", "---", "---", "---", "---", "---"] really_high_e = ["24-----", "-------", "-------", "-------", "-------", "-------"] #list of lists - first list is the names of chords, second inner list is the list of notes list_1 = [mid_e, mid_g, mid_a, mid_b, mid_c, mid_d, high_e, high_fsharp, high_g, high_a, high_b, high_c, high_d, really_high_e] # print(list_1[12],[0]) #def create_random_chords(): #define the random chords that will be used in this riff by randomizing integers for each of 8 chords in this riff random_int1 = random.randint(0,13) random_int2 = random.randint(0,13) random_int3 = random.randint(0,13) random_int4 = random.randint(0,13) random_int5 = random.randint(0,13) random_int6 = random.randint(0,13) random_int7 = random.randint(0,13) random_int8 = random.randint(0,13) #def print_my_tab(): #print the chords that were randomized in the earlier function by using the random integers to find the corresponding (create_random_chords()) chords in the list of lists defined in define_chords() print(list_1[random_int1][0] + list_1[random_int2][0] + list_1[random_int3][0] + list_1[random_int4][0] + list_1[random_int5][0] + list_1[random_int6][0] + list_1[random_int7][0] + list_1[random_int8][0]) print(list_1[random_int1][1] + list_1[random_int2][1] + list_1[random_int3][1] + list_1[random_int4][1] + list_1[random_int5][1] + list_1[random_int6][1] + list_1[random_int7][1] + list_1[random_int8][1]) print(list_1[random_int1][2] + list_1[random_int2][2] + list_1[random_int3][2] + list_1[random_int4][2] + list_1[random_int5][2] + list_1[random_int6][2] + list_1[random_int7][2] + list_1[random_int8][2]) print(list_1[random_int1][3] + list_1[random_int2][3] + list_1[random_int3][3] + list_1[random_int4][3] + list_1[random_int5][3] + list_1[random_int6][3] + list_1[random_int7][3] + list_1[random_int8][3]) print(list_1[random_int1][4] + list_1[random_int2][4] + list_1[random_int3][4] + list_1[random_int4][4] + list_1[random_int5][4] + list_1[random_int6][4] + list_1[random_int7][4] + list_1[random_int8][4]) print(list_1[random_int1][5] + list_1[random_int2][5] + list_1[random_int3][5] + list_1[random_int4][5] + list_1[random_int5][5] + list_1[random_int6][5] + list_1[random_int7][5] + list_1[random_int8][5]) if __name__ == "__main__": main()