How to control sample volume in Minim

I read in minim docs about a setVolume() function, but there are no examples. Further, the docs say, "if a volume control is not available, this (setVolume() ) does nothing. I can't find any information on what is meant by "a volume control" being available or how to use the function.

Can you help?

Many thanks,

George

Tagged:

Answers

  • edited April 2014

    Hi, i had the same issue. I wanted to make a volumecontrol but setVolume didn't work.

    (I just have to say, before you go on reading, i'm relativly new to Processing but this works good enough for me and you can use this solution until someone gives a better one.)

    What works is setGain. setGain can help you determine the volume of the audio but i don't know if it is meant to be a volumecontrol. Anyways, i've discovered that setGain doesn't work with positive number. It only works between -13,(something) to -80. So what it does is only lower the volume. So it might end up looking like this, (example): player.setGain(-40); I don't know if it's what your looking for but i hope it helps.

    /Dilun

  • I have the same problem. The setGain workaround seems a bit patchy. Does anyone have insights into how to use the volume control with minim? The examples use "depreciated code" and no longer work.

Sign In or Register to comment.