Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

get_midi_length(3alleg4) [netbsd man page]

get_midi_length(3alleg4)					  Allegro manual					  get_midi_length(3alleg4)

NAME
get_midi_length - Determines the total playing time of a midi, in seconds. Allegro game programming library. SYNOPSIS
#include <allegro.h> int get_midi_length(MIDI *midi); DESCRIPTION
This function will simulate playing the given MIDI, from start to end, to determine how long it takes to play. After calling this function, midi_pos will contain the negative number of beats, and midi_time the length of the midi, in seconds. Note that any currently playing midi is stopped when you call this function. Usually you would call it before play_midi, to get the length of the midi to be played, like in this example: length = get_midi_length(my_midi); play_midi(my_midi); do { pos = midi_time; textprintf_ex(screen, font, 0, 0, c, -1, "%d:%02d / %d:%02d ", pos / 60, pos % 60, length / 60, length % 60); rest(100); } while(pos <= length); RETURN VALUE
Returns the value of midi_time, the length of the midi. SEE ALSO
load_midi(3alleg4), midi_time(3alleg4), midi_pos(3alleg4), exmidi(3alleg4) Allegro version 4.4.2 get_midi_length(3alleg4)

Check Out this Related Man Page

get_midi_length(3alleg4)					  Allegro manual					  get_midi_length(3alleg4)

NAME
get_midi_length - Determines the total playing time of a midi, in seconds. Allegro game programming library. SYNOPSIS
#include <allegro.h> int get_midi_length(MIDI *midi); DESCRIPTION
This function will simulate playing the given MIDI, from start to end, to determine how long it takes to play. After calling this function, midi_pos will contain the negative number of beats, and midi_time the length of the midi, in seconds. Note that any currently playing midi is stopped when you call this function. Usually you would call it before play_midi, to get the length of the midi to be played, like in this example: length = get_midi_length(my_midi); play_midi(my_midi); do { pos = midi_time; textprintf_ex(screen, font, 0, 0, c, -1, "%d:%02d / %d:%02d ", pos / 60, pos % 60, length / 60, length % 60); rest(100); } while(pos <= length); RETURN VALUE
Returns the value of midi_time, the length of the midi. SEE ALSO
load_midi(3alleg4), midi_time(3alleg4), midi_pos(3alleg4), exmidi(3alleg4) Allegro version 4.4.2 get_midi_length(3alleg4)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to get timestamp of a file in a perl script

I have seen this posting here: perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:%02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' file1.txt I need to use it inside a perl script. Can anybody please help me out. (5 Replies)
Discussion started by: biswajeet.beher
5 Replies

2. UNIX for Dummies Questions & Answers

perl yesterday's date in mmddyyyy format

Hi, Below command is producing yesaterday's date in mmddyy format - perl -e '@T=localtime(time-86400);printf("%02d%02d%02d",$T+1,$T,($T+1900)%100)' But i want the date in mmddyyyy format; plz help. Thankx, Rahul Bahulekar. ---------- Post updated at 05:13 AM ---------- Previous... (1 Reply)
Discussion started by: rahulbahulekar
1 Replies

3. Ubuntu

MIDI sync to external daw Yamaha AW4416

I am trying to sync up my Yamaha AW4416 to ubuntu studio 9.10 in order to use drum and midi sounds. I have tried using MTC and midi clock slave and master but to no avail. I am using an Edirol UA-25 usb soundcard with the advance switch on to enable midi. Any ideas or is this impossible? (2 Replies)
Discussion started by: stelloscuro
2 Replies

4. Shell Programming and Scripting

Formatting date time in unix

while read l do vTimeCreated=`perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:% 02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' ${l}` echo "${l} || ${vTimeCreated}" >> ${fPrefx}_Output_Files_${vDate}.txt done < servername.txt Using the above code to format date time for each of the... (0 Replies)
Discussion started by: HeadBang
0 Replies

5. UNIX for Dummies Questions & Answers

Formatting date time in unix using perl breaks

while read l do vTimeCreated=`perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:% 02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' ${l}` echo "${l} || ${vTimeCreated}" >> ${fPrefx}_Output_Files_${vDate}.txt done < servername.txt Using the above code to format date time for each of... (5 Replies)
Discussion started by: HeadBang
5 Replies

6. Shell Programming and Scripting

Most vexing: Sed or Awk scripting for date conversion needed

Hi, I have some files being sent to me that have dates in them in this format: from 1/8/2011 15:14:20 and I need the dates in this format (mysql date format) To 2011-01-08 15:14:20 all I have so far is the regexp that detects the format: sed -r -e 's@\1/\2/\3\4\5\6]::$@do... (7 Replies)
Discussion started by: Astrocloud
7 Replies

7. Programming

Reuse format strings

I have a collection of format strings for sscanf, such as "%02d%*1s%02d%*1s%02d" to read in certain formatted strings, such as dates, times, etc. I wonder if there is a way to use them in printf without some changes? The example above would not work - at least I can't think of any ways to... (4 Replies)
Discussion started by: migurus
4 Replies