Previous topicNext topic

Audio to effect modifier

Questions, comments, feedback, etc.
Post Reply
Kneedless
Posts: 8
Joined: Tue Aug 16, 2016 11:17 am

Audio to effect modifier

Post by Kneedless »

Hi all,

I thought I made this post but it's not here so I'll try again.

I'm trying to create a guy that bobs his head along to music, but when the music stops he stops bobbing his head.

I would like a Modifier of a module to be effected by my audio but I cannot work out how to do it. For example I have a rotate module on a shape that has an oscillator modifier and a scale modifier in the module (scale is effecting the oscillation), I would like the scale modifier to be effected by the volume of my source audio, so when there is no audio the scale is set to 0 and when there is full audio the scale is set to 1(or 2 or whatever). is this possible? is there a way I can do this with the expression modifier?
Sadler
Posts: 1143
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Audio to effect modifier

Post by Sadler »

If you want to rotate 2d plane (i.e. image) or a 3D model so that it bobs to the music then Translate up (Y) to change the anchor pos to the 'neck', Rotate about X with angle set to 20-80hz with Smoothing, then Translate down (Y) to move the neck back onto the body.

For a video of someone nodding, unfortunately one cannot automate the play-head, however, if you have a series of jpegs of someone nodding then you can automate the Index on the JpegFolder.
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: Audio to effect modifier

Post by Magic »

You might want to look at the DancingRobot sample project, which shows how to use audio to animate the movement of a simple stick figure.

In particular you can see how the head tilts back when the volume is high.
Kneedless
Posts: 8
Joined: Tue Aug 16, 2016 11:17 am

Re: Audio to effect modifier

Post by Kneedless »

Hi Sadler, I don't understand your answer, I don't see how you have explained the audio reactivity in this explanation.

Eric wrote:You might want to look at the DancingRobot sample project, which shows how to use audio to animate the movement of a simple stick figure.

In particular you can see how the head tilts back when the volume is high.

Hi Eric, this does not answer my question sorry. I was using the Dancing robot project when I came up with the question, there are no oscillation modifiers in the project. I want the source audio to modify a scale modifier which effects a oscillator modifier of a rotation module. here's a picture of what I want to be audio reactive, this may make my question easier to understand.

Cheers

http://i23.photobucket.com/albums/b351/ ... 20help.jpg
Sadler
Posts: 1143
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Audio to effect modifier

Post by Sadler »

Let me try again...

You asked:
I'm trying to create a guy that bobs his head along to music, but when the music stops he stops bobbing his head.
In your screenshot you have Source->Sin->Scale. Using this modifier stack, when the music is, say 0.8, the sin will add to that and take it from 0.8 to 1.8 which you then scale to reduce that to 15% (to between 0.1 to 0.2). Even if the music is changing between 0 and 1 the maximum change you will see in your stack will be 0-0.3 and half of that will be due to the sin function. But if the volume is constant the angle will only change because of the sin, and greatly reduced by the scale and not necessarily in time to the music.

What you don't seem to have grasped is that modifiers combine arithmetically according to mathematical precedence from the source down.
See the manual: https://magicmusicvisuals.com/downloads ... ingModules

So, if you have no modifiers at all on the angle parameter the source will drive the angle accordingly (i.e from 0 to 1 according to the volume or whatever) - start from this. You would then use modifiers to adjust the range or to scale or smooth the action.

Once you've mastered this then you can go onto combining modules together which also have an order of operations. This was what I was trying to explain in my first post. Try playing with the dancing robot as suggested by Eric.

However this...
I want the source audio to modify a scale modifier which effects a oscillator modifier
You can't modify a modifier (except thru UI or MIDI). I can't see why you'd need to for what you're asking.
Kneedless
Posts: 8
Joined: Tue Aug 16, 2016 11:17 am

Re: Audio to effect modifier

Post by Kneedless »

Hi Eric, Thanks for your explanation, that cleared things up allot, also I am using the dancing robot.

That scale modifier is set to lower the sin so he is only bobbing his head only about 40deg instead of his head spinning a full 360deg I added a scale modifier of 100 to the start of the string and set the sin to 0 and the robot is now bobbing when the music plays and stops when the music stops, I'm half way there but the bob speed increases with the audio. I want the bob speed to be constant.

lets say for example the music is 120bpm and I want the head to bob at a rate of 1hz. I would like the amplitude of the source to effect the scale modifier below the sin modifier and leave the sin modifier set to 1hz, so lets say i set that scale modifier to 0 so with no source input there is no movement, but with input he bobs at 1hz, as the music increases he bobs he's head further, not faster. so if source amplitude is 0 he doesn't move his head, if source amplitude is 50 is bobs his head 30deg and if source is 100 he bobs 60deg.

So basically I want the source to skip effecting the sin osc speed and just effect effect the scale modifier beneath it. is there a way of doing that?
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: Audio to effect modifier

Post by Magic »

So basically I want the source to skip effecting the sin osc speed and just effect effect the scale modifier beneath it. is there a way of doing that?
No :), but even if you could do that, it wouldn't get you the result you want. Volume changes very rapidly, so you'd get a very chaotic motion, not a smooth bobbing.

As you discovered, the smoothest bobbing would be achieved by a Sine Oscillator with param set to 0. Since you want the bobbing speed to be constant regardless of volume, you can try this:
Threshold: 0.01
Sine Osc: 0

The Threshold will send through a value of 0 when there is no music, otherwise it will send through a value of 1.
Kneedless
Posts: 8
Joined: Tue Aug 16, 2016 11:17 am

Re: Audio to effect modifier

Post by Kneedless »

that's a shame, it would be a very useful feature, and it could be smoothed out by having the ability to change the sample size. I'll try this threshold thing then. and play around and see if I can find a way of doing what I want with expressions.
Post Reply