}         // ColorOrganBand(template)

        /// <summary>
        /// Wrap the frequency bands in an object that is linked to the color organ band
        /// </summary>
        /// <param name="frequencyBands"></param>
        private void buildMapOfFrequencyBands(bool defaultState)
        {
            m_energyPeak   = Double.MinValue;
            m_energyMin    = Double.MaxValue;
            m_energySumAvg = 0.0;
            m_energyCount  = 0;

            // convert the list of frequency bands into a map of frequency bands
            foreach (var frequencyBand in m_frequencyBands)
            {
                // create a color organ frequency band
                ColorOrganFrequencyBand coFrequencyBand = new ColorOrganFrequencyBand(frequencyBand.Value, defaultState);

                // add the frequency band to the dictionary
                m_mapOfFrequencyBands.Add(frequencyBand.Value.CenterFrequency, coFrequencyBand);
                if (true == defaultState)
                {
                    // ignore empty time slots
                    if (0.0 < frequencyBand.Value.Avg)
                    {
                        m_energySumAvg += frequencyBand.Value.Avg;
                        m_energyPeak    = Math.Max(m_energyPeak, frequencyBand.Value.Peak);
                        m_energyMin     = Math.Min(m_energyMin, frequencyBand.Value.Min);
                        m_energyCount++;
                    } // end process non zero time slot
                }     // end if this frequency is part of this band
            }         // end convert frequency band list into a dictionary
        }             // buildMapOfFrequencyBands
        }         // colorOrganFrequencyBand

        /// <summary>
        /// Copy constructuor: init the Color Organ wrapper around a frequency band
        /// </summary>
        /// <param name="template"></param>
        public ColorOrganFrequencyBand(ColorOrganFrequencyBand template)
        {
            // save the frequency band
            m_frequencyBand = template.m_frequencyBand;

            // set the group membership flag
            m_member = template.m_member;
        }         // colorOrganFrequencyBand