This is a part of the Kinetiszer project.
midi.h@0:5a419ba2726d, 2014-10-28 (annotated)
- Committer:
- Clemo
- Date:
- Tue Oct 28 12:19:22 2014 +0000
- Revision:
- 0:5a419ba2726d
Error & warning free (I believe as I don't know how to clean).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Clemo | 0:5a419ba2726d | 1 | /* |
Clemo | 0:5a419ba2726d | 2 | Copyright 2013 Paul Soulsby www.soulsbysynths.com |
Clemo | 0:5a419ba2726d | 3 | This file is part of Atmegatron. |
Clemo | 0:5a419ba2726d | 4 | |
Clemo | 0:5a419ba2726d | 5 | Atmegatron is free software: you can redistribute it and/or modify |
Clemo | 0:5a419ba2726d | 6 | it under the terms of the GNU General Public License as published by |
Clemo | 0:5a419ba2726d | 7 | the Free Software Foundation, either version 3 of the License, or |
Clemo | 0:5a419ba2726d | 8 | (at your option) any later version. |
Clemo | 0:5a419ba2726d | 9 | |
Clemo | 0:5a419ba2726d | 10 | Atmegatron is distributed in the hope that it will be useful, |
Clemo | 0:5a419ba2726d | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
Clemo | 0:5a419ba2726d | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Clemo | 0:5a419ba2726d | 13 | GNU General Public License for more details. |
Clemo | 0:5a419ba2726d | 14 | |
Clemo | 0:5a419ba2726d | 15 | You should have received a copy of the GNU General Public License |
Clemo | 0:5a419ba2726d | 16 | along with Atmegatron. If not, see <http://www.gnu.org/licenses/>. |
Clemo | 0:5a419ba2726d | 17 | */ |
Clemo | 0:5a419ba2726d | 18 | |
Clemo | 0:5a419ba2726d | 19 | #ifndef __MIDI_H__ |
Clemo | 0:5a419ba2726d | 20 | #define __MIDI_H__ |
Clemo | 0:5a419ba2726d | 21 | |
Clemo | 0:5a419ba2726d | 22 | |
Clemo | 0:5a419ba2726d | 23 | //frequency of all midi notes (rounded to nearest integer) |
Clemo | 0:5a419ba2726d | 24 | extern const uint16_t MIDI_freqs[128]; |
Clemo | 0:5a419ba2726d | 25 | |
Clemo | 0:5a419ba2726d | 26 | //midi constants |
Clemo | 0:5a419ba2726d | 27 | #define NOTE_OFF 128 |
Clemo | 0:5a419ba2726d | 28 | #define NOTE_ON 144 |
Clemo | 0:5a419ba2726d | 29 | #define PITCH_WHEEL 224 |
Clemo | 0:5a419ba2726d | 30 | #define CONTROLLER 176 |
Clemo | 0:5a419ba2726d | 31 | #define SYSEXBEGIN 240 |
Clemo | 0:5a419ba2726d | 32 | #define SYSEXEND 247 |
Clemo | 0:5a419ba2726d | 33 | #define CC_PITCHLFO 1 |
Clemo | 0:5a419ba2726d | 34 | #define CC_PORTAMENTO 5 |
Clemo | 0:5a419ba2726d | 35 | #define CC_FILTERENV 16 |
Clemo | 0:5a419ba2726d | 36 | #define CC_DISTORTION 17 |
Clemo | 0:5a419ba2726d | 37 | #define CC_FILTCUTOFF 74 |
Clemo | 0:5a419ba2726d | 38 | #define CC_AMPENVR 72 |
Clemo | 0:5a419ba2726d | 39 | #define CC_AMPENVA 73 |
Clemo | 0:5a419ba2726d | 40 | #define CC_FILTRES 71 |
Clemo | 0:5a419ba2726d | 41 | #define CC_AMPENVD 75 |
Clemo | 0:5a419ba2726d | 42 | #define CC_LFOCLOCKDIV 79 |
Clemo | 0:5a419ba2726d | 43 | #define CC_PWM 91 |
Clemo | 0:5a419ba2726d | 44 | #define CC_AMPLFO 92 |
Clemo | 0:5a419ba2726d | 45 | #define CC_FILTLFO 93 |
Clemo | 0:5a419ba2726d | 46 | #define CC_PITCHENV 94 |
Clemo | 0:5a419ba2726d | 47 | #define CC_FLANGE 95 |
Clemo | 0:5a419ba2726d | 48 | |
Clemo | 0:5a419ba2726d | 49 | //sysex message types, used by librarian software |
Clemo | 0:5a419ba2726d | 50 | #define SYSEX_PATCH 0 |
Clemo | 0:5a419ba2726d | 51 | #define SYSEX_WAVE 1 |
Clemo | 0:5a419ba2726d | 52 | #define SYSEX_MEM 2 |
Clemo | 0:5a419ba2726d | 53 | #define SYSEX_CALLPATCH 3 |
Clemo | 0:5a419ba2726d | 54 | #define SYSEX_CALLWAVE 4 |
Clemo | 0:5a419ba2726d | 55 | |
Clemo | 0:5a419ba2726d | 56 | byte MIDI_Get_curNote(void); |
Clemo | 0:5a419ba2726d | 57 | unsigned int MIDI_Get_Freq(byte notenum); |
Clemo | 0:5a419ba2726d | 58 | boolean MIDI_Get_KeyDown(byte notenum); |
Clemo | 0:5a419ba2726d | 59 | void MIDI_Let_ClockArpSpeed(unsigned int newspeed); |
Clemo | 0:5a419ba2726d | 60 | void MIDI_Let_SYSEXRead(boolean newval); |
Clemo | 0:5a419ba2726d | 61 | boolean MIDI_Get_ClockPresent(void); |
Clemo | 0:5a419ba2726d | 62 | void MIDI_Set_Channel(byte newchannel); |
Clemo | 0:5a419ba2726d | 63 | void MIDI_Init(void); |
Clemo | 0:5a419ba2726d | 64 | void MIDI_NoteOn(byte notenum); |
Clemo | 0:5a419ba2726d | 65 | void MIDI_NoteOff(byte notenum); |
Clemo | 0:5a419ba2726d | 66 | void MIDI_TriggerNote(byte notenum); |
Clemo | 0:5a419ba2726d | 67 | void MIDI_Reset(void); |
Clemo | 0:5a419ba2726d | 68 | void MIDI_TestButtonDown(void); |
Clemo | 0:5a419ba2726d | 69 | void MIDI_TestButtonUp(void); |
Clemo | 0:5a419ba2726d | 70 | void MIDI_TestButtonInc(void); |
Clemo | 0:5a419ba2726d | 71 | void MIDI_TestButtonDec(void); |
Clemo | 0:5a419ba2726d | 72 | void MIDI_ClockStart(void); |
Clemo | 0:5a419ba2726d | 73 | void MIDI_ClockContinue(void); |
Clemo | 0:5a419ba2726d | 74 | void MIDI_ClockStop(void); |
Clemo | 0:5a419ba2726d | 75 | void MIDI_ClockTick(void); |
Clemo | 0:5a419ba2726d | 76 | unsigned long MIDI_Get_ClockTick(void); |
Clemo | 0:5a419ba2726d | 77 | char MIDI_Get_PitchBend_Level(void); |
Clemo | 0:5a419ba2726d | 78 | void MIDI_SYSEX_read(byte databyte); |
Clemo | 0:5a419ba2726d | 79 | void MIDI_SYSEX_write_patch(void); |
Clemo | 0:5a419ba2726d | 80 | void MIDI_Poll(void); |
Clemo | 0:5a419ba2726d | 81 | |
Clemo | 0:5a419ba2726d | 82 | |
Clemo | 0:5a419ba2726d | 83 | #endif // __MIDI_H__ |