Package de.maramuse.soundcomp.files

Examples of de.maramuse.soundcomp.files.OutputFile


    mixL.setSource(-3, solo_L, OUT.i);
    mixR.setSource(-1, bass_R, OUT.i);
    mixR.setSource(-4, drums_R, OUT.i);
    mixR.setSource(-2, pad_R, OUT.i);
    mixR.setSource(-3, solo_R, OUT.i);
    OutputFile of=new OutputFile(2);
    Time time=new Time();
    of.setSource(0, mixL, OUT.i);
    of.setSource(-1, mixR, OUT.i);
    advancerRegistry.registerAdvancer(time);
    advancerRegistry.registerAdvancer(of);
    advancerRegistry.registerAdvancer(mixR);
    advancerRegistry.registerAdvancer(mixL);
    time.reset();
    System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": total song time: "+getTimestamp(104));
    double lastTime=0;
    for(; time.getValue(StandardParameters.OUT.i)<getTimestamp(103);){
    advancerRegistry.advanceAll();
    if(time.getValue(OUT.i)>lastTime+1){
      lastTime=Math.floor(time.getValue(OUT.i));
      System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": prepared song time: "+time.getValue(OUT.i)+"s");
    }
    }
    try{
    File f=new File("demo.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    of.setFormat(FileFormats.FMT_WAVE_S16);
    System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": writing file");
    of.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": finished");
