KT24-1110_65E-HA-651B/cpu/br25/audio_dec/audio_dec_midi_ctrl.h

101 lines
3.0 KiB
C
Raw Permalink Normal View History

2024-11-10 10:44:17 +00:00
#ifndef _AUDIO_DEC_MIDI_CTRL_H_
#define _AUDIO_DEC_MIDI_CTRL_H_
#include "asm/includes.h"
#include "media/includes.h"
#include "system/includes.h"
#include "app_config.h"
#include "audio_config.h"
#include "audio_dec.h"
#include "app_main.h"
#include "asm/dac.h"
#include "clock_cfg.h"
#include "key_event_deal.h"
#include "midi_ctrl_decoder.h"
/*----------------------------------------------------------------------------*/
/**@brief 打开midi ctrl解码
@param sample_rate:
@param *path:
@return 0
@return 0
@note
*/
/*----------------------------------------------------------------------------*/
int midi_ctrl_dec_open(u32 sample_rate, char *path);
/*----------------------------------------------------------------------------*/
/**@brief 关闭midi ctrl解码
@param
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_dec_close(void);
/*----------------------------------------------------------------------------*/
/**@brief 乐器更新
@param prog:
@param trk_num : (0~15)
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_set_porg(u8 prog, u8 trk_num);
/*----------------------------------------------------------------------------*/
/**@brief 按键按下
@param nkey:0~127
@param nvel:0~127
@param chn :(0~15)
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_note_on(u8 nkey, u8 nvel, u8 chn);
/*----------------------------------------------------------------------------*/
/**@brief 按键松开
@param nkey:0~127
@param chn :(0~15)
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_note_off(u8 nkey, u8 chn);
/*----------------------------------------------------------------------------*/
/**@brief midi 配置接口
@param cmd:
@param priv:cmd的结构体
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_confing(u32 cmd, void *priv);
/*----------------------------------------------------------------------------*/
/**@brief midi keyboard 设置按键按下音符发声的衰减系数
@param obj:
@param samp:samplerate_tab坐标
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_confing_set_melody_decay(u16 val);
/*----------------------------------------------------------------------------*/
/**@brief 弯音轮配置
@param pitch_val:,1 - 65535 256,
@param chn :(0~15)
@return
@note
*/
/*----------------------------------------------------------------------------*/
void midi_ctrl_pitch_bend(u16 pitch_val, u8 chn);
#endif