IO port logic.
John Paul
Posts: 143
I have a site where i have 7 mics connected on the IO port of a NI controller. Now when ever a person speaks, the mic which the person speaks thro turns the respective IO channel in the IO port and there is camera preset associated with each mic.
But when there are two or more speakers at the same time, the client wants the camera to go to a default preset which shows the full room. But since the two or more speakers will speak maybe for a sec or two, it goes immediately to the default preset and comes back to the speaker who spoke last. I wanted to know if there is any way where if it detects two or more speakers speaking, till there is a single speaker, it will stick to the default preset. I tried combining channel events for this purpose but to no avail.
But when there are two or more speakers at the same time, the client wants the camera to go to a default preset which shows the full room. But since the two or more speakers will speak maybe for a sec or two, it goes immediately to the default preset and comes back to the speaker who spoke last. I wanted to know if there is any way where if it detects two or more speakers speaking, till there is a single speaker, it will stick to the default preset. I tried combining channel events for this purpose but to no avail.
0
Comments
Now to answer your question... I don't think there is a built-in function that will help you do this. You will need to write the code with the logic desired to accomplish this. If this seems like something you aren't comfortable doing yet, I am sure there are a couple of independent programmers on the forums that could write you some code for a fee to get you going.
Jeff
I just needed a logic for this, i been programming for 5 years and its always good to ve different view points for a problem
create a simple for loop that checks each I/O port
keep a running tally of 'on' ports. If it exceeds 1 turn a variable flag on. If flag is on, send the camera to the preset
here's one way you might do it:
What I expect this would do is to switch to a camera preset if only one mic is active and switch to the default preset if more than one mic is active or when the single active mic goes inactive. If this last creates a problem (if you don't want to got to the default preset quickly when a mic is released) you could use a named wait to delay the move to default preset on the release and kill the wait if another preset went active during the wait time.
Of course, you could combine all the IO button presses into one event and use a button array, or any other code paradigms you like. Just trying to demonstrate the logic.
How about
where vdvDefaultPreset is a purpose defined virtual device for holding a flag for the requested lag time.
This gets UP every time there is more than one mic active, or none, and it stays UP for at least nDefaultPresetHoldTime. When it goes down, it is safe to go to individual framing.
To best of my understanding, this was the question asked...
Be that as it may, you'd be surprised how many experienced programmers aren't aware of things some of us take for granted, and I include myself in that statement. Just throwing it out in case he didn't know.
Dave,u are right. I do end up forgetting the obvious sometimes.
I will take all ur views and check it up on my next site visit. Thanks guys for your views