Exemplo n.º 1
0
        static void Main(string[] args)
        {
            engine.EmoEngineEmoStateUpdated += new EmoEngine.EmoEngineEmoStateUpdatedEventHandler(engine_EmoStateUpdated);
            engine.Connect();

            while (true)
            {
                engine.ProcessEvents(1000);
                if (allow)
                {
                    int x = 0, y = 0;
                    engine.HeadsetGetGyroDelta(userId, out x, out y);
                    xmax += x;
                    ymax += y;
                    Console.WriteLine("xmax: {0}, ymax : {1}", xmax, ymax);
                }
                else
                {
                    Console.WriteLine("Elapsed :  {0}, Engagement: {1}, Frustration: {2}, Medidation: {3}, Signal: {4}", elapsed,
                                      (eState != null ? eState.AffectivGetEngagementBoredomScore().ToString(): "null"),
                                      (eState != null ? eState.AffectivGetFrustrationScore().ToString(): "null"),
                                      (eState != null ? eState.AffectivGetMeditationScore().ToString() : "null"),
                                      (eState != null ? eState.GetWirelessSignalStatus().ToString() : "null"));
                }
            }
        }
Exemplo n.º 2
0
        static void affectiveStateUpdate(object sender, EmoStateUpdatedEventArgs e)
        {
            EmoState es              = e.emoState;
            float    lastUpdate      = time;
            float    esTimeStamp     = es.GetTimeFromStart();
            string   systemTimeStamp = DateTime.Now.ToString("hh.mm.ss.ffffff");
            // Write the data to a file
            TextWriter file = new StreamWriter(filename, true);

            // "Timestamp,EmoState_Timestamp,BoredomScore,ExcitementShortScore,FrustrationScore," +
            // " MediationScore,ValenceScore,ExcitementLongShort,"


            if (e.userId == userID)
            {
                file.Write(systemTimeStamp + ";");
                file.Write(Convert.ToString(esTimeStamp) + ";");
                file.Write(es.AffectivGetEngagementBoredomScore() + ";");
                file.Write(es.AffectivGetExcitementShortTermScore() + ";");
                file.Write(es.AffectivGetFrustrationScore() + ";");
                file.Write(es.AffectivGetMeditationScore() + ";");
                file.Write(es.AffectivGetValenceScore() + ";");
                file.Write(es.AffectivGetExcitementLongTermScore() + ";");
                file.WriteLine("");



                Console.WriteLine("Receiveing affective update .....");
            }
            file.Close();
        }
Exemplo n.º 3
0
        void affectiveStateUpdate(object sender, EmoStateUpdatedEventArgs e)
        {
            EmoState es = e.emoState;

            // float lastUpdate = time;
            //float esTimeStamp = es.GetTimeFromStart();
            //string systemTimeStamp = DateTime.Now.ToString("hh.mm.ss.ffffff");

            // "Timestamp,EmoState_Timestamp,BoredomScore,ExcitementShortScore,FrustrationScore," +
            // " MediationScore,ValenceScore,ExcitementLongShort,"


            if (e.userId == userID)
            {
                AffectiveOSC.AffectiveState affectiveState = new AffectiveOSC.AffectiveState();
                affectiveState.emotivTimeStamp    = es.GetTimeFromStart();
                affectiveState.boredom            = es.AffectivGetEngagementBoredomScore();
                affectiveState.excitement         = es.AffectivGetExcitementShortTermScore();
                affectiveState.frustration        = es.AffectivGetFrustrationScore();
                affectiveState.mediation          = es.AffectivGetMeditationScore();
                affectiveState.valence            = es.AffectivGetValenceScore();
                affectiveState.excitementLongTerm = es.AffectivGetExcitementLongTermScore();
                affectiveOSC.sendAffectiveStateData(affectiveState, false);

                Console.WriteLine("Received Affective State Update");
            }
        }
