def filter_pattern_group(note_begin_pattern, note_end_pattern, note_metronome_group, note_end_metronome_group):
    """
    The pattern group from dataset contains all notes. This filters it to only notes present in the new map
    """
    for i,p in enumerate(note_begin_pattern):
        if i not in note_metronome_group:
            note_begin_pattern[i] *= 0
    for i,p in enumerate(note_end_pattern):
        if i not in note_end_metronome_group:
            note_end_pattern[i] *= 0
    return note_begin_pattern, note_end_pattern