-
Notifications
You must be signed in to change notification settings - Fork 3
LogWindow sometimes obscured. Some samples added to .organ file with incorrect path. Wave tremulant addition tweak. #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
0b58be2
3f1d122
8ee59c8
c0ff2d7
12a5360
a8439fb
28e51e0
fb4dfa6
10b7d34
ff81740
354693f
5c4d432
3a34eaa
cd6f714
fc57885
8c20781
1f5faeb
1f1178d
382de96
abfd215
e5a6f99
e6526bf
79361e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Test | ||
|
|
||
| on: [workflow_dispatch] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| name: A job to run test in FreeBSD | ||
| env: | ||
| MYTOKEN : ${{ secrets.MYTOKEN }} | ||
| MYTOKEN2: "value2" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Test in FreeBSD | ||
| id: test | ||
| uses: vmactions/freebsd-vm@v1 | ||
| with: | ||
| envs: 'MYTOKEN MYTOKEN2' | ||
| usesh: true | ||
| prepare: | | ||
| pkg install -y curl | ||
|
|
||
| run: | | ||
| pwd | ||
| ls -lah | ||
| whoami | ||
| env | ||
| freebsd-version | ||
| sysctl hw.model | ||
| sysctl hw.ncpu | ||
| sysctl hw.physmem | ||
| sysctl hw.usermem | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,12 @@ | |
| #include "GOODFFunctions.h" | ||
| #include <wx/unichar.h> | ||
|
|
||
| #define TREMULANT_MESSAGE do { \ | ||
| wxMessageDialog msg(::wxGetApp().m_frame, wxT("Warning: A mix of tremulant and non-tremulant pipes in a rank."), wxT("Pipe Tremulants Warning"), wxOK|wxCENTRE|wxICON_EXCLAMATION); \ | ||
| msg.ShowModal(); \ | ||
| } while(0) | ||
| #define MIXED_TREMULANTS(a, b) (((a) && (b) == -1) || (!(a) && (b) != -1)) | ||
|
|
||
| Rank::Rank() { | ||
| name = wxT("New Rank"); | ||
| firstMidiNoteNumber = 36; | ||
|
|
@@ -725,6 +731,7 @@ void Rank::addToPipes( | |
| int totalNbrOfPipes | ||
| ) { | ||
| bool organRootPathIsSet = false; | ||
| bool hadIgnoreTremulant = false; | ||
|
|
||
| if (::wxGetApp().m_frame->m_organ->getOdfRoot() != wxEmptyString) | ||
| organRootPathIsSet = true; | ||
|
|
@@ -797,6 +804,17 @@ void Rank::addToPipes( | |
|
|
||
| // if there are any matching attacks we add them | ||
| if (!pipeAttacksToAdd.IsEmpty()) { | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that all this (in more or less every place it's done) and the relevant macros perhaps would be better done as a public function of a Pipe. Then one could just ask the Pipe if it has conflicting isTremulant values in the attacks and save a few repeated lines. The function would just return a bool value which in turn would decide whether to trigger the warning message or not.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And possibly fire that message dialog itself as well...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That had occurred to me too. I'm not a C++ programmer. Even though I certainly understand and agree with what you're saying (public function of Pipe, etc.) implementation might take me some figuring out.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, as a message dialog would block the execution, it could be better for the flow to just log the warning and proceed. |
||
| // set the warning flag if any previous attack is different than (hasTremulantFolders || loadPipesAsTremOff) | ||
| if (p->m_attacks.size() > 0) { | ||
| for (std::list<Attack>::iterator attack = p->m_attacks.begin(); attack != p->m_attacks.end(); attack++) { | ||
| if (MIXED_TREMULANTS(hasTremulantFolders || loadPipesAsTremOff, attack->isTremulant)) { | ||
| hadIgnoreTremulant = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| for (unsigned j = 0; j < pipeAttacksToAdd.GetCount(); j++) { | ||
| wxString relativeFileName; | ||
| if (organRootPathIsSet) | ||
|
|
@@ -846,6 +864,16 @@ void Rank::addToPipes( | |
| // if there are any matching releases we add them | ||
| if (!pipeReleasesToAdd.IsEmpty()) { | ||
|
|
||
| // set the warning flag if any previous release is different than (hasTremulantFolders || loadPipesAsTremOff) | ||
| if (p->m_releases.size() > 0) { | ||
| for (std::list<Release>::iterator release = p->m_releases.begin(); release != p->m_releases.end(); release++) { | ||
| if (MIXED_TREMULANTS(hasTremulantFolders || loadPipesAsTremOff, release->isTremulant)) { | ||
| hadIgnoreTremulant = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| for (unsigned k = 0; k < pipeReleasesToAdd.GetCount(); k++) { | ||
| wxString relativeFileName; | ||
| if (organRootPathIsSet) | ||
|
|
@@ -975,6 +1003,17 @@ void Rank::addToPipes( | |
|
|
||
| // if there are any matching releases we add them | ||
| if (!pipeReleasesToAdd.IsEmpty()) { | ||
|
|
||
| // set the warning flag if any previous release is different than (hasTremulantFolders || loadPipesAsTremOff) | ||
| if (p->m_releases.size() > 0) { | ||
| for (std::list<Release>::iterator release = p->m_releases.begin(); release != p->m_releases.end(); release++) { | ||
| if (MIXED_TREMULANTS(true, release->isTremulant)) { | ||
| hadIgnoreTremulant = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| for (unsigned k = 0; k < pipeReleasesToAdd.GetCount(); k++) { | ||
| wxString relativeFileName; | ||
| if (organRootPathIsSet) | ||
|
|
@@ -1020,6 +1059,9 @@ void Rank::addToPipes( | |
| } | ||
| count++; | ||
| } | ||
| if (hadIgnoreTremulant) { | ||
| TREMULANT_MESSAGE; | ||
| } | ||
| } | ||
|
|
||
| void Rank::addTremulantToPipes( | ||
|
|
@@ -1034,6 +1076,7 @@ void Rank::addTremulantToPipes( | |
| ) { | ||
| // This method is for adding additional attacks/releases as (wave) tremulants only | ||
| bool organRootPathIsSet = false; | ||
| bool hadIgnoreTremulant = false; | ||
|
|
||
| if (::wxGetApp().m_frame->m_organ->getOdfRoot() != wxEmptyString) | ||
| organRootPathIsSet = true; | ||
|
|
@@ -1100,6 +1143,17 @@ void Rank::addTremulantToPipes( | |
|
|
||
| // if there are any matching attacks we add them | ||
| if (!pipeAttacksToAdd.IsEmpty()) { | ||
|
|
||
| // set the warning flag if any previous attack ignores wave tremulant | ||
| if (p->m_attacks.size() > 0) { | ||
| for (std::list<Attack>::iterator attack = p->m_attacks.begin(); attack != p->m_attacks.end(); attack++) { | ||
| if (MIXED_TREMULANTS(true, attack->isTremulant)) { | ||
| hadIgnoreTremulant = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| for (unsigned j = 0; j < pipeAttacksToAdd.GetCount(); j++) { | ||
| wxString relativeFileName; | ||
| if (organRootPathIsSet) | ||
|
|
@@ -1155,6 +1209,16 @@ void Rank::addTremulantToPipes( | |
| else | ||
| relativeFileName = pipeReleasesToAdd.Item(k); | ||
|
|
||
| // set the warning flag if any previous release ignores wave tremulant | ||
| if (p->m_releases.size() > 0) { | ||
| for (std::list<Release>::iterator release = p->m_releases.begin(); release != p->m_releases.end(); release++) { | ||
| if (MIXED_TREMULANTS(true, release->isTremulant)) { | ||
| hadIgnoreTremulant = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // create and add the release to the pipe | ||
| Release rel; | ||
| rel.fileName = relativeFileName; | ||
|
|
@@ -1197,6 +1261,10 @@ void Rank::addTremulantToPipes( | |
| } | ||
| count++; | ||
| } | ||
|
|
||
| if (hadIgnoreTremulant) { | ||
| TREMULANT_MESSAGE; | ||
| } | ||
| } | ||
|
|
||
| void Rank::addReleasesToPipes( | ||
|
|
@@ -1207,6 +1275,7 @@ void Rank::addReleasesToPipes( | |
| ) { | ||
| // This method is for adding releases only from a single folder | ||
| bool organRootPathIsSet = false; | ||
| bool hadIgnoreTremulant = false; | ||
|
|
||
| if (::wxGetApp().m_frame->m_organ->getOdfRoot() != wxEmptyString) | ||
| organRootPathIsSet = true; | ||
|
|
@@ -1241,6 +1310,17 @@ void Rank::addReleasesToPipes( | |
|
|
||
| // if there are any matching attacks we add them | ||
| if (!pipeReleasesToAdd.IsEmpty()) { | ||
|
|
||
| // set the warning flag if any previous release is different than loadPipeAsTremOff | ||
| if (p->m_releases.size() > 0) { | ||
| for (std::list<Release>::iterator release = p->m_releases.begin(); release != p->m_releases.end(); release++) { | ||
| if (MIXED_TREMULANTS(loadPipesAsTremOff, release->isTremulant)) { | ||
| hadIgnoreTremulant = true; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| for (unsigned j = 0; j < pipeReleasesToAdd.GetCount(); j++) { | ||
| wxString relativeFileName; | ||
| if (organRootPathIsSet) | ||
|
|
@@ -1264,6 +1344,9 @@ void Rank::addReleasesToPipes( | |
| pipeReleasesToAdd.Empty(); | ||
| count++; | ||
| } | ||
| if (hadIgnoreTremulant) { | ||
| TREMULANT_MESSAGE; | ||
| } | ||
| } | ||
|
|
||
| void Rank::clearAllPipes() { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.