in model/data_utils.py [0:0]
def notes_mapping(self):
# Maps note on and note off tokens to a vector for append_note_status
# functionality
# Assume note_on and note_off are in sequence
note_on_tokens = [i for i in self._map.keys() if 'NOTE_ON' in i]
note_off_tokens = [i for i in self._map.keys() if 'NOTE_OFF' in i]
self.vec_len = len(note_on_tokens)
self.note_on_dic = dict()
self.note_off_dic = dict()
index = 0
for note_on, note_off in zip(note_on_tokens, note_off_tokens):
self.note_on_dic[self._map[note_on]] = index
self.note_off_dic[self._map[note_off]] = index
index += 1