From d5e32167ea73b121a0438dbb4ef94dc9b90ca4b4 Mon Sep 17 00:00:00 2001 From: Camilowser Date: Sat, 14 Sep 2024 19:27:38 -0300 Subject: [PATCH 1/6] added scales --- projects/lgpt64.xcodeproj/project.pbxproj | 6 + sources/Application/Model/Project.cpp | 13 ++ sources/Application/Model/Project.h | 2 + sources/Application/Model/Scale.cpp | 199 ++++++++++++++++++++++ sources/Application/Model/Scale.h | 11 ++ sources/Application/Views/PhraseView.cpp | 23 +++ sources/Application/Views/ProjectView.cpp | 16 +- sources/Foundation/Variables/Variable.cpp | 10 ++ sources/Foundation/Variables/Variable.h | 1 + 9 files changed, 279 insertions(+), 2 deletions(-) create mode 100644 sources/Application/Model/Scale.cpp create mode 100644 sources/Application/Model/Scale.h diff --git a/projects/lgpt64.xcodeproj/project.pbxproj b/projects/lgpt64.xcodeproj/project.pbxproj index 442b1c74..d84a10a6 100644 --- a/projects/lgpt64.xcodeproj/project.pbxproj +++ b/projects/lgpt64.xcodeproj/project.pbxproj @@ -167,6 +167,7 @@ A95153FD2C88A4E70060FA44 /* SDLTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A95153FB2C88A4E60060FA44 /* SDLTimer.cpp */; }; A95154012C88A6670060FA44 /* MacOSmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A95153FE2C88A6670060FA44 /* MacOSmain.cpp */; }; A95154052C88A6720060FA44 /* MacOSSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A95154042C88A6720060FA44 /* MacOSSystem.cpp */; }; + A9A67DC42C9629AF00E923CD /* Scale.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9A67DC32C9629AF00E923CD /* Scale.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -512,6 +513,8 @@ A95153FE2C88A6670060FA44 /* MacOSmain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MacOSmain.cpp; path = ../MacOS/MacOSMain/MacOSmain.cpp; sourceTree = ""; }; A95154032C88A6720060FA44 /* MacOSSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MacOSSystem.h; path = ../../MacOS/MacOSSystem/MacOSSystem.h; sourceTree = ""; }; A95154042C88A6720060FA44 /* MacOSSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MacOSSystem.cpp; path = ../../MacOS/MacOSSystem/MacOSSystem.cpp; sourceTree = ""; }; + A9A67DC22C9629AF00E923CD /* Scale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scale.h; sourceTree = ""; }; + A9A67DC32C9629AF00E923CD /* Scale.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scale.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -758,6 +761,8 @@ 737D11A20BCE66F000099CB3 /* Model */ = { isa = PBXGroup; children = ( + A9A67DC32C9629AF00E923CD /* Scale.cpp */, + A9A67DC22C9629AF00E923CD /* Scale.h */, 87CA0EA80F7E1160001D6BD0 /* Mixer.cpp */, 87CA0EA90F7E1160001D6BD0 /* Mixer.h */, 73A640190D3CF90A00F43955 /* Groove.cpp */, @@ -1496,6 +1501,7 @@ 737D128D0BCE66F000099CB3 /* UIController.cpp in Sources */, 737D128E0BCE66F000099CB3 /* ViewData.cpp in Sources */, 737D12900BCE66F000099CB3 /* Observable.cpp in Sources */, + A9A67DC42C9629AF00E923CD /* Scale.cpp in Sources */, 737D12940BCE66F000099CB3 /* Service.cpp in Sources */, 737D12950BCE66F000099CB3 /* ServiceRegistry.cpp in Sources */, 737D12960BCE66F000099CB3 /* SubService.cpp in Sources */, diff --git a/sources/Application/Model/Project.cpp b/sources/Application/Model/Project.cpp index cee834ac..0d0111ac 100644 --- a/sources/Application/Model/Project.cpp +++ b/sources/Application/Model/Project.cpp @@ -5,6 +5,7 @@ #include "System/io/Status.h" #include "Foundation/Variables/WatchedVariable.h" #include "Application/Player/SyncMaster.h" +#include "Scale.h" #include "Table.h" #include "Groove.h" #include "Application/Persistency/PersistencyService.h" @@ -27,6 +28,11 @@ tempoNudge_(0) this->Insert(wrap) ; Variable *transpose=new Variable("transpose",VAR_TRANSPOSE,0) ; this->Insert(transpose) ; + + // from: https://github.com/xiphonics/picoTracker/blob/master/sources/Application/Model/Project.cpp + Variable *scale = new Variable("scale", VAR_SCALE, scaleNames, scaleCount, 0); + this->Insert(scale); + scale->SetInt(0); // Reload the midi device list @@ -59,6 +65,13 @@ Project::~Project() { delete instrumentBank_ ; } ; +// from: https://github.com/xiphonics/picoTracker/blob/master/sources/Application/Model/Project.cpp +int Project::GetScale() { + Variable *v = FindVariable(VAR_SCALE); + NAssert(v); + return v->GetInt(); +} + int Project::GetTempo() { Variable *v=FindVariable(VAR_TEMPO) ; NAssert(v) ; diff --git a/sources/Application/Model/Project.h b/sources/Application/Model/Project.h index b9ffa201..689e1345 100644 --- a/sources/Application/Model/Project.h +++ b/sources/Application/Model/Project.h @@ -14,6 +14,7 @@ #define VAR_WRAP MAKE_FOURCC('W','R','A','P') #define VAR_MIDIDEVICE MAKE_FOURCC('M','I','D','I') #define VAR_TRANSPOSE MAKE_FOURCC('T','R','S','P') +#define VAR_SCALE MAKE_FOURCC('S', 'C', 'A', 'L') #define PROJECT_NUMBER "1" #define PROJECT_RELEASE "4" @@ -35,6 +36,7 @@ class Project: public Persistent,public VariableContainer,I_Observer { bool Wrap() ; void OnTempoTap(); void NudgeTempo(int value) ; + int GetScale(); int GetTempo() ; // Takes nudging into account int GetTranspose() ; diff --git a/sources/Application/Model/Scale.cpp b/sources/Application/Model/Scale.cpp new file mode 100644 index 00000000..2943b8a8 --- /dev/null +++ b/sources/Application/Model/Scale.cpp @@ -0,0 +1,199 @@ +// from: https://github.com/xiphonics/picoTracker +#include "Scale.h" + +// Source of scales in original release: +// https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/PitchConstellations.svg/1280px-PitchConstellations.svg.png + +// Additional Scales +// https://pianoencyclopedia.com/scales/ + +const char *scaleNotes[scaleNoteCount] = { + "C","C#","D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" +}; + +const char *scaleNames[scaleCount] = {"None (Chromatic)", + "Acoustic", + "Adonal malakh", + "Aeolian mode (minor)", + "Algerian", + "Altered", + "Augmented", + "Bebop dominant", + "Blues", + "Dorian", + "Double harmonic", + "Enigmatic", + "Flamenco", + "Gypsy", + "Half diminished", + "Harmonic major", + "Harmonic minor", + "Hirajoshi", + "Hungarian gypsy", + "Hungarian minor", + "Insen", + "Ionian mode (major)", + "Istrian", + "Iwato", + "Locrian", + "Lydian augmented", + "Lydian", + "Major bebop", + "Major locran", + "Major pentatonic", + "Melodic minor", + "Melodic minor (asc)", + "Minor pentatonic", + "Mixolydian", + "Neapolitan major", + "Neapolitan minor", + "Octatonic", + "Persian", + "Phrygian dominant", + "Phrygian", + "Prometheus", + "Ryukyu", + "Tritone", + "Tercera Alta", + "Ukranian", + "Whole tone", + }; + +const bool scaleSteps[scaleCount][scaleNoteCount] = { + // "C","C#","D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" + // "None (Chromatic)" + {true, true, true, true, true, true, true, true, true, true, true, true}, + // "Acoustic" + {true, false, true, false, true, false, true, true, false, true, false, + false}, + // "Adonal malakh" + {true, false, true, false, true, true, false, true, true, false, true, + false}, + // "Aeolian mode (minor)" + {true, false, true, true, false, true, false, true, true, false, true, + false}, + // "Algerian" + {true, false, true, true, false, false, true, true, true, false, false, + true}, + // "Altered" + {true, true, false, true, true, false, true, false, true, false, true, + false}, + // "Augmented" + {true, false, false, true, true, false, false, true, true, false, false, + true}, + // "Bebop dominant" + {true, false, true, false, true, true, false, true, false, true, true, + true}, + // "Blues" + {true, false, false, true, false, true, true, true, false, false, true, + false}, + // "Dorian" + {true, false, true, true, false, true, false, true, false, true, true, + false}, + // "Double harmonic" + {true, true, false, false, true, true, false, true, true, false, false, + true}, + // "Enigmatic" + {true, true, false, false, true, false, true, false, true, false, true, + true}, + // "Flamenco" + {true, true, false, false, true, true, false, true, true, false, false, + true}, + // "Gypsy" + {true, false, true, true, false, false, true, true, true, false, true, + false}, + // "Half diminished" + {true, false, true, true, false, true, true, false, true, false, true, + false}, + // "Harmonic major" + {true, false, true, false, true, true, false, true, true, false, false, + true}, + // "Harmonic minor" + {true, false, true, true, false, true, false, true, true, false, false, + true}, + // "Hirajoshi" + {true, false, true, true, false, false, false, true, true, false, false, + false}, + // "Hungarian gypsy" + {true, false, true, true, false, false, true, true, true, false, false, + true}, + // "Hungarian minor" + {true, false, true, true, false, false, true, true, true, false, false, + true}, + // "Insen" + {true, true, false, false, false, true, false, true, false, false, true, + false}, + // "Ionian mode (major)" + {true, false, true, false, true, true, false, true, false, true, false, + true}, + // "Istrian" + {true, true, false, true, true, false, true, true, false, false, false, + false}, + // "Iwato" + {true, true, false, false, false, true, true, false, false, false, true, + false}, + // "Locrian" + {true, true, false, true, false, true, true, false, true, false, true, + false}, + // "Lydian augmented" + {true, false, true, false, true, false, true, false, true, true, false, + true}, + // "Lydian" + {true, false, true, false, true, false, true, true, false, true, false, + true}, + // "Major bebop" + {true, false, true, false, true, true, false, true, true, true, false, + true}, + // "Major locran" + {true, false, true, false, true, true, true, false, true, false, true, + false}, + // "Major pentatonic" + {true, false, true, false, true, false, false, true, false, true, false, + false}, + // "Melodic minor" + {true, false, true, true, false, true, false, true, true, true, true, true}, + // "Melodic minor (asc)" + {true, false, true, true, false, true, false, true, false, true, false, + true}, + // "Minor pentatonic" + {true, false, false, true, false, true, false, true, false, false, true, + false}, + // "Mixolydian" + {true, false, true, false, true, true, false, true, false, true, true, + false}, + // "Neapolitan major" + {true, true, false, true, false, true, false, true, false, true, false, + true}, + // "Neapolitan minor" + {true, true, false, true, false, true, false, true, true, false, false, + true}, + // "Octatonic" + {true, false, true, true, false, true, true, false, true, true, false, + true}, + // "Persian" + {true, true, false, false, true, true, true, false, true, false, false, + true}, + // "Phrygian dominant" + {true, true, false, false, true, true, false, true, true, false, true, + false}, + // "Phrygian" + {true, true, false, true, false, true, false, true, true, false, true, + false}, + // "Prometheus" + {true, false, true, false, true, false, true, false, false, true, true, + false}, + // Ryukyu + {true, false, false, false, true, true, false, true, false, false, false, true}, + // "Tritone" + {true, true, false, false, true, false, true, true, false, false, true, + false}, + // "Tercera Alta" + {false, true, true, false, false, false, true, false, false, true, false, false}, + // "Ukranian" + {true, false, true, true, false, false, true, true, false, true, true, + false}, + // "Whole tone" + {true, false, true, false, true, false, true, false, true, false, true, + false} + +}; diff --git a/sources/Application/Model/Scale.h b/sources/Application/Model/Scale.h new file mode 100644 index 00000000..de4398cc --- /dev/null +++ b/sources/Application/Model/Scale.h @@ -0,0 +1,11 @@ +// from: https://github.com/xiphonics/picoTracker +#ifndef SCALE_VIEW_H +#define SCALE_VIEW_H + +const int scaleCount = 46; +const int scaleNoteCount = 12; +extern const char *scaleNames[scaleCount]; +extern const char *scaleNotes[scaleNoteCount]; +extern const bool scaleSteps[scaleCount][scaleNoteCount]; + +#endif diff --git a/sources/Application/Views/PhraseView.cpp b/sources/Application/Views/PhraseView.cpp index 1f592be2..7fc941b2 100644 --- a/sources/Application/Views/PhraseView.cpp +++ b/sources/Application/Views/PhraseView.cpp @@ -3,6 +3,7 @@ #include "Application/Utils/char.h" #include "Application/Instruments/CommandList.h" #include "UIController.h" +#include "Application/Model/Scale.h" #include "Application/Model/Table.h" #include "Application/Utils/HelpLegend.h" #include @@ -206,6 +207,12 @@ void PhraseView::updateCursorValue(ViewUpdateDirection direction,int xOffset,int } if ((c)&&(*c!=0xFF)) { int offset=offsets_[col_+xOffset][direction] ; + // from: https://github.com/xiphonics/picoTracker/blob/master/sources/Application/Views/PhraseView.cpp + // Add/remove from offset to match selected scale + int scale = viewData_->project_->GetScale(); + while (!scaleSteps[scale][(*c + offset) % 12]) { + offset > 0 ? offset++ : offset--; + } updateData(c,offset,limit,wrap) ; switch(col_+xOffset) { @@ -1010,6 +1017,22 @@ void PhraseView::DrawView() { SetColor(CD_NORMAL) ; sprintf(title,"Phrase %2.2x",viewData_->currentPhrase_) ; DrawString(pos._x,pos._y,title,props) ; + + + // Draw Current Scale + int scale = viewData_->project_->GetScale(); + char scale_notes_title[25]; + std::string scale_notes = ""; + + for(int i = 0; i < scaleNoteCount; i++) { + if (scaleSteps[scale][i] == true) { + scale_notes = scale_notes + scaleNotes[i]; + }; + } + + sprintf(scale_notes_title, "Scale: %s", scale_notes.c_str()); + DrawString(pos._x, pos._y + 2, scale_notes_title, props); + // Compute song grid location diff --git a/sources/Application/Views/ProjectView.cpp b/sources/Application/Views/ProjectView.cpp index b4d656dd..db3c9c8d 100644 --- a/sources/Application/Views/ProjectView.cpp +++ b/sources/Application/Views/ProjectView.cpp @@ -8,6 +8,7 @@ #include "Application/Views/ModalDialogs/MessageBox.h" #include "Application/Views/ModalDialogs/NewProjectDialog.h" #include "Application/Views/ModalDialogs/SelectProjectDialog.h" +#include "Application/Model/Scale.h" #define ACTION_PURGE MAKE_FOURCC('P','U','R','G') #define ACTION_SAVE MAKE_FOURCC('S','A','V','E') @@ -114,6 +115,17 @@ ProjectView::ProjectView(GUIWindow &w,ViewData *data):FieldView(w,data) { position._y+=1 ; UIIntVarField *f2=new UIIntVarField(position,*v,"transpose: %3.2d",-48,48,0x1,0xC) ; T_SimpleList::Insert(f2) ; + + // from: https://github.com/xiphonics/picoTracker/blob/master/sources/Application/Views/ProjectView.cpp + v = project_->FindVariable(VAR_SCALE); + // if scale name is not found, set the default chromatic scale + if (v->GetInt() < 0) { + v->SetInt(0); + } + position._y += 1; + UIIntVarField *f3 = + new UIIntVarField(position, *v, "scale: %s", 0, scaleCount - 1, 1, 10); + T_SimpleList::Insert(f3); position._y+=2 ; UIActionField *a1=new UIActionField("Compact Sequencer",ACTION_PURGE,position) ; @@ -143,8 +155,8 @@ ProjectView::ProjectView(GUIWindow &w,ViewData *data):FieldView(w,data) { v=project_->FindVariable(VAR_MIDIDEVICE) ; NAssert(v) ; position._y+=2 ; - UIIntVarField *f3=new UIIntVarField(position,*v,"MIDI: %s",0,MidiService::GetInstance()->Size(),1,1) ; - T_SimpleList::Insert(f3) ; + UIIntVarField *f4=new UIIntVarField(position,*v,"MIDI: %s",0,MidiService::GetInstance()->Size(),1,1) ; + T_SimpleList::Insert(f4) ; position._y+=2 ; a1=new UIActionField("Exit",ACTION_QUIT,position) ; diff --git a/sources/Foundation/Variables/Variable.cpp b/sources/Foundation/Variables/Variable.cpp index 53f19ab6..f07b857f 100644 --- a/sources/Foundation/Variables/Variable.cpp +++ b/sources/Foundation/Variables/Variable.cpp @@ -48,6 +48,16 @@ Variable::Variable(const char *name,FourCC id,char **list,int size,int index) { type_=CHAR_LIST ; } ; +Variable::Variable(const char *name,FourCC id,const char *const *list,int size,int index) { + name_=name ; + id_=id ; + list_.char_=(char **)list ; + listSize_=size ; + value_.index_=index ; + defaultValue_.index_=index ; + type_=CHAR_LIST ; +} ; + Variable::~Variable() { } ; diff --git a/sources/Foundation/Variables/Variable.h b/sources/Foundation/Variables/Variable.h index 0fff5a01..50987dbd 100644 --- a/sources/Foundation/Variables/Variable.h +++ b/sources/Foundation/Variables/Variable.h @@ -24,6 +24,7 @@ class Variable { Variable(const char *name,FourCC id,bool value=false) ; Variable(const char *name,FourCC id,const char *value=0) ; Variable(const char *name,FourCC id,char **list,int size,int index=-1) ; + Variable(const char *name,FourCC id,const char *const *list,int size,int index=-1) ; virtual ~Variable() ; From ef33b2c6cb99efccf87739b734d0eb2d7d4bfdea Mon Sep 17 00:00:00 2001 From: Camilowser Date: Sat, 14 Sep 2024 19:37:13 -0300 Subject: [PATCH 2/6] added scales.o --- projects/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/Makefile b/projects/Makefile index 2de9394b..7898fcf7 100644 --- a/projects/Makefile +++ b/projects/Makefile @@ -254,7 +254,7 @@ COMMONFILES := \ MessageBox.o \ GrooveView.o UINoteVarField.o UIBigHexVarField.o \ SRPUpdaters.o UIStaticField.o \ - Song.o Chain.o Phrase.o Project.o \ + Song.o Chain.o Phrase.o Project.o Scale.o \ char.o n_assert.o fixed.o wildcard.o \ SyncMaster.o TablePlayback.o Player.o \ Table.o TableView.o\ From b66c5c46cac0c51444a93f05cecb900f9a84f933 Mon Sep 17 00:00:00 2001 From: Camilowser Date: Sat, 14 Sep 2024 21:48:36 -0300 Subject: [PATCH 3/6] added scale to vcproj --- projects/lgpt.vcproj | 8 ++++++++ projects/lgpt.vcxproj | 2 ++ 2 files changed, 10 insertions(+) diff --git a/projects/lgpt.vcproj b/projects/lgpt.vcproj index d885f0dc..01f65532 100644 --- a/projects/lgpt.vcproj +++ b/projects/lgpt.vcproj @@ -788,6 +788,14 @@ RelativePath="..\sources\Application\Model\Song.h" > + + + + diff --git a/projects/lgpt.vcxproj b/projects/lgpt.vcxproj index acbf4c29..2b2b5584 100644 --- a/projects/lgpt.vcxproj +++ b/projects/lgpt.vcxproj @@ -266,6 +266,7 @@ + @@ -408,6 +409,7 @@ + From 127a60722c6115137622fa6b354b5f20117e1f57 Mon Sep 17 00:00:00 2001 From: Camilowser Date: Sat, 14 Sep 2024 22:19:24 -0300 Subject: [PATCH 4/6] only show scale if not default --- sources/Application/Views/PhraseView.cpp | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/sources/Application/Views/PhraseView.cpp b/sources/Application/Views/PhraseView.cpp index 7fc941b2..5a3c8645 100644 --- a/sources/Application/Views/PhraseView.cpp +++ b/sources/Application/Views/PhraseView.cpp @@ -1019,19 +1019,22 @@ void PhraseView::DrawView() { DrawString(pos._x,pos._y,title,props) ; - // Draw Current Scale +// Draw Current Scale int scale = viewData_->project_->GetScale(); - char scale_notes_title[25]; - std::string scale_notes = ""; - - for(int i = 0; i < scaleNoteCount; i++) { - if (scaleSteps[scale][i] == true) { - scale_notes = scale_notes + scaleNotes[i]; - }; - } - - sprintf(scale_notes_title, "Scale: %s", scale_notes.c_str()); - DrawString(pos._x, pos._y + 2, scale_notes_title, props); + if (scale > 0) { + // Only Draw Scales different from default (chromatic) + char scale_notes_title[25]; + std::string scale_notes = ""; + + for(int i = 0; i < scaleNoteCount; i++) { + if (scaleSteps[scale][i] == true) { + scale_notes = scale_notes + scaleNotes[i]; + }; + } + + sprintf(scale_notes_title, "Scale: %s", scale_notes.c_str()); + DrawString(pos._x, pos._y + 2, scale_notes_title, props); + } // Compute song grid location From ddd501f71f244f49b9f89dedbe56fda1640f6e71 Mon Sep 17 00:00:00 2001 From: Camilowser Date: Tue, 17 Sep 2024 10:05:31 -0300 Subject: [PATCH 5/6] moved scales to lower --- sources/Application/Views/PhraseView.cpp | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sources/Application/Views/PhraseView.cpp b/sources/Application/Views/PhraseView.cpp index 5a3c8645..7f65b62c 100644 --- a/sources/Application/Views/PhraseView.cpp +++ b/sources/Application/Views/PhraseView.cpp @@ -1017,24 +1017,6 @@ void PhraseView::DrawView() { SetColor(CD_NORMAL) ; sprintf(title,"Phrase %2.2x",viewData_->currentPhrase_) ; DrawString(pos._x,pos._y,title,props) ; - - -// Draw Current Scale - int scale = viewData_->project_->GetScale(); - if (scale > 0) { - // Only Draw Scales different from default (chromatic) - char scale_notes_title[25]; - std::string scale_notes = ""; - - for(int i = 0; i < scaleNoteCount; i++) { - if (scaleSteps[scale][i] == true) { - scale_notes = scale_notes + scaleNotes[i]; - }; - } - - sprintf(scale_notes_title, "Scale: %s", scale_notes.c_str()); - DrawString(pos._x, pos._y + 2, scale_notes_title, props); - } // Compute song grid location @@ -1204,6 +1186,24 @@ void PhraseView::DrawView() { drawMap() ; drawNotes() ; + + // Draw Current Scale + int scale = viewData_->project_->GetScale(); + if (scale > 0) { + // Only Draw Scales different from default (chromatic) + char scale_notes_title[25]; + std::string scale_notes = ""; + + for(int i = 0; i < scaleNoteCount; i++) { + if (scaleSteps[scale][i] == true) { + scale_notes = scale_notes + scaleNotes[i]; + }; + } + + SetColor(CD_NORMAL); + sprintf(scale_notes_title, "Scale: %s", scale_notes.c_str()); + DrawString(0, pos._y + 4, scale_notes_title, props); + } Player *player=Player::GetInstance() ; if (player->IsRunning()) { From 42e1627bcbeb5afc9124c556e13dff1e7993ea2c Mon Sep 17 00:00:00 2001 From: Camilowser Date: Fri, 20 Sep 2024 09:09:39 -0300 Subject: [PATCH 6/6] commented out drawing scales --- sources/Application/Views/PhraseView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/Application/Views/PhraseView.cpp b/sources/Application/Views/PhraseView.cpp index 7f65b62c..a6ea9bb4 100644 --- a/sources/Application/Views/PhraseView.cpp +++ b/sources/Application/Views/PhraseView.cpp @@ -1188,6 +1188,8 @@ void PhraseView::DrawView() { drawNotes() ; // Draw Current Scale + // Uncomment if you want to display the current scale in phrase view + /* int scale = viewData_->project_->GetScale(); if (scale > 0) { // Only Draw Scales different from default (chromatic) @@ -1204,6 +1206,7 @@ void PhraseView::DrawView() { sprintf(scale_notes_title, "Scale: %s", scale_notes.c_str()); DrawString(0, pos._y + 4, scale_notes_title, props); } + */ Player *player=Player::GetInstance() ; if (player->IsRunning()) {