• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

GUIDOPianoRoll.h

Go to the documentation of this file.
00001 #ifndef GUIDOPianoRollAPI_H
00002 #define GUIDOPianoRollAPI_H
00003 
00004 /*
00005   GUIDO Library
00006   Copyright (C) 2014 Grame
00007 
00008   This Source Code Form is subject to the terms of the Mozilla Public
00009   License, v. 2.0. If a copy of the MPL was not distributed with this
00010   file, You can obtain one at http://mozilla.org/MPL/2.0/.
00011 
00012   Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
00013   research@grame.fr
00014 
00015 */
00016 
00017 #include "GUIDOEngine.h"
00018 #include "GUIDOExport.h"
00019 #include "GUIDOScoreMap.h"
00020 
00021 class PianoRoll;
00022 
00025 enum PianoRollType {
00026     kSimplePianoRoll,
00027     kTrajectoryPianoRoll
00028 };
00029 
00032 const int kCLine      =  1;
00033 const int kCSharpLine =  1<<1;
00034 const int kDLine      =  1<<2;
00035 const int kDSharpLine =  1<<3;
00036 const int kELine      =  1<<4;
00037 const int kFLine      =  1<<5;
00038 const int kFSharpLine =  1<<6;
00039 const int kGLine      =  1<<7;
00040 const int kGSharpLine =  1<<8;
00041 const int kALine      =  1<<9;
00042 const int kASharpLine =  1<<10;
00043 const int kBLine      =  1<<11;
00044 const int kAutoLines  =  0;
00045 const int kNoLine     = -1;
00046 
00047 typedef struct LimitParams {
00048     GuidoDate startDate;
00049     GuidoDate endDate;
00050     int       lowPitch;
00051     int       highPitch;
00052 } LimitParams;
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00063     //---------------------------------------------------------------------------
00064     // the new API
00065     //---------------------------------------------------------------------------
00066 
00075     GUIDOAPI(PianoRoll *)  GuidoAR2PianoRoll(PianoRollType type, ARHandler arh);
00076     
00085     GUIDOAPI(PianoRoll *)  GuidoMidi2PianoRoll(PianoRollType type, const char *midiFileName);
00086 
00092     GUIDOAPI(GuidoErrCode)      GuidoDestroyPianoRoll(PianoRoll *pr);
00093 
00105     GUIDOAPI(GuidoErrCode)      GuidoPianoRollSetLimits(PianoRoll *pr, LimitParams limitParams);
00106 
00113     GUIDOAPI(GuidoErrCode)      GuidoPianoRollEnableKeyboard(PianoRoll *pr, bool enabled);
00114     
00122     GUIDOAPI(GuidoErrCode)      GuidoPianoRollGetKeyboardWidth(PianoRoll *pr, int height, float &keyboardWidth);
00123 
00132     GUIDOAPI(GuidoErrCode)      GuidoPianoRollEnableAutoVoicesColoration(PianoRoll *pr, bool enabled);
00133 
00144     GUIDOAPI(GuidoErrCode)      GuidoPianoRollSetRGBColorToVoice(PianoRoll *pr, int voiceNum, int r, int g, int b, int a);
00145 
00153     GUIDOAPI(GuidoErrCode)      GuidoPianoRollSetHtmlColorToVoice(PianoRoll *pr, int voiceNum, long color);
00154     
00161     GUIDOAPI(GuidoErrCode)      GuidoPianoRollEnableMeasureBars(PianoRoll *pr, bool enabled);
00162     
00172     GUIDOAPI(GuidoErrCode)      GuidoPianoRollSetPitchLinesDisplayMode(PianoRoll *pr, int mode);
00173 
00181     GUIDOAPI(GuidoErrCode)      GuidoPianoRollGetMap(PianoRoll *pr, int width, int height, Time2GraphicMap &outmap);
00182 
00191     GUIDOAPI(GuidoErrCode)      GuidoPianoRollOnDraw(PianoRoll *pr, int width, int height, VGDevice* dev);
00192 
00196 #ifdef __cplusplus
00197 }
00198 #endif
00199 
00200 #endif  /* GUIDOPianoRollAPI_H */

Generated on Mon Jan 5 2015 11:16:24 for GUIDOLib by doxygen 1.7.2 - © Grame Research Lab.