wav file volume control
Hi!
I have a patch set up triggering an audio sample. the sfplay~ object is used to play a wav file. I want to be able to trigger the sample at different volumes depending on incoming acceleration values e.g. greater acceleration would result in a higher volume.
I'm looking for more of a hint really than just a straight forward answer. I'm not sure how to control the volume from the ezdac~. I tried to use the gain object but this didn't seem to work. I'm sure if I knew how to alter the output volume I would be able to work out the rest!
thanks!
Look into [adsr~] in conjunction with [*~]. You can scale an incoming
MIDI note's velocity, for example, to drive the sustain portion of
the [adsr~].
On Mar 15, 2008, at 4:00 PM, Adam wrote:
>
> Hi!
>
> I have a patch set up triggering an audio sample. the sfplay~
> object is used to play a wav file. I want to be able to trigger the
> sample at different volumes depending on incoming acceleration
> values e.g. greater acceleration would result in a higher volume.
>
> I'm looking for more of a hint really than just a straight forward
> answer. I'm not sure how to control the volume from the ezdac~. I
> tried to use the gain object but this didn't seem to work. I'm sure
> if I knew how to alter the output volume I would be able to work
> out the rest!
>
----
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe
Home
SFIFEM
Atrium Sound Space
OVOS
CMP
Adam schrieb:
> I tried to use the gain object but this didn't seem to work. I'm sure
> if I knew how to alter the output volume I would be able to work out
> the rest!
The knowledge you are missing is in the tutorials. The gain object does
work (as does *~, adsr~, line~... they all have help files as well...)
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Here's two ways to control the levels.
basically the same results.
I understand wanting to jump right in Max and do cool stuff, hell, I'm still slowly going through them, damn thing called work keeps getting in the way for me. :)
I had an "Ah ha!" moment this weekend with Max. Once I accepted that the help files are really a HUGE help in learning how the objects work (and a great "cheater's" tool), and that the help files don't contain all the info many objects. That's where the reference manuals come in super handy showing you all the more techy info on attributes and settings the help files may not show.
So in this moment of hypocrisy, The tutorials and help files really are your best friends in learning Max.
Hope the patch helps. Yay, I finally get to post a patch to try to help someone. :)
Hi
I can't find a way to do this properly. Basically I aim to recreate the effect of mapping acceleration values to midi note velocity E.g. the greater the incoming acceleration value the greater midi note velocity and therefore the louder the midi note played.
I know how to do this using midi, but I want to create the same effect using a wav soundfile instead. At the moment I have a soundfile being triggered at one constant volume, but I want the output to be altered depending on the incoming acceleration force.
Please help!
Thanks, but I'm not completely sure of what the the post above post is showing...getting a bit confused with which objects are plugged into other inlets etc. Could you explain please.
Thanks
thanks guys!
After implementing the map described in the posts above I have run into yet another problem. The incoming acceleration data that is mapped to the output amplitude is constantly changing, so the output of the wav file being played is altered several times before it finishes playing, which sounds unnatural. I'm not sure how to get around this problem.
I have tried using peak, to give the maximum acceleration value after each time the acceleration device is in motion, but once a maximum was calculated, peak could not be reset without affecting the output during the next motion.Is there a way round this? Possibly using average?Please help me!
On Mar 31, 2008, at 3:54 PM, Adam wrote:
> After implementing the map described in the posts above I have run
> into yet another problem. The incoming acceleration data that is
> mapped to the output amplitude is constantly changing, so the output
> of the wav file being played is altered several times before it
> finishes playing, which sounds unnatural. I'm not sure how to get
> around this problem.
Why don't you post what you have? People can help better that way.
Chris Muir
cbm@well.com
http://www.xfade.com
managed to rectify the problem in the end! cheers!