def calc_cycle_param(freq=440, sec=5, sampling_rate=48000):
    """
    基本的なパラメータを計算する。

    sample_per_one_cycle: 1周期に必要なサンプル数
    cycle_num: 生成秒数に必要な周期の数
    total_sample_num: sample_per_one_cycle * cycle_num

    # memo
    time_per_one_cycle[s] = sample_per_one_cycle / sampling_rate
    freq_per_one_cycle[Hz] = sampling_rate / sample_per_one_cycle
    sample_per_one_cycle = sampling_rate / freq_per_one_cycle[Hz]
    """
    temp_total_sample_num = sec * sampling_rate
    sample_per_one_cycle = sampling_rate / freq
    cycle_num = int(temp_total_sample_num / sample_per_one_cycle + 0.5)
    total_sample_num = cycle_num * sample_per_one_cycle

    return total_sample_num, sample_per_one_cycle, cycle_num