We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › problems playing my sample
Page Index Toggle Pages: 1
problems playing my sample (Read 2801 times)
problems playing my sample
Apr 25th, 2005, 9:11pm
 
Can someone please help me...I am having trouble playing my aiff sample on Sonia, I keep getting an error message that reads, "StringIndexOutOfBoundsException: String indew out of range: -61".
Thanks You,
James Clark
Re: problems playing my sample
Reply #1 - Apr 26th, 2005, 3:44am
 
James,

You need to explain more about the problem. It's helpful to see your code, to know which platform you are working on, which version of Sonia, which version of Processing, etc.

Casey
Re: problems playing my sample
Reply #2 - Apr 27th, 2005, 9:13am
 
I am using 85 Proccessing with Sonia 2.9 on Mac OS/X.  I am using a very simple code.  I am just trying to call my sample and tell it to play.  I copied the code straight from the "Sample" example of the Sonia reference section.

Here's the code:
Code:

import pitaru.sonia_v2_9.*;

Sample mySample;

void setup()
{
size(100,100);
Sonia.start(this);
mySample = new Sample("water.wav");
mySample.play();
}

void draw() {

}

public void stop()
{
Sonia.stop();
super.stop();
}



And this is the error:
Code:

Syn using native library JSynV142
JSyn for OS X, Built 4/16/03.

java.lang.StringIndexOutOfBoundsException: String index out of range: -61
at java.lang.String.checkBounds(String.java:283)
at java.lang.String.<init>(String.java:233)
at com.softsynth.jsyn.SynthContext.getDeviceName(SynthContext.java:938)
at com.softsynth.jsyn.AudioDevice.getName(AudioDevice.java:60)
at pitaru.sonia_v2_9.Sonia.initJsyn(Sonia.java:98)
at pitaru.sonia_v2_9.Sonia.start(Sonia.java:46)
at Temporary_8686_5878.setup(Temporary_8686_5878.java:8)
Re: problems playing my sample
Reply #3 - Apr 28th, 2005, 6:24am
 
james, could you try and run the same code with the sine.aiff file from here: http://www.pitaru.com/sonia/files/sine.aiff

make sure to change the code to load the new file.

-a
Re: problems playing my sample
Reply #4 - Apr 28th, 2005, 8:02am
 
that link seems broken. i think it's:
http://www.pitaru.com/sonia/site_68/files/sine.aiff
Re: problems playing my sample
Reply #5 - Apr 28th, 2005, 3:37pm
 
sorry, i moved it around and forgot!

amit
Page Index Toggle Pages: 1