Paul Davis
ccc62e927d
remove unused variables
2025-07-12 10:35:31 -06:00
Paul Davis
5801716a78
fix MidiViewBackground keeping track of data note range
2025-07-08 17:59:57 -06:00
Paul Davis
d847266cd5
more work on scroomer behavior, close to as intended but still a little bit meh
2025-07-07 16:21:52 -06:00
Paul Davis
5767c8f62e
better handling of MidiView::apply_note_range()
...
In particular, keep the MidiViewBackground's sense of the data range intact,
use MidiModel::{highest,lowest}_note(), center ranges that don't fit
on the data range
2025-07-01 17:31:42 -06:00
Paul Davis
baf41a65c3
some incremental improvements in scroomer behavior
...
Notably dbl-click works consistently/reliably
2025-06-30 09:39:51 -06:00
Paul Davis
73f4378a51
more adjustments to scroomer drag logic
...
1. use an idle callback
2. MidiViewBackground::apply_note_range() now returns true/false
depending on whether or not it was able to make the requested change.
It might fail due to out of bounds note line size, for example.
2025-06-16 23:01:10 -06:00
Paul Davis
49597c6e2c
do no modify data note range in MidiViewBackground based on user requests
2025-06-13 17:20:09 -06:00
Paul Davis
5208fdce2c
the continuing saga of MIDI note line geometry and the scroomer
2025-06-10 12:28:33 -06:00
Paul Davis
eefe584070
another round of fixing for note-to-y and y-to-note and note line setup
2025-06-09 09:29:52 -06:00
Paul Davis
80a34fc3ec
stop crash from adding a note in a region also shown in an invisible pianoroll
...
if the height of the pianoroll has not been set, we can't do the math
for the note range display.
2025-06-04 20:41:29 -06:00
Paul Davis
baa855d3a0
fix an error with piano roll header display for a new track
2025-06-04 20:41:03 -06:00
Paul Davis
134907b9b1
fixups for pianoroll header/midi view background key/note positions
2025-06-04 14:11:40 -06:00
Paul Davis
03bd3da740
fix initialization order
2025-06-04 14:11:40 -06:00
Paul Davis
06593d1a79
pianoroll note labelling: pixel pushing, crash prevent, theme utilization for fonts
2025-06-03 23:17:53 -06:00
Paul Davis
bbc9089264
extend MidiViewBackground API
...
1. provide access to an EditingContext for use in piano roll headers
2. provide pre-computed note positions and heights for use in
piano roll headers
2025-06-02 19:47:44 -06:00
Paul Davis
96a88b9dc2
NO-OP: whitespace in function call syntax
2025-06-02 19:46:55 -06:00
Paul Davis
1f18a4defc
change MidiViewBackground implementation
...
1. use a RectSet instead of a LineSet to draw note lines. Cairo provides
different coordinate -> pixel coloration rules for rectangles than for lines,
and it makes more sense in this case to use rectangles rather than fat lines.
2. change ::draw_note_lines() to ::setup_note_lines() since the method
doesn't actually draw anything.
2025-06-02 19:46:25 -06:00
Paul Davis
1ed9876446
Change various positions and dimensions to integer from double
...
This includes note heights, note positions, contents height
for streamviews, positions of tracks. It makes zero sense to think of these as
having potentially fractional positions.
In addition, fractional note heights and positions lead to numerous
errors drawing MIDI stuff at the pixel level.
2025-06-02 19:28:10 -06:00
Paul Davis
a47a443079
add a canvas item debug name to midi view background's note lines
2025-06-02 18:32:00 -06:00
Paul Davis
975b01060a
enforce a 1 octave minimum note range in MidiViews
...
May revisit this to allow less in the future
2025-04-28 08:58:25 -06:00
Paul Davis
609f5c0112
fix initial position/size of scroomer in pianorolls
...
This still needs some API to reset note_range_set when we change the model
being displayed
2025-02-25 13:12:57 -07:00
Paul Davis
e08dfcba5e
remove a couple of debugging printfs
2025-01-20 18:07:07 -07:00
Paul Davis
ab39c26f68
a variety of changes to make timeline-region editing-in-pianoroll to start to work
...
This also removes the useless "new pianoroll window" menu option and action
2025-01-20 18:05:19 -07:00
Paul Davis
5cade315fb
redraw (pianoroll) MidiView when note mode changes
...
This also fixes the position of the percussive mode canvas items
2025-01-15 10:34:46 -07:00
Paul Davis
678ebca032
don't always adjust note range in a MidiView after a model change
2025-01-14 16:49:58 -07:00
Paul Davis
4c34f3cd29
provide rudimentary button control over percussive/sustained drawing in clip editor
...
Note that the note length selector can always be used to change the length of a note added
via a click
2024-12-13 21:48:18 -07:00
Paul Davis
a7bd0da8ea
fix missing initialization
2024-11-09 09:19:01 -07:00
Paul Davis
fcf5bb88d5
cue editor/piano roll: starting to get mode buttons working and keybindings too
2024-10-17 07:44:30 -06:00
Paul Davis
59ed3d7138
cleanup canvas piano roll header so that it can exist with no current MidiView
2024-10-17 07:44:30 -06:00
Paul Davis
549defc068
more work on fixing pianorule recomposition of objects
2024-10-17 07:44:29 -06:00
Paul Davis
3bd2d39d51
fixes to get redraws when note range changes
2024-10-17 07:44:29 -06:00
Paul Davis
2b997343a4
first working visual evidence of MIDI display/editing on cue page
2024-10-17 07:44:29 -06:00
Paul Davis
e24d1d069d
all streamviews are now ViewBackgrounds
...
This new inheritance heirarchy lets us share (a very small piece of) code
between streamviews in the Editor and the nascent piano roll object on the cue
page.
2024-10-17 07:44:29 -06:00
Paul Davis
a550b6482f
start using the now-compilable MidiView
...
Nothing yet derives from this, but MIDI display items and drags
do use it.
2024-10-17 07:44:29 -06:00
Paul Davis
204d4237f8
further steps towards MidiRegionView outside the Editor
2024-10-17 07:44:29 -06:00