Feature #869

Link between notes & pitch track

Added by Rachel Bittner over 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:2014-02-10
Priority:HighDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

The behavior of the notes & pitch track should be linked:

1) Deleted pitch track => deleted note
2) Added pitch track => added note
3) Shifted pitch track => shifted note

History

#1 Updated by Rachel Bittner over 7 years ago

Maybe, instead of a forced interaction by interaction link, have a menu item called "readjust notes" that would re-estimate the notes based on the current pitch track values.

#2 Updated by Matthias Mauch over 7 years ago

  • Assignee set to Matthias Mauch

Very good idea. This seems to be not quite so urgent for your purposes, but I would (and will, eventually) like to look into that. Maybe with Chris. Assigning myself to it.

#3 Updated by Chris Cannam over 7 years ago

  • Assignee changed from Matthias Mauch to Chris Cannam
  • Priority changed from Normal to High

I've added some note editing functions. As of fce61899aeea we have

  • Split Notes at Selection Boundaries -- if any notes overlap the left and right edges of the selected region, they will be split into two notes and each one will be snapped to the underlying pitch track
  • Merge Notes -- all notes that overlap the selected region at all will be merged into a single note, and it will be snapped to the underlying pitch track
  • Snap Notes to Pitch Track -- manually causes all notes that are wholly within the selected region to be snapped to the pitch track (e.g. after editing the pitch track)

I don't feel these form a coherent set of editing commands, but they should give us something to work on.

