本帖最后由 大明哥 于 2024-12-31 14:14 编辑
调音台 麦克风混响回声 控制 用的是一个 800 X 480 分辨率的屏幕,控制一个混响板子,控制混响参数,通过T5L的串口4进行控制
视频效果如下,因为手机录的视频,混响现场听起来( ^_^ )不错,手机拾音视频差一些 https://v.youku.com/v_show/id_XNjQ0Nzk4NzYwNA==.html
界面如下:
屏幕代码如下:
void main(){ INIT_CPU(); //系统初始化 PORT_Init();//IO口初始化
T0_Init();//定时器0初始化 T2_Init();//定时器2初始化
my_UART4_Init(115200); uart_init();//串口初始化
ws2812_writ_byte(8); //LED初始化 RetMicSet(); delay_ms(1000); ChangePage(1);
while(1){ Uart_Handle_all(); OneMsHandle();//1Ms一次 TenMsHandle();
Read_0xF00();//数据自动上传 } }
void TenMsHandle(void) { if(!TenmsFlag) return; TenmsFlag=0;
HunX_Wet(); HunX_Dry(); HunX_WeiYing(); HunX_ShuaiJian(); HunX_Switch();
Echo_Wet(); Echo_Dry(); Echo_Delay(); Echo_ShuaiJian(); Echo_Switch(); } }
void HunX_Wet(void) { u16readst=0;
readst=Read_Dgus(0x1200); if(readst==Mic_Set.MicWetNum) return;
Mic_Set.MicWetNum=readst; MicEffectSend(Mic_Set.MicWetNum*10, Mic_Set.MicDryNum*10, Mic_Set.MicDiffNum*5, Mic_Set.MicDecayNum*5, Mic_Set.HunXiangSW); }
细节自已去看下
混响板子代码主要目录如下:
混响相关参数如下: #if 1 intreverb_parameter_val(u16 wet,u16 dry,u8 diffusion,u8 decayfactor, u8 is_bypass,u8 idmode) { #if defined(TCFG_MIC_EFFECT_ENABLE)&& TCFG_MIC_EFFECT_ENABLE #if 1 u8 mode_id = idmode+5; Plate_reverb_TOOL_SET *parmt = &eff_mode[mode_id - mic_mode_seq0].plate_reverb_parm; parmt->parm.wet=wet; parmt->parm.dry=dry; parmt->parm.diffusion=diffusion; parmt->parm.decayfactor=decayfactor; parmt->is_bypass=is_bypass; plate_reverb_update_parm(&parmt->parm, parmt->is_bypass); #elif 1 u8 mode_id = idmode+5; //memcpy(&eff_mode[mode_id - mic_mode_seq0].echo_parm,&packet->data[1], sizeof(EF_ECHO_TOOL_SET)); EF_ECHO_TOOL_SET *parmt = &eff_mode[mode_id -mic_mode_seq0].echo_parm; parmt->parm.delay=delay_ms; echo_updata_parm(&parmt->parm, parmt->is_bypass); #elif 0//PARM_DEBUG ECHO_PARM_SET *parm = &parmt->parm; log_debug("delay%d, decayval %d, filt_enable %d, lpf_cutoff %d, wetgain %d, drygain %d\n", parm->delay, parm->decayval,parm->filt_enable, parm->lpf_cutoff, parm->wetgain, parm->drygain); #endif #endif return 0; } #endif 回声相关参数控制代码如下: int Echo_parameter_val(u16 wet,u16 dry,u16 delay,u16 decayfactor, u16 is_bypass,u16 idmode) { #ifdefined(TCFG_MIC_EFFECT_ENABLE) &&TCFG_MIC_EFFECT_ENABLE #ifTCFG_MIC_EFFECT_SEL==MIC_EFFECT_REVERB_ECHO u8 mode_id = idmode+5; EF_ECHO_TOOL_SET*parmt = &eff_mode[mode_id - mic_mode_seq0].echo_parm; parmt->parm.wetgain=wet; parmt->parm.drygain=dry; parmt->parm.delay=delay; parmt->parm.decayval=decayfactor; parmt->is_bypass=is_bypass; echo_updata_parm(&parmt->parm, parmt->is_bypass); #endif return 0; #endif }
简单讲到这里,有兴趣的,自已下载看看
|