Exemplo n.º 4
0
    static void engine_AffectivEmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
    {
        EmoState es = e.emoState;

        longTermExcitementScore  = (float)es.AffectivGetExcitementLongTermScore();
        shortTermExcitementScore = (float)es.AffectivGetExcitementShortTermScore();
        for (int i = 0; i < affAlgoList.Length; ++i)
        {
            isAffActiveList[i] = es.AffectivIsActive(affAlgoList[i]);
        }
        meditationScore  = (float)es.AffectivGetMeditationScore();
        frustrationScore = (float)es.AffectivGetFrustrationScore();
        boredomScore     = (float)es.AffectivGetEngagementBoredomScore();
    }
Exemplo n.º 5
0
    private static void engine_AffectivEmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
    {
        EmoState emoState = e.emoState;

        EmoAffectiv.longTermExcitementScore  = emoState.AffectivGetExcitementLongTermScore();
        EmoAffectiv.shortTermExcitementScore = emoState.AffectivGetExcitementShortTermScore();
        for (int i = 0; i < EmoAffectiv.affAlgoList.Length; i++)
        {
            EmoAffectiv.isAffActiveList[i] = emoState.AffectivIsActive(EmoAffectiv.affAlgoList[i]);
        }
        EmoAffectiv.meditationScore  = emoState.AffectivGetMeditationScore();
        EmoAffectiv.frustrationScore = emoState.AffectivGetFrustrationScore();
        EmoAffectiv.boredomScore     = emoState.AffectivGetEngagementBoredomScore();
    }
