Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
myLine.h
1 /*
2  myLine.h
3  Pd++
4 
5  Created by Robert Esler on 10/28/14.
6  Copyright (c) 2014 Robert Esler. All rights reserved.
7 */
8 
9 
10 
11 #ifndef __Pd____myLine__
12 #define __Pd____myLine__
13 
14 #include <stdio.h>
15 #include "PdMaster.h"
16 #include <string>
17 
18 namespace rwe {
19  /*! \brief Generates a ramp over a specified time.
20 
21  My line takes a starting value, ending value and a time length
22  to generate a ramp from start to end. The time increment is
23  based on the sample rate. The function stop() and start()
24  can be used to begin and end the ramp.
25  */
26 class myLine : public PdMaster {
27 
28  private:
29  double startingValue;
30  double endingValue;
31  double time;
32  bool isStopped = false; //starts ON
33  long sampleCounter = 0;
34  double valueIncrementor = 0;
35 
36 
37  public:
38  myLine();
39  ~myLine();
40  double perform(double arg1, double arg2, double arg3);
41  void stop();
42  void start();
43 
44 };
45 
46 
47 } // rwe namespace
48 
49 
50 #endif /* defined(__Pd____myLine__) */
A super class inherited by all Pd++ objects.
Definition: PdMaster.h:62
Personal namespace. Use intials for your own classes.
Definition: CosineWave.cpp:18
Generates a ramp over a specified time.
Definition: myLine.h:26