Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SampleHold.h
1 //
2 /*
3  SampleHold.h
4  Pd++
5 
6  Created by Robert Esler on 11/3/14.
7  Copyright (c) 2014 Robert Esler. All rights reserved.
8 
9  Some of the code in Pd++ is Copyright (c) 1997-1999 Miller Puckette.
10  For information on usage and redistribution, and for a DISCLAIMER OF ALL
11  WARRANTIES, see the file, "LICENSE.txt," in this distribution.
12 */
13 
14 #ifndef __Pd____SampleHold__
15 #define __Pd____SampleHold__
16 
17 #include <string>
18 #include "PdMaster.h"
19 
20 namespace pd {
21 /*!
22  \class SampleHold
23  \brief Sample and Hold a number until the control input decreases in value.
24 
25 */
26 class SampleHold : public PdMaster {
27 
28 private:
29  double lastIn;
30  double lastOut;
31 
32 public:
33 
34  SampleHold();
35  ~SampleHold();
36  double perform(double input, double control);
37  void reset(double value);
38  void set(double value);
39 
40  std::string pdName = "samphold~";
41 
42 };
43 
44 } // pd namespace
45 #endif /* defined(__Pd____SampleHold__) */
The Pd++ namespace.
Definition: BandPass.cpp:14
A super class inherited by all Pd++ objects.
Definition: PdMaster.h:62
Sample and Hold a number until the control input decreases in value.
Definition: SampleHold.h:26
void set(double value)
Definition: SampleHold.cpp:51
void reset(double value)
Definition: SampleHold.cpp:46