Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Metro.h
1 /*
2  Metro.cpp
3  Pd++
4 
5  Created by Robert Esler on 10/29/14.
6  Copyright (c) 2014 Robert Esler. All rights reserved.
7  */
8 
9 #ifndef __Pd____Metro__
10 #define __Pd____Metro__
11 
12 #include <stdio.h>
13 #include "PdMaster.h"
14 
15 namespace rwe {
16 
17 /*! \brief A simple metronome that accepts milliseconds and beats per minute.
18 
19  Metro in its default state is set to a millisecond delay. You can set the
20  function setBPM(bool) to true if you would rather use bpm as your argument
21  value.
22 
23 */
24 
25 class Metro : public PdMaster {
26 
27 private:
28 
29  double metroCounter = 0;
30  bool bpmIsSet = false;
31 
32 public:
33 
34  Metro();
35  ~Metro();
36  bool perform(double time);
37  void setBPM(bool );
38  bool getBPM() {return bpmIsSet;};
39 };
40 
41 } // rwe namespace
42 #endif /* defined(__Pd____Metro__) */
A super class inherited by all Pd++ objects.
Definition: PdMaster.h:62
Personal namespace. Use intials for your own classes.
Definition: CosineWave.cpp:18
A simple metronome that accepts milliseconds and beats per minute.
Definition: Metro.h:25