Pd++
0.01
A pure C++ implementation of Pure Data objects
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pd++Classes
Line.h
1
/*
2
Line.cpp
3
Pd++
4
5
Created by Robert Esler on 10/28/14.
6
Copyright (c) 2014 Robert Esler. All rights reserved.
7
8
Some of the code in Pd++ is Copyright (c) 1997-1999 Miller Puckette.
9
For information on usage and redistribution, and for a DISCLAIMER OF ALL
10
WARRANTIES, see the file, "LICENSE.txt," in this distribution.
11
*/
12
13
#ifndef __Pd____Line__
14
#define __Pd____Line__
15
16
#include <stdio.h>
17
#include <string>
18
#include "PdMaster.h"
19
20
namespace
pd
{
21
22
/*! \brief A ramp generator.
23
24
Line ramps up or down to a value in the time increment specified.
25
This is the Pd version. For another version see myLine.cpp
26
27
*/
28
29
class
Line
:
public
PdMaster
{
30
31
private
:
32
typedef
struct
_line
33
{
34
double
x_target;
/* target value of ramp */
35
double
x_value;
/* current value of ramp at block-borders */
36
double
x_biginc;
37
double
x_inc;
38
double
x_1overn;
39
double
x_dspticktomsec;
40
double
x_inletvalue;
41
double
x_inletwas;
42
int
x_ticksleft;
43
int
x_retarget;
44
} t_line;
45
46
t_line *x =
new
t_line;
47
double
previousTarget = 0;
48
double
previousTime = 0;
49
50
public
:
51
Line
();
52
~
Line
();
53
double
perform(
double
target,
double
time);
54
void
set(
double
target,
double
time);
55
void
stop();
56
57
std::string pdName =
"line~"
;
58
59
};
60
61
}
// pd namespace
62
#endif
/* defined(__Pd____Line__) */
pd
The Pd++ namespace.
Definition:
BandPass.cpp:14
PdMaster
A super class inherited by all Pd++ objects.
Definition:
PdMaster.h:62
pd::Line
A ramp generator.
Definition:
Line.h:29
Generated on Tue Nov 22 2016 14:30:53 for Pd++ by
1.8.8