Skip to content

Commit fd0c3c9

Browse files
committed
add macos-13
1 parent 41829b0 commit fd0c3c9

File tree

4 files changed

+50
-19
lines changed

4 files changed

+50
-19
lines changed

.github/workflows/workflow.yaml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ jobs:
77
continue-on-error: true
88
strategy:
99
matrix:
10-
os: [macos-latest, ubuntu-24.04, windows-latest]
10+
os: [macos-latest, macos-13, ubuntu-latest, windows-latest]
1111
runs-on: ${{matrix.os}}
1212
steps:
1313
- name: Download
1414
uses: actions/checkout@v4
1515

1616
- name: Update Ubuntu
17-
if: matrix.os == 'ubuntu-24.04'
17+
if: matrix.os == 'ubuntu-latest'
1818
run: sudo apt-get update
1919

2020
- name: Install dependencies on Ubuntu
21-
if: matrix.os == 'ubuntu-24.04'
21+
if: matrix.os == 'ubuntu-latest'
2222
run: >
2323
sudo apt-get install
2424
cmake
@@ -28,11 +28,11 @@ jobs:
2828
qt6-base-dev
2929
3030
- name: Install gcovr on Ubuntu
31-
if: matrix.os == 'ubuntu-24.04'
31+
if: matrix.os == 'ubuntu-latest'
3232
run: pipx install gcovr
3333

3434
- name: Install dependencies on MacOS
35-
if: matrix.os == 'macos-latest'
35+
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
3636
run: brew install fluid-synth ninja qt libxml2
3737

3838
- name: Add MSVC to path on Windows
@@ -109,10 +109,6 @@ jobs:
109109
110110
- name: Build with tests
111111
run: cmake --build with_tests --config Debug
112-
113-
- name: Start fonts server on MacOS
114-
if: matrix.os == 'macos-latest'
115-
run: sudo launchctl load -w /System/Library/LaunchAgents/com.apple.fontd.useragent.plist
116112

117113
- name: Test on Unix
118114
if: matrix.os != 'windows-latest'
@@ -123,17 +119,25 @@ jobs:
123119
run: cd with_tests; ctest --build-config Debug --verbose
124120

125121
- name: Run gcovr
126-
if: matrix.os == 'ubuntu-24.04'
122+
if: matrix.os == 'ubuntu-latest'
127123
run: gcovr --xml "coverage.xml" --filter "$(pwd)/src/"
128124

