• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdemid
 

libtdemid

  • libtdemid
midfile.h
1 /* midfile.h - function which reads a midi file,and creates the track classes
2  This file is part of LibKMid 0.9.5
3  Copyright (C) 1997,98,99,2000 Antonio Larrosa Jimenez
4  LibKMid's homepage : http://www.arrakis.es/~rlarrosa/libtdemid.html
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 
21  Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org>
22 
23  ***************************************************************************/
24 #ifndef _MIDFILE_H
25 #define _MIDFILE_H
26 
27 #include <libtdemid/dattypes.h>
28 #include <libtdemid/track.h>
29 #include <stdio.h>
30 #include <tdelibs_export.h>
31 
39 struct MidiFileInfo
40 {
44  int format;
45 
49  int ntracks;
50 
54  int ticksPerCuarterNote;
55 
59  ulong ticksTotal;
60 
64  double millisecsTotal;
65 
66  ulong ticksPlayed;
67 
77  int patchesUsed[256];
78 
79 };
80 
81 double KMID_EXPORT tempoToMetronomeTempo(ulong x);
82 double metronomeTempoToTempo(ulong x);
83 
93 MidiTrack **readMidiFile( const char *name, MidiFileInfo *info, int &ok);
94 
95 void parseInfoData( MidiFileInfo *info, MidiTrack **tracks, float ratioTempo);
96 
97 void parsePatchesUsed( MidiTrack **tracks, MidiFileInfo *info, int gm);
98 
99 #endif
MidiTrack
Stores a MIDI track.
Definition: track.h:127
MidiFileInfo
Contains all the information about a MIDI file.
Definition: midfile.h:40
MidiFileInfo::format
int format
Format of MIDI file.
Definition: midfile.h:44
MidiFileInfo::ticksTotal
ulong ticksTotal
Total number of MIDI ticks.
Definition: midfile.h:59
MidiFileInfo::millisecsTotal
double millisecsTotal
Total number of milliseconds.
Definition: midfile.h:64
MidiFileInfo::ntracks
int ntracks
Number of tracks.
Definition: midfile.h:49
MidiFileInfo::patchesUsed
int patchesUsed[256]
Patches used in the MIDI file.
Definition: midfile.h:77
MidiFileInfo::ticksPerCuarterNote
int ticksPerCuarterNote
Ticks per cuarter note.
Definition: midfile.h:54

libtdemid

Skip menu "libtdemid"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdemid

Skip menu "libtdemid"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for libtdemid by doxygen 1.9.1
This website is maintained by Timothy Pearson.