79 lines
2.9 KiB
C
79 lines
2.9 KiB
C
|
|
#ifndef AUTO_BAND_TOP1_H
|
|||
|
|
#define AUTO_BAND_TOP1_H
|
|||
|
|
|
|||
|
|
#ifdef __cplusplus
|
|||
|
|
extern "C" {
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
//#define ARCH_32bit_MCU
|
|||
|
|
|
|||
|
|
#include <stdint.h>
|
|||
|
|
#include <string.h>
|
|||
|
|
#include <stdio.h>
|
|||
|
|
|
|||
|
|
typedef void (*TwoIntCallback)(int a, int b);
|
|||
|
|
typedef void (*ThreeIntCallback)(int a, int b, int c);
|
|||
|
|
typedef int (*ReadFlashCallback)(int address,int length,uint8_t* pOutput);
|
|||
|
|
|
|||
|
|
int AutoBandTop1_Init(void);
|
|||
|
|
void AutoBandTop1_RegisterCallBack_NoteOn(ThreeIntCallback pFunc);
|
|||
|
|
void AutoBandTop1_RegisterCallBack_CC(ThreeIntCallback pFunc);
|
|||
|
|
void AutoBandTop1_RegisterCallBack_NoteOff(TwoIntCallback pFunc);
|
|||
|
|
void AutoBandTop1_RegisterCallBack_ProgChange(TwoIntCallback pFunc);
|
|||
|
|
void AutoBandTop1_RegisterCallBack_PitchWheel(ThreeIntCallback pFunc);
|
|||
|
|
void AutoBandTop1_Metronome_External_1msTick();
|
|||
|
|
|
|||
|
|
// 注册读取flash回调函数,用户必须实现这个函数,用来读取flash中的数据,flash本身的地址偏移量在用户函数中实现
|
|||
|
|
// 例如用户把伴奏数据放在flash的0x10000开始的地址上,那么在用户函数中读取数据时应当加上这个偏移量,库在调用这个函数时是按照0偏移开始的
|
|||
|
|
void AutoBandTop1_RegisterReadFlashCallback(ReadFlashCallback pFunc);
|
|||
|
|
|
|||
|
|
void AutoBandTop1_Start(void);
|
|||
|
|
void AutoBandTop1_SetLoopMode(uint8_t mode,uint32_t countAfterStart);
|
|||
|
|
void AutoBandTop1_SetPiecePlayMode(uint8_t onoff,uint32_t startTick,uint32_t stopTick);
|
|||
|
|
void AutoBandTop1_StartWithNote(uint8_t note);
|
|||
|
|
void AutoBandTop1_StartWithNotes(uint8_t* notes,uint8_t noteCount);
|
|||
|
|
void AutoBandTop1_Stop(void);
|
|||
|
|
void AutoBandTop1_SyncStart(void);
|
|||
|
|
void AutoBandTop1_SetRunVar(int varIndex);
|
|||
|
|
void AutoBandTop1_Preamble(int index);
|
|||
|
|
void AutoBandTop1_Postamble(int index);
|
|||
|
|
void AutoBandTop1_Fillin(void);
|
|||
|
|
void AutoBandTop1_FillinWithIndex(int index);
|
|||
|
|
void AutoBandTop1_ChangeBPM(int bpm);
|
|||
|
|
int AutoBandTop1_GetRunVar();
|
|||
|
|
int AutoBandTop1_GetPostambleVar();
|
|||
|
|
int AutoBandTop1_GetPreambleVar();
|
|||
|
|
int AutoBandTop1_GetFillinVar();
|
|||
|
|
void AutoBandTop1_SetOneFingerProfile(int profile);
|
|||
|
|
void AutoBandTop1_Note_On(int32_t key,int32_t vel);
|
|||
|
|
int AutoBandTop1_GetCurrentBeat();
|
|||
|
|
int AutoBandTop1_GetCurrentStage();
|
|||
|
|
char* GetCurrentChordString();
|
|||
|
|
int AutoBandTop1_GetMeterUp();
|
|||
|
|
int AutoBandTop1_GetMeterDown();
|
|||
|
|
uint64_t AutoBandTop1_GetCurrentPlayTick();
|
|||
|
|
uint32_t AutoBandTop1_GetCurrentRunMeasure();
|
|||
|
|
|
|||
|
|
void AutoBandTop1_SetFillinAlignMode(int mode);
|
|||
|
|
|
|||
|
|
//// 设置一个preset存储缓冲区(用来存储一个preset在内存里)
|
|||
|
|
void AutoBandTop1_SetPresetStoreBuffer(uint8_t* pBuffer,int32_t length);
|
|||
|
|
int AutoBandTop1_LoadPresetItemFromFlash(int presetIndex);
|
|||
|
|
int AutoBandTop1_GetPresetItemCount();
|
|||
|
|
char* AutoBandTop1_GetPresetName();
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
extern ThreeIntCallback m1_pFunc_CallBack_NoteOn;
|
|||
|
|
extern ThreeIntCallback m1_pFunc_CallBack_CC;
|
|||
|
|
extern TwoIntCallback m1_pFunc_CallBack_NoteOff;
|
|||
|
|
extern TwoIntCallback m1_pFunc_CallBack_ProgramChange;
|
|||
|
|
extern ThreeIntCallback m1_pFunc_CallBack_PitchWheel;
|
|||
|
|
extern ReadFlashCallback m1_pFunc_ReadFlash;
|
|||
|
|
|
|||
|
|
#ifdef __cplusplus
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#endif
|