def normalize_column_to_midi_range(column, target_range, target_min_value):
    """
    Normalizes the values to the values range used by the MIDI format
    :param column: A list with the values that should be sonified
    :param target_range: The target range
    :param target_min_value: The target minimum value
    :return: A list with the transformed values
    """

    # determine min and max of the array
    min_value = min(column)
    max_value = max(column)
    value_range = max_value - min_value

    # conduct the transformation and return it
    transformed_column = []
    for row in column:
        ratio = (row - min_value) / value_range
        # print(ratio)
        end_note = int(ratio * target_range + target_min_value)
        transformed_column.append(end_note)
    return transformed_column