Пример #1
0
 /// <summary>
 /// Converts a Float32 in the range 0-1 to an Integer32 in the range 0-16383. Also takes care of clamping
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public static int FloatToMidiInt14(float value)
 {
     return(Clamp14Bit(Float32Extensions.Round(value * 16383)));
 }
Пример #2
0
 /// <summary>
 /// Converts a Float32 in the range 0-1 to an Integer32 in the range 0-127. Also takes care of clamping
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public static int FloatToMidiInt(float value)
 {
     return(Clamp7Bit(Float32Extensions.Round(value * 127)));
 }