添加一些关于midi播放的项目

This commit is contained in:
terryLP
2025-03-24 14:30:56 +08:00
parent e31eb22077
commit 498b4ef13b
699 changed files with 186162 additions and 1 deletions
@@ -0,0 +1,49 @@
#ifndef __PLAYER_H__
#define __PLAYER_H__
#include <stdint.h>
#include "SynthCore.h"
#ifdef __cplusplus
extern "C" {
#endif
enum PLAY_STATUS{
STATUS_STOP=0,
STATUS_REDAY_TO_PLAY=1,
STATUS_PLAYING=2
};
typedef struct _Player
{
uint32_t currentTick;
uint32_t lastScoreTick;
uint32_t status;
uint32_t decayGenTick;
uint8_t *scorePointer;
Synthesizer mainSynthesizer;
} Player;
extern void PlayerInit(volatile Player *player);
extern void Player32kProc(volatile Player *player);
extern void PlayerProcess(volatile Player *player);
extern void PlayerPlay(volatile Player *player);
extern void UpdateTick(volatile Player *player);
extern uint8_t PlayNoteTimingCheck(volatile Player *player);
extern void PlayUpdateNextScoreTick(volatile Player *player);
extern void PlayerResetSynthesizer(volatile Player *player);
#ifdef __cplusplus
} //end extern "C"
#endif
#endif