def __init__(
        self, 
        midi_df_list, 
        batch_size=20, 
        seq_len=10, 
        time_fraction=0.1,
        min_pitch=24,
        max_pitch=108
    ):
        '''
        Init.

        Args:
            midi_path_list:         `list` of paths to MIDI files.
            batch_size:             Batch size.
            seq_len:                The length of sequneces.
                                    The length corresponds to the number of `time` splited by `time_fraction`.

            time_fraction:          Time fraction which means the length of bars.

            min_pitch:              The minimum of note number.
            max_pitch:              The maximum of note number.
        '''
        program_list = []
        self.__midi_df_list = midi_df_list
        for i in range(len(self.__midi_df_list)):
            program_list.extend(
                self.__midi_df_list[i]["program"].drop_duplicates().values.tolist()
            )
        program_list = list(set(program_list))

        self.__batch_size = batch_size
        self.__seq_len = seq_len
        self.__channel = len(program_list)
        self.__program_list = program_list
        self.__time_fraction = time_fraction
        self.__min_pitch = min_pitch
        self.__max_pitch = max_pitch
        self.__dim = self.__max_pitch - self.__min_pitch
def __init__ ( self , midi_df_list , batch_size = 20 , seq_len = 10 , time_fraction = 0.1 , min_pitch = 24 , max_pitch = 108 ) : program_list = [ ] self . __midi_df_list = midi_df_list for i in range ( len ( self . __midi_df_list ) ) : program_list . extend ( self . __midi_df_list [ i ] [ "program" ] . drop_duplicates ( ) . values . tolist ( ) ) program_list = list ( set ( program_list ) ) self . __batch_size = batch_size self . __seq_len = seq_len self . __channel = len ( program_list ) self . __program_list = program_list self . __time_fraction = time_fraction self . __min_pitch = min_pitch self . __max_pitch = max_pitch self . __dim = self . __max_pitch - self . __min_pitch
Init.

        Args:
            midi_path_list:         `list` of paths to MIDI files.
            batch_size:             Batch size.
            seq_len:                The length of sequneces.
                                    The length corresponds to the number of `time` splited by `time_fraction`.

            time_fraction:          Time fraction which means the length of bars.

            min_pitch:              The minimum of note number.
            max_pitch:              The maximum of note number.