Top | ![]() |
![]() |
![]() |
![]() |
int
ipatch_unit_sf2_abs_pitch_to_dls_abs_pitch
(int sf2_abs_pitch
);
Converts a value from SF2 absolute pitch to DLS absolute pitch.
sf2_abs_pitch = 1200 * log2(f/8.176) f = 8.176 * 2^(sf2_abs_pitch/1200)
dls_abs_pitch = (1200 * log2(f/440) + 6900) * 65536 f = 440 * 2^((dls_abs_pitch / 65536 - 6900) / 1200)
int
ipatch_unit_dls_abs_pitch_to_sf2_abs_pitch
(int dls_abs_pitch
);
Converts a value from DLS absolute pitch to SF2 absolute pitch.
See ipatch_unit_sf2_abs_pitch_to_dls_abs_pitch()
double
ipatch_unit_sf2_abs_pitch_to_hertz (int sf2_abs_pitch
);
Convert SoundFont absolute pitch to frequency in Hertz.
int
ipatch_unit_hertz_to_sf2_abs_pitch (double hz
);
Convert frequency in Hertz to SoundFont absolute pitch.
double
ipatch_unit_sf2_ofs_pitch_to_multiplier
(int sf2_ofs_pitch
);
Convert SoundFont offset pitch (cents) to multiplier factor.
int
ipatch_unit_multiplier_to_sf2_ofs_pitch
(double multiplier
);
Convert multiplier factor to SoundFont offset pitch (cents).
int
ipatch_unit_sf2_abs_time_to_dls_abs_time
(int sf2_abs_time
);
Convert a value from SF2 absolute time to DLS absolute time.
sf2_abs_time = 1200 * log2 (seconds) seconds = 2^(sf2_abs_time / 1200)
dls_abs_time = 1200 * log2 (seconds) * 65536 seconds = 2^(dls_abs_time / (1200 * 65536))
int
ipatch_unit_dls_abs_time_to_sf2_abs_time
(int dls_abs_time
);
Convert a value from DLS absolute time to SF2 absolute time.
See ipatch_unit_sf2_abs_time_to_dls_abs_time()
double
ipatch_unit_sf2_abs_time_to_seconds (int sf2_abs_time
);
Convert a value from SoundFont absolute time (timecents) to seconds.
int
ipatch_unit_seconds_to_sf2_abs_time (double sec
);
Convert value from seconds to SoundFont absolute time (timecents).
double
ipatch_unit_sf2_ofs_time_to_multiplier
(int sf2_ofs_time
);
Convert a value from SoundFont offset time (timecents) to a multiplier.
int
ipatch_unit_multiplier_to_sf2_ofs_time
(double multiplier
);
Convert value from a multiplier to SoundFont offset time (timecents).
int
ipatch_unit_centibels_to_dls_gain (int centibel
);
Convert a value from centibels to DLS gain (1/655360th of a dB).
V = target amplitude, v = original amplitude centibel = 200 * log10 (v / V) dls_gain = 200 * 65536 * log10 (V / v)
int
ipatch_unit_dls_gain_to_centibels (int dls_gain
);
Convert a value from DLS gain to centibels.
double
ipatch_unit_centibels_to_decibels (int cb
);
Convert a value from Centibels to Decibels.
int
ipatch_unit_decibels_to_centibels (double db
);
Convert Decibels to Centibels (10ths of a dB)
double
ipatch_unit_tenth_percent_to_percent (int tenth_percent
);
Convert a value from 10ths of a Percent to Percent.