Just Intonation  Version 1.3.0 (18)
Explore scale-independent dynamically adapting tuning in just intonation
tunerkeydata.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2016-2017 Karolin Stange, Christoph Wick, and Haye Hinrichsen
3  *
4  * This file is part of JustIntonation.
5  *
6  * JustIntonation is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * JustIntonation is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with JustIntonation. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 #ifndef TUNERKEYDATA_H
21 #define TUNERKEYDATA_H
22 
23 #include <QVector>
24 
31 
33 {
34  int key; // number of the key
35  bool pressed; // flag indicating a pressed key
36  bool newlyPressed; // flag indicating a newly pressed key
37  bool emitted; // flag indicating first emission
38  double intensity; // intensity of the keypress
39  double memory; // flag for psychoacoustic memory
40  double sustainDampingFactor; // sustain damping of the key
41  double releaseDampingFactor; // release damping of the key
42  qint64 timeStamp; // time when the key was pressed
43  double pitch; // actual pitch
44  double previousPitch; // previously emitted pitch
45 
46  TunerKeyData() { clear(); }
47 
49  void clear()
50  {
51  key=0;
52  pressed = newlyPressed = emitted = false;
53  intensity = memory = pitch = previousPitch = 0;
54  sustainDampingFactor = 1;
55  releaseDampingFactor = 0;
56  timeStamp = 0;
57  }
58 };
59 
60 using KeyData = QVector<TunerKeyData>;
61 
62 #endif // TUNERKEYDATA_H
qint64 timeStamp
Definition: tunerkeydata.h:42
double previousPitch
Definition: tunerkeydata.h:44
double sustainDampingFactor
Definition: tunerkeydata.h:40
double pitch
Definition: tunerkeydata.h:43
double memory
Definition: tunerkeydata.h:39
QVector< TunerKeyData > KeyData
Definition: tunerkeydata.h:60
double releaseDampingFactor
Definition: tunerkeydata.h:41
TunerKeyData()
Constructor.
Definition: tunerkeydata.h:46
void clear()
Function for clearing all fields in the TunerKeyData structure.
Definition: tunerkeydata.h:49
bool newlyPressed
Definition: tunerkeydata.h:36
Structure holding the tuner&#39;s data of a single key.
Definition: tunerkeydata.h:32
double intensity
Definition: tunerkeydata.h:38