Just an update to slightly rotten wscripts, shouldn't be any changes during an
ardour build. Motivation being a short development cycle for working on evoral
and/or its test suite.
Note the old Note::operator= was unsafe, since it made shallow copies of the on
and off events, which results in a double delete of events when the notes are
destructed.
I'm not sure if this is really the best way to do event types (should it
just be a completely static enum in evoral, or completely dynamic and
provided by the type map, or a mix like currently?), but previously the
event type was frequently set to either total garbage, or parameter
types, which are a different thing.
This fixes all those cases, and makes Evoral::EventType an enum so the
compiler will warn about implicit conversions from int.
It is slightly questionable whether type specific methods like
velocity() belong on Event at all, these may be better off as free
functions. However the code currently uses them as methods in many
places, and it seems like a step in the right direction, since, for
example, we might some day have events that have a velocity but aren't
stored as MIDI messages (e.g. if Ardour uses an internal musical model
that is more expressive).
In any case, the former inheritance and plethora of sloppy casts is
definitely not the right thing.
According to the comment in line 79, this button should toggle between mixer and
editor windows - but it didn't (for me). Apparently that action named has changed
in Ardour 5.x - anyway, using this command, it works for me.