~mendomusic/lmms/+git/lmms-github:feature/detach-window

Last commit made on 2023-12-18
Get this branch:
git clone -b feature/detach-window https://git.launchpad.net/~mendomusic/lmms/+git/lmms-github

Branch merges

Branch information

Name:
feature/detach-window
Repository:
lp:~mendomusic/lmms/+git/lmms-github

Recent commits

bf922af... by Dalton Messmer <email address hidden>

Prevent resizing in detached Mixer and Sample Track windows

2043cac... by Dalton Messmer <email address hidden>

Fix Windows build

2fd7df8... by Dalton Messmer <email address hidden>

Refactor; Fix close event for editor windows

02d753d... by Dalton Messmer <email address hidden>

Fix style; Use lambda to reduce duplicate code

059be51... by Dalton Messmer <email address hidden>

Merge branch 'master' into feature/detach-window

17c9198... by IanCaio <email address hidden>

Implement Note Types (#5902)

* Initial Commit

 Starts implementing Note Types. The two available types are
RegularNote and StepNote. PianoRoll now paints the color with a
different color for StepNotes. Pattern::addStep now sets the type of the
note to StepNote.
 Negative size is still used to signal a step note.

* Update Pattern.cpp to account for the Note::Type

 Updates the methods noteAtStep(), addStepNote() and checkType()
from Pattern.cpp to account for the note type and not the note length.

* Update PatternView::paintEvent to draw step notes

 PatternView::paintEvent now draws the pattern if the pattern
type is BeatPattern and TCOs aren't fixed (Song Editor). Color used is
still the BeatPattern color (grey) and the conditional doesn't look very
nice and can be improved.
 Pattern::beatPatternLength was also updated so it accounts for
the note type not note length. Review this method, as it looks a bit
weird (particularly the second conditional).

* Implements StepNotes setting a NPH with 0 frames

 Now, instead of TimePos returning 0 for negative lengths, we
create a NotePlayHandle with 0 frames when the note type is StepNote on
InstrumentTrack::play.

* Improves PatternView::paintEvent conditional

 Improves a conditional inside PatternView::paintEvent by
reversing the order in which they are executed.

* Adds upgrade method for backwards compatibility

 Adds an upgrade method that converts notes with negative length
to StepNotes, so old projects can be loaded properly.
 Explicitly set the Note::RegularNote value as 0.
 Make the default "type" value "0", so notes without a type are
loaded as RegularNotes.

* Addresses Veratil's review

 - Changes "addStepNote" so "checkType" isn't called twice in a
row.
 - Changes style on a one line conditional.

* Uses ternary expression on statement

 Reduces number of lines by using ternary expression.

* Addresses PR review (sakertooth)

 - Changes class setter to inline
 - Uses enum class instead of enum
 - Uses auto and const where appropriate

* Finished changes from review (sakertooth)

 - Used std::max instead of qMax
 - Fixed style on lines changed in the PR

* Uses std::find_if to save codelines

 As suggested by sakertooth, by using std::find_if we are able to
simplify the checkType method to two lines.

* Addresses review from sakertooth

 - Reverts m_detuning in-class initialization
 - Removes testing warning
 - Removes unnecessary comment

* Addresses DomClark's review

 - Rename the Note Types enum to avoid redundancy
 - Uses std::all_of instead of std::find_if on MidiClip checkType
 - Rewrites addStepNote so it sets the note type before adding it
to the clip, avoiding having to manually change the type of the clip
after adding the note

* Updates MidiExport to use Note Types

 - Now MidiExport is updated to use note types instead of relying
on negative length notes.
 - For that change it was necessary to find a way of letting
MidiExport know how long step notes should be. The solution found was to
add an attribute to the Instrument XML called "beatlen", which would
hold the number of frames of the instrument's beat. That would be
converted to ticks, so we could calculate how long the MIDI notes would
have to be to play the whole step note. If the attribute was not found,
the default value of 16 ticks would be used as a length of step notes,
as a fallback.

* Fixes ambiguity on enum usage

 Due to changes in the name of enum classes, there was an
ambiguity caused in NotePlayHandle.cpp. That was fixed.

* Addresses new code reviews

 - Addresses code review from PhysSong and Messmerd

* Fixes note drawing on Song Editor

 - Notes were not being draw on the song editor for BeatClips.
This commit fixes this.

* Adds cassert header to TimePos.cpp

 - Adds header to use assert() on TimePos.cpp

* Apply suggestions from code review

Fixes style on some lines

Co-authored-by: Dalton Messmer <email address hidden>

* Reverts some changes on MidiExport

 - Some changes were reverted on MidiExport and InstrumentTrack.
We were storing the beat length on the XML of Instrument Tracks, but in
reality the beat length is a per note attribute, and some instruments
could run into a segmentation fault when calling beat length without a
NotePlayHandle (i.e.: AFP). Because of that I reverted this change, so
the beat length is not stored on the XML anymore, and instead we have a
magic number on the MidiExport class that holds a default beat length
which is actually an upper limit for the MIDI notes of step notes. In
the future we can improve this by finding a way to store the beat length
on the note class to use it instead. The MidiExport logic is not
worsened at all because previously the beat length wasn't even
considered during export (it was actually improved making the exported
notes extend until the next one instead of cutting shorter).

* Fix the order of included files

---------

Co-authored-by: Dalton Messmer <email address hidden>

0255704... by Lost Robot <email address hidden>

Disable Compressor background autofill (#6986)

7268827... by saker <email address hidden>

Revamp synchronization with the audio engine (#6881)

The revamp consists of one lock. When the audio thread needs to render audio or another thread wants to run a change, acquiring the lock grants mutual exclusion to do one of the two. The intention is that this will provide stronger guarantees that changes do not run concurrently with the audio thread, as well as having the synchronization mechanism itself be free of data races (verified with TSan).

1e2167d... by Hyunjin Song

Fix Sf2 player freezing on project unloading with shared SoundFonts (#6950)

* Require FluidSynth >= 1.1.7

* Use `fluid_sfont_t` directly without sharing

* Adjust formatting a bit

a64bbc7... by Mirko Di <email address hidden>

Add BPM tags to built-in beat loops (#5439) (#6747)

* Added floating-point vorbis BPM tags to files in lmms/data/samples/beats
* Added rounded BPM to filenames, surrounded by square brackets and separated from the rest of the filename by an underscore