Specific inconsistencies with the current functions include

  • Split Notes and Merge Notes operate on any notes that overlap the selected region at all, while Snap Notes only operates on notes that are wholly within the region
  • Split Notes and Merge Notes are not inverses of one another -- after you split a note at the right boundary of the selection, its right half is no longer a candidate for merging (because it isn't in the selection any more)
  • Split Notes and Merge Notes both automatically snap the newly formed notes to the pitch track -- reinforcing the idea that this is supposed to happen for all editing operations and making it seem odd that it doesn't happen when you edit the pitch track (i.e. why is Snap Notes necessary at all?)
  • Conversely, Split Notes and Merge Notes could be seen as over-eager to mess with note pitches when they are only really note duration operations

Incidentally, if you use Snap Notes on a note that has no underlying pitches, the note will be removed. So you can remove notes by deleting the pitch region and then snapping (Ctrl+Backspace Ctrl+=). You can probably do pretty much all the note timing edits you would want, with these commands, they just don't have quite the right feel as a package.

What would you change?

#4 Updated by Matthias Mauch over 7 years ago

I've added some note editing functions. As of fce61899aeea we have

Some functions are marvellous, some I don't quite get.

  • Split Notes at Selection Boundaries -- if any notes overlap the left and right edges of the selected region, they will be split into two notes and each one will be snapped to the underlying pitch track

Works fine (only splits once though, at the right boundary, which is better). I find splitting at the selection boundary counter-intuitive. I want to click in one place in the selection pane, and use that as the split point.

  • Merge Notes -- all notes that overlap the selected region at all will be merged into a single note, and it will be snapped to the underlying pitch track

Wonderful.
However: key combination doesn't work for me (unlike menu).

  • Snap Notes to Pitch Track -- manually causes all notes that are wholly within the selected region to be snapped to the pitch track (e.g. after editing the pitch track)

Great.

I don't feel these form a coherent set of editing commands, but they should give us something to work on.
Specific inconsistencies with the current functions include

  • Split Notes and Merge Notes operate on any notes that overlap the selected region at all, while Snap Notes only operates on notes that are wholly within the region

What about this. Split works at a single time point indicated in the selection pane. The other two operations, Merge and Snap operate on whatever... my current inclination is "any notes that overlap the selected region at all".

  • Split Notes and Merge Notes are not inverses of one another -- after you split a note at the right boundary of the selection, its right half is no longer a candidate for merging (because it isn't in the selection any more)

My least worry for now.

  • Split Notes and Merge Notes both automatically snap the newly formed notes to the pitch track -- reinforcing the idea that this is supposed to happen for all editing operations and making it seem odd that it doesn't happen when you edit the pitch track (i.e. why is Snap Notes necessary at all?)

Yes. So maybe I would do automatic snap to pitch track after the pitch track is changed. I think this will be the more likely scenario, certainly the one I would adopt for our current study. Ideally, then, notes that have been manually pitch-corrected could remain locked until manually re-snapped.
This, I believe would cover the vanilla case in which someone is not interested in adapting the note pitch to perceived pitch, and even a person who might want to do that would first have to go through the file to correct the pitch track, so then the auto-snapped note track would give them a good point to start with.

  • Conversely, Split Notes and Merge Notes could be seen as over-eager to mess with note pitches when they are only really note duration operations

I find that quite appealing, and certainly something nice to show off.

Incidentally, if you use Snap Notes on a note that has no underlying pitches, the note will be removed. So you can remove notes by deleting the pitch region and then snapping (Ctrl+Backspace Ctrl+=). You can probably do pretty much all the note timing edits you would want, with these commands, they just don't have quite the right feel as a package.

Thanks for this. It's lovely.

#5 Updated by Chris Cannam over 7 years ago

I find splitting at the selection boundary counter-intuitive. I want to click in one place in the selection pane, and use that as the split point.

We certainly could replace it with a "split at playback position". Clicking on the selection strip moves the playback pointer, so that would work.

There isn't any concept of a single position in the selection strip other than the playback pointer.

Of course it is also possible to split a note by clicking on the note itself.

The rationale for splitting at selection boundaries is just that it provides a way to say "this selection spans a note". That is basically two actions -- split at selection boundaries, then merge the notes within the selection -- and it doesn't quite work as planned at the moment. Perhaps an action that literally forms a single note from the duration of the selection would be more useful.

Merge Notes -- all notes that overlap the selected region at all will be merged into a single note, and it will be snapped to the underlying pitch track

Wonderful.
However: key combination doesn't work for me (unlike menu).

Bloomin' Mac. Do they work for the other functions? Is it just the ctrl+. that doesn't work?

Yes. So maybe I would do automatic snap to pitch track after the pitch track is changed.

I think we can do that easily enough.

I think this will be the more likely scenario, certainly the one I would adopt for our current study. Ideally, then, notes that have been manually pitch-corrected could remain locked until manually re-snapped.

That part might not happen straight away though.

#6 Updated by Chris Cannam over 7 years ago

OK, another revision (6ac45eb0f4c7).

Now we have

  • Split Note -- splits at playback position (i.e. the result of a single-click on the selection strip)
  • Merge Notes -- merges into a single note all the notes that overlap the selection at all
  • Form Note from Selection -- splits at selection boundaries and merges the notes within the selection into a single note

And I've updated all (at least I think all) the pitch-track editing functions so that they update the notes as well.

I've removed "Snap Notes to Pitch Track" since this should now be happening automatically everywhere (though I'm sure there'll turn out to be some problem with this that I haven't anticipated).

Two of the new functions currently have no keyboard shortcut -- can one of you find and commit some suitable shortcuts that actually work on the Mac? (Matthias, I nominate you to do that)

Thoughts?

#7 Updated by Gyorgy Fazekas over 7 years ago

Chris Cannam wrote:

OK, another revision (6ac45eb0f4c7).

Now we have

  • Split Note -- splits at playback position (i.e. the result of a single-click on the selection strip)

This was a bit unintuitive to me, until reading what it supposed to do I thought you need a selection.

  • Merge Notes -- merges into a single note all the notes that overlap the selection at all
  • Form Note from Selection -- splits at selection boundaries and merges the notes within the selection into a single note

These work very well

And I've updated all (at least I think all) the pitch-track editing functions so that they update the notes as well.

I've removed "Snap Notes to Pitch Track" since this should now be happening automatically everywhere (though I'm sure there'll turn out to be some problem with this that I haven't anticipated).

Two of the new functions currently have no keyboard shortcut -- can one of you find and commit some suitable shortcuts that actually work on the Mac? (Matthias, I nominate you to do that)

