FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Sound
(Moderators: pitaru, REAS)
   Sonia samples (.wav) in executable jar
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Sonia samples (.wav) in executable jar  (Read 793 times)
ereytorr

Email
Sonia samples (.wav) in executable jar
« on: Nov 15th, 2004, 3:04am »

I've gone through the "Creating an EXE" http://processing.org/discourse/yabb/board_Tools_action_display__num_1084266556.html,
and  "Making an .exe app..." http://processing.org/discourse/yabb/board_Tools_action_display__num_1086874853.html topics in the Tools section and I was doing really fine with my project (using live video and external classes), until now when I started trying to play wav files with sonia v.2_8.
 
When I use LiveOutput streams everything goes fine but when I use Sample and repeat(), the java console says:
 
JSyn using native library JSynV142
Input Device #0: Asignador de sonido de Microsoft - Input has 2 channels
Input Device #3: Asignador de sonido de Microsoft - Input has 2 channels
com.softsynth.jsy.SynthException: JSyn error: Parameter out of range. - , 0x0=0, 0x0=0
      at com.softsynth.jsyn.SynthSample.write(SynthSample.java:155)
      at com.softsynth.jsyn.SynthSample.write(SynthSample.java:161)
      at com.softsynth.jsyn.SynthSample.load(SynthSample.java:316)
      at com.softsynth.jsyn.SynthSample.load(SynthSample.java:298 )
      at BJSyn.loadSample(BJSyn.java:304)
      at BJSyn.loadSample(BJSyn.java:249)
      at Sample.<init>(Sample.java:37)
      at sketch.myLoadMethod(sketch.java:72)
      at sketch.setup(sketch.java:126)
      at BApplet.init(BApplet.java:185)
      at BApplet.main(BApplet.java:2286)
      at sketch.main(sketch.java:42)
 
I must add: catching all these was a pain cause the java console qets close inmediately (when its working it stays beside the app running).  
 
wXP (international version), PIV-2.8 machine
P5_068. (I dont think this has to be with the nav2004 trouble)
 
Any help, thanks.
« Last Edit: Nov 15th, 2004, 2:54pm by ereytorr »  
ereytorr

Email
Re: Sonia samples (.wav) in executable jar
« Reply #1 on: Nov 15th, 2004, 2:49pm »

mmh, maybe a simple example will make the problem more clear:
 
Following the basic steps and files in the tutorial posted by fry  
on Jun 10th, 2004, 3:40pm, fry wrote:
" download the files for this tutorial from: http://processing.org/download/distribution.zip "
 
and using this sample code will work:
 
int streamSize = 1024;  
 
static public void main(String args[]) {
BApplet.main(new String[] { "sketch" });
}  
 
void setup(){  
  Sonia.start(this,44100);
  LiveOutput.start(streamSize,streamSize*3);  
  LiveOutput.startStream();  
}  
 
void loop(){  
  background(0);  
}  
  
void liveOutputEvent(){  
  for(int i = 0; i < LiveOutput.data.length; i++){  
    float oneCycle = TWO_PI/streamSize;  
    float freq = 0.5;  
    float sinData = (freq*2) * oneCycle * i;  
    LiveOutput.data[i] = sin(sinData);  
  }  
}  
 
public void stop(){  
  Sonia.stop();  
  super.stop();  
}  
 
-----------------------------------
If you also put the sonia classes into the .jar, this will make a just fine executable and low "hmmmmmmmm...".
 
But:
 
If you follow the same steps or just change the sketch.class for the one produced by the next code, it will just close the java console (with the error message in last post) and do absolutly nothing:
 
Sample banda;
 
static public void main(String args[]) {
BApplet.main(new String[] { "sketch" });
}  
 
void setup(){  
  Sonia.start(this);
  banda = new Sample("intro.wav");
  banda.repeat();
}  
 
void loop(){  
  background(0);  
}
 
public void stop(){  
  Sonia.stop();  
  super.stop();  
}
« Last Edit: Nov 15th, 2004, 2:58pm by ereytorr »  
fjen

WWW
Re: Sonia samples (.wav) in executable jar
« Reply #2 on: Nov 15th, 2004, 3:23pm »

maybe this is related to another known error. here#s the thread:
http://processing.org/discourse/yabb/board_Integrate_action_dis_play_num_1091828290.html
 
have you tried to put the wav next to your application instead of having it inside the jar
 
ereytorr

Email
Re: Sonia samples (.wav) in executable jar
« Reply #3 on: Nov 19th, 2004, 9:05pm »

Yes, I tried but I't didn't work. Actually I've to go back to BSound, and for what I need its working, but there's have to be a solution so we can use the power of Sonia
 
Pages: 1 

« Previous topic | Next topic »