Package toxi.audio

Class SynthUtil

java.lang.Object
toxi.audio.SynthUtil

public class SynthUtil extends Object
This class provides static conversion tools for translating normalized floating point wave data into 16bit PCM.
  • Constructor Details

    • SynthUtil

      public SynthUtil()
  • Method Details

    • floatArrayTo16bitBuffer

      public static AudioBuffer floatArrayTo16bitBuffer(JOALUtil audioSys, float[] raw, int rate)
    • floatArrayTo16bitPCM

      public static byte[] floatArrayTo16bitPCM(float[] raw)
    • floatArrayTo16bitStereoBuffer

      public static AudioBuffer floatArrayTo16bitStereoBuffer(JOALUtil audioSys, float[] raw, int rate)
    • floatArrayTo8bitBuffer

      public static AudioBuffer floatArrayTo8bitBuffer(JOALUtil audioSys, float[] raw, int rate)
    • floatArrayTo8bitPCM

      public static byte[] floatArrayTo8bitPCM(float[] raw)
    • floatArrayTo8bitStereoBuffer

      public static AudioBuffer floatArrayTo8bitStereoBuffer(JOALUtil audioSys, float[] raw, int rate)
    • joinMonoFloatArrays

      public static float[] joinMonoFloatArrays(float[] left, float[] right)
      Merges the two given mono arrays into an interleaved stereo array in left-right order.
      Parameters:
      left -
      right -
      Returns:
      stereo array