-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patha_midi.h
67 lines (54 loc) · 2.1 KB
/
a_midi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
Copyright (C) 2023-2025 Frenkel Smeijers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: MIDI.H
author: James R. Dose
date: May 25, 1994
Public header for MIDI.C. Midi song file playback routines.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __MIDI_H
#define __MIDI_H
enum MIDI_Errors
{
MIDI_Error = -1,
MIDI_Ok = 0,
MIDI_NullMidiModule,
MIDI_InvalidMidiFile,
MIDI_UnknownMidiFormat,
MIDI_NoTracks,
MIDI_InvalidTrack,
MIDI_NoMemory
};
typedef struct
{
void (*NoteOff)(int32_t channel, int32_t key, int32_t velocity);
void (*NoteOn)(int32_t channel, int32_t key, int32_t velocity);
void (*PolyAftertouch)(int32_t channel, int32_t key, int32_t pressure);
void (*ControlChange)(int32_t channel, int32_t number, int32_t value);
void (*ProgramChange)(int32_t channel, int32_t program);
void (*ChannelAftertouch)(int32_t channel, int32_t pressure);
void (*PitchBend)(int32_t channel, int32_t lsb, int32_t msb);
void (*SetVolume)(int32_t volume);
int32_t (*GetVolume)(void);
} midifuncs;
void MIDI_SetVolume(int32_t volume);
void MIDI_SetMidiFuncs(midifuncs *funcs, int32_t soundDevice);
void MIDI_ContinueSong(void);
void MIDI_PauseSong(void);
void MIDI_StopSong(void);
int32_t MIDI_PlaySong(uint8_t *song, int32_t loopflag);
#endif