BleuBleu / FamiStudio

FamiStudio NES Music Editor
MIT License
1.58k stars 98 forks source link

Slide note triangle is only half the length of the note #46

Closed ridho9 closed 3 years ago

ridho9 commented 3 years ago

So I was trying slide note but the slide triangle is only half the length of the notes, but from what I can hear the slide does go to the target pitch correctly. I was using version 2.3.0 on Catalina

image
BleuBleu commented 3 years ago

Hi!

Ha, this is actually addressed in the documentation and is not a bug: https://famistudio.org/doc/pianoroll/#slide-notes

Let me do my best to explain why this happens. Remember, we are making music on the NES/Famicom and we have to deal with all the limitations of the hardware.

There are no real pitches on the NES, only "periods" that tells us how long/short is the square wave. As the pitch gets higher, the periods become small. Also, we can only use 8 bit integers on the NES.

So when you create a very long slide notes like this, the smallest pitch it can vary per frame is going to be 1 (actually 1/2, since we have 1 bit of fractional precision, we have twice the precision as FamiTracker for that kind of stuff.), and a some point you are going to reach the target pitch and it will stop.

To see this in action for yourself, do the same slide notes, but 3 octaves lower, you will notice the problem will be much less pronounced. This is because periods are much larger in the lower octaves.

-Mat

ridho9 commented 3 years ago

Ah I see, I do saw that in the documents. So the triangle in the image that I posted is working as intended then? (The triangle width is only half of the note length)

BleuBleu commented 3 years ago

Yes and no! :)

Its not a bug. But its probably not satisfactory for you. In most cases where slides are short, or if you are at lower octaves, the end of the triangle will more-of-less perfectly match with the end.

In you case, you have the worst-case scenario: a very long slide, and at high pitch (where the precision is pretty bad). So the slide ends up terminating early. You can try making the slide shorter, that is likely to help.

In either cases, the slide will stop whenever the target note is reached.

Sorry if I am not very good at explaining it.

-Mat

ridho9 commented 3 years ago

Ah I see. Thanks! I really enjoyed using famistudio, finally something that I could use

BleuBleu commented 3 years ago

No problem. Join us on Discord if you have other questions.

https://discord.gg/88UPmxh