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)
   inputs for sonia on osx
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: inputs for sonia on osx  (Read 711 times)
ndmccormack


inputs for sonia on osx
« on: Jul 21st, 2004, 7:53pm »

hi, i've just downloaded sonia, so I may be asking an obvious question!  
I was playing around with the Liveinput stuff, and wanted to to react to teh Wave output, so I could see realtime graphic changes to music i was playng from itunes..  
 
however i can't seem to get it to target the wave channel as an input. I know you can do this with a pc pretty easily in the sound controls, but I don't know if theres a way to change it on osx...
 
any ideas  
 
cheers
 
niall
« Last Edit: Jul 21st, 2004, 7:54pm by ndmccormack »  
fjen

WWW
Re: inputs for sonia on osx
« Reply #1 on: Jul 23rd, 2004, 8:17am »

somehow i'm not sure what you mean by "wave channel". do you mean to directly get sound-input from i.e. iTunes?
 
hmm. i can't find anything that provides a targetdataline for reading sound data from a running app (iTunes). i guess you'd have to set the sound-system to channel the data (like a cable from sound-out to sound-in would do), which is not possible to as far as i know. maybe someone can jump in and write something to do that? there are apps like audiohijack that can record any sound played on your machine, so i'm sure it's doable.
 
it would be possible to stream audio and use the stream (internally) on your machine. check out "quicktime streaming server" or the "java streaming server" example from apple.
 
http://www.apple.com/quicktime/products/qtss/
http://developer.apple.com/samplecode/JavaRadioStation/JavaRadioStation. html
« Last Edit: Jul 23rd, 2004, 2:00pm by fjen »  
pitaru


WWW Email
Re: inputs for sonia on osx
« Reply #2 on: Jul 23rd, 2004, 8:01pm »

Hello Niall,  
 
I remember that its not possible to get a direct input signal for an internaly-playing sound with OSX.
 
But sonia lets you do this be loading a sample into the program, and using the sample.connectLiveInput(true);
 
this command will route the audio from the sample into the LiveInput engine, which has the FFT functionality you need.
 
let me know how it works out..
 
amit
 
ndmccormack


Re: inputs for sonia on osx
« Reply #3 on: Jul 27th, 2004, 8:36pm »

cheers guys
still haven't had time to play about much with it. I'll try the streaming server, but to be honest its probably a bit complex for just playing with some ideas!
 
and I did try loading samples straight into processing, but it kept on crashing due to lack of memory. I've read thats its possible to increase the amount that processing uses in the preferences, so I may try that...
 
I had wanted to generate 3d geometary from the audio, so I could maybe just break music into smaller samples and load them in concurently...
 
once i get osme omre time i'll play about and see what I can do!
 
cheers
Niall
 
turuto


Re: inputs for sonia on osx
« Reply #4 on: Aug 18th, 2004, 8:22pm »

i'm trying to combine the 2 examples you give in the reference to load a sample and analyze de spectrum but i'm newbie and can't understand de error message:
 
 
java.lang.NullPointerException
 
      at Sample.connectLiveInput(Sample.java:510)
 
      at Temporary_7955_5161.setup(Temporary_7955_5161.java:12)
 
 
mi code is as follows:
 
Sample mySample;
 
void setup() {
  size(512,200);
 
  Sonia.start(this);
  mySample = new Sample("cancion3.wav");
  mySample.play(); // play the sample once.
  mySample.connectLiveInput(true);
  LiveInput.start(256);  
 
}
void loop(){  
 
   background(0,20,0);  
   strokeWeight(0);  
   stroke(0,230,0);  
 
   LiveInput.getSpectrum(); // Populates the LiveInput.spectrum[] array with latest FFT data.  
   // Use the LiveInput.spectrum[] to display the FFT data  
   for ( int i = 0; i < LiveInput.spectrum.length; i++){  
      line(i*2, height, i*2, height - LiveInput.spectrum[i]/10);  
   }  
}  
 
// safely stop the Sonia engine upon shutdown.
public void stop(){
  Sonia.stop();
  super.stop();
}
 
can anybody tell me what i'm doing wrong?
thanks a lot in advance
 
 
turuto
« Last Edit: Aug 18th, 2004, 8:26pm by turuto »  
turuto


Re: inputs for sonia on osx
« Reply #5 on: Aug 18th, 2004, 8:25pm »

by the way, i don't know if this is the place, i don't know if anybody is translating the sonia reference into spanish, but i can do it o help the people that are doing it
 
Pages: 1 

« Previous topic | Next topic »