libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description |
int ipatch_unit_sf2_abs_pitch_to_dls_abs_pitch (int sf2_abs_pitch
); int ipatch_unit_dls_abs_pitch_to_sf2_abs_pitch (int dls_abs_pitch
); double ipatch_unit_sf2_abs_pitch_to_hertz (int sf2_abs_pitch
); int ipatch_unit_hertz_to_sf2_abs_pitch (double hz
); double ipatch_unit_sf2_ofs_pitch_to_multiplier (int sf2_ofs_pitch
); int ipatch_unit_multiplier_to_sf2_ofs_pitch (double multiplier
); int ipatch_unit_sf2_abs_time_to_dls_abs_time (int sf2_abs_time
); int ipatch_unit_dls_abs_time_to_sf2_abs_time (int dls_abs_time
); double ipatch_unit_sf2_abs_time_to_seconds (int sf2_abs_time
); int ipatch_unit_seconds_to_sf2_abs_time (double sec
); double ipatch_unit_sf2_ofs_time_to_multiplier (int sf2_ofs_time
); int ipatch_unit_multiplier_to_sf2_ofs_time (double multiplier
); int ipatch_unit_centibels_to_dls_gain (int centibel
); int ipatch_unit_dls_gain_to_centibels (int dls_gain
); double ipatch_unit_centibels_to_decibels (int cb
); int ipatch_unit_decibels_to_centibels (double db
); double ipatch_unit_tenth_percent_to_percent (int tenth_percent
); int ipatch_unit_percent_to_tenth_percent (double percent
);
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)
|
Value in SF2 absolute pitch |
Returns : |
Value converted to DLS absolute pitch |
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()
|
Value in DLS absolute pitch |
Returns : |
Value converted to SF2 absolute pitch |
double ipatch_unit_sf2_abs_pitch_to_hertz (int sf2_abs_pitch
);
Convert SoundFont absolute pitch to frequency in Hertz.
|
Value in SoundFont absolute pitch |
Returns : |
Value in Hertz (cycles per second) |
int ipatch_unit_hertz_to_sf2_abs_pitch (double hz
);
Convert frequency in Hertz to SoundFont absolute pitch.
|
Hertz (cycles per second) value |
Returns : |
Converted value in SoundFont absolute pitch. |
double ipatch_unit_sf2_ofs_pitch_to_multiplier
(int sf2_ofs_pitch
);
Convert SoundFont offset pitch (cents) to multiplier factor.
|
Value in SoundFont offset pitch |
Returns : |
Multiplier factor |
int ipatch_unit_multiplier_to_sf2_ofs_pitch
(double multiplier
);
Convert multiplier factor to SoundFont offset pitch (cents).
|
Multiplier factor |
Returns : |
Converted value in 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))
|
Value in SF2 absolute time (timecents) |
Returns : |
Value converted to DLS absolute time. |
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()
|
Value in DLS absolute time |
Returns : |
Value converted to SF2 absolute time |
double ipatch_unit_sf2_abs_time_to_seconds (int sf2_abs_time
);
Convert a value from SoundFont absolute time (timecents) to seconds.
|
Value in SoundFont absolute time |
Returns : |
Value in seconds |
int ipatch_unit_seconds_to_sf2_abs_time (double sec
);
Convert value from seconds to SoundFont absolute time (timecents).
|
Value in seconds |
Returns : |
Value in SoundFont absolute time |
double ipatch_unit_sf2_ofs_time_to_multiplier
(int sf2_ofs_time
);
Convert a value from SoundFont offset time (timecents) to a multiplier.
|
Value in SoundFont offset time (timecents) |
Returns : |
Multiplier factor |
int ipatch_unit_multiplier_to_sf2_ofs_time
(double multiplier
);
Convert value from a multiplier to SoundFont offset time (timecents).
|
Multiplier factor |
Returns : |
Value in 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)
|
Value in centibels (10th of a Decibel) |
Returns : |
Value converted to DLS gain |
int ipatch_unit_dls_gain_to_centibels (int dls_gain
);
Convert a value from DLS gain to centibels.
|
Value in DLS gain (1/655360th of a dB) |
Returns : |
Value converted to centibels. |
double ipatch_unit_centibels_to_decibels (int cb
);
Convert a value from Centibels to Decibels.
|
Value in Centibels (10th of a Decibel) |
Returns : |
Value in Decibels |
int ipatch_unit_decibels_to_centibels (double db
);
Convert Decibels to Centibels (10ths of a dB)
|
Value in Decibels |
Returns : |
Converted value in Centibels (10ths of a Decibel) |
double ipatch_unit_tenth_percent_to_percent
(int tenth_percent
);
Convert a value from 10ths of a Percent to Percent.
|
Value in 10ths of a Percent (Percent * 10) |
Returns : |
Value in Percent |