Exemple #1
0
        public TimeDisplayWaterfall(Graph g) : base("Waterfall", g)
        {
            _port = new InputPortDataFFT(this, "In");

            _attrDbMax      = new AttributeValueDouble(this, "dB max", "dB");
            _attrDbMin      = new AttributeValueDouble(this, "dB min", "dB");
            _attrTimeWindow = new AttributeValueInt(this, "Window Length", "ms");

            _attrDbMin.Changed += (s, e) => {
                if (_attrDbMin.TypedGet() >= _attrDbMax.TypedGet())
                {
                    _attrDbMin.Set(_attrDbMax.TypedGet() - 0.0001);
                }
                if (_wnd != null)
                {
                    _wnd.DbMin = (float)_attrDbMin.TypedGet();
                }
            };

            _attrDbMax.Changed += (s, e) => {
                if (_attrDbMax.TypedGet() <= _attrDbMin.TypedGet())
                {
                    _attrDbMax.Set(_attrDbMin.TypedGet() + 0.0001);
                }
                if (_wnd != null)
                {
                    _wnd.DbMax = (float)_attrDbMax.TypedGet();
                }
            };

            _attrTimeWindow.Changed += (s, e) => {
                UpdateWindowSettings();
            };
            _attrTimeWindow.SetRuntimeReadonly();
        }
Exemple #2
0
 private static void LoadFftInputBuffer(NodeState from, InputPortDataFFT to)
 {
     if (to.Queue != null)
     {
         to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]);
     }
 }
Exemple #3
0
 private static void SaveDataInputBuffer(InputPortDataFFT p, NodeState to)
 {
     if (p.Queue != null)
     {
         to.WriteValue(to.PortValues, p.Name, p.Queue.GetState());
     }
 }
Exemple #4
0
 public TimeFourierDisplay(Graph g) : base("Time Fourier Display", g)
 {
     _port = new InputPortDataFFT(this, "In");
 }