<jupyter_start><jupyter_text>Analysis of the obtained Parameter file This notebook contains code to find out the number of frames for each MIDI note in the selected octave. This can be used to choose the number of frames to train on in the network<jupyter_code>import pickle
import numpy as np
import matplotlib.pyplot as pyp
data = pickle.load(open('./Train_octave_4_Parametric.txt', 'rb'))
hist_dict = {}
hist_dict['C'] = [0,0]
hist_dict['C#'] = [0,0]
hist_dict['D'] = [0,0]
hist_dict['D#'] = [0,0]
hist_dict['E'] = [0,0]
hist_dict['F'] = [0,0]
hist_dict['F#'] = [0,0]
hist_dict['G'] = [0,0]
hist_dict['G#'] = [0,0]
hist_dict['A'] = [0,0]
hist_dict['A#'] = [0,0]
hist_dict['B'] = [0,0]
el = []
for i in data.keys():
    hist_dict[i.split('_')[0]][0] = hist_dict[i.split('_')[0]][0] + 1
    hist_dict[i.split('_')[0]][1] = hist_dict[i.split('_')[0]][1] + data[i]['cc'].shape[0]
    el.append(data[i]['cc'].shape[0])
print('Min Number of frames = ',min(el))
print('Max Number of frames = ',max(el))
list_files = []
list_frames = []
for k in hist_dict.keys():
    list_files.append(hist_dict[k][0])
    list_frames.append(hist_dict[k][1])
pyp.barh(list(hist_dict.keys()), list_files, color='b');
pyp.xlabel('Number of Recordings')
pyp.ylabel('MIDI(Note)')
pyp.title('Number of Recordings for each Note');
pyp.barh(list(hist_dict.keys()), list_frames, color='b');
pyp.xlabel('Number of frames')
pyp.ylabel('MIDI(Note)')
pyp.title('Number of Frames for each Note');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20777479892761394, 'fraction_numerical': 0.02546916890080429, 'mean_word_length': 6.177884615384615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '286018', 'license': 'MIT', 'n_tokens_mistral': 610, 'n_tokens_neox': 606, 'n_words': 134, 'path': 'Parametric/Preprocess-Stats.ipynb', 'repo_name': 'SubramaniKrishna/VaPar-Synth', 'size': '1492'}