I try to hide a String, with the Measure of the Audio Level.. Well it is working but not perfect i have sometimes a little issue in my opinion.
It´s difficult to discribe. The audio level is measured, and if it is greater than 0.01 [sound is played] then the conditions are executed. However, if the sound falls too quickly and rises again within seconds, then the skin or measurement value does not update quickly enough and the text no longer disappears. [look at the GIF].
Rooky_89 wrote: ↑September 30th, 2024, 6:32 pm
The audio level is measured, and if it is greater than 0.01 [sound is played] then the conditions are executed. However, if the sound falls too quickly and rises again within seconds, then the skin or measurement value does not update quickly enough and the text no longer disappears.
Hard to say something meaningful, because I can't replicate the issue (don't know what sound to use for this), however:
It's a complete non-sense to have two different IfConditions, into two different measures, both showing / hiding the same meter ([Str1] in this case). There will be cases when one IfCondition will have to hide, while the other will have to show the meter. Such approaches always (or almost always) create confusion. I'd either:
Decide with which channel to work (left or right) and would get only the appropriate IfCondition, removing the other. Basically doesn't really matter if you're choosing the left or the right channel, important is not tu hide / show the meter based on both.
If you want to keep both, create a Calc measure calculate the sum of the values returned by the above two measures and apply the IfCondition only to this Calc measure.
Besides this, remove the [!UpdateMeasure MeasureAudioRMS_X] and [!Update] bangs from the IfTrueAction and IfFalseAction options of the measure on which you keep them (no matter if that's the above created Calc measure, or [MeasureAudioRMS_L] and [MeasureAudioRMS_R]). Keep only the [!HideMeter Str1] / [!ShowMeter Str1] and the [!Redraw] bangs (do the same):
One more, related to the second above point: You should never put together the [!Update] and the [!Redraw] bangs, because when you update the skin (by the [!Update] bang), you get a redraw of the skin as well. The redrawing being a more or less expensive operation in terms of required resources, doesn't worth to get a double redraw, one by the [!Update] and the other by the [!Redraw] bang.
The IfFalse Section starts to work [while no sound is incoming]... But the talker begins again now to speak the audio level is going quickly high, so quickly that after 5 secs delay the String is showing up. Thats the result in the Gif Image.
Also you can try to play a Song press short Pause one till two seconds and immediately press play. It's Tricky..
-------------------------- Have you tried increasing the measured volume to 0.1? I try it tomorrw
Last edited by Yincognito on September 30th, 2024, 8:56 pm, edited 1 time in total.
Reason:Fixed post syntax
Rooky_89 wrote: ↑September 30th, 2024, 8:45 pm
Also you can try to play a Song press short Pause one till two seconds and immediately press play. It's Tricky..
Alright, got now.
Try removing the IfConditions from the [MeasureAudioRMS_L] and [MeasureAudioRMS_R] measures, create a Calc measure and add the IfCondition to that measure, as said in my previous reply:
Note that I commented out the IfConditions in the initially existing [MeasureAudioRMS_L] and [MeasureAudioRMS_R] measures. Make sure not to forget this. Also see that I added two !HideMeter bangs to the IfTrueAction option of the newly created [MeasureAudioRMS] measure.
Rooky_89 wrote: ↑September 30th, 2024, 6:32 pmThe audio level is measured, and if it is greater than 0.01 [sound is played] then the conditions are executed. However, if the sound falls too quickly and rises again within seconds, then the skin or measurement value does not update quickly enough and the text no longer disappears.
This seems simpler to me than a bunch of channel measures and IfConditions (the [Visualizer] meter is rudimentar, just for demonstration purposes):
Feel free to adjust or remove the RMS options if needed. Works for me in podcasts or audios having short no sound breaks, like this one at the 00:07 time:
Everything is done in the Hidden option from [MediaPlay], with the help of a conditional. Doesn't use delays though.
Feel free to adjust or remove the RMS options if needed. Works for me in podcasts or audios having short no sound breaks
Thank you Incognito, your code is useful too. Nice Music demonstration, sounds like in Time where Cellphone ringtones were cool. ohh dear long time before. You should try this . Enjoy it