sound synthesizer n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Sound Synthesizer PowerPoint Presentation
Download Presentation
Sound Synthesizer

Loading in 2 Seconds...

play fullscreen
1 / 8

Sound Synthesizer - PowerPoint PPT Presentation


  • 63 Views
  • Uploaded on

Sound Synthesizer . Abstract.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Sound Synthesizer' - traci


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
abstract
Abstract

This project consists on a sound synthesizer that plays four different notes using the four push buttons of the board. This buttons were set to play each note of the score of “Mary had a little lamb”. The LEDs of the board were configured to turn on when the push buttons are pressed.

board interface
Board Interface

In order to make this project work, the push buttons of the boards were enabled as input, and the interrupt was registered in the interrupt vector table. This process takes place in InitializeMary.c file.

This project uses LEDs 4-7, when the push buttons are pressed specific LEDs will light, and a specific sound will be produced.

In order to produce the specific sounds the cMath library was used with an algorithm that will be explained in the next slide. Four output channels were used to output the four sounds created.

interrupt service routine
Interrupt Service Routine
  • EX_INTERRUPT_HANDLER(Sport0_RX_ISR)
  • {
  • // confirm interrupt handling
  • *pDMA1_IRQ_STATUS = 0x0001;
  • // call function that contains user code
  • if(counter == 1||counter == 2||counter == 3||counter == 4)
  • {
  • Sound_Generation();
  • }
  • // copy processed data from variables into dma output buffer
  • iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;
  • iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut;
  • iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut;
  • iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut;
  • }
slide5

EX_INTERRUPT_HANDLER(Timer0_ISR)

  • {
  • *pTIMER_STATUS = 0x0001;
  • counter = 8;
  • }
  • EX_INTERRUPT_HANDLER(FlagA_ISR)
  • {
  • if(*pFIO_FLAG_C == 0x0100)
  • {
  • counter = 1;
  • FIO_ANOM_0311_FLAG_W(0x0100,pFIO_FLAG_C);
  • }
  • if(*pFIO_FLAG_C == 0x0200)
  • {
  • counter = 2;
  • FIO_ANOM_0311_FLAG_W(0x0200,pFIO_FLAG_C);
  • }
slide6

if(*pFIO_FLAG_C == 0x0400)

  • {
  • counter = 3;
  • FIO_ANOM_0311_FLAG_W(0x0400,pFIO_FLAG_C);
  • }
  • if(*pFIO_FLAG_C == 0x0800)
  • {
  • counter = 4;
  • FIO_ANOM_0311_FLAG_W(0x0800,pFIO_FLAG_C);
  • }
sound generation
Sound Generation

A4 = 440Hz(Central Frequency)

sound generation file
Sound Generation File
  • int n=0;
  • const float x = (1<<20);
  • float y; //initialize output
  • void Sound_Generation()
  • {
  • ///////E_NOTE/////////////
  • if(counter == 3)
  • {
  • *pFlashA_PortB_Data = 0x04;
  • n %= 146;
  • y=7*x*sinf(0.0215 * n);
  • iChannel0LeftOut = (int)y;
  • //counter = 0;
  • }