Exemplo n.º 6
0
        void engine_EmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
        {
            EmotivUser = e.userId;
            // enable data aquisition for this user.
            engine.DataAcquisitionEnable(e.userId, true);

            // ask for up to 1 second of buffered data
            engine.EE_DataSetBufferSizeInSec(1);



            EmoState es  = e.emoState;
            DateTime now = DateTime.Now;
            //int x,y;
            //engine.HeadsetGetGyroDelta(e.userId, out x, out y);

            //values["GyroDeltaX"] = (float)x;
            //values["GyroDeltaY"] = (float)y;
            Dictionary <string, float> values = new Dictionary <string, float>();

            values["AffectivGetExcitementShortTermScore"] = es.AffectivGetExcitementShortTermScore();
            values["AffectivGetExcitementLongTermScore"]  = es.AffectivGetExcitementLongTermScore();
            values["AffectivGetEngagementBoredomScore"]   = es.AffectivGetEngagementBoredomScore();
            values["AffectivGetMeditationScore"]          = es.AffectivGetMeditationScore();
            values["AffectivGetFrustrationScore"]         = es.AffectivGetFrustrationScore();
            float leftEye, rightEye;

            es.ExpressivGetEyelidState(out leftEye, out rightEye);
            values["ExpressivGetEyelidStateLeft"]  = leftEye;
            values["ExpressivGetEyelidStateRight"] = rightEye;
            es.ExpressivGetEyeLocation(out leftEye, out rightEye);
            values["ExpressivGetEyeLocationLeft"]      = leftEye;
            values["ExpressivGetEyeLocationRight"]     = rightEye;
            values["ExpressivGetClenchExtent"]         = es.ExpressivGetClenchExtent();
            values["ExpressivGetEyebrowExtent"]        = es.ExpressivGetEyebrowExtent();
            values["ExpressivGetLowerFaceActionPower"] = es.ExpressivGetLowerFaceActionPower();
            values["ExpressivGetSmileExtent"]          = es.ExpressivGetSmileExtent();
            values["ExpressivGetUpperFaceActionPower"] = es.ExpressivGetUpperFaceActionPower();
            values["ExpressivIsBlink"]        = bool2float(es.ExpressivIsBlink());
            values["ExpressivIsEyesOpen"]     = bool2float(es.ExpressivIsEyesOpen());
            values["ExpressivIsLeftWink"]     = bool2float(es.ExpressivIsLeftWink());
            values["ExpressivIsLookingDown"]  = bool2float(es.ExpressivIsLookingDown());
            values["ExpressivIsLookingLeft"]  = bool2float(es.ExpressivIsLookingLeft());
            values["ExpressivIsLookingRight"] = bool2float(es.ExpressivIsLookingRight());
            values["ExpressivIsLookingUp"]    = bool2float(es.ExpressivIsLookingUp());
            values["ExpressivIsRightWink"]    = bool2float(es.ExpressivIsRightWink());

            Sender.uploadEmotivEvent(user, now, values);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Main update event for AFFECTION data
        /// </summary>
        private void engine_AffectivEmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
        {
            EmoState es = e.emoState;

            EdkDll.EE_AffectivAlgo_t[] affAlgoList =
            {
                EdkDll.EE_AffectivAlgo_t.AFF_ENGAGEMENT_BOREDOM,
                EdkDll.EE_AffectivAlgo_t.AFF_EXCITEMENT,
                EdkDll.EE_AffectivAlgo_t.AFF_FRUSTRATION,
                EdkDll.EE_AffectivAlgo_t.AFF_MEDITATION,
            };

            Boolean[] isAffActiveList = new Boolean[affAlgoList.Length];

            Single longTermExcitementScore  = es.AffectivGetExcitementLongTermScore();
            Single shortTermExcitementScore = es.AffectivGetExcitementShortTermScore();

            for (int i = 0; i < affAlgoList.Length; ++i)
            {
                isAffActiveList[i] = es.AffectivIsActive(affAlgoList[i]);
            }

            Single meditationScore  = es.AffectivGetMeditationScore();
            Single frustrationScore = es.AffectivGetFrustrationScore();
            Single boredomScore     = es.AffectivGetEngagementBoredomScore();

            double rawScoreEc = 0, rawScoreMd = 0, rawScoreFt = 0, rawScoreEg = 0;
            double minScaleEc = 0, minScaleMd = 0, minScaleFt = 0, minScaleEg = 0;
            double maxScaleEc = 0, maxScaleMd = 0, maxScaleFt = 0, maxScaleEg = 0;
            double scaledScoreEc = 0, scaledScoreMd = 0, scaledScoreFt = 0, scaledScoreEg = 0;

            // Short Excitement
            es.AffectivGetExcitementShortTermModelParams(out rawScoreEc, out minScaleEc, out maxScaleEc);
            if (minScaleEc != maxScaleEc)
            {
                if (rawScoreEc < minScaleEc)
                {
                    scaledScoreEc = 0;
                }
                else if (rawScoreEc > maxScaleEc)
                {
                    scaledScoreEc = 1;
                }
                else
                {
                    scaledScoreEc = (rawScoreEc - minScaleEc) / (maxScaleEc - minScaleEc);
                }
            }

            // Short Engagaement
            es.AffectivGetEngagementBoredomModelParams(out rawScoreEg, out minScaleEg, out maxScaleEg);
            if (minScaleEg != maxScaleEg)
            {
                if (rawScoreEg < minScaleEg)
                {
                    scaledScoreEg = 0;
                }
                else if (rawScoreEg > maxScaleEg)
                {
                    scaledScoreEg = 1;
                }
                else
                {
                    scaledScoreEg = (rawScoreEg - minScaleEg) / (maxScaleEg - minScaleEg);
                }
                //Console.WriteLine("Affectiv Engagement : Raw Score {0:f5}  Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreEg, minScaleEg, maxScaleEg, scaledScoreEg);
            }

            // Meditation
            es.AffectivGetMeditationModelParams(out rawScoreMd, out minScaleMd, out maxScaleMd);
            if (minScaleMd != maxScaleMd)
            {
                if (rawScoreMd < minScaleMd)
                {
                    scaledScoreMd = 0;
                }
                else if (rawScoreMd > maxScaleMd)
                {
                    scaledScoreMd = 1;
                }
                else
                {
                    scaledScoreMd = (rawScoreMd - minScaleMd) / (maxScaleMd - minScaleMd);
                }
                //Console.WriteLine("Affectiv Meditation : Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreMd, minScaleMd, maxScaleMd, scaledScoreMd);
            }

            // Frustration
            es.AffectivGetFrustrationModelParams(out rawScoreFt, out minScaleFt, out maxScaleFt);
            if (maxScaleFt != minScaleFt)
            {
                if (rawScoreFt < minScaleFt)
                {
                    scaledScoreFt = 0;
                }
                else if (rawScoreFt > maxScaleFt)
                {
                    scaledScoreFt = 1;
                }
                else
                {
                    scaledScoreFt = (rawScoreFt - minScaleFt) / (maxScaleFt - minScaleFt);
                }
                //Console.WriteLine("Affectiv Frustration : Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreFt, minScaleFt, maxScaleFt, scaledScoreFt);
            }

            // If recording is enabled...
            if (this._recording)
            {
                //Append SCALED affectiv values
                _ondra.AppendAffectivData(_stopwatch.Elapsed.TotalSeconds, scaledScoreEc,
                                          scaledScoreEg, scaledScoreMd, scaledScoreFt);
            }
        }
Exemplo n.º 8
0
        static void engine_AffectivEmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
        {
            //TextWriter file = new StreamWriter(filen, true);
            AffectivValue af = new AffectivValue();
            EmoState      es = e.emoState;

            Single timeFromStart = es.GetTimeFromStart();

            EdkDll.EE_AffectivAlgo_t[] affAlgoList =
            {
                EdkDll.EE_AffectivAlgo_t.AFF_ENGAGEMENT_BOREDOM,
                EdkDll.EE_AffectivAlgo_t.AFF_EXCITEMENT,
                EdkDll.EE_AffectivAlgo_t.AFF_FRUSTRATION,
                EdkDll.EE_AffectivAlgo_t.AFF_MEDITATION,
            };

            Boolean[] isAffActiveList = new Boolean[affAlgoList.Length];

            Single longTermExcitementScore  = es.AffectivGetExcitementLongTermScore();
            Single shortTermExcitementScore = es.AffectivGetExcitementShortTermScore();

            for (int i = 0; i < affAlgoList.Length; ++i)
            {
                isAffActiveList[i] = es.AffectivIsActive(affAlgoList[i]);
            }

            Single meditationScore  = es.AffectivGetMeditationScore();
            Single frustrationScore = es.AffectivGetFrustrationScore();
            Single boredomScore     = es.AffectivGetEngagementBoredomScore();

            double rawScoreEc = 0, rawScoreMd = 0, rawScoreFt = 0, rawScoreEg = 0;
            double minScaleEc = 0, minScaleMd = 0, minScaleFt = 0, minScaleEg = 0;
            double maxScaleEc = 0, maxScaleMd = 0, maxScaleFt = 0, maxScaleEg = 0;
            double scaledScoreEc = 0, scaledScoreMd = 0, scaledScoreFt = 0, scaledScoreEg = 0;


            #region Excitement
            es.AffectivGetExcitementShortTermModelParams(out rawScoreEc, out minScaleEc, out maxScaleEc);



            if (minScaleEc != maxScaleEc)
            {
                if (rawScoreEc < minScaleEc)
                {
                    scaledScoreEc = 0;
                }
                else if (rawScoreEc > maxScaleEc)
                {
                    scaledScoreEc = 1;
                }
                else
                {
                    scaledScoreEc = (rawScoreEc - minScaleEc) / (maxScaleEc - minScaleEc);
                }

                //   Console.WriteLine("Affectiv Short Excitement: Raw Score {0:f7}", rawScoreEc);
                //  Console.WriteLine("Affectiv Short Excitement: Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreEc, minScaleEc, maxScaleEc, scaledScoreEc);
                af.shortTermExcitementScore = (float)rawScoreEc;
                //                file.Write("Excitement :" + rawScoreEc + " ");

                //  file.Close();
            }

            #endregion
            #region Boredom
            es.AffectivGetEngagementBoredomModelParams(out rawScoreEg, out minScaleEg, out maxScaleEg);
            if (minScaleEg != maxScaleEg)
            {
                if (rawScoreEg < minScaleEg)
                {
                    scaledScoreEg = 0;
                }
                else if (rawScoreEg > maxScaleEg)
                {
                    scaledScoreEg = 1;
                }
                else
                {
                    scaledScoreEg = (rawScoreEg - minScaleEg) / (maxScaleEg - minScaleEg);
                }
                //  Console.WriteLine("Affectiv Engagement : Raw Score {0:f5}  Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreEg, minScaleEg, maxScaleEg, scaledScoreEg);
                af.boredom = rawScoreEg;
                //file.Write("Engagement: " + rawScoreEg + " ");
            }
            #endregion

            #region Meditation
            es.AffectivGetMeditationModelParams(out rawScoreMd, out minScaleMd, out maxScaleMd);
            if (minScaleMd != maxScaleMd)
            {
                if (rawScoreMd < minScaleMd)
                {
                    scaledScoreMd = 0;
                }
                else if (rawScoreMd > maxScaleMd)
                {
                    scaledScoreMd = 1;
                }
                else
                {
                    scaledScoreMd = (rawScoreMd - minScaleMd) / (maxScaleMd - minScaleMd);
                }
                //    Console.WriteLine("Affectiv Meditation : Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreMd, minScaleMd, maxScaleMd, scaledScoreMd);
                af.meditation = rawScoreMd;
                // file.Write(" Meditation :" + rawScoreMd + "  ");
            }
            #endregion

            #region Frustration
            es.AffectivGetFrustrationModelParams(out rawScoreFt, out minScaleFt, out maxScaleFt);
            if (maxScaleFt != minScaleFt)
            {
                if (rawScoreFt < minScaleFt)
                {
                    scaledScoreFt = 0;
                }
                else if (rawScoreFt > maxScaleFt)
                {
                    scaledScoreFt = 1;
                }
                else
                {
                    scaledScoreFt = (rawScoreFt - minScaleFt) / (maxScaleFt - minScaleFt);
                }
                //  Console.WriteLine("Affectiv Frustration : Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreFt, minScaleFt, maxScaleFt, scaledScoreFt);
                af.frustration = rawScoreFt;
                //file.Write("Frustration :" + rawScoreFt + "  ");
                //file.WriteLine("");
                //file.Close();
            }
            #endregion


            af.timeFromStart      = timeFromStart;
            af.longTermExcitement = longTermExcitementScore;
            af.isAffActiveList    = isAffActiveList;
            Affv.Add(af);

            /*
             *
             * affLog.Write(
             *  "{0},{1},{2},{3},{4},{5},",
             *  timeFromStart,
             *  longTermExcitementScore, shortTermExcitementScore, meditationScore, frustrationScore, boredomScore);
             *
             * for (int i = 0; i < affAlgoList.Length; ++i)
             * {
             *  affLog.Write("{0},", isAffActiveList[i]);
             * }
             *
             * affLog.WriteLine("");
             * affLog.Flush();
             */
        }
Exemplo n.º 9
0
        static void engine_AffectivEmoStateUpdated(object sender, EmoStateUpdatedEventArgs e)
        {
            EmoState es = e.emoState;

            Single timeFromStart = es.GetTimeFromStart();

            EdkDll.EE_AffectivAlgo_t[] affAlgoList =
            {
                EdkDll.EE_AffectivAlgo_t.AFF_ENGAGEMENT_BOREDOM,
                EdkDll.EE_AffectivAlgo_t.AFF_EXCITEMENT,
                EdkDll.EE_AffectivAlgo_t.AFF_FRUSTRATION,
                EdkDll.EE_AffectivAlgo_t.AFF_MEDITATION,
            };

            Boolean[] isAffActiveList = new Boolean[affAlgoList.Length];

            Single longTermExcitementScore  = es.AffectivGetExcitementLongTermScore();
            Single shortTermExcitementScore = es.AffectivGetExcitementShortTermScore();

            for (int i = 0; i < affAlgoList.Length; ++i)
            {
                isAffActiveList[i] = es.AffectivIsActive(affAlgoList[i]);
            }

            Single meditationScore  = es.AffectivGetMeditationScore();
            Single frustrationScore = es.AffectivGetFrustrationScore();
            Single boredomScore     = es.AffectivGetEngagementBoredomScore();

            double rawScoreEc = 0, rawScoreMd = 0, rawScoreFt = 0, rawScoreEg = 0;
            double minScaleEc = 0, minScaleMd = 0, minScaleFt = 0, minScaleEg = 0;
            double maxScaleEc = 0, maxScaleMd = 0, maxScaleFt = 0, maxScaleEg = 0;
            double scaledScoreEc = 0, scaledScoreMd = 0, scaledScoreFt = 0, scaledScoreEg = 0;

            es.AffectivGetExcitementShortTermModelParams(out rawScoreEc, out minScaleEc, out maxScaleEc);
            if (minScaleEc != maxScaleEc)
            {
                if (rawScoreEc < minScaleEc)
                {
                    scaledScoreEc = 0;
                }
                else if (rawScoreEc > maxScaleEc)
                {
                    scaledScoreEc = 1;
                }
                else
                {
                    scaledScoreEc = (rawScoreEc - minScaleEc) / (maxScaleEc - minScaleEc);
                }
                Console.WriteLine("Affectiv Short Excitement: Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreEc, minScaleEc, maxScaleEc, scaledScoreEc);
            }

            es.AffectivGetEngagementBoredomModelParams(out rawScoreEg, out minScaleEg, out maxScaleEg);
            if (minScaleEg != maxScaleEg)
            {
                if (rawScoreEg < minScaleEg)
                {
                    scaledScoreEg = 0;
                }
                else if (rawScoreEg > maxScaleEg)
                {
                    scaledScoreEg = 1;
                }
                else
                {
                    scaledScoreEg = (rawScoreEg - minScaleEg) / (maxScaleEg - minScaleEg);
                }
                Console.WriteLine("Affectiv Engagement : Raw Score {0:f5}  Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreEg, minScaleEg, maxScaleEg, scaledScoreEg);
            }
            es.AffectivGetMeditationModelParams(out rawScoreMd, out minScaleMd, out maxScaleMd);
            if (minScaleMd != maxScaleMd)
            {
                if (rawScoreMd < minScaleMd)
                {
                    scaledScoreMd = 0;
                }
                else if (rawScoreMd > maxScaleMd)
                {
                    scaledScoreMd = 1;
                }
                else
                {
                    scaledScoreMd = (rawScoreMd - minScaleMd) / (maxScaleMd - minScaleMd);
                }
                Console.WriteLine("Affectiv Meditation : Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreMd, minScaleMd, maxScaleMd, scaledScoreMd);
            }
            es.AffectivGetFrustrationModelParams(out rawScoreFt, out minScaleFt, out maxScaleFt);
            if (maxScaleFt != minScaleFt)
            {
                if (rawScoreFt < minScaleFt)
                {
                    scaledScoreFt = 0;
                }
                else if (rawScoreFt > maxScaleFt)
                {
                    scaledScoreFt = 1;
                }
                else
                {
                    scaledScoreFt = (rawScoreFt - minScaleFt) / (maxScaleFt - minScaleFt);
                }
                Console.WriteLine("Affectiv Frustration : Raw Score {0:f5} Min Scale {1:f5} max Scale {2:f5} Scaled Score {3:f5}\n", rawScoreFt, minScaleFt, maxScaleFt, scaledScoreFt);
            }

            affLog.Write(
                "{0},{1},{2},{3},{4},{5},",
                timeFromStart,
                longTermExcitementScore, shortTermExcitementScore, meditationScore, frustrationScore, boredomScore);

            for (int i = 0; i < affAlgoList.Length; ++i)
            {
                affLog.Write("{0},", isAffActiveList[i]);
            }
            affLog.WriteLine("");
            affLog.Flush();
        }
Exemplo n.º 10
0
        //Update data
        void AffectivEmoStateUpdated()
        {
            if (FEmoState[0] != null)
            {
                EmoState es = FEmoState[0];

                Single timeFromStart = es.GetTimeFromStart();

                mLongTermExcitementScore  = es.AffectivGetExcitementLongTermScore();
                mShortTermExcitementScore = es.AffectivGetExcitementShortTermScore();
                for (int i = 0; i < mAffAlgoList.Length; ++i)
                {
                    mIsAffActiveList[i] = es.AffectivIsActive(mAffAlgoList[i]);
                }

                mMeditationScore  = es.AffectivGetMeditationScore();
                mFrustrationScore = es.AffectivGetFrustrationScore();
                mBoredomScore     = es.AffectivGetEngagementBoredomScore();

                es.AffectivGetExcitementShortTermModelParams(out mRawScoreEc, out mMinScaleEc, out mMaxScaleEc);
                if (mMinScaleEc != mMaxScaleEc)
                {
                    if (mRawScoreEc < mMinScaleEc)
                    {
                        mScaledScoreEc = 0;
                    }
                    else if (mRawScoreEc > mMaxScaleEc)
                    {
                        mScaledScoreEc = 1;
                    }
                    else
                    {
                        mScaledScoreEc = (mRawScoreEc - mMinScaleEc) / (mMaxScaleEc - mMinScaleEc);
                    }
                }

                es.AffectivGetEngagementBoredomModelParams(out mRawScoreEg, out mMinScaleEg, out mMaxScaleEg);
                if (mMinScaleEg != mMaxScaleEg)
                {
                    if (mRawScoreEg < mMinScaleEg)
                    {
                        mScaledScoreEg = 0;
                    }
                    else if (mRawScoreEg > mMaxScaleEg)
                    {
                        mScaledScoreEg = 1;
                    }
                    else
                    {
                        mScaledScoreEg = (mRawScoreEg - mMinScaleEg) / (mMaxScaleEg - mMinScaleEg);
                    }
                }
                es.AffectivGetMeditationModelParams(out mRawScoreMd, out mMinScaleMd, out mMaxScaleMd);
                if (mMinScaleMd != mMaxScaleMd)
                {
                    if (mRawScoreMd < mMinScaleMd)
                    {
                        mScaledScoreMd = 0;
                    }
                    else if (mRawScoreMd > mMaxScaleMd)
                    {
                        mScaledScoreMd = 1;
                    }
                    else
                    {
                        mScaledScoreMd = (mRawScoreMd - mMinScaleMd) / (mMaxScaleMd - mMinScaleMd);
                    }
                }
                es.AffectivGetFrustrationModelParams(out mRawScoreFt, out mMinScaleFt, out mMaxScaleFt);
                if (mMaxScaleFt != mMinScaleFt)
                {
                    if (mRawScoreFt < mMinScaleFt)
                    {
                        mScaledScoreFt = 0;
                    }
                    else if (mRawScoreFt > mMaxScaleFt)
                    {
                        mScaledScoreFt = 1;
                    }
                    else
                    {
                        mScaledScoreFt = (mRawScoreFt - mMinScaleFt) / (mMaxScaleFt - mMinScaleFt);
                    }
                }
            }
        }