MuseScore  3.4
Music composition and notation
interval.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2010-2011 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __INTERVAL_H__
14 #define __INTERVAL_H__
15 
16 namespace Ms {
17 
18 //---------------------------------------------------------
19 // Interval
20 //---------------------------------------------------------
21 
22 struct Interval {
23  signed char diatonic;
24  signed char chromatic;
25 
26  Interval();
27  Interval(int a, int b);
28  Interval(int _chromatic);
29  void flip();
30  bool isZero() const;
31  bool operator!=(const Interval& a) const { return diatonic != a.diatonic || chromatic != a.chromatic; }
32  bool operator==(const Interval& a) const { return diatonic == a.diatonic && chromatic == a.chromatic; }
33  };
34 
35 
36 } // namespace Ms
37 #endif
38 
void flip()
Definition: interval.cpp:42
signed char chromatic
Definition: interval.h:24
bool isZero() const
Definition: interval.cpp:52
bool operator!=(const Interval &a) const
Definition: interval.h:31
Interval()
Definition: interval.cpp:22
Definition: interval.h:22
Definition: aeolus.cpp:26
signed char diatonic
Definition: interval.h:23
bool operator==(const Interval &a) const
Definition: interval.h:32