helge17 / tuxguitar

Improve TuxGuitar and provide builds
Other
452 stars 37 forks source link

Let Ring issue #258

Open zuzute opened 7 months ago

zuzute commented 7 months ago

Hello.

I wrote about that problem in the other topic but decided to open it as a separate issue. The problem happens when we use L.R. (Let Ring):

Screenshot_2024-03-02_19-46-50

Look at the first bar. What can be wrong here? Theoretically, LR should stop at the end of 2 and 4 beats, but it doesn't:

Screenshot_2024-03-02_19-46-29

You need to explicitly stop every string that has a note with a Let Ring effect using a note on that string without LR. Look at bar 2, now it works. It even adds the natural feeling of muting unused strings. But it's ugly and hardly can be called "readable".

There are 2 ways to fix it:

1) Simple: decide that if after the chain of LR, there is a note without LR, all LR notes stop after that note ends. In the example above, after E4 and D4. Pros: doesn't need file format change, doesn't affect score unless it relies on this weird behavior. Cons. no? I think that is how it was planned to be. Also, it decreases the urgency of introducing 4 voices to TG, which will not happen until 2.0.

2) Advanced: introduce some "No Ring" (N.R.?) per-string effect, not visible on the score, which instantly cancels any sound on the specified string. Pros: more precise control to get what you want. Cons: harder to implement, required file format change (new effect).

Thoughts?

guiv42 commented 7 months ago

Theoretically, LR should stop at the end of 2 and 4 beats

Sorry if my question is stupid, I'm not a heavy user of LR: which theory are you referring to? See first 4 notes: I do not really understand why playing a "non-LR" note on string 1 would imply "stop LR on string 6".

And another question, just to help me understand: how did you produce the second screenshot?

zuzute commented 7 months ago

Sorry if my question is stupid, I'm not a heavy user of LR: which theory are you referring to? See first 4 notes: I do not really understand why playing a "non-LR" note on string 1 would imply "stop LR on string 6".

It just seems... logical. If there is no obvious way to stop Let Ring, it should be stopped globally if there is no LR for the next note (or there is a pause). At the note end, or, in case of a pause, at its start. For example, Guitar Pro does it correctly:

Screenshot_2024-03-03_19-43-40

Otherwise, we'll need to manually mute all four notes of the Em chord 'cause none of them fits the next D(5). There are no zero velocities in TG, so we should use a short "pppp" note, which is still can be heard. And it's visible on the score!

I guess there are not many LR users because it's hard to write readable scores for, say, heavily arpeggiated stuff when strings used change in every chord: you'll need to manually mute unused, or sometimes even all (when no voice leading) strings.

The better solution is, of course, to add the "Not Ring" per-position effect (not even per-string - is it even possible in TG to add an effect to nothing?). It'll also allow to handle voice leading more easily when some notes are canceled and others are not. But it'll require a file format change, so if it happens, it'll be no earlier than in 2.0.

You're the developer, the decision is up to you. Would be nice to have more input from users, but I can guess due to unclear LR behavior, many people write stuff like that:

Screenshot_2024-02-28_12-48-03

And another question, just to help me understand: how did you produce the second screenshot?

It's from REAPER's piano roll (https://reaper.fm). But you can get the same from the open-source Rosegarden, for example (matrix view).

guiv42 commented 7 months ago

OK, clear, thanks.

I think I'll have a look at the "simple solution" you suggested:

decide that if after the chain of LR, there is a note without LR, all LR notes stop after that note ends

Though I have never opened yet this part of the code (I mean anything linked to sound generation, midi sequencers etc). Taking over someone else's code can sometimes prove difficult, especially for a code of this size (and without any doc). So it might take some time.

zuzute commented 7 months ago

I think I'll have a look at the "simple solution" you suggested:

Great! Simple things are (usually) the best.

There are also three minor things I forgot to mention, but they're required for consistent behavior. 1) The beginning of a new bar should effectively cancel all LR effects on all strings; 2) The same goes for the pause; 3) Linked notes should ignore (1).

Screenshot_2024-03-04_21-10-23

I.e. in the screenshot above: 1) Em7 at the first bar sounds until the beginning of the second bar (next bar cancels LRs); 2) the second bar is completely silent; 3) Em7 starting at bar 3 sounds until the end of bar 4, 'cause notes are explicitly linked. 4) Bar 6, Fmaj7 stops at the last quarter, 'cause there is only the pause at that beat.

