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 › A basic question about Sonia!
Page Index Toggle Pages: 1
A basic question about Sonia! (Read 1064 times)
A basic question about Sonia!
Apr 12th, 2010, 10:20pm
 
Hey guys,
I'm very new to processing and I'm trying to use Sonia to play my samples, but I cannot make it read my file at all!
I tried a sample code from Sonia's website, like this:
Code:

import pitaru.sonia_v2_9.*;

Sample mySample;

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

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

This suppose to play the file 1.wav in data folder once, but it doesn't do anything at all! the error I get in console is : "NullPointerException"

Any idea how can I fix this? I tried couple of different files in both wav and aiff format, non worked out...  Sad

Any help is extremely appreciated!
Re: A basic question about Sonia!
Reply #1 - Apr 13th, 2010, 2:26am
 
you need to add the file to your processing sketch!
choose "Add File..." from the Sketch menu!

cheers,
jns
Page Index Toggle Pages: 1