hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.03k stars 172 forks source link

PatternEditor issues #1859

Closed theGreatWhiteShark closed 11 months ago

theGreatWhiteShark commented 11 months ago

Hydrogen version * : 1.2


I just experienced some very strange behavior in the Pattern Editor

  1. Create a new song
  2. Fill the first instrument with notes
  3. Select all notes and move them up by dragging them into the ruler -> the notes will disappear and don't show up in the .h2song when saving now. This shouldn't be possible
  4. Hit Ctrl + Z to undo -> the notes reappear as NoteOff notes which can neither be selected using mouse dragging or Ctrl + A. WTF?

Edit: moving notes out of the pattern is probably not a bad idea. But undo has to work.


theGreatWhiteShark commented 11 months ago

Allow to select NoteOff notes using drag select and keyboard select

Hey @cme ,

In

https://github.com/hydrogen-music/hydrogen/blob/master/src/gui/src/PatternEditor/PatternEditor.cpp#L237 https://github.com/hydrogen-music/hydrogen/blob/master/src/gui/src/PatternEditor/PatternEditor.cpp#L1048 https://github.com/hydrogen-music/hydrogen/blob/master/src/gui/src/PatternEditor/PatternEditor.cpp#L1137

NoteOff notes are intentionally excluded from being selected and rendered as selected. Do you know why?

I never used them in a real song but just quickly toying with them feels super strange as they do not behave like regular notes.

theGreatWhiteShark commented 11 months ago

We can do this (the NoteOff note is rendered blue):

noteOffScreenshot

Triggering another note within the fixed length of a note is fine. But adding a NoteOff should cut the length of the note till the position of the stop note. Else the GUI suggests that the note will keep ringing. Which it does not.

cme commented 11 months ago

Allow to select NoteOff notes using drag select and keyboard select

NoteOff notes are intentionally excluded from being selected and rendered as selected. Do you know why?

Looks like I accidentally inherited that logic from the original drag event handlers which were set up only to handle start notes because the previous functionality was to change the lengths by dragging. No explicit stop notes in the demo songs meant I ended up not noticing.

theGreatWhiteShark commented 11 months ago

Looks like I accidentally inherited that logic from the original drag event handlers which were set up only to handle start notes because the previous functionality was to change the lengths by dragging. No explicit stop notes in the demo songs meant I ended up not noticing.

Alright. That's what I thought. I almost forgot about them too. One of those more hidden features