| Top |
| int | ipatch_unit_dls_class_convert () |
| double | ipatch_unit_dls_percent_to_percent () |
| int | ipatch_unit_percent_to_dls_percent () |
| double | ipatch_unit_dls_gain_to_decibels () |
| int | ipatch_unit_decibels_to_dls_gain () |
| double | ipatch_unit_dls_abs_time_to_seconds () |
| int | ipatch_unit_seconds_to_dls_abs_time () |
| double | ipatch_unit_dls_rel_time_to_time_cents () |
| int | ipatch_unit_time_cents_to_dls_rel_time () |
| double | ipatch_unit_dls_abs_pitch_to_hertz () |
| int | ipatch_unit_hertz_to_dls_abs_pitch () |
| double | ipatch_unit_dls_rel_pitch_to_cents () |
| int | ipatch_unit_cents_to_dls_rel_pitch () |
int ipatch_unit_dls_class_convert (guint16 src_units,const GValue *src_val);
Converts a value to "DLS" units. DLS units are unit types that
are used by DLS (Downloadable Sounds) patches. The IPATCH_UNIT_CLASS_DLS
map is used to lookup the corresponding type to convert to.
Only some types have an associated DLS type. It is an error to pass a
src_units
type that has no DLS mapping (note that this is contrary to the
behavior of ipatch_unit_user_class_convert()).
double
ipatch_unit_dls_percent_to_percent (int dls_percent);
Convert value in DLS percent units to percent.
percent = dls_percent / (10 * 65536)
int
ipatch_unit_percent_to_dls_percent (double percent);
Convert percent to DLS percent.
dls_percent = percent * 10 * 65536
double
ipatch_unit_dls_gain_to_decibels (int dls_gain);
Converts a value from DLS gain to decibels.
dls_gain = 200 * 65536 * log10 (V / v) decibels = 20 * log10 (V / v)
int
ipatch_unit_decibels_to_dls_gain (double db);
Converts a value from decibels to DLS gain.
See ipatch_unit_dls_gain_to_decibel()
double
ipatch_unit_dls_abs_time_to_seconds (int dls_abs_time);
Converts a value from DLS absolute time to seconds. seconds = 2^(dls_abs_time / (1200 * 65536))
0x80000000 is used as a 0 value.
int
ipatch_unit_seconds_to_dls_abs_time (double seconds);
Converts a value from seconds to DLS absolute time. dls_rel_time = 1200 * log2 (seconds) * 65536
double
ipatch_unit_dls_rel_time_to_time_cents
(int dls_rel_time);
Converts a value from DLS relative time to time cents. time_cents = dls_rel_time / 65536
int
ipatch_unit_time_cents_to_dls_rel_time
(double time_cents);
Converts a value from time_cents to DLS relative time. dls_rel_time = time_cents * 65536
double
ipatch_unit_dls_abs_pitch_to_hertz (int dls_abs_pitch);
Converts a value from DLS absolute pitch to hertz. hertz = 440 * 2^((dls_abs_pitch / 65536 - 6900) / 1200)
int
ipatch_unit_hertz_to_dls_abs_pitch (double hertz);
Converts a value from hertz to DLS absolute pitch. dls_abs_pitch = (1200 * log2(hertz/440) + 6900) * 65536
double
ipatch_unit_dls_rel_pitch_to_cents (int dls_rel_pitch);
Converts a value from DLS relative pitch to cents. cents = dls_rel_pitch / 65536