~ubuntu-branches/ubuntu/vivid/aeolus/vivid

« back to all changes in this revision

Viewing changes to source/scales.cc

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-19 19:12:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100419191251-hgarjfcdfl7c0ryl
Tags: 0.8.4-3
debian/patches/01-makefile.patch: Drop -march=native flag, it isn't valid
for Debian packages as the results are unpredictable, thanks to
Bastian Blank for reporting this (Closes: #578278).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2003-2010 Fons Adriaensen <fons@kokkinizita.net>
 
3
    
 
4
  This program is free software; you can redistribute it and/or modify
 
5
  it under the terms of the GNU General Public License as published by
 
6
  the Free Software Foundation; either version 2 of the License, or
 
7
  (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public License
 
15
  along with this program; if not, write to the Free Software
 
16
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
*/
 
18
 
 
19
 
 
20
#include "scales.h"
 
21
 
 
22
 
 
23
// Pythagorean
 
24
 
 
25
float scale_pythagorean [12] =
 
26
{
 
27
    1.00000000,
 
28
    1.06787109,
 
29
    1.12500000,
 
30
    1.18518519,
 
31
    1.26562500,
 
32
    1.33333333,
 
33
    1.42382812,
 
34
    1.50000000,
 
35
    1.60180664,
 
36
    1.68750000,
 
37
    1.77777778,
 
38
    1.89843750,
 
39
};
 
40
 
 
41
 
 
42
// 1/4 comma meantone (Pietro Aaron, 1523)
 
43
 
 
44
float scale_meanquart [12] = 
 
45
{
 
46
    1.0000000,
 
47
    1.0449067,
 
48
    1.1180340,
 
49
    1.1962790,
 
50
    1.2500000,
 
51
    1.3374806,
 
52
    1.3975425,
 
53
    1.4953488,
 
54
    1.5625000,
 
55
    1.6718508,
 
56
    1.7888544,
 
57
    1.8691860
 
58
};
 
59
 
 
60
 
 
61
// Andreas Werckmeister III, 1681
 
62
 
 
63
float scale_werckm3 [12] = 
 
64
{
 
65
    1.00000000,
 
66
    1.05349794,
 
67
    1.11740331,
 
68
    1.18518519,
 
69
    1.25282725,
 
70
    1.33333333,
 
71
    1.40466392,
 
72
    1.49492696,
 
73
    1.58024691,
 
74
    1.67043633,
 
75
    1.77777778,
 
76
    1.87924088
 
77
};
 
78
 
 
79
 
 
80
// Kirnberger III
 
81
 
 
82
float scale_kirnberg3 [12] = 
 
83
{
 
84
    1.00000000,
 
85
    1.05349794,
 
86
    1.11848107,
 
87
    1.18518519,
 
88
    1.25000021,
 
89
    1.33333333,
 
90
    1.40625000,
 
91
    1.49542183,
 
92
    1.58024691,
 
93
    1.67176840,
 
94
    1.77777778,
 
95
    1.87500000
 
96
};
 
97
 
 
98
 
 
99
// Well-tempered (Jacob Breetvelt)
 
100
 
 
101
float scale_welltemp [12] =
 
102
{
 
103
    1.00000000,
 
104
    1.05468828,
 
105
    1.12246205,
 
106
    1.18652432,
 
107
    1.25282725,
 
108
    1.33483985,
 
109
    1.40606829,
 
110
    1.49830708,
 
111
    1.58203242,
 
112
    1.67705161,
 
113
    1.77978647,
 
114
    1.87711994
 
115
};
 
116
 
 
117
 
 
118
// Equally Tempered
 
119
 
 
120
float scale_equaltemp [12] =
 
121
{
 
122
    1.00000000,
 
123
    1.05946309,
 
124
    1.12246205,
 
125
    1.18920712,
 
126
    1.25992105,
 
127
    1.33483985,
 
128
    1.41421356,
 
129
    1.49830708,
 
130
    1.58740105,
 
131
    1.68179283,
 
132
    1.78179744,
 
133
    1.88774863,
 
134
};
 
135
 
 
136
 
 
137
// The following five were contributed by Hanno Hoffstadt.
 
138
// The Lehman temperament was also provided by Adam Sampson.
 
139
 
 
140
// Vogel/Ahrend
 
141
 
 
142
float scale_ahrend [12] =
 
143
{
 
144
    1.00000000,
 
145
    1.05064661,
 
146
    1.11891853,
 
147
    1.18518519,
 
148
    1.25197868,
 
149
    1.33695184,
 
150
    1.40086215,
 
151
    1.49594019,
 
152
    1.57596992,
 
153
    1.67383521,
 
154
    1.78260246,
 
155
    1.87288523,
 
156
};
 
157
 
 
158
 
 
159
// Vallotti
 
160
 
 
161
float scale_vallotti [12] =
 
162
{
 
163
    1.00000000,
 
164
    1.05647631,
 
165
    1.12035146,
 
166
    1.18808855,
 
167
    1.25518740,
 
168
    1.33609659,
 
169
    1.40890022,
 
170
    1.49689777,
 
171
    1.58441623,
 
172
    1.67705160,
 
173
    1.78179744,
 
174
    1.87888722,
 
175
};
 
176
 
 
177
 
 
178
// Kellner
 
179
 
 
180
float scale_kellner [12] =
 
181
{
 
182
    1.00000000,
 
183
    1.05349794,
 
184
    1.11891853,
 
185
    1.18518519,
 
186
    1.25197868,
 
187
    1.33333333,
 
188
    1.40466392,
 
189
    1.49594019,
 
190
    1.58024691,
 
191
    1.67383521,
 
192
    1.77777778,
 
193
    1.87796802,
 
194
};
 
195
 
 
196
 
 
197
// Lehman
 
198
 
 
199
float scale_lehman [12] =
 
200
{
 
201
    1.00000000,
 
202
    1.05826737,
 
203
    1.11992982,
 
204
    1.18786496,
 
205
    1.25424281,
 
206
    1.33634808,
 
207
    1.41102316,
 
208
    1.49661606,
 
209
    1.58560949,
 
210
    1.67610496,
 
211
    1.77978647,
 
212
    1.88136421,
 
213
};
 
214
 
 
215
// Pythagorean
 
216
 
 
217
float scale_pure_cfg [12] =
 
218
{
 
219
    1.00000000,
 
220
    1.04166667,
 
221
    1.12500000,
 
222
    1.1892,
 
223
    1.25000000,
 
224
    1.33333333,
 
225
    1.40625000,
 
226
    1.50000000,
 
227
    1.5874,
 
228
    1.66666667,
 
229
    1.77777778,
 
230
    1.87500000,
 
231
};
 
232
 
 
233
 
 
234
 
 
235
struct temper scales [NSCALES] =
 
236
{
 
237
    { "Pythagorean", "pyt", scale_pythagorean },
 
238
    { "Meantone 1/4", "mtq", scale_meanquart },
 
239
    { "Werckmeister III", "we3", scale_werckm3 },
 
240
    { "Kirnberger III", "ki3", scale_kirnberg3 },
 
241
    { "Well Tempered", "wt",  scale_welltemp },
 
242
    { "Equally Tempered", "et", scale_equaltemp },
 
243
    { "Vogel/Ahrend", "ahr", scale_ahrend },
 
244
    { "Vallotti", "val", scale_vallotti },
 
245
    { "Kellner", "kel", scale_kellner },
 
246
    { "Lehman", "leh", scale_lehman },
 
247
    { "Pure C/F/G", "cfg", scale_pure_cfg },
 
248
};
 
249