Package com.talixa.audio.wav

Examples of com.talixa.audio.wav.WaveFile


      @Override
      public void actionPerformed(ActionEvent e) {       
        double vol = Double.valueOf(gainText.getText());
       
        try {
          WaveFile wave1 = SpectrumAnalyzer.readWaveFile(inputFile);   
          if (wave1 != null) {
            short[] inputData = SharedDSPFunctions.extractWaveFileData(wave1);                   
            GainController.setGain(inputData, vol, outputFileLabel.getText())
          }
        } catch (IOException e1) {           
View Full Code Here


  }   
 
  public static void mix(short[] background, short[] foreground, MixerMode mode, String outputFile) throws IOException {
    short[] mixed = mix(background,foreground, mode);
    byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(mixed);   
    WaveFile w = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);   
    w.outputToFile(outputFile);   
  }
View Full Code Here

  }
 
  public static void shiftDown(short[] data, int frequency, String outputFile) throws IOException {
    short[] shifted = shiftDown(data, frequency);         
    byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(shifted);                   
    WaveFile out = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);
    out.outputToFile(outputFile);   
  }
View Full Code Here

  }
 
  public static void shiftUp(short[] data, int frequency, String outputFile) throws IOException {
    short[] shifted = shiftUp(data, frequency);         
    byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(shifted);                   
    WaveFile out = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);
    out.outputToFile(outputFile);   
  }
View Full Code Here

  public static void main(String args[]) {
    String testFile = "/home/thomas/audio/1000Hz.wav";
    String downFile  = "/home/thomas/audio/900Hz.wav";
    String upFile  = "/home/thomas/audio/1100Hz.wav";
    try {               
      WaveFile waveFile = WaveReader.readFromFile(testFile);
      short[] data = SharedDSPFunctions.extractWaveFileData(waveFile)
      shiftDown(data, 100, downFile);
      shiftUp(data, 100, upFile);
     
    } catch (IOException e) {     
View Full Code Here

  }
 
  public static void generateWave(double frequency, double volume, int length, int phase, String outputFile) throws IOException {
    short[] data = generateWave(frequency, volume, length, phase);
    byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(data);   
    WaveFile w = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);   
    w.outputToFile(outputFile);   
  }
View Full Code Here

 
 
  public static void filterData(short[] data, int lowFreq, int highFreq, String outputFile) throws IOException {               
    short[] filteredData = filterData(data, lowFreq, highFreq);           
    byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(filteredData);                   
    WaveFile out = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);
    out.outputToFile(outputFile);   
  }
View Full Code Here

  }
 
  public static void main(String args[]) {
    String testFile = "/home/thomas/audio/rtty-psk.wav";   
    try {     
      WaveFile waveFile = WaveReader.readFromFile(testFile);
      short[] data = SharedDSPFunctions.extractWaveFileData(waveFile);           
      data = filterData(data, 1750, 2150);     
      Psk31Demod demod = new Psk31Demod(data);
      String msg = demod.demodulate(1900);
      System.out.println(msg);
View Full Code Here

  }   
 
  public static void setGain(short[] data, double gain, String outputFile) throws IOException {
    short[] newData = setGain(data,gain);
    byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(newData);   
    WaveFile w = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);   
    w.outputToFile(outputFile);   
  }   
View Full Code Here

      @Override
      public void actionPerformed(ActionEvent e) {
        int low = Integer.valueOf(lowFreqText.getText());
        int high = Integer.valueOf(highFreqText.getText());       
       
        WaveFile wave1 = SpectrumAnalyzer.readWaveFile(inputFile);   
        if (wave1 != null) {
          short[] inputData = SharedDSPFunctions.extractWaveFileData(wave1);         
          try {
            BandPassFilter.filterData(inputData, low, high, outputFileLabel.getText());
          } catch (IOException e1) {
View Full Code Here

TOP

Related Classes of com.talixa.audio.wav.WaveFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.