added shell interactions
This commit is contained in:
parent
86b0540feb
commit
eaaad76a2a
@ -7,17 +7,16 @@ from midi_processing import extract_data, analyze_data
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('midi_pack', help='folder name for midi pack in midi_packs folder', type=str)
|
||||
parser.add_argument('--n', help='name for experiment', type=str)
|
||||
parser.add_argument('name', help='name for experiment', type=str)
|
||||
parser.add_argument('--b', help='lengh of sequence in bars', type=int)
|
||||
parser.add_argument('-a', help='analize data', action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
'''SETTINGS'''
|
||||
MIDI_PACK_NAME = args.midi_pack
|
||||
EXPERIMENT_NAME = args.n
|
||||
EXPERIMENT_NAME = args.name
|
||||
BARS_IN_SEQ = args.b
|
||||
|
||||
|
||||
midi_folder_path = os.path.join('midi_packs', MIDI_PACK_NAME)
|
||||
|
||||
# analyze data set for intresting intruments
|
||||
@ -25,13 +24,18 @@ if args.a:
|
||||
analyze_data(midi_folder_path)
|
||||
sys.exit()
|
||||
|
||||
'''SETTINGS'''
|
||||
model_workflow = {
|
||||
1 : ('Organ', 'melody'),
|
||||
2 : (('Organ','Guitar'), 'arrangment'),
|
||||
3 : (('Organ','Bass'), 'arrangment'),
|
||||
4 : (('Bass','Drums'), 'arrangment')
|
||||
}
|
||||
|
||||
'''MODEL WORKFLOW DIALOG'''
|
||||
number_of_instruments = int(input('Please specify number of instruments\n'))
|
||||
model_workflow = dict()
|
||||
input_list = []
|
||||
for i in range(number_of_instruments):
|
||||
input_string = input('Please specify a workflow step\n')
|
||||
tokens = input_string.split()
|
||||
if tokens[-1] == 'melody':
|
||||
model_workflow[i] = (tokens[0], tokens[1])
|
||||
else:
|
||||
model_workflow[i] = ((tokens[1], tokens[0]), tokens[2])
|
||||
|
||||
# make folder for new experiment if no exist
|
||||
try:
|
||||
|
@ -8,12 +8,14 @@ import pickle
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('n', help='name for experiment', type=str)
|
||||
parser.add_argument('--i', help='number of midis to generate', type=int)
|
||||
parser.add_argument('--l', help='latent_dim_of_model', type=int)
|
||||
parser.add_argument('--m', help="mode {'from_seq', 'from_state}'", type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
EXPERIMENT_NAME = args.n
|
||||
GENERETIONS_COUNT = args.i
|
||||
LATENT_DIM = 256
|
||||
MODE = 'from_seq'
|
||||
LATENT_DIM = args.l
|
||||
MODE = args.m
|
||||
|
||||
if GENERETIONS_COUNT == None:
|
||||
GENERETIONS_COUNT = 1
|
||||
|
Loading…
Reference in New Issue
Block a user