Open Ephys GUI
 All Classes Functions Variables Pages
EventNode.h
1 /*
2  ------------------------------------------------------------------
3 
4  This file is part of the Open Ephys GUI
5  Copyright (C) 2012 Open Ephys
6 
7  ------------------------------------------------------------------
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #ifndef __EVENTNODE_H_9B67A789__
25 #define __EVENTNODE_H_9B67A789__
26 
27 #include "../../JuceLibraryCode/JuceHeader.h"
28 #include "GenericProcessor.h"
29 #include "Editors/EventNodeEditor.h"
30 
31 /**
32 
33  Generates events at regular intervals.
34 
35  @see GenericProcessor, EventNodeEditor
36 
37 */
38 
40 
41 {
42 public:
43 
44  EventNode();
45  ~EventNode();
46 
47  void process(AudioSampleBuffer &buffer, MidiBuffer &midiMessages, int& nSamples);
48  //void setParameter (int parameterIndex, float newValue);
49 
50  bool isSource() {return true;}
51 
52  int getDefaultNumOutputs() {return 0;}
53 
54  void updateSettings();
55 
56  AudioProcessorEditor* createEditor();
57 
58 private:
59 
60  float accumulator;
61  float Hz;
62 
63  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EventNode);
64 
65 };
66 
67 
68 
69 
70 
71 
72 #endif // __EVENTNODE_H_9B67A789__