129125
- name: Upload code coverage
130126
uses: codecov/codecov-action@v4
131-
if: matrix.os == 'ubuntu-24.04'
127+
if: matrix.os == 'ubuntu-latest'
132128
with:
133129
files: ./coverage.xml
134130
token: ${{ secrets.CODECOV_TOKEN }}
131+
132+
- name: Configure without tests on MacOS 13
133+
if: matrix.os == 'macos-13'
134+
run: >
135+
cmake -S . -B without_tests
136+
-DCMAKE_BUILD_TYPE=Release
137+
-DCPACK_GENERATOR=ZIP
138+
-DCPACK_PACKAGE_FILE_NAME=Justly-MacOS-Intel
135139
136-
- name: Configure without tests on MacOS
140+
- name: Configure without tests on MacOS latest
137141
if: matrix.os == 'macos-latest'
138142
run: >
139143
cmake -S . -B without_tests
@@ -142,7 +146,7 @@ jobs:
142146
-DCPACK_PACKAGE_FILE_NAME=Justly-MacOS-arm64
143147
144148
- name: Configure without tests on Ubuntu
145-
if: matrix.os == 'ubuntu-24.04'
149+
if: matrix.os == 'ubuntu-latest'
146150
run: >
147151
cmake -S . -B without_tests
148152
-DCMAKE_BUILD_TYPE=Release

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ qt_add_executable(Justly)
123123
target_sources(Justly PRIVATE bin/main.cpp)
124124
target_link_libraries(Justly PRIVATE JustlyLibrary Qt6::Core Qt6::Widgets)
125125
if (WIN32)
126-
# set_target_properties(Justly PROPERTIES WIN32_EXECUTABLE ON)
126+
set_target_properties(Justly PROPERTIES WIN32_EXECUTABLE ON)
127127
endif()
128128
install_executable(Justly)
129129

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ To go back to the chords, select "Back to chords" from the "Edit" menu (see belo
145145
In the "File" menu, you can choose among the following options:
146146

147147
- "Open" to open a previously saved song.
148-
- "Import MusicXML" to import an uncompressed MusicXML file using [5-limit tuning](https://en.wikipedia.org/wiki/Five-limit_tuning#The_just_ratios) based on the key signature.
148+
- "Import MusicXML" to import an uncompressed MusicXML file (see below).
149149
- "Save" to save the song in the previous location.
150150
- "Save As" to save the song in a new location.
151151
- "Export recording" to export a recording of the song as a wav file.
@@ -183,6 +183,34 @@ In the play menu, you can choose among the following options:
183183
- "Play selection" to play a selection of chords or notes. If you play a selection of chords, you will skip any previous chords, and only play the selected chords. If you play a selection of notes within a chord, you will skip any previous chords, and only play the selected notes within the current chord.
184184
- "Stop Playing" to stop playing.
185185

186+
## Import
187+
188+
Justly can import sheet music written in MusicXML.
189+
To do so, Justly uses a few heuristics.
190+
191+
Justly uses the current key signature to find the tonic. Just then uses the following scale relative to the tonic:
192+
193+
- Minor second: 16/5
194+
- Major second: 9/8
195+
- Minor third: 6/5
196+
- Major third: 5/4
197+
- Perfect fourth: 4/3
198+
- Augmented fourth/dimished fifth: 45/32
199+
- Perfect fifth: 3/2
200+
- Minor sixth: 8/5
201+
- Major sixth: 5/3
202+
- Minor seventh: 9/5
203+
- Perfect octave: 2
204+
205+
For example, in the key of A, the frequency of any E (a perfect fifth away from the tonic) will be 3/2 of the frequency of the tonic below it.
206+
207+
When the key signature changes, Justly modulates by the interval of the new key in the old key signature. So, if you modulate by from the key of A to the key of E, Justly will modulate by an interval of 3/2 (plus or minus an octave).
208+
209+
Here are some tips for importing music written in standard notation:
210+
211+
- Change key signatures every time the underlying chord in the music changes.
212+
- You might need to manually adjust seventh intervals. In the context of a seventh chord, you might want to change the seventh of the chord to be a harmonic seventh above the tonic. Likewise, in the context of a half-diminished seventh chord, you might want to change the root note of the chord to be a harmonic seventh below the top note of the chord. Be careful, however, because harmonic seventh intervals are notically different from minor seventh intervals.
213+
186214
## Example
187215

188216
This example is the [simple.json](examples/simple.json) file in the examples folder.

src/justly.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ to_xml_program_pointer(xmlNode &node) -> const SubProgram * {
430430
const auto name = get_content(node);
431431
const auto &all_programs = SubProgram::get_all_programs();
432432
const auto program_pointer = std::find_if(
433-
all_programs.cbegin(), all_programs.cend(),
433+
all_programs.begin(), all_programs.end(),
434434
[name](const SubProgram &item) { return item.original_name == name; });
435-
Q_ASSERT(program_pointer != nullptr);
435+
Q_ASSERT(program_pointer != all_programs.end());
436436
return &(*program_pointer);
437437
}
438438

@@ -540,7 +540,7 @@ template <std::derived_from<Program> SubProgram>
540540

541541
std::sort(programs.begin(), programs.end(),
542542
[](const SubProgram &instrument_1, const SubProgram &instrument_2) {
543-
return instrument_1.translated_name <=
543+
return instrument_1.translated_name <
544544
instrument_2.translated_name;
545545
});
546546

@@ -4636,6 +4636,5 @@ void SongEditor::closeEvent(QCloseEvent *const close_event_pointer) {
46364636

46374637
// TODO(brandon): instrument mapping for musicxml
46384638
// TODO(brandon): musicxml repeats
4639-
// TODO(brandon): more musicxml docs
46404639

46414640
#include "justly.moc"

0 commit comments

Comments
 (0)