View Full Code Here


  public void testSID() {
  try{
    AdvancerRegistry advancerRegistry=new AdvancerRegistry();
    advancerRegistry.clear();
    globalParameters.setSampleRate(44100);
    OutputFile ws=new OutputFile(1);
    int waveform=0;
    double freq=0.01;
    double lasttime=0;
    boolean gate=false;
    ProcessElement sid=new SID6581();
    // set any parameters you like. SID6581 treats unset parameters as 0.
    // you may edit this template to test any features of the SID6581.
    sid.setSource(VOL.i, ConstStream.c(0.8), OUT.i);
    sid.setSource(SQUA1.i, ConstStream.c(1), OUT.i);
    sid.setSource(DUTYCYCLE1.i, ConstStream.c(.75), OUT.i);
    sid.setSource(RING1.i, ConstStream.c(1), OUT.i);
    sid.setSource(SYNC1.i, ConstStream.c(1), OUT.i);
    sid.setSource(A1.i, ConstStream.c(5/15.0), OUT.i);
    sid.setSource(D1.i, ConstStream.c(8/15.0), OUT.i);
    sid.setSource(S1.i, ConstStream.c(9/15.0), OUT.i);
    sid.setSource(R1.i, ConstStream.c(3/15.0), OUT.i);
    ProcessElement m=new mul();
    // multiply the output with 0.05 to reduce signal volume, OutputFile expects abs(signal)<1
    m.setSource(IN_IMAG.i, ConstStream.c(0.95), OUT.i);
    m.setSource(IN.i, sid, OUT.i);
    advancerRegistry.registerAdvancer(ws);
    ws.setSource(0, m, OUT.i);
    advancerRegistry.registerAdvancer(sid);
    for(double time=0; time<10; time+=1/globalParameters.getSampleRate()){
    if(time>lasttime){
      gate=!gate;
      sid.setSource(GATE1.i, ConstStream.c(gate), OUT.i);
      lasttime+=0.3;
      if(gate){
        waveform++;
        waveform%=3;
        sid.setSource(SQUA1.i, ConstStream.c(waveform==0), OUT.i);
        sid.setSource(TRIA1.i, ConstStream.c(waveform==1), OUT.i);
        sid.setSource(SAWT1.i, ConstStream.c(waveform==2), OUT.i);
      freq*=Math.exp(Math.log(2)/12d);
      sid.setSource(StandardParameters.FREQUENCY1.i, new ConstStream(freq), StandardParameters.OUT.i);
      sid.setSource(StandardParameters.FREQUENCY3.i, new ConstStream(freq/2), StandardParameters.OUT.i);
      }
    }
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("SID6581test.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), 4096);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(ws);
View Full Code Here

    fmul.setSource(StandardParameters.IN_IMAG.i, new ConstStream(1), StandardParameters.OUT.i);
    fmix2.setSource(-2, fmul, StandardParameters.OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    OutputFile ws1=new OutputFile(2);
    mul m1=new mul();
    mul m2=new mul();
    ws1.setSource(0, m1, OUT.i);
    ws1.setSource(-1, m2, OUT.i);
    m1.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m2.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m1.setSource(IN.i, mix, OUT.i);
    m2.setSource(IN.i, gate, OUT.i);
    advancerRegistry.registerAdvancer(ws1);
    double lastVal=0;
    int lastIndex=0;
    int sampleCounter=0;
    long starttime=System.currentTimeMillis();
    //for(; time.getValue(StandardParameters.OUT.i)<10.5;){ // as long as we're testing the file buffering in emulation, we must take the time
    for(; time.getValue(StandardParameters.OUT.i)<1.0;){ // as long as we're testing coding in emulation, we don't need full buffers
    advancerRegistry.advanceAll();
    sampleCounter++;
    // ws1.getChannel(0).add(0.5*mix.getValue(StandardParameters.OUT.i));
    // ws1.getChannel(1).add(0.5*gate.getValue(StandardParameters.OUT.i));
    double newVal=gate.getValue(StandardParameters.OUT.i);
    if(lastVal<1&&newVal>0){
      fmul.setSource(StandardParameters.IN.i, notes[lastIndex], StandardParameters.OUT.i);
      lastIndex=(lastIndex+1)%notes.length;
    }
    lastVal=gate.getValue(StandardParameters.OUT.i);
    if((sampleCounter%1000)==0)
      System.out.println("calculated "+sampleCounter+" samples in "+(System.currentTimeMillis()-starttime)/1000+" seconds");
    }
    try{
    File f=new File("monkeytest.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    System.out.println("started writing wav file after "+(System.currentTimeMillis()-starttime)/1000+" seconds");
    ws1.setFormat(FileFormats.FMT_WAVE_S16);
    ws1.write(fos);
    System.out.println("finished writing wav file after "+(System.currentTimeMillis()-starttime)/1000+" seconds");
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("monkeytest.ape");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    System.out.println("started writing ape file after "+(System.currentTimeMillis()-starttime)/1000+" seconds");
    ws1.setFormat(FileFormats.FMT_MONKEY_16);
    ws1.write(fos);
    System.out.println("finished writing ape file after "+(System.currentTimeMillis()-starttime)/1000+" seconds");
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
View Full Code Here

    mixL.setSource(-3, solo_L, OUT.i);
    mixR.setSource(-1, bass_R, OUT.i);
    mixR.setSource(-4, drums_R, OUT.i);
    mixR.setSource(-2, pad_R, OUT.i);
    mixR.setSource(-3, solo_R, OUT.i);
    OutputFile of=new OutputFile(2);
    Time time=new Time();
    of.setSource(0, mixL, OUT.i);
    of.setSource(-1, mixR, OUT.i);
    advancerRegistry.registerAdvancer(time);
    advancerRegistry.registerAdvancer(of);
    advancerRegistry.registerAdvancer(mixR);
    advancerRegistry.registerAdvancer(mixL);
    time.reset();
    int totalbeats=103;
    System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": total song time: "
      +getTimestamp(totalbeats+1));
    double lastTime=0;
    for(; time.getValue(StandardParameters.OUT.i)<getTimestamp(totalbeats);){
    advancerRegistry.advanceAll();
    if(time.getValue(OUT.i)>lastTime+1){
      lastTime=Math.floor(time.getValue(OUT.i));
      System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": prepared song time: "
        +time.getValue(OUT.i)+"s");
    }
    }
    try{
    File f=new File("demo2.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    of.setFormat(FileFormats.FMT_WAVE_S16);
    System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": writing file");
    of.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    System.out.println(""+(System.currentTimeMillis()-calcTime)/1000+": finished");
View Full Code Here

    pe.setSource(SYNC.i, sync, OUT.i);
    pe.setSource(SYNCPHASE.i, syncphase, OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    OutputFile ws=new OutputFile(1);
    ProcessElement m=new mul();
    m.setSource(IN_IMAG.i, pe, OUT.i);
    m.setSource(IN.i, ConstStream.c(0.9995), OUT.i);
    advancerRegistry.registerAdvancer(ws);
    advancerRegistry.registerAdvancer(sync);
    advancerRegistry.registerAdvancer(syncphase);
    ws.setSource(0, m, OUT.i);
    advancerRegistry.registerAdvancer(m);
    for(double time=0; time<10; time+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("880HzSyncSaw.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(pe);
    advancerRegistry.unregisterAdvancer(ws);
    advancerRegistry.unregisterAdvancer(m);
    NativeObjects.unregisterNativeObject(pe);
    NativeObjects.unregisterNativeObject(ws);
    NativeObjects.unregisterNativeObject(m);
    pe=new Cosine();
    advancerRegistry.registerAdvancer(pe);
    ws=new OutputFile(1);
    advancerRegistry.registerAdvancer(ws);
    m.setSource(IN_IMAG.i, pe, OUT.i);
    m.setSource(IN.i, ConstStream.c(0.5), OUT.i);
    ws.setSource(0, m, OUT.i);
    try{
    pe.setSource(FREQUENCY.i, freq, OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    for(double time=0; time<10; time+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("880HzSine.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(pe);
    NativeObjects.unregisterNativeObject(pe);
    NativeObjects.unregisterNativeObject(ws);
    pe=new Cosine();
    ProcessElement pe2=new Cosine();
    ProcessElement mix=new Mixer();
    advancerRegistry.registerAdvancer(pe2);
    advancerRegistry.registerAdvancer(pe);
    advancerRegistry.registerAdvancer(mix);
    mix.setSource(-1, pe2, StandardParameters.OUT.i);
    mix.setSource(-1, new ConstStream(0.5), StandardParameters.OUT.i);
    mix.setSource(-2, new ConstStream(0.5), StandardParameters.OUT.i);
    ws=new OutputFile(1);
    advancerRegistry.registerAdvancer(ws);
    try{
    pe2.setSource(StandardParameters.FREQUENCY.i, new ConstStream(1), StandardParameters.OUT.i);
    pe.setSource(StandardParameters.FREQUENCY.i, freq, StandardParameters.OUT.i);
    pe.setSource(StandardParameters.DUTYCYCLE.i, mix, StandardParameters.OUT.i);
    m.setSource(StandardParameters.IN_IMAG.i, pe, StandardParameters.OUT.i);
    m.setSource(StandardParameters.IN.i, new ConstStream(0.5), StandardParameters.OUT.i);
    ws.setSource(0, m, OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    for(double time=0; time<10; time+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("880HzSineMod.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.clear();
View Full Code Here

    cos.setSource(StandardParameters.FREQUENCY.i, _exp, StandardParameters.OUT.i);
    hi.setSource(StandardParameters.IN.i, cos, StandardParameters.OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    OutputFile ws=new OutputFile(2);
    mul m1=new mul();
    mul m2=new mul();
    ws.setSource(0, m1, OUT.i);
    ws.setSource(-1, m2, OUT.i);
    m1.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m2.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m1.setSource(IN.i, hi, OUT.i);
    m2.setSource(IN.i, hi, OUT_IMAG.i);
    advancerRegistry.registerAdvancer(ws);
    for(double t=0; t<3; t+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    // ws.getChannel(0).add(0.5*hi.getValue(StandardParameters.OUT.i));
    // ws.getChannel(1).add(0.5*hi.getValue(StandardParameters.OUT_IMAG.i));
    }
    try{
    File f=new File("hilbertsweep_u8.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_U8);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_i16.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_d.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_DOUBLE);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_i32.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S32);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_i24.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S24);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_b.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_U8);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_f.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_FLOAT);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_m16.ape");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_MONKEY_16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_m24.ape");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_MONKEY_24);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_m8.ape");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_MONKEY_8);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_f16.flac");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_FLAC_RAW_16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    try{
    File f=new File("hilbertsweep_f16.ogg");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_FLAC_OGG_16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(cos);
View Full Code Here

    all.setSource(StandardParameters.FREQUENCY.i, cs2, StandardParameters.OUT.i);
    all.setSource(StandardParameters.Q.i, cs3, StandardParameters.OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    OutputFile ws=new OutputFile(2);
    mul m1=new mul();
    mul m2=new mul();
    mul m3=new mul();
    // Mixer mix2=new Mixer();
    // mix2.setSource(-1, m1, OUT.i);
    // mix2.setSource(-1, new ConstStream(-0.6), OUT.i);
    // AdvancerRegistry.registerAdvancer(mix2);
    // mix2.setSource(-2, m2, OUT.i);
    // mix2.setSource(-2, new ConstStream(-0.3), OUT.i);
    m3.setSource(IN_IMAG.i, /* _exp */new ConstStream(10000d), OUT.i);
    m3.setSource(IN.i, new ConstStream(1d/10001d), OUT.i);
    ws.setSource(0, m1, OUT.i);
    ws.setSource(-1, m2, OUT.i);
    m2.setSource(IN_IMAG.i, ConstStream.c(0.3), OUT.i);
    m1.setSource(IN_IMAG.i, ConstStream.c(0.3), OUT.i);
    m1.setSource(IN.i, all, OUT.i);
    m2.setSource(IN.i, cos, OUT.i);
    advancerRegistry.registerAdvancer(ws);
    for(double t=0; t<3; t+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("allpasssweep.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(cos);
View Full Code Here

    fs.setSource(StandardParameters.IN.i, cos, StandardParameters.OUT.i);
    fs.setSource(StandardParameters.FREQUENCY.i, cs2, StandardParameters.OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    OutputFile ws=new OutputFile(2);
    mul m1=new mul();
    mul m2=new mul();
    ws.setSource(0, m1, OUT.i);
    ws.setSource(-1, m2, OUT.i);
    m1.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m2.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m1.setSource(IN.i, fs, OUT.i);
    m2.setSource(IN.i, fs, OUT_IMAG.i);
    advancerRegistry.registerAdvancer(ws);
    for(double t=0; t<3; t+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("shiftsweep.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(cos);
View Full Code Here

    wm.setSource(StandardParameters.IN.i, svf, StandardParameters.LP.i);
    wm.setSource(StandardParameters.WINDOWSIZE.i, sz, StandardParameters.OUT.i);
    }catch(Exception te){
    fail(te.getMessage());
    }
    OutputFile ws=new OutputFile(2);
    mul m1=new mul();
    mul m2=new mul();
    ws.setSource(0, m1, OUT.i);
    ws.setSource(-1, m2, OUT.i);
    m1.setSource(IN_IMAG.i, ConstStream.c(0.125), OUT.i);
    m2.setSource(IN_IMAG.i, ConstStream.c(0.125), OUT.i);
    m1.setSource(IN.i, svf, LP.i);
    m2.setSource(IN.i, wm, OUT.i);
    advancerRegistry.registerAdvancer(ws);
    for(double t=0; t<3; t+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("svf.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(cos);
View Full Code Here

    globalParameters.setSampleRate(44100);
    ProcessElement white=new WhiteNoise();
    ProcessElement pink=new PinkNoise();
    advancerRegistry.registerAdvancer(white);
    advancerRegistry.registerAdvancer(pink);
    OutputFile ws=new OutputFile(2);
    mul m1=new mul();
    mul m2=new mul();
    ws.setSource(0, m1, OUT.i);
    ws.setSource(-1, m2, OUT.i);
    m1.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m2.setSource(IN_IMAG.i, ConstStream.c(0.5), OUT.i);
    m1.setSource(IN.i, white, OUT.i);
    m2.setSource(IN.i, pink, OUT.i);
    advancerRegistry.registerAdvancer(ws);
    for(double t=0; t<3; t+=1/globalParameters.getSampleRate()){
    advancerRegistry.advanceAll();
    }
    try{
    File f=new File("noise.wav");
    BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(f), fileBufferSize);
    ws.setFormat(FileFormats.FMT_WAVE_S16);
    ws.write(fos);
    fos.close();
    }catch(IOException ex){
    fail(ex.getMessage());
    }
    advancerRegistry.unregisterAdvancer(pink);
View Full Code Here

TOP

Related Classes of de.maramuse.soundcomp.files.OutputFile

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.