3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
|
* Copyright (C) 2005 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
56 |
* (assuming equal tempered scale of course, divided into 12 |
* (assuming equal tempered scale of course, divided into 12 |
57 |
* semitones per octave and 100 cents per semitone). |
* semitones per octave and 100 cents per semitone). |
58 |
* |
* |
59 |
* Note: MAX_PITCH (defined in global.h) has to be defined to an |
* Note: CONFIG_MAX_PITCH (defined in config.h) has to be defined to an |
60 |
* appropriate value, otherwise the behavior of this function is |
* appropriate value, otherwise the behavior of this function is |
61 |
* undefined, but most probably if MAX_PITCH is too small, the |
* undefined, but most probably if CONFIG_MAX_PITCH is too small, the |
62 |
* application will crash due to segmentation fault here. |
* application will crash due to segmentation fault here. |
63 |
* |
* |
64 |
* @param cents - pitch value in cents (+1200 cents means +1 octave) |
* @param cents - pitch value in cents (+1200 cents means +1 octave) |
71 |
} |
} |
72 |
|
|
73 |
private: |
private: |
74 |
static float CentsToFreqTable[MAX_PITCH * 1200 * 2 + 1]; |
static float CentsToFreqTable[CONFIG_MAX_PITCH * 1200 * 2 + 1]; |
75 |
static float* pCentsToFreqTable; |
static float* pCentsToFreqTable; |
76 |
|
|
77 |
static float* InitCentsToFreqTable(); |
static float* InitCentsToFreqTable(); |