Metronome

[color=#0000ff][i][color=#0000ff][i][color=#999999]This activity belongs to the GeoGebra book [url=https://www.geogebra.org/m/mes4bgft]The Domain of the Time[/url].[/color][/i][/color][/i][/color][br][br]Thanks to the seconds pendulum, the first precise clocks were made. This also led to the creation of the first metronomes..
[b]SCRIPT FOR SLIDER anima[/b][br][br][color=#cc0000][color=#cc0000]# Calculate the elapsed seconds dt; add one second if t1(1) < tt[/color][/color][br][color=#999999]SetValue(tt, t1(1))[br]SetValue(t1, First(GetTime(), 3))[br]SetValue(dt, (t1(1) < tt) + (t1(1) − tt)/1000)[/color][br] [br][color=#cc0000]# Move M. Visual and acoustic alert upon passing the vertical[/color][color=#999999][br][color=#999999]SetValue[/color](v, vt + dt gt)[/color][color=#0000FF][br]If(x(M - O) x(M + dt v - O) < 0 ∧ play, PlaySound(sin(440 2Pi x), 0, 0.1))[br]SetValue(p, If(x(M − O) x(M + dt v − O) < 0, p + 1, p))[br][/color][color=#999999][color=#999999]SetValue[/color](M, M + dt v)[/color] [br][br][br][br][br][color=#0000ff][color=#999999][color=#999999][color=#0000ff][color=#0000ff][color=#999999][color=#999999]Author of the activity and GeoGebra construction: [/color][/color][/color][color=#0000ff][color=#999999][color=#999999][url=https://www.geogebra.org/u/rafael]Rafael Losada[/url].[/color][/color][/color][/color][/color][/color][/color]

Information: Metronome