• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C5000 Ultra Low Power DSP » C5000 Ultra Low Power DSP Forum » Implementing a variable low-pass filter on the C5515
Share
C5000 Ultra Low Power DSP
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Top 6 Wiki Links
  • C5000 Main Wiki
  • C5000 Software
  • C5515 Boot-Image Programmer
  • CSL (including CSL 3.00)
  • C5000 Connected Audio Framework
  • Porting C5000 Teaching ROM to C5535 eZdsp
  • Forums

    Implementing a variable low-pass filter on the C5515

    • Nettech
      Posted by Nettech
      on Mar 29 2011 11:43 AM
      Prodigy160 points

      Hello everyone,

      I wrote a small and simple 3-voice synthesizer engine in Algebraic Assembly using CCS4.2.

      I have attached a CCS4 project. The code is commented.

      Currently, it gets note values from notes.inc, converts from ascii to a proper interval using interval.inc,  looks up pitch to the corresponding note in pitch.inc, and pulls waveform values from sine.inc.

      Timers 0,1, and 2 control the frequency of the wave playback, and DMA 0,1, and 2 are used to move the wave values into memory.

      There is a single main routine, driven by the interrupt rate of I2S0 (corresponding to the AIC sample rate, which is 48khz) which sums up the 3 voices, applies a crude linear envelope generator to each voice, and then feeds the results to the AIC.

      Is there a way to also apply a variable low-pass filter (12db/octave and frequency range of about 40-5000 hz) to the resultant waveforms?

      I have never seen code for a variable LPF before. It is always fixed LPF. The only idea i can think of is to use lookup tables with coefficients generated from 40 - 5000 hz stepped at some reasonable rate to balance resolution with the overall table size.

      Does anyone have any thoughts or ideas on a simpler way to implement a variable LPF?

      Thanks!!

      Chris

      2318.SynthPlay.zip

      C5505 C5515 synth music LPF variable assembly algebraic CCS4
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hyun Kim
      Posted by Hyun Kim
      on Mar 31 2011 11:31 AM
      Genius12725 points

      Hi,

      This sounds more looking for an algorithm or ideas on variable LPF. I wish some one post something useful here.

      Regards,

      Hyun

      ---------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      Check out these great resources

      http://processors.wiki.ti.com/index.php/Category:C5000
      --------------------------------------------------------------------------------------------------------- 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Michal Szymanski
      Posted by Michal Szymanski
      on Apr 02 2011 06:58 AM
      Expert1215 points

      In my opinion, window method is good option to implement variable filter. If you need to use IIR  filter, LUT might be a good option. But, if FIR filter is enough for you, use window method. It will allow you to tune filter for ANY frequency. Use formulas for different types of filters (LP,HP,BP,BR) and write function which will take certain frequency and filter type as input, and will generate filter coefficients.Using fixed kernel length is handy, but if your filtering code is flexible enough, you can also use coefficients amount as input parameter.   

      regards

      MS 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Nettech
      Posted by Nettech
      on Apr 08 2011 20:07 PM
      Prodigy160 points

      Yes, I think FIR with window will work fine. I only need a LowPass Filter. It looks like I will be generating a table of coefficients from 40 thru 6000 hz (I was hoping to avoid this, since it will sound grainy when I step thru the tables using an EG).

      Here is a more recent version of my code, which adds some more nice features and better commenting.

      Thanks to all!!

      Chris

      6562.C5515 synth.zip

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Michal Szymanski
      Posted by Michal Szymanski
      on Apr 09 2011 09:30 AM
      Expert1215 points

      If you  want to avoid using predefined coefficients table, then don't use it. I've pointed very easy way to generate coefficients in the fly.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Nettech
      Posted by Nettech
      on Sep 21 2011 18:45 PM
      Prodigy160 points

      Here is the same code, adjusted to work on the C5535 eZdsp usb stick. Had to change to i2s2 from i2s0, and use dma1 instead of dma0.

      4034.workspace_091811.zip

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Nettech
      Posted by Nettech
      on Dec 30 2011 13:57 PM
      Prodigy160 points

      Here is the same code, adjusted to work on the C5535 eZdsp usb stick, and an added MIDI interface, so that the synth engine can be controlled by an external keyboard. Bring your own MIDI interface to the UART. I just used a standard 6N137 circuit, and tapped right into the eZdsp's card edge connector (i know, living dangerously...hehehe).8816.midisynth.zip

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • irving rynning
      Posted by irving rynning
      on Apr 07 2012 22:24 PM
      Prodigy50 points

      I don't see any source code-- can you post that as well? 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Nettech
      Posted by Nettech
      on Apr 17 2012 21:52 PM
      Prodigy160 points

      Since this code was written in algebraic assembly language, the main source code is contained within vectors.asm, and all of the include files in the INC directory.

      I can't continue working with this code, because to this day I still have not come up with a workable solution for a variable filter. I only see that in floating-point DSPs, and they are all out of my price range.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use