Thoughts?

A couple of bugs I found in my current build:

  • Once you merged a note you can't switch between Navigate and Edit modes (until you move something else)
  • In Edit mode, notes are split on click even if the up arrow is not shown (I could fix this unless this is desired)
  • If you have a selection but right click on another note outside of the selection and choose some note edit command, it still operates on the selection. I think this makes sense, but it is rather unexpected first. -- Maybe clicking a note in Navigate mode should update the selection ? * Sometimes when you split a note and there is no pitch track associated with one of the new notes is it moved to a strange location. Seen it a few times but can't yet reproduce it reliably.
  • Unrelated but Key and Mouse reference brings up a help window from SV. I was trying to find out how the pitch track editing works.

#8 Updated by Chris Cannam over 7 years ago

Split Note -- splits at playback position (i.e. the result of a single-click on the selection strip)

This was a bit unintuitive to me, until reading what it supposed to do I thought you need a selection.

Well, that's how it used to work -- until Matthias complained (further up this page) that it seemed a bit unintuitive to him and it should operate at a single point instead.

I suggest you two fight it out amongst yourselves.

Unrelated but Key and Mouse reference brings up a help window from SV.

Some of it is Tony-specific, but yes, there are still some oversights in there. I've fixed the window title (which said Sonic Visualiser) and submitted bug #911 for the rest.

btw, I realise that "Snap to Pitch Track" is still necessary -- because of course you can manually move a note away from the pitch track using the edit tool, and might reasonably want to automatically move it back again. You can in fact do this by selecting the whole note and using form-from-selection but it's not exactly intuitive.

#9 Updated by Gyorgy Fazekas over 7 years ago

My guess is that we don't need two different ways of splitting notes, since you can do this in edit mode, I would remove the option, or make it work with a selection which is something you can't do in edit mode.

General design consideration: If we have navigate and edit modes, shouldn't any sort of note editing only be allowed in edit mode?

#10 Updated by Chris Cannam over 7 years ago

General design consideration: If we have navigate and edit modes, shouldn't any sort of note editing only be allowed in edit mode?

I don't think so, no. The usual convention is that modes like these apply to tool use only, and menu functions are modeless.

Even modal tools can be quite confusing -- it'd be nice to be able to get rid of the distinction between modes completely (somehow).

#11 Updated by Matthias Mauch over 7 years ago

  • Once you merged a note you can't switch between Navigate and Edit modes (until you move something else)

This is a good point and actually really unhelpful. Any chance of getting this fixed?
Or are there any general problems with using the Edit mode? In particular, I would
like to show off the move-left/right boundary.

  • In Edit mode, notes are split on click even if the up arrow is not shown (I could fix this unless this is desired)

... and you can't delete them! This used to work doing Shift-Click, but doesn't
currently. This would be very helpful, too.

I'm going to put this into a new issue as well.

#12 Updated by Chris Cannam over 7 years ago

  • Assignee deleted (Chris Cannam)

#13 Updated by Chris Cannam over 7 years ago

We now have all the requested behaviour except

2) Added pitch track => added note

This is subtler than it looks because "adding a pitch track" is not an explicit action, just something that happens as a side-effect of choosing a different candidate in a region that formerly had no pitch track. This region could overlap existing notes, contain existing notes, or contain more than one potential note.

Example:

  • select a region that spans multiple notes
  • delete pitches from that region (notes also disappear)
  • select a longer region that spans that area but also covers some neighbouring notes
  • choose a different pitch candidate track in that region

Now we have a region that already contains at least one note (we've done nothing to suggest that the timings of those notes need to be corrected) and added a pitch track that should most likely be represented by more than one note. Short of running the note analysis algorithm again on the new pitch track, it's not clear what the right thing to do here is.

At the moment we just leave it up to the user to create new notes in this region using the "Form Note from Selection" function (which btw still lacks a good shortcut).

#14 Updated by Matthias Mauch about 7 years ago

  • Status changed from New to Resolved

I think this is satisfactory for the moment.

#15 Updated by Chris Cannam about 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF