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 › Adjusting volume problem
Page Index Toggle Pages: 1
Adjusting volume problem (Read 2234 times)
Adjusting volume problem
Oct 14th, 2009, 1:54pm
 
Hi, I wanted to adjust the volume of the replayed song, so I did this:

import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;


Minim minim;
AudioPlayer song;
AudioOutput out;

void setup()
{
minim = new Minim(this);

song = minim.loadFile("fatboy_slim_-_right_here_right_now.mp3");
out = minim.getLineOut();
out.setGain(0.5);
}

And the volume is not being adjusted, I just recieve the
"=== Minim Error ===
=== Likely buffer underrun in AudioOutput"

Previously I tried using the setVolume() function directly, but I got the message that Volume is not supported.

Could please someone help me?
Re: Adjusting volume problem
Reply #1 - Oct 15th, 2009, 11:37am
 
You are trying to change the volume of the wrong object.
Code:

import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;

Minim minim;
AudioPlayer song;

void setup()
{
 minim = new Minim(this);

 song = minim.loadFile("fatboy_slim_-_right_here_right_now.mp3");
 song.setGain(0.5);
 song.play();
}


This should work.
Re: Adjusting volume problem
Reply #2 - Oct 16th, 2009, 6:19am
 
So I´ve misunderstood the examples from Minim´s website Angry

Thanks a lot!
Re: Adjusting volume problem
Reply #3 - Dec 30th, 2009, 3:50am
 
hi


this doesn't work for me.

.setVolume doesnt work either.

Is there no other way for a Volume control in Processing?


Please help, because this is the last bug in my project, and I really would like to end it this year!


greetings
n
Page Index Toggle Pages: 1