Sound in [how to connect] video out

Hellooo!

Complete newbie here… Tried already a lot but now I’m stuck… Probably answer is just around the corner but I don’t know it…

Idea briefly: I want to control two videos with an audio input.
IF there is sound - video A is shown.
IF there is no sound - still pic B is shown.

(Sound will actually come from Arduino board which is connected to sensor. If sensor will be triggered it will send sound to PC)

For showing one video and changing it to the still pic I think to use the group node. And add two videotextures.

For sound input I thought to use audioin/rms.

Overall I’m not quite sure how to connect sound input with video.
Any thoughts? Maybe there is easier way to do it?
Any help or guidance would be very much appreciated since deadline is sooo close…

Gabi

Try AudioIn (DShow9) >>> RMS (DShow9) >>> > (Value) use the second pin as thresold
then use a Switch (Node Input) to toggle between the two textures
S.

Thanks a lot! buttt…

Probably I don’t understand it enough… This is what I’m trying to do now.
Though every time after a while videos stops to play. I think it just a matter of my stupidity and inserting strange/insane values. ;) But maybe there is some kind “refresh” function? When I open it again it works fine.

Crappy question - can I instead of video show still picture? In a format for eg jpg or smth…

Plus I’ve just tried RMS and this time with Arduino and sensor connected to it. Strange thing is that input values changes not only from 1 to 0 but vvvv also shows values in between (0.6666, 0425… etc). But it should not be possible since sensor can send (and it does - I can see it from serial monitor) only two values… Any ideas about it?

FileTexture (EX9.Texture) for still image format

which nodes are you using with Arduino how do you connect it?

S.

About the video stopping maybe it just ends… if you want it to loop toggle the loop pin to 1 and feed the output pin Duration to the input pin End Loop using a FrameDelay (Animation)
S.

Arduino is connected to sensor and also it is connected to mini jack which is just plugged as normal microphone. So vvvv gets sound input.

I want to switch between video and image. When sound comes + video is played. When there is no sound image is shown.

Maybe it’s better to use group(priority) instead of switch?
And how can I define when video is shown and when image is shown in relation to sound?

Ahhhrrr time runs so fast…

You define that in the second input pin of “>”

Good morning. I’m here again…

If someone could look into my patch it would be much more than awesome. :)
My problem appears when I want to switch from video to picture and back.

I’ve tried to change values many many times but it either shows video ether picture. One time I managed to set value and then it was changing from vid to pic. But very fast and I’m not even sure that it reacted to sound… And I forgot to save it… (yes… Stupidity…)

gabi

switching_gabi (6.5 kB)

I’m still in troubles. Struggling a lot with probably the most simple things in 4v world…

Please check my patch it has my comments and questions.

Basically I cant extend time when video and picture is shown. Plus I need to play not only video but also and sound from it. Have no idea how to do it…

Gabi

patch_a (41.6 kB)

try this
just a little hint: try to make your patches more clean especially if you seek for help here
S.

patch_b.v4p (16.9 kB)

I will surely become better and more clearer with my quewstions and patches because I fell in love with vvvv. :)
Probably last question is how to play audio together with video = at the same time. And audio is actually together with video = in same file. Possible/not/how?

In the patch I ve sent you you should be able to listen to the audio (if any), you see the AudioOut connected to the Filestreamer?
S.

Yep it works. :) But is it possible also to play it in sinc with video. If video is shown - audio plays. So that it doesn’t play constantly?

Homework: Audioout has got a Volume input pin !

Yep I understand and can see that there is volume pin in audioout. My question is where to connect it. If I want to play it at the same time as video plays should I connect it to the existing rms somehow or should it has to have another input?

So now when sound comes in the Alpha channel of the quad where the video is goes from 0 to 1 then stays to 1 even if the sound goes down the threshold, for a while.
The Audioout Volume pin goes from -60dB (i guess, can t remember now) to +6dB so you want to map that value to the 0-1 range which is sent to the Alpha channel.
Use a Map (Value), connect its input to the decay node, then set the output range so that when the input is 0 the level of the audio is at its lowest rate possible (destination minimum) then set the maximum destination to the level of audio you want when the video is visible.
S.