Skip to content

Commit

Permalink
Merge pull request #1274 from muse-sequencer/issue/issue_1104_globalP…
Browse files Browse the repository at this point in the history
…itchTranspose

Issue/issue 1104 global pitch transpose
  • Loading branch information
spamatica authored Apr 26, 2024
2 parents 4de7ce2 + 7aeb53e commit 52207f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
26.04.2024
- Fix issue 1104: Fixed update of UI element for globalPitchShift upon loading song (rj)
11.12.2023
- Shortcuts: Forum request: Added editor scroll up/down, fast up/down + left/right. (Tim)
25.09.2023
Expand Down
11 changes: 9 additions & 2 deletions src/muse/arranger/arranger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,12 @@ void Arranger::songChanged(MusECore::SongChangedStruct_t type)
if (type & SC_TEMPO)
setGlobalTempo(MusEGlobal::tempomap.globalTempo());

if (type & SC_KEY) {
// hijacking this update type as it's sort of related...
// when a song is loaded we need to update the pitch spinbox
globalPitchSpinBox->setValue(MusEGlobal::song->globalPitchShift());
}

if (type & SC_DIVISION_CHANGED)
{
// The division has changed. The raster table and raster model will have been
Expand All @@ -870,8 +876,9 @@ void Arranger::songChanged(MusECore::SongChangedStruct_t type)
if(type & (SC_PART_INSERTED | SC_PART_REMOVED | SC_PART_MODIFIED |
SC_EVENT_INSERTED | SC_EVENT_REMOVED | SC_EVENT_MODIFIED |
SC_CLIP_MODIFIED | SC_MARKER_INSERTED | SC_MARKER_REMOVED | SC_MARKER_MODIFIED |
SC_AUDIO_CTRL_MOVE_MODE))
canvas->redraw();
SC_AUDIO_CTRL_MOVE_MODE)) {
canvas->redraw();
}

// We must marshall song changed instead of connecting to the strip's song changed
// otherwise it crashes when loading another song because track is no longer valid
Expand Down

0 comments on commit 52207f8

Please sign in to comment.