Find time from distance-speed graph

  • Thread starter Thread starter Metaphysics
  • Start date Start date
  • Tags Tags
    Graph Time
Click For Summary
SUMMARY

This discussion focuses on calculating the time taken for a playhead to travel different sections of an audio application where the playrate envelope varies. The initial section's time is easily calculated using the formula time = section length/speed. For subsequent sections, participants suggest using average speed and integrating the velocity as a function of distance, leading to a differential equation approach. The key equations discussed include the transformation for acceleration and the standard form for a straight line, allowing for the calculation of time as a function of velocity.

PREREQUISITES
  • Understanding of basic physics concepts such as speed, distance, and time.
  • Familiarity with differential equations and integration techniques.
  • Knowledge of linear functions and their graphical representations.
  • Experience with audio application automation and playrate manipulation.
NEXT STEPS
  • Learn to solve differential equations related to motion, specifically the equation $$\frac{dv}{dt}=\alpha v$$.
  • Study integration techniques for calculating areas under curves in velocity-distance graphs.
  • Explore the application of average speed in non-constant motion scenarios.
  • Investigate the use of linear functions in modeling real-world phenomena, particularly in audio processing.
USEFUL FOR

Audio engineers, software developers working on audio applications, and anyone interested in the mathematical modeling of motion in variable-speed scenarios.

Metaphysics
Messages
1
Reaction score
0
Playrate envelope.png

In audio application i can automate playrate envelope (playhead speed)
1 = original speed, 2 = 2 x original speed, 3 = 3 x original speed etc..

Now i need to calculate time it takes for playhead to travel each section

its easy to calculate time for section 1, where speed is constant
time = section 1 len/speed = 1/1 = 1 sec

but i don't know how to find time for section 2, section 3

can you help?
 
Physics news on Phys.org
Metaphysics said:
but i don't know how to find time for section 2, section 3
I don't really know what you're calculating. Nonetheless, it looks like the speed changes linearly in those sections, so you should be able to use the average speed.
 
I think my previous response was a bit glib, seeing as the horizontal axis is distance and not time. But for each section, you can write the speed as a linear function of distance, then rearrange and integrate.
 
I would follow a different approach from @Doc Al. Start with the standard transformation for the acceleration.
$$a=\frac{dv}{dt}=\frac{dv}{dx}\frac{dx}{dt}=v\frac{dv}{dx}$$In sections 2 and 3 ##\dfrac{dv}{dx}=\text{const.}=\alpha##. You can easily get the slope ##\alpha## in each section from the graph. Then $$\frac{dv}{dt}=\alpha ~v.$$Can you solve this simple differential equation to find ##v(t)##? If so, then do it, but don't forget the initial condition at the beginning of each section. Then invert the equation to find ##t## as a function of ##v## and you're done. If you cannot solve the differential equation, we are here to help.
 
Good stuff @kuruman.

I'll outline the approach I mentioned above (which was just the first that occurred to me). Start by expressing the velocity as a function of distance, which should be trivial since it's a straight line. For example, using the standard form for a straight line:
$$ v(x) = mx + b$$
That gives you the following simple differential equation, which you can solve:
$$v = \frac{dx}{dt} = mx + b$$

Either way, it's all good. (For fun, solve it both ways and compare.)
 

Similar threads

  • · Replies 49 ·
2
Replies
49
Views
4K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 8 ·
Replies
8
Views
696
  • · Replies 22 ·
Replies
22
Views
8K