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)
   PortAudio!???
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: PortAudio!???  (Read 488 times)
flight404

WWW Email
PortAudio!???
« on: Jan 2nd, 2004, 10:58pm »

What is this?  Any idea?  Just scared the shit out of me and my coworkers because...
 
JSyn using native library JSynV142
JSyn for OS X,  Built 4/16/03.
Volume for audio channel 1 was <= 0.10 so set to 0.90 by PortAudio!
Volume for audio channel 2 was <= 0.10 so set to 0.90 by PortAudio!
 
 
Any idea how to turn this feature off??
 
robert
 
pitaru


WWW Email
Re: PortAudio!???
« Reply #1 on: Jan 2nd, 2004, 11:29pm »


PortAudio is the core C library that jSyn runs on; Sonia uses Jsyn, and Jsyn uses PortAudio.
 
strange - first time i've seen this. does it change the volume, or just prompt the message?
 
-amit
 
flight404

WWW Email
Re: PortAudio!???
« Reply #2 on: Jan 2nd, 2004, 11:39pm »

It actually changed my system volume.  Blasted me out of my chair.  Surprised it doesn't change it to .5.  That would have been bearable.
 
Oh well.
 
pitaru


WWW Email
Re: PortAudio!???
« Reply #3 on: Jan 2nd, 2004, 11:54pm »

wow. i need to make sure that its not a Sonia bug - can you show me the code that's making this happen?
 
flight404

WWW Email
Re: PortAudio!???
« Reply #4 on: Jan 3rd, 2004, 5:51am »

On OSX 10.3.2 running Processing v.67 with Sonia_v2_5_b and libJSynV142, if the system volume is set to the lowest setting (mute) or the second lowest setting, it changes the volume to nearly max.
 
Code:

Sample theSound;
Sample revSound;
 
void setup(){
 
  size(512,100);
  Sonia.start(this);
   
  theSound = new Sample("bjork.aiff");
  int theSoundLength = theSound.getNumFrames();
   
  revSound = new Sample(theSoundLength);
 
  float[] forwards = new float[theSoundLength];
  float[] backwards = new float[theSoundLength];
   
  theSound.read(forwards);
 
  int counter = 0;
  for (int i = theSoundLength - 1; i>=0; i--){
    backwards[counter] = forwards[i];
    counter ++;
  }
 
  revSound.write(backwards);
}
 
void mousePressed(){
  theSound.play();
}
 
 
// Safely close the sound engine upon Browser shutdown.
public void stop(){
  Sonia.stop();
  super.stop();
}

 
 
By the way, is this a reasonable way to get a sound to play backwards... i.e., making a sample array with the reverse information as the original sample array?
 
robert
 
pitaru


WWW Email
Re: PortAudio!???
« Reply #5 on: Jan 3rd, 2004, 6:29pm »

yep, i get it as well. wieeerd. i'll look into it.
 
> By the way, is this a reasonable way to get a sound to play backwards... i.e., making a sample array with the reverse information as the original sample array?  
 
Yep, for now that's the way to go about it. I'll enable nagetive rate values for reverse playback in future releases.  
 
-amit
 
Pages: 1 

« Previous topic | Next topic »