Comment by svennidal

Comment by svennidal 3 days ago

5 replies

Nice. Although, it bothers me that the shorter lines are lower pitched than the longer lines. Don’t know why, but intuitively I feel like the pitch should go down as the line gets longer.

franze 3 days ago

Fixed

  //const lengthFactor = clamp(lineLength / 200, 0.5, 2); // outdated // Adjust between 0.5x and 2x
  const lengthFactor = clamp(200 / lineLength, 0.5, 2); //Reason: This aligns the instrument with the physical properties of real-world instruments, making it more intuitive and educational.
em3rgent0rdr 3 days ago

It probably bothers anyone that has a physics or music background.

istjohn 3 days ago

I mean, that's how a tuning fork, bell, string, or chime works in the real world. Frequency is inversely proportional to wave length.