MusicKit
0.0.0
|
00001 /* 00002 $Id$ 00003 Defined In: The MusicKit 00004 HEADER FILES: MusicKit.h 00005 00006 Description: 00007 See the Headerdoc description below. 00008 00009 Original Author: David A. Jaffe 00010 00011 Copyright (c) 1988-1992, NeXT Computer, Inc. 00012 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00013 Portions Copyright (c) 1994 Stanford University 00014 Portions Copyright (c) 1999-2004, The MusicKit Project. 00015 */ 00061 #ifndef __MK_TuningSystem_H___ 00062 #define __MK_TuningSystem_H___ 00063 00064 #import <Foundation/NSObject.h> 00065 00066 #import "keynums.h" 00067 00068 @interface MKTuningSystem : NSObject 00069 { 00071 NSMutableArray *frequencies; 00072 } 00073 00080 + (MKTuningSystem *) tuningSystem; 00081 00086 - init; 00087 00092 - copyWithZone: (NSZone *) zone; 00093 00097 - (void) setTo12ToneTempered; 00098 00107 - install; 00108 00113 - (int) keyCount; 00114 00126 + (NSString *) pitchNameForKeyNum: (int) keyNum; 00127 00142 + (double) freqForKeyNum: (MKKeyNum) aKeyNum; 00143 00157 - (double) freqForKeyNum: (MKKeyNum) aKeyNum; 00158 00185 + (MKKeyNum) keyNumForFreq: (double) freq 00186 pitchBentBy: (int *) bendPtr 00187 bendSensitivity: (double) sensitivity; 00188 00199 - setKeyNum: (MKKeyNum) aKeyNum toFreq: (double) freq; 00200 00216 + setKeyNum: (MKKeyNum) aKeyNum toFreq: (double) freq; 00217 00228 - setKeyNumAndOctaves: (MKKeyNum) aKeyNum toFreq: (double) freq; 00229 00246 + setKeyNumAndOctaves: (MKKeyNum) aKeyNum toFreq: (double) freq; 00247 00259 + (void) transpose: (double) semitones; 00260 00261 #if 0 00262 /* some versions of gcc can't deal properly with class methods that have 00263 * the same name as instance methods in other classes. So I have renamed 00264 * this one because of a conflict with NSResponder:-transpose 00265 */ 00266 + (void)_transpose:(double)semitones; 00267 #endif 00268 00280 - (void) transpose: (double) semitones; 00281 00285 + (int) findPitchVar: (id) aVar; 00286 00287 @end 00288 00289 /* Functions for tuning and frequency conversion */ 00290 00309 double MKTranspose(double freq, double semiTonesUp); 00310 00326 double MKAdjustFreqWithPitchBend(double freq, int pitchBend, double sensitivity); 00327 00328 #endif