Need help figuring out the formula for ovl/pre

Discussion in 'UTAU Discussion' started by KNΞMΛTCS, May 19, 2017.

  1. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    As you know, I'm still half-assedly working on my Utau front-end Fuid/FVSS/whatever. However, I'm stuck at this problem with the overlap/preutterance that I can't figure out. Essentially, when Utau invokes wavtool.exe, it gives it, among other parameters, a special factor that adjusts the length of the note to account for overlap and preutterance. The basic number is derived from (currentpre) - (nextpre) + (nextovl), however on top of that there's something done to the number. There's a sort of dynamic "cap" that blocks the value from going any higher depending on the length of the note, the length of the note before it and the ratio of the preutterance to overlap, potentially among other things. If anyone understands this or has an idea what this is, please let me know. Thanks.
     
  2.  
  3. _caustic_

    _caustic_ Very Gay in a Straight Way Supporter Defender of Defoko

    Messages
    926
    Likes Received
    1,359
    Trophy Points
    130
    I'm pretty sure the cap is based on the length of the note before it and nothing more. Otherwise the overlap and preutterence values are exactly that in the oto. So you would need to look at the length of the previous note and then use the highest values that will fit in that constraint.
    What is the special number that adjusts the length? I guess in terms of the command line.

    I know absolutely no coding so at best all I could do is maybe explain how some of the numbers interact.
     
  4. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    On most longer notes, it follows the info as expected, with the basic addition mentioned above. However, on shorter notes the cap comes into play. Depending on the circumstances, it's either half the length of the note, half the length of the previous note, the full length of either, or occasionally something else which seems to be in interaction between one of those lengths and the preutterance. I've tried for several days now to find what signals these caps, but it seems to be quite complicated.
     
  5. PaintedCz

    PaintedCz VCCV UTAU English Moderator Tutor Defender of Defoko

    Messages
    62
    Likes Received
    208
    Trophy Points
    58
    I know that the preutterence will only go half way into the previous note. But if you use overlap, the overlap will extend it further out.

    I don't know the exact details of how it's computed, but I do know that if you make the overlap exactly half the preutterence, it will fit the previous note exactly. (Won't extend past the previous note and cause errors in the envelope.)

    I hope that makes sense and helps shed some more light on it!
     
  6. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    This is another detail I forgot to mention, thanks for bringing it up. Unfortunately, exact details are what I'm after - I have a rough (and most likely incomplete) idea, but I need to have the numbers.
     
  7. PaintedCz

    PaintedCz VCCV UTAU English Moderator Tutor Defender of Defoko

    Messages
    62
    Likes Received
    208
    Trophy Points
    58
    I might be able to get you some numbers.

    The length of a 4th note is 480.

    If you give the note after it a Preutterance of 480, and 0 overlap, the preutterence will extend 240 into that note.
    0 overlap.PNG

    If you make the Overlap 240 in this case, the note length will extend that extra 240 into the note.

    240 overlap.PNG

    The preutterence is still in the same place, but the overlap is added sort of backwards onto that?

    I don't know how the calculation is done when the note is longer than that, but I believe it has something to do with STP.
     
  8. _caustic_

    _caustic_ Very Gay in a Straight Way Supporter Defender of Defoko

    Messages
    926
    Likes Received
    1,359
    Trophy Points
    130
    Then length into the previous note also depends on the ratio between the overlap and preutterance.
    The further you drift from a 2:1 ratio the less into the previous note it will overlap....regardless of the values.
    But generally it can span the length of the entire note.

    But that's just basics and you probably already knew that.
    --- Double Post Merged, May 19, 2017 ---
    By cap you mean when the previous note is too short for those values and it shrinks them?

    for example I can have a note with the overlap of 200 and a preutternce of 400 (extreme example) and it could be shortened to something like 62.5 and 31.25 to fit within the shorter previous note.

    In that case it's a matter of you just findng a way to scale the values down without disrupting their relationship and then shifting the note forwards based on the number of milliseconds you shaved off the preutternce probably.
     
    Last edited: May 19, 2017
    Kiyoteru likes this.
  9. PaintedCz

    PaintedCz VCCV UTAU English Moderator Tutor Defender of Defoko

    Messages
    62
    Likes Received
    208
    Trophy Points
    58
    If I take these same two note, and shorten the first one to an 8th note (length 240) then the oto edits itself and cuts off the beginning of the note by 230.

    230 STP.PNG

    Honestly I was expecting 240, but it looks like possibly 10ms are being kept from the first note that aren't part of the preutterence or overlap? //shrugs haha
     
  10. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    I hope this a linear relationship and not a fancy ratio curve I have to attempt to reconstruct (I'm horrible at math). I noticed a similar reaction but can't get my head around exactly what numbers do it.

    @PaintedCz I think you're leaving out that we're working with 2 different units here, and a preutterence of 480 != a quarter note. The notes are in a unit system where a quarter note = 480 units regardless. Everything else is in milliseconds, which are tempo-dependant: a quarter note is 500ms at 120bpm, and 333.333...ms at 180.

    The STP value is something I'll have to play with, I'll admit I didn't really know what it did until now.
     
    Last edited: May 19, 2017
  11. _caustic_

    _caustic_ Very Gay in a Straight Way Supporter Defender of Defoko

    Messages
    926
    Likes Received
    1,359
    Trophy Points
    130
    I'm pretty sure it linear so I wouldn't worry about it.
    Even if it was a curve you probably wouldn't have to do it exactly like that for it to work.

    It's probably pretty safe to say that there are no curves in utau...
     
  12. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    Not true, pitch bends are definitely curves. For now, FVSS is only using a crappy linear portamento curve as a proof of concept though. This is the reason I'm using vocaloid style tuning, all I have to do is get data from a drawing control (already made that) and add it to the portamento.
     
  13. PaintedCz

    PaintedCz VCCV UTAU English Moderator Tutor Defender of Defoko

    Messages
    62
    Likes Received
    208
    Trophy Points
    58
    Honestly I don't do much with math yet. LOL
    I just record at 120, on quarter notes, and base everything I do in UTAU off that. LOL These examples are also done at BPM 120.

    What would the BPM need to be to make the quarter note 480ms? (because now I'm curious lol)


    If you press ACPT on a note it will apply any changes it is making on a notes oto, to that note in particular so you can see the exact numbers that it is changing.

    0 more overlap.PNG

    This is just the information I know. Does that help at all?
     
  14. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    60 seconds in a minute / 0.48 seconds (480ms) a beat = 125 beats per minute. This is probably why you got the units mixed up, at 120bpm they are almost the same (but not quite). And your information is partially helpful, thanks.
     
    PaintedCz likes this.
  15. PaintedCz

    PaintedCz VCCV UTAU English Moderator Tutor Defender of Defoko

    Messages
    62
    Likes Received
    208
    Trophy Points
    58
    ahh, I need to recalculate some things now. LOOL Thank you.
    (Not that I ever bothered to calculate anything from the start. You can only get so far on your intuition I suppose.)
     
  16. Khento

    Khento Ruko's Ruffians Defender of Defoko

    Messages
    18
    Likes Received
    151
    Trophy Points
    33
    Maybe this is what you're looking for?
    食い込み補正について
    [​IMG]
    先行発声が大きく、直前の音符の長さが短い場合、直前の音符よりも先に発声されてしまうという状況が発生する可能性がある。

    例えば、テンポ 360 で四分音符の「あ」「い」が続いている場面を考える。テンポ 360 において四分音符は 167 ミリ秒の長さがあるが、「い」の先行発声が 200 ミリ秒だとすると、「い」の方が先に発生されてしまう(ここでは「あ」の先行発声は 0 ミリ秒と仮定する)。

    そういうおかしな状況が発生しないよう、UTAU では、直前の音符の半分の長さ以上に先行発声が食い込んでいる場合は、直前の音符が半分生き残るように、先行発声などの長さを調整する。

    例の状況では、先行発声を約 83 ミリ秒にして、「あ」が半分発生されるようにする。

    この補正のことを、(俺は勝手に)食い込み補正と呼んでいる。食い込み補正の処理は以下。

    ◆食い込み補正の発動条件

    先行発声-オーバーラップ > 直前の音符の長さの半分
    であれば発動

    ◆食い込み補正率

    食い込み補正率 = 直前の音符の長さの半分÷(先行発声-オーバーラップ)

    ◆食い込み補正後の数値

    食い込み補正後の先行発声 = 補正前の先行発声×食い込み補正率
    食い込み補正後のオーバーラップ = 補正前のオーバーラップ×食い込み補正率
    食い込み補正後の STP = 補正前の先行発声-補正後の先行発声
     
  17. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    I hope google can translate this one. Let's see!
     
  18. _caustic_

    _caustic_ Very Gay in a Straight Way Supporter Defender of Defoko

    Messages
    926
    Likes Received
    1,359
    Trophy Points
    130
    pitchbends are more just a bunch of straight points connected to make a curve.
     
  19. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    True, but the way Utau handles it is by you giving it a few points and then mathematically interpolating in between them.
     
  20. PaintedCz

    PaintedCz VCCV UTAU English Moderator Tutor Defender of Defoko

    Messages
    62
    Likes Received
    208
    Trophy Points
    58
    As previous stated- Math is not my strong suit.
    But can't all the points just be connected linearly? Then you just need to have enough points and it'll look like a curve! :3c
    Mmm, but knowing where to put the point is probably on some kind of curve. XD'

    You might want to look into the pitch editing plug ins if you haven't already? That might have some insight.
     
  21. KNΞMΛTCS

    KNΞMΛTCS Just an UtaForum user Defender of Defoko

    Messages
    307
    Likes Received
    547
    Trophy Points
    115
    I already have pitch editing mostly sorted out, I just have to tweak the control and wire everything up. As I said I'm using an editor similar to Vocaloid's - no curve interpolation required.

    [​IMG]
     
    Khento and PaintedCz like this.

Share This Page