PLEASE, remove silence notes

And not copying and pasting, so rests ought to be removed because there exists at least one user who cannot find a use case of copying and pasting rests.

Therefore it should be possible to drag note events horizontally, because both use cases occur equally often in Hookpad; besides dragging the ends of a rest (without Alt) does not alter the position of “everything” else on the same row. This is not an argument for rendering rests invisible to the eyes or transparent to the controls.

And editable drum tracks have been suggested (though not formally requested iirc), so this would be on the Hookpad to-do list.

What then happens to the existing elements on index 0 and 1? If you store them at index 23 and 27 directly, only these original entries will be erased; when you insert them in a fixed-length array, you decide to delete the first two entries before insertion:

std::array<int, /* large constant */> A;
// storing
A[27] = 0;
// inserting
A[1] = 0; for (int i = 2; i <= 27; ++i) std::swap(A[i], A[i - 1]);

It becomes slightly more complicated for variable-length arrays or vectors, but that might really be what you meant in this context.

C++ is not a truly modern language, but actual “modern” C++ code uses RAII and smart pointers to hide away many, many cases of manual memory deallocation.

virtual destructors : ) ) ) )

It is not; “manually write code to displace them separately until they reach your desired destination” means this:

// inserting "manually"
A[1] = 0;
std::swap(A[2], A[1]);
std::swap(A[3], A[2]);
std::swap(A[4], A[3]);
// ...
std::swap(A[27], A[26]);

It is rest notes that achieve this abstraction; instead of having to move the cursor by grid units to the target destination, you could now displace your cursor by the exact distance as desired. This is not superfluous, unrestrained cursor movement is superfluous in the context of single-track piano roll sequencers, and indeed will make it behave like an “old school” tracker more than a piano roll.