propeller as eq for pocket amp?
rwgast_logicdesign
Posts: 1,464
ive recently been side tracked building a headphone amp, basically becuase i needed one and wanted to learn more about analog stuff..
i started thinking i could use the propeller to control some digital pots for gain and volume control, and build a decent little prop sound card using my amp design. then i started wondering what would it take to use the prop as a digital eg for my pocket amp..
i have some pricey 24bit adcs and a 12 bit dac if needed. im not sure if using the props dacs and adcs would be good enough. how posible would it be to use the prop as an eq? ive never written sound code so im not sure what it entails. is this whole idea a huge undertacking or is it as simple as a few passives with an obex object? id really like to make a kill headphone amp but have 0 intrest ib learning to much about coding an eq or any sound processing.
i started thinking i could use the propeller to control some digital pots for gain and volume control, and build a decent little prop sound card using my amp design. then i started wondering what would it take to use the prop as a digital eg for my pocket amp..
i have some pricey 24bit adcs and a 12 bit dac if needed. im not sure if using the props dacs and adcs would be good enough. how posible would it be to use the prop as an eq? ive never written sound code so im not sure what it entails. is this whole idea a huge undertacking or is it as simple as a few passives with an obex object? id really like to make a kill headphone amp but have 0 intrest ib learning to much about coding an eq or any sound processing.
Comments
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537918
On the prop you would have to go with somewhat lower performance I think, reduce bandwidth and resolution, and hand-code the multiplies (which are by the filter constants). Of course if you calculate the filter coefficients on the fly then the multiplies cannot be optimized. Splitting the work between many cogs will likely be needed (you'll need at least one to drive the I2S bus to talk to external ADC/DAC.
DSPs usually use limiting (rather than overflowing) arithmetic to clip an overly strong signal rather than produce even worse distortion.
I'm intrigued why you have expensive ADCs, they are commodity chips for audio now, for instance the WM8783 24bit stereo ADC, less than $1.
You might want to look at what a $5 chip can do in the way of audio signal processing and class-D amplification: STA339BWS http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00220929.pdf
I have done a guitar sound project with the propeller "propersound" and have had a lot of fun with it. I think, that the propeller is berhaps not the optimum but still very well suited. I find sound processing very interesting. Some (personal) remarks:
* If you want to use just any processor, you might want to consider "spinsemi FV-1" (google), because this chip is designed for stereo sound processing and has got high quality adc and dac onboard. They have good descriptions of effects and their programming.
* If you want to give propeller a try, then:
* Use external adc and dac, on chip sigma delta is not good enough.>=16bit codec.
* Spin is far too slow, you need a compiler, that can produce cog code. PropBasic worked for me very well.
* The bottleneck for the propeller might be the number of multiplications between two sample steps. The propeller-I does not have hardware multiply, so each multiplication takes its time. You have 20e6 Instructions per cog and second and you have 44e3 samples per second, thats about 450 instructions per cog and sample. I don't know by heart now, but a multiply will need about up to somewhat like 50...100 instructions. So I would try to find an algorythm and count the multiplies in it and then check, if this can fit into the cogs. The maths will have to be split to do it in parallel with multiple cogs.
Reverb or echo is rather easy, you could add such a feature into your project.
Have fun, Christof
http://forums.parallax.com/showthread.php?133173-FIR2PASM-Automatic-FIR-Filter-Code-Generator
The prop may not be the optimal choice, but you'd be surprised what it can handle. Best of luck.
i figured id ask though becuase the prop would be the fatest way for me to implement a dsp if there were librarys already and it was a capable solution.
ive looked at just implementing a 3band rc eq, but i have a feeling a chip will be alot smaller and sound alot better. going digital makes it easy to use a touch screen too instead of trimmers/pots.
@mark i ordered my dacs and adcs when i didnt know what i was doing. i didnt even want audio stuff i wanted adcs for measurement tools 24bit res sounded nice had no idea they wouldnt make good chips for scopes etc till later..
anyways thanks guys i will just look into more specialized cheaper chips for this. i just figured if the prop could play mp3s it would be able to do audio processing on them too
Unless you have unlimited time and money, use what you got, don't buy nothin' till you know what to buy.
Right now my main projects are a hi end prop dev board with superior OC capability and Bus speed. Ive been working on it like mad and am pleased with my protoboard version which is very rough, but close to meating some goals. Im really only being held back from finishing by lack of passive funds and really needing to learn a cad program, so I can try to etch a test board to show off for funding. Ive also decided to change alot of the orginal connector designs and shoot to release it with a 100% proto/quick start/hydra compatible fully loaded standard accessory board.
Ok Im sorry im getting wayyy off topic let me get to the point. A while ago I stumbled on the cmoy headphone amp, because I needed an amp and refuse to pay the prices the audio industry sets, plus I obviously have better ways to spend the little money I have. So I ordered a few samples and bread boarded the thing out. I wasnt to happy with its performance driving ear buds off my phone, so I did alot of research and have come up with a superior amp design of my own that has alot more current. Iooking at the audio industry I figured hey I could sell this thing for alot more than prop gear its easy to make and if its well received should give me enough cash to start boot strapping my prop projects.. It also gives me a basis to start working on maybe a more hi end desktop amp with LCD driven by a prop, and it is also a good start to a higher end audio interface for my prop board.
I would really like to do an EQ and use the prop the more I think about it. If it worked well in the high end desktop amp it could give the prop exposure to the blegh "audiophile" community and just be one more solid prop based project, maybe pave the way for someone to do a hi end mp3 player.. idk. Anyways like I said Im happy with my acuall amp sound and I think it will measure well when I get to the point of having someone test it. I think for the pocket amp I will just add some RC filters for low/mid/hi to keep size and mostly price down. This is entry level and adding a prop with adc and dac and going surface mount to make it pocket will definately require me to sell it for more than 50 bucks.
As far using the prop to drive an LCD and digital button interface along with audio processing in a higher end amp wether it be pocket or full desktop, Im in love with the idea very much, I want one!! so im gonna design it . Anyways heres where the trouble rolls in. Like I said I dont know anything about audio processing code. I do know a prop can play wav's and mp3's though so I would think a simple DSP should be possible. I understand EQs are basically just boosting the gain of certain frequencys and thats how the RC EQs work so Ill have to figure out how to code this and will probably mainly use C since its what Im skilled with runs quickly and allows for more memmory. If anyone knows where I could start and just genrally learn how to code an interface to DAC/ADC's it would be appreciated. The second rode block is in the audio market alot of people sell dedicated usb DACs... so this would be competing with that crowd which kind of sucks but o well... Anyways Im no audiophile I like good quality loud clear music and belive in measurements and practical designs not esoteric crazy 3 channel grounding systems, or black beauty caps, tube amps. None of that Im out to design something thats practical with hi quality audio not something that is badly overdesigned with rediclous audiophool parts. This is where im hoping someone could help me pick an ADC/DAC that is practical with hi quality sound. I have these ADS1210 ADC's I sampled thinking I could use for a scope making a mistake braino pointed out. Im not sure if there practical or good.... Id like dip ICs, but i might live with SMT stuff for this, I have a feeling im going to need a well thought out pcb anyways and protoboard wont cut it here. They are a bit pricey... with screen and all id like to sell for 100 but would settle for 200... Basically I wanna know solid audio chips that work well with the prop that have low distortion and can accurately represnt lossless audio from 10hz-22,000khz at the cheapest price possible, preferably that have a through hole and smt design.
Like I said im working away at my dev board and I really wanna earn a living off this stuff Im busting my a** to learn as much as I can. Right now the dev board is being held back becuase I need to get a real PCB and get some passive money togather to tweak it a little, Its almost there just need an interface polish some tweaks and maybe a switching 5vt regulator. If I can get some of these audio projects out there somehow I think they will be just the boost in income I need to start really getting my other stuff done. The audio community is just a much more massive market and amps are alot simpler and especially cheaper than micro computers with a full os, or even decently designed hi speed prop dev boards. Plus I love audio
I have one more question acually if I were to set my prop up with one of the many scope projects out there, like TV scope or the one in duanes dougans index, would it be enough to make my own hi quality measuremants, along with a propely set up sound card audio analyser?
One thing about audio to remember: The transducers are the weakest link. In this case the speakers, carefully check the earbuds. The audio can only sound as good as the speakers you are using.
You can run a not so good amp into excellent speakers, and they will sound pretty excellent.
You can run an excellent amp into not so good speakers and it will pretty much sound like Smile. Even after lots of fancy EQ and other compensation.
Always use the best possible speakers (and mics). My $100 Sennheiser over the ear headphones sound noticeably better than my $700 5.1 surround system. There is a huge cost benefit to spending more on better speakers or in this case headphones. There may be earbuds suitable for playing guitar through, but I have not heard of any.
Ear buds usually deliver the same performance as AM radio. They may claim 10hz-22khz, but that may be ... other than accurate.
Where does this idea that a Prop can play mp3s come from?
I'm pretty sure it's performance falls far short of that.
I guess it has been done with the aid of an mp3 chip.
first things first, this whole project is for use with mp3 player computers etc, not guitars or other instraments.
pive never heard seinheisers and dont have any headphones over 30 bucks. my buds are 10 dollar 108db 10-20000hz 16ohm sonys which i chose over way more exspensive ones after tryimg a few sets. i use to have a 2500 dollar car stereo with infinity amps and speakes it sounded incredible definately audiophile grade. my buds sound damn close to that except the bass obviously... but for buds they have good lows im pretty sure 10hz spec is right or there at least well bellow all the 20hz buds. i basically built this thing becuase i like to listen at concert volumes all the time (i know ima go deaf).
as far as a good amp can sound like this and a bad amp with good phones can sound like that is a bit of a loaded statement. no amp is a good amp unless it sounds exactly like it source except louder. a good amp should never make a sound quality difference only a volume difference. now its true ur sienhiesers and my sonys are different set ups. but with a good transparent amp both should sound like they did when driven from the sourcr the only thing a good amp should need to adjust is the voltage gain. driving buds clearly is no easy task at 16ohm vs 300 ohm seinheisers. so if my design has enough current to drive buds massively loud with very low voltage than when the gain is adjusted to higher voltages it should be spot on. but maybe its not... idk this is why id like to do solid measurements or have someone like nwavguy(google him very intresing practical blog) do them with his hi end equitment and blind listening tests. the audio world is just to full of Smile and mystasism to not do measurements.
in case neone reading is wondering my amp theoreticaly should be a very accurate low impedance amp. there are no resistors in the audio lines and one set of .22uf ac coupling caps. thats it. its a two stage design with the gain stage/input being two opamps in parallel to get alot of current rolling then an output stage with 250ma unity gain buffers..
this was no argument and no hostility twords u braino, ur a good guy and i like u. this is just me ranting and stating the facts about amps after a month of wading through audiophile bs written by people who belive in voodoo like virtual 3rd channel grounds, its very frustratimg to be new to audio and wonder what caps are best.. it doesnt matter to much lol.
How right you are. Any discussion with "audiophiles" can easily tip over into a dog fight.
Years ago I decided this is all psychological, some of my most wonderful musical experience have been produced via very poor equipment. It sounds very good and you have a lot of fun at the time and then you spend the rest of your life trying to reproduce that experience. Failing miserably as you forget it was the whole environment, physically, socially, mentally that produced that emotion not just the sound system.
So yes, lets go with measurements as best we can. As long as you are using tube amps and klipschorns that is:)
In addition to playing MP3 and WAV, I believe you can display and control equalizer functions...
@rayman i acually havent seen this do u have a link to the acual soundcard for the prop is it on ur site?
(Actually, I suppose I have to make sure the boards work before I put them up for sale on the website.)
Don't worry, there was a smiley at the end of my last statement. I'm all for getting things to measure correctly.
However I don't see how tube amps are holding back technology. So a few die hards insist on paying for hugely expensive, heavy, power guzzling amplifiers for whatever reasons they have. 99.999% of the world is getting on with it's solid state iPods etc and seems to be quite happy with it.
Then again a half decent tube amp has noise and distortion levels low enough as not to be noticeable. Certainly less annoying than the obvious fizzing sounds introduced by low bit rate mp3s which a lot of people are happy with.
Not so. Playing a wav just requires fetching the samples from somewhere and writing them out to an ADC.
Perhaps simple DSP. Thing is when you get into DSP you soon find you need a lot of multiplying. The Prop has no multiply instruction so soon you run out of processing power. Don't forget that a few simple rc circuits can actually being doing quite complicated stuff.
what if i were to use the math chip in conjunction with a prop that parallax sells would the bus speed be to slow
You mentioned the chip whos name shall not be mentioned here. Probably a good choice. Now we are all in deep trouble.
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en532298
I've designed a little home-made PCB for it, see photo. Codecs and amplifiers can be interfaced on a suitable daughter-board.
XMOS chips are overkill for this sort of application. They are ideal for high-end audio.
Actually, its an observation. Good speakers set the amp limit at "good", bad speakers set the amp limit at "bad", given the same amp. Speakers are the biggest bang for the buck, and easy to get right; but compensating for bad speakers with a more expensive amp is VERY difficult, that's all I'm saying.
If I were to spend money on earbuds, these (or similar) would be on my list http://www.newegg.com/Product/Product.aspx?Item=N82E16826106241
These headphones can probably make anything sound as good as it can http://www.newegg.com/Product/Product.aspx?Item=N82E16826106328 . These are best I need, as I cannot hear the difference between these and the $469 ones.
The classic analog "state variable" filter can be implemented digitally very efficiently(*) indeed (about 10 PASM instructions) and gives highpass, lowpass and bandpass outputs. By mixing these three outputs (two multiply-and-add operations) you get a pretty reasonable bass/treble circuit... So two multiplies per sample is all that's needed, ballpark of 100 instructions or 5us. 48000 sample rate stereo is about 20.8us, so one cog can easily do volume and tone controls I think.
So I've now started to look at what it takes to implement an all-digital mixing desk with the Prop
(*) if you choose the parameter f to be 2^-n and Q=1.0. Basically the code is Note that the unweighted sum of the three outputs equals the input, so you can get a totally flat response if treble and bass == 1.0