Though I have never opened yet this part of the code (I mean anything linked to sound generation, midi sequencers etc). Taking over someone else's code can sometimes prove difficult, especially for a code of this size (and without any doc). So it might take some time.

No worries/no hurry. Take your time. Taking over such a huge codebase is not a simple task! Schedule it for 2.x, for example, if it helps to release 1.6.2 faster.

guiv42 commented 7 months ago

One more question:

if after the chain of LR, there is a note without LR, all LR notes stop after that note ends

Since LR effect is associated to note and not to beat, could you please confirm my rewording? -> if after a chain of LR, there is a note starting after LR chain start and without LR, all LR effects shall stop when this note ends Example: Screenshot_20240304_224645

In this case, if LR is associated to E2 of first beat but not G3 (not visible on score), then I guess E2 shall sound through the full bar, whilst G3 only for a duration of one quarter. Correct?

zuzute commented 7 months ago

In this case, if LR is associated to E2 of first beat but not G3 (not visible on score), then I guess E2 shall sound through the full bar, whilst G3 only for a duration of one quarter. Correct?

This is a tricky situation. First, you can't say from the score which note has an LR effect, only that it's one of two (if two or more notes have an LR effect, the text is slightly bolder). Check the example below: 1) at bar 2, G (not E) has an LR effect, but it looks the same as in your example - we can't say for sure which not should ring; 2) at bar 3 both notes got LR and the text is slightly fatter. 3) however, if there would be a third note w/o LR, we can't say for sure which 2 of the 3 notes should ring (look at the bar 4). What if there are 4 notes? 5? Total mess!

Screenshot_2024-03-07_13-19-56

So, in my opinion, it should be written using voices (bar 1). It's clear and easy to understand. However the 2-voice limitation may prevent from writing relatively complex scores w/o crutches. Any pause (and a new bar, if there are no linked notes) should stop all sounds for the specific voice. LR is good for easy writing single-note arpeggios, i.e. usually with a pick. With a (classical/jazzy) fingerstyle or a hybrid (pick + occasional fingers), when two or more notes can be used at the same time, voices are better, 'cause we can't really distinguish which notes should ring w/o modifying how the LR effect is displayed.

Something like that:

Screenshot_2024-03-07_14-05-48

It's easier to write the first bar using LR and the second using voices.

profOnno commented 7 months ago

Don't know if this is usefull, take it or leave it.

https://static.guitar-pro.com/gp8/manual/Guitar-Pro-8-user-guide.pdf

Auto let ring This option consists in letting resonate the strings independently of the duration of the note. A rest in your track will stop this effect for all the strings until a new note is played.

Page 102 (96) Shows how guitar pro implements this.

cernael commented 6 months ago

As a reader of notation, I expect the Let Ring indication to work similarly to the pedal markings for piano, i.e. to indicate a stretch of beats for which the notes played on a string will continue to sound until a new note is played on that string. Situations where only one string should ring through are usually handled either with voices (as per zuzute's last example in the previous comment), or with ties to repeated notes as in a previous example.

I'm all for simple solutions when they work, but to put this completely in line with standard practice, I think the decision to attach LR to notes rather than beats might need to be reconsidered.

guiv42 commented 6 months ago

I think the decision to attach LR to notes rather than beats might need to be reconsidered

Not understood, could you please precise? Currently:

cernael commented 6 months ago

Yes. To conform to, not "theory", but established conventions for how the marking is expected to work, I think the LR might need to be attached to the beat at the software level. The mental model of players is not "let this note ring even though it's duration stops", but rather "let all notes ring, but let new notes replace old notes on the same string".

guiv42 commented 1 month ago

New file format for TuxGuitar is progressing: a first version is now available in tuxguitar-next branch. Take care, I don't recommend saving your files under this format until it's fully stable. But at least it makes it possible to work on this issue.

@zuzute, @cernael (or anyone else!): could you please review the proposed test scenario below? I would appreciate some feedback before trying to implement anything, to avoid possible reworks. Also, don't hesitate to add some test case you would find relevant.

letRing

Proposed behavior (in brackets: compliance of 1.6.4 to this proposal):

Note: select measures 5-6 and play, this reproduces issue #504

tablature file: letRing.zip

guiv42 commented 1 month ago

Sorry, I wasn't patient enough to wait for any feedback. It's now implemented in master branch, except for measure 11. I gave up the idea to move "letRing" from note to beat, implementation would be really complex. Especially, it would require a rework of all file formats import plugins, including some I cannot test as they require licences (GuitarPro, TablEdit).

I suggest closing issue.