Shop OBEX P1 Docs P2 Docs Learn Events
Digital Audio Processor — Parallax Forums

Digital Audio Processor

TahirTahir Posts: 2
edited 2008-01-05 23:28 in Propeller 1
Hi,
I am new here.
I would like to know whether it is possible to do digital audio processing on Propeller with many simultaneous channels.
I would like to have capability similar to texas instrument's TAS3108 (8 channel Programmable Audio Digital Signal Processor).

http://focus.ti.com/docs/prod/folders/print/tas3108.html

Also I would like to learn more about Propellers architecture. Where should I start from.

BTW, I am really excited by what I have learnt about propeller so far.
Only thing that has stopped me from getting hands-on experience on Propeller is that
I have limited budget for my next project. So I am carefully evaluating different platforms for it.
I am based in Karachi, Pakistan. Most exciting stuff is not available in local market so
I will have to pay big bucks for shipping too

Regards
Tahir

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-01-05 05:25
    Hi Tahir and welcome,
    Yes it is possible to do audio processing on the Propeller, you won't get the same throughput because the TI chip is optimized for DSP. You can take a look at StereoSpatializer.spin in the Tool distribution for an example of audio processing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • TahirTahir Posts: 2
    edited 2008-01-05 07:37
    Thanks Paul.
    Yes I already came across the StereoSpatializer.spin . This looks really cool.
    Now I want to look into hardware/sampling part.
    I mean getting this to work with several real-time audio streams.
    Do you have any tips for such thing?

    Regards
    Tahir
  • Sleazy - GSleazy - G Posts: 79
    edited 2008-01-05 09:49
    ·· based on the props bottlenecked thruput and its INA count, concieveably getting more than 1 audiostream through the chip with 16 bits that is NOT delta sigma is going to be a rough road.·

    ·· you cant get more than 16 bits through without an external switch since the prop has only 32 pins.· 16 in 16 out with paralleled ADC DAC could be a good config.· Remember that delta sigma routines are noisy, not very smooth or reliable, and work on duty cycles.· Any good audio youd have to use paralleled ADC DAC or


    heres how I plan on doing·my audio synth processor

    get a decent adc in 16 bits from TI or your chiphouse of choice.· Something R2R for high speed.

    the software could use 2 cogs input· , 2 cogs output··to optimize the throughput.·· make sure the cogs are spaced apart so that you will not have sample errors from·instruction execution·latency or from high frequency noise.· Like cog 1,5 for in and cog 3,7 for in

    set up INA to have the high word (pins 16-31) as output and low word (pins 0 thru 15)

    set up the software to have the input cog·3·sample the low word of INA (16 bits) and write this·as the low word of a single·hub register of your choice.· Have cog·7 sample the·low word of INA·also (8 clocks later at the best)·write this to·the high word of·another·HUB register··you used to store the sample COG·3 stored earlier in the hub cycle.

    So this should produce·2 hub registers with 1 being sample·from cog·7·and the other being sample from cog 3\

    for the output, have cog 1 output to the high word of OUTA the hub register that cog 3's sample is in to the , and cog 5 also ouput to the high word of OUTA the register that cog 7's sample is in

    that way the 6 clocks you have to wait for hub access, you can perform some kind of audio processing instruction·in·the input cogs·

    this should give you the fastest throughput with the longest time to do audio processes inbetween hub access.

    and remember, if you try to use just one cog to sample the stream, and process it, and output it, youre going to run into local RAM cog buffer overflow, and youll just bottlenect the throughput.· Youll have to write your samples to the hub as fast as you can read them, that is, if you dont want to suffer lost samples, or you want more than a few milliseconds of information .

    remember Youre going to have to wait 16 clocks for each throughput data set per cog, that way by doubling the cogs you get 8 clocks per throughput.

    im thinking of trying 14 bit ADC DAC so i can leave 4 INA pins open for buttons and such.

    Post Edited (Sleazy - G) : 1/5/2008 9:54:08 AM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-05 11:19
    Tahir said...
    I am new here.
    Welcome, again!
    said...
    Also I would like to learn more about Propellers architecture. Where should I start from.
    Alas, there is no good tutorial for this. The main features are well explained in the data sheet and the manual, but not the way and techniques you can use them efficiently. Most people here have learned this by "trial and error" and more or less simple projects....
    said...
    ...thatI have limited budget for my next project. So I am carefully evaluating different platforms for it.
    To my understanding the costs for propeller ($20) will be only a small part of the overall cost of your project. 16 channel ADC/DAC and means for noise reduction (be it only high end gold connectors) will contribute to 90% of the cost.

    To make a useful evaluation you should have a clear understanding of the specific DSP algorithms needed: Amount of code and throughput bottleneck. Note that the Propeller is NOT designed as a DSP in the first place.
    The Propeller has a raw power of 20 (32-bit!) MIPS per COG, but this cannot be taken unquestioned:
    - it cannot be multiplied simply by 8, as you will need some COGs for lesser activities, or parallelisation of the algorithm might not work
    - there is neither a very fast multiplication nor division
    - the programm space per COG is limited; by advanced techniques to work around that (LMM) you pay a performance penalty, reducing throughput to 4 MIPS or less per COG
    - you will still have to wait for a C-compiler, if you do not want to recode your algorithms in assembly language (though you most likely would..)

    Post Edited (deSilva) : 1/5/2008 11:26:22 AM GMT
  • geokonstgeokonst Posts: 48
    edited 2008-01-05 13:03
    Parallax's shipping rates outside the us are crazy though. Total cost would be 3figures. I can see how Tahir hesitates. It took me a while myself to dicide to go on and by my first propstick.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-01-05 16:30
    Tahir,

    You may find this thread interesting if you have not seen it beore. (Guitar Effects Processor - Howler)


    http://forums.parallax.com/forums/default.aspx?f=25&m=232008


    Good luck

    Bob
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-01-05 16:31
    Let me try the URL again [noparse]:)[/noparse]

    http://forums.parallax.com/showthread.php?p=690777
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-01-05 23:28
    Bob, quick replies don't make links clickable, but you can edit your posts. Click on the pencil in the upper right of your message. In the editor, highlight your link and find the button to make it live.
Sign In or Register to comment.