midfile.h
/* midfile.h - function which reads a midi file,and creates the track classes
This file is part of LibKMid 0.9.5
Copyright (C) 1997,98,99,2000 Antonio Larrosa Jimenez
LibKMid's homepage : http://www.arrakis.es/~rlarrosa/libkmid.html
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org>
***************************************************************************/
#ifndef _MIDFILE_H
#define _MIDFILE_H
#include <libkmid/dattypes.h>
#include <libkmid/track.h>
#include <stdio.h>
#include <kdelibs_export.h>
struct MidiFileInfo
{
int format;
int ntracks;
int ticksPerCuarterNote;
ulong ticksTotal;
double millisecsTotal;
ulong ticksPlayed;
int patchesUsed[256];
};
double KMID_EXPORT tempoToMetronomeTempo(ulong x);
double metronomeTempoToTempo(ulong x);
MidiTrack **readMidiFile( const char *name, MidiFileInfo *info, int &ok);
void parseInfoData( MidiFileInfo *info, MidiTrack **tracks, float ratioTempo);
void parsePatchesUsed( MidiTrack **tracks, MidiFileInfo *info, int gm);
#endif
MidiFileInfo::ntracks
int ntracks
Number of tracks.
Definition: midfile.h:49
MidiFileInfo
Contains all the information about a MIDI file.
Definition: midfile.h:39
MidiFileInfo::millisecsTotal
double millisecsTotal
Total number of milliseconds.
Definition: midfile.h:64
MidiFileInfo::ticksPerCuarterNote
int ticksPerCuarterNote
Ticks per cuarter note.
Definition: midfile.h:54
MidiFileInfo::patchesUsed
int patchesUsed[256]
Patches used in the MIDI file.
Definition: midfile.h:77
MidiTrack
Stores a MIDI track.
Definition: track.h:126
MidiFileInfo::ticksTotal
ulong ticksTotal
Total number of MIDI ticks.
Definition: midfile.h:59
MidiFileInfo::format
int format
Format of MIDI file.
Definition: midfile.h:44

KDE Home | KDE Accessibility Home | Description of Access Keys