-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathBasicFilterCHOP.h
More file actions
58 lines (44 loc) · 2.03 KB
/
BasicFilterCHOP.h
File metadata and controls
58 lines (44 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* Shared Use License: This file is owned by Derivative Inc. (Derivative)
* and can only be used, and/or modified for use, in conjunction with
* Derivative's TouchDesigner software, and only if you are a licensee who has
* accepted Derivative's TouchDesigner license or assignment agreement
* (which also govern the use of this file). You may share or redistribute
* a modified version of this file provided the following conditions are met:
*
* 1. The shared file or redistribution must retain the information set out
* above and this list of conditions.
* 2. Derivative's name (Derivative Inc.) or its trademarks may not be used
* to endorse or promote products derived from this file without specific
* prior written permission from Derivative.
*/
#ifndef __BasicFilterCHOP__
#define __BasicFilterCHOP__
#include "CHOP_CPlusPlusBase.h"
#include "Parameters.h"
using namespace TD;
/*
This example implements a CHOP which takes the following parameters:
- Apply Scale: If On, scale values.
- Scale: A scalar by which the output signal is scaled.
- Apply Offset: If On, offset values.
- Offset: A scalar by which the output is offsetted.
The output values are: scale*(channel) + offset
This CHOP is a filter and it takes exactly one input.
*/
// Check methods [getNumInfoCHOPChans, getInfoCHOPChan, getInfoDATSize, getInfoDATEntries]
// if you want to output values to the Info CHOP/DAT
// To get more help about these functions, look at CHOP_CPlusPlusBase.h
class BasicFilterCHOP : public CHOP_CPlusPlusBase
{
public:
BasicFilterCHOP(const OP_NodeInfo* info);
virtual ~BasicFilterCHOP();
virtual void getGeneralInfo(CHOP_GeneralInfo*, const TD::OP_Inputs*, void*) override;
virtual bool getOutputInfo(CHOP_OutputInfo*, const TD::OP_Inputs*, void*) override;
virtual void getChannelName(int32_t index, OP_String *name, const TD::OP_Inputs*, void*) override;
virtual void execute(CHOP_Output*, const TD::OP_Inputs*, void*) override;
virtual void setupParameters(TD::OP_ParameterManager* manager, void*) override;
private:
Parameters myParms;
};
#endif