---
name: "midi_time"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/midi_time"
---

# midi\_time(3alleg)

The current position in the MIDI file, in seconds. Allegro game programming library.

## NAME

midi\_time - The current position in the MIDI file, in seconds. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern volatile long midi\_time;**

## DESCRIPTION

Contains the position in seconds in the currently playing midi. This is useful if you want to display the current song position in seconds, not as beat number.

## SEE ALSO

[**play\_midi**(3alleg)](/play_midi/3alleg.md), [**midi\_pos**(3alleg)](/midi_pos/3alleg.md), [**get\_midi\_length**(3alleg)](/get_midi_length/3alleg.md), [**exmidi**(3alleg)](/exmidi/3alleg.md)
