1 / 13

Basic Audio Manipulation

ECE3551 - Microcomputer System 1. Basic Audio Manipulation. By Haitham Alogbi Instructor: Dr.Kepuska. Purpose. To use the blackfin processor BF-533 to implement what we have learned about the blackfin processor. My approach for this project by :

elysia
Download Presentation

Basic Audio Manipulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE3551 - Microcomputer System 1 Basic Audio Manipulation By HaithamAlogbi Instructor: Dr.Kepuska

  2. Purpose • To use the blackfin processor BF-533 to implement what we have learned about the blackfin processor. My approach for this project by : • Input Audio will play throw 4 speakers and all LEDs will be turned off. • PF8(once) : activate the IIR low pass filter , LED: 4 turn on • (twice) : activate the FIR low pass filter. LED :4, 5 turn on • PF9 (once) : activate the IIR High pass filter. LED :4,5,6,7 turn on • (twice) : activate the FIR High pass filter.LED:4,5,6,7,8,9 turn on • PF10: Activate / Deactivate the Mute function. LED :4,5,6,7,8,9

  3. Input Audio will play throw 4 speakers and all LEDs will be turned off. EX_INTERRUPT_HANDLER(FlagA_ISR) { if (low==0 && high==0) { *pFlashA_PortB_Data=0x00; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1];//l iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; Original(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } }

  4. Design Example IIR lowpass /High pass filter design • Transfer function for IIR filter. • we implement the Transfer function using the two formulas: • Matlab • Low pass filter frequencies : Fstop= 5000 Hz • Fpass = 8000 Hz • High pass filter frequencies : Fstop= 1400 Hz • Fc = 2000 Hz • Generate a Header file which include the filter coefficients.

  5. Problems I have faced while implementing the IIR low pass filter: • Filter coefficient collapsed and corrupt every now and then since yesterday night. Solutions: • Redesign the filter in math lab and redo the coefficient. But it is not a permanent solution because the problem keeps coming back

  6. pressing PF8(once): Activates IIR low pass filter. EX_INTERRUPT_HANDLER(FlagA_ISR) { if(*pFIO_FLAG_C == 0x0100) { *pFIO_FLAG_C = 0x0100; high=0; if(low<2) { low++; } else { low=0; } } }

  7. PF8(once) continue: EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(low==1) { high=0; *pFlashA_PortB_Data=0x01; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; lowpassfilterIIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } }

  8. pressing PF8(twice): Activates FIR low pass filter. EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(low==2) { high=0; *pFlashA_PortB_Data=0x03; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; highpassfilter_FIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } }

  9. pressing PF9(ONCE): Activates IIR High pass filter. EX_INTERRUPT_HANDLER(FlagA_ISR) { if(*pFIO_FLAG_C == 0x0200) { *pFIO_FLAG_C = 0x0200; low=0; if(high<2) { high++; } else { high=0; } } }

  10. PF9 (once)continue: EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(high==1) { low=0; *pFlashA_PortB_Data=0x0f; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; HighpassfilterIIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } }

  11. pressing PF9(twice): Activates FIR High pass filter. EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(high==2) //plays audio input through the high pass filter { low = 0; *pFlashA_PortB_Data=0x3f; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; lowpassfilter_FIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } }

  12. pressing PF10: Activates Mute function. EX_INTERRUPT_HANDLER(FlagA_ISR) { *pFIO_FLAG_C = 0x0400; if(mute<1) { mute++; } else { mute=0; } } } EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(mute==1) { high=0; low=0; mute_b(); } }

  13. conclusion • I got all other filters to work as expected in in this class . • I re-design the IIR low pass many times since yesterday night and it continues to • corrupt . Hopefully it will work during the demonstration. • things I would change: • If I have taken Signal and Systems I would be able to • improve my filter and how they sound.

More Related