Skip to content

dfUpdateVisFB()

Dante Smith edited this page Mar 6, 2022 · 4 revisions

Link to File
Author: Dante

[color, newPos, loudResult] = dfUpdateVisFB(msrStr, sampRMS) updates the height and color of the loudness bar that is present at the end of trials as visual feedback to the participant. This script is updating the annotation elements that are created by the function dfSetVisFB.m

The mean RMS from a sample/trial is compared against the baseline sample that was inputted during generation of dfSetVisFB.m and the height and color of changes based on if the trial recording was within the bounds.

INPUTS
msrStr : Struct of annotation measurements. The collection of the positions for all the annotations on the figure. Annotations are just objects on the figure that can be moved around. This struct is generated from dfSetVisFB.m
sampRMS : Mean RMS of sample trial recording

OUTPUTS
color : String ('Red', 'Green'). Color update to the loudness bar
newRecMeas : Vector [XPos YPos Width Height] of the updated position for the loudness bar
loudResult : Int value for the outcome of the loudness comparison (0 = Just Right, -1 = Too Low, 1 = Too High)