Re: [LAD] simulating analog audio devices part II
2007/6/19, porl sheean [EMAIL PROTECTED]: thanks guys, i'll look into those models and links when i get a chance. i'm hoping to be able to learn a lot more about valve amps this way. apart from a few odds and ends it is hard to find out how they *really* work off the net. The AX84 P1 Theory Document: http://annex.ax84.com/media/ax84_m35.pdf Noob-oriented introductory document to their simplest SE amp, the P1. ( http://ax84.com/index.php?pg=legacyprojectsproject_id=p1 ) The Radiotron Designer's Handbook 4th Edition is online here: http://geek.scorpiorising.ca/RDH4.html The RDH is also pretty noob-friendly (everything you need to learn is there), it's a much longer read though. It starts by the describing the way a valve is made and works up to complex schematics. It's considered by many the bible for thermionic valves(tubes). ps. (offtopic): anyone know the approximate b+ voltage i should using for a SE 6v6 amp through a 4k primary? i built one from odds and ends (i seem to You need an OT with an higher primary impedance IMHO, 6V6 tubes need a higher load to operate correctly. Having a valve load mismatch might have bad consequences for your amp. At an anode voltage of 250V it should be a 5k5 ohm load and at 315V 8k5 ohm according to the RCA receiving tube manual. 4k is a bit low, you'd have to run the tube starved plate (at low plate voltages). The sound is usually considered poor when a valve is starved plate. it might be your kind of thing though. If it really is a 4k primary transformer I'd run it at a ~320V B+ and mis match the speaker wiring (old trick) to double the impedance to 8k (much closer to the ideal load)... i.e.: plug an 8 ohm speaker to the 16 ohms secondary tap (or 4 ohms speaker into the 8 ohms tap), that will effectively double the primary to secondary reflected impedance. And this configuration would give you around 5 Watts of power. Thats much cheaper then buying a new OT ;) Also a quick link to a well designed SE 6V6 based PA: http://ax84.com/static/corepoweramps/5W_SE/AX84_5W_SE_Poweramp_Schematic.pdf like that phrase) and my valves started glowing blue... looked cool though ;) hehe Some blue glowing is usually pretty normal, I have an 6L6GC based small combo sitting next to me with a blue glowing power tube, and its pretty fine. If I swap this Electro Harmonix tube for a chinese made one the blue glow disappears. You should watch out for any other part than the filament in a tube that are red plating though, now that would be dangerous. Watch out for those big power supply caps! always make sure they're completely discharged before you operate on your amp... potentially lethal voltages inside, as you probably already know. Cheers, -Giuseppe ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
thanks for the links! the ax84 one is really good, pretty much exactly what i was after - short and to the point (i don't mind a bit of complex math as long as it is explained why i am doing it :) i've looked through a few old valve books ( http://www.pmillett.com/technical_books_online.htm is an awesome site) but it was hard to find certain info. i should probably have told you that i am making a guitar amp that i want to sound dirty (not heavy metal distortion, but old overdriven blues sound). i was only talking about a 4k primary because i'm pretty sure that is what the OT that i gutted from my fender hotrod (a bit high rated for this project but i can't afford to buy much at the moment). i have tried the same tactic with PTs of old amps off ebay (the fender one doesn't have a 5V output and i want to use a tube rectifier), but even the small one i realised is 375-0-375 for the primary! i think this is a *little* over what i need, so i am going to have to buy a new PT. i can't figure out how the old amp used this voltage: it was only a p/p el34 amp (2 output tubes). how would it have brought the voltage down enough to not kill the valves? maybe el34s can handle a lot but i didn't think the preamp tubes could. anyway, sorry about how off topic this is. i should probably take my questions elsewhere. porl On 19/06/07, Giuseppe Zompatori [EMAIL PROTECTED] wrote: 2007/6/19, porl sheean [EMAIL PROTECTED]: thanks guys, i'll look into those models and links when i get a chance. i'm hoping to be able to learn a lot more about valve amps this way. apart from a few odds and ends it is hard to find out how they *really* work off the net. The AX84 P1 Theory Document: http://annex.ax84.com/media/ax84_m35.pdf Noob-oriented introductory document to their simplest SE amp, the P1. ( http://ax84.com/index.php?pg=legacyprojectsproject_id=p1 ) The Radiotron Designer's Handbook 4th Edition is online here: http://geek.scorpiorising.ca/RDH4.html The RDH is also pretty noob-friendly (everything you need to learn is there), it's a much longer read though. It starts by the describing the way a valve is made and works up to complex schematics. It's considered by many the bible for thermionic valves(tubes). ps. (offtopic): anyone know the approximate b+ voltage i should using for a SE 6v6 amp through a 4k primary? i built one from odds and ends (i seem to You need an OT with an higher primary impedance IMHO, 6V6 tubes need a higher load to operate correctly. Having a valve load mismatch might have bad consequences for your amp. At an anode voltage of 250V it should be a 5k5 ohm load and at 315V 8k5 ohm according to the RCA receiving tube manual. 4k is a bit low, you'd have to run the tube starved plate (at low plate voltages). The sound is usually considered poor when a valve is starved plate. it might be your kind of thing though. If it really is a 4k primary transformer I'd run it at a ~320V B+ and mis match the speaker wiring (old trick) to double the impedance to 8k (much closer to the ideal load)... i.e.: plug an 8 ohm speaker to the 16 ohms secondary tap (or 4 ohms speaker into the 8 ohms tap), that will effectively double the primary to secondary reflected impedance. And this configuration would give you around 5 Watts of power. Thats much cheaper then buying a new OT ;) Also a quick link to a well designed SE 6V6 based PA: http://ax84.com/static/corepoweramps/5W_SE/AX84_5W_SE_Poweramp_Schematic.pdf like that phrase) and my valves started glowing blue... looked cool though ;) hehe Some blue glowing is usually pretty normal, I have an 6L6GC based small combo sitting next to me with a blue glowing power tube, and its pretty fine. If I swap this Electro Harmonix tube for a chinese made one the blue glow disappears. You should watch out for any other part than the filament in a tube that are red plating though, now that would be dangerous. Watch out for those big power supply caps! always make sure they're completely discharged before you operate on your amp... potentially lethal voltages inside, as you probably already know. Cheers, -Giuseppe ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
thanks for your help! :) porl On 20/06/07, Dominique Michel [EMAIL PROTECTED] wrote: Le Tue, 19 Jun 2007 20:51:58 +1000, porl sheean [EMAIL PROTECTED] a écrit : thanks for the links! the ax84 one is really good, pretty much exactly what i was after - short and to the point (i don't mind a bit of complex math as long as it is explained why i am doing it :) i've looked through a few old valve books ( http://www.pmillett.com/technical_books_online.htm is an awesome site) but it was hard to find certain info. i should probably have told you that i am making a guitar amp that i want to sound dirty (not heavy metal distortion, but old overdriven blues sound). i was only talking about a 4k primary because i'm pretty sure that is what the OT that i gutted from my fender hotrod (a bit high rated for this project but i can't afford to buy much at the moment). i have tried the same tactic with PTs of old amps off ebay (the fender one doesn't have a 5V output and i want to use a tube rectifier), but even the small one i realised is 375-0-375 for the primary! i think this is a *little* over what i need, so i am going to have to buy a new PT. i can't figure out how the old amp used this voltage: it was only a p/p el34 amp (2 output tubes). how would it have brought the voltage down enough to not kill the valves? maybe el34s can handle a lot but i didn't think the preamp tubes could. anyway, sorry about how off topic this is. i should probably take my questions elsewhere. You can try the diyaudio forum. It is a thread with a lot of links on vacuum tubes theory: http://www.diyaudio.com/forums/showthread.php?s=5fc6a5fdf8f4d9101e3f07260bc6c498threadid=38278 You can find some with amule too. Just search for vacuum, valves or tubes. About the EL34, 375V for Ua is a very low voltage for such a tube. (You can find the datasheet from http://www.nj7p.org/Tube.php or with google). You can go up to 600 or even 700 V without problem. But you are right when you said at 375 is too much for the preamp tubes. Only some old japanese preamp tubes can handle such voltages, and they are very hard to find. The best is to made a separate and low-noise alimentation for the preamp. A simple R-C can be enough. For the tubes, I generally prefer new tubes over old ones. Some new tubes are even better as the best old ones. The engineers of today know what they are doing when they manufacture a new tube. Dominique porl ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
hello again. Sorry for the late reply, but I could not spare any time to work on it the previous week(s).. porl sheean wrote: I have not progressed to simulating tube-amps or synths yet.. lack of time, netlists and tube-models; it's low priority ATM. i don't mind making the circuits (in oregano or whatever), but i don't have decent models of tubes or transformers, I'm sorry; can't help you on this one. Should you find some, I'm interested, too. Try searching the internet for device-name and add some spice model syntax (eg. Is= Rs= ... #more `locate .model`) - that helped me to find a specific Zener-Diode model, but tubes are more tricky; I suppose most models of them are copyrighted somehow. and am not sure how to easily work with them in oregano (it's been a while, be kind)... I barely scratched the surface of oregano. Modellibrary preferences are not accessible in the 0.60.0 version - I got lucky placing a .model file named after the device in /usr/share/oregano/models/ before I switched to editing netslists with a text-editor after an initially generating them with oregano. I've only just installed qucs and like it. Working on schematic entry it's much faster! (oreagno's wiring still sucks) i do however have access to a lot of classic amp schematics (fender, marshall, vox etc) and don't mind spending time capturing them into oregano etc if it will help. It'd be great to run a full simulation of a setup. more later, robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Giuseppe Zompatori wrote: Wow, your ltSpice simulation sounds really real! I hoped to get ngSpice to do the same. Now days I am messing around with GNUCap and QUCS (http://qucs.sf.net) to which I just ported my first tube model whose plate voltage/grid current curves look like that: great! looking forward to listening to those ;) Hopefully a way to inject wav files in both GNUCap and QUCS will come true as they both seem better than spice derived programs. the sndfileresample wrappers that I patched into ngSpice just work with GNUCap and QUCS too. GNUCap is still quite unusable (segfaults on large data sets) but I've elaborated on the QUCS hack - It's much slower than ngSpice, but indeed more accurate (at least the timing); I'm still to run some tests.. http://mir.dnsalias.com/oss/spicesound/qucs - (highly experimental) - I did not get to clean it up last week as I intended to and can't spare any time this week either.. - but I plan to revisit the issue properly over the summer. keep in touch, robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
wow, i never heard of qucs before, but it looks really interesting. so many choices :) porl On 18/06/07, Robin Gareus [EMAIL PROTECTED] wrote: Giuseppe Zompatori wrote: Wow, your ltSpice simulation sounds really real! I hoped to get ngSpice to do the same. Now days I am messing around with GNUCap and QUCS (http://qucs.sf.net) to which I just ported my first tube model whose plate voltage/grid current curves look like that: great! looking forward to listening to those ;) Hopefully a way to inject wav files in both GNUCap and QUCS will come true as they both seem better than spice derived programs. the sndfileresample wrappers that I patched into ngSpice just work with GNUCap and QUCS too. GNUCap is still quite unusable (segfaults on large data sets) but I've elaborated on the QUCS hack - It's much slower than ngSpice, but indeed more accurate (at least the timing); I'm still to run some tests.. http://mir.dnsalias.com/oss/spicesound/qucs - (highly experimental) - I did not get to clean it up last week as I intended to and can't spare any time this week either.. - but I plan to revisit the issue properly over the summer. keep in touch, robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
2007/6/18, porl sheean [EMAIL PROTECTED]: hi Giuseppe would it be at all possible to provide a link to the ltspice file you made of the amp? i am having trouble finding out how to do things like output transformers well, and didn't even imagine the possibility of spice simulating a particular speaker. whilst i am eagerly watching the ngspice patchset i would like to play around with one that i know works so that i can make sure i'm doing things right. ps. where abouts did you get the models for the transformers, valves and speaker from? and how did you simulate the reverb section? Xformers, valves, pots and speaker models courtesy of duncunamps.com: http://www.duncanamps.com/spicemodels.html The ogg I linked to in my previous email has been processed with LADSPA plugins for recreating the speaker filtering a bit more accurately, and to add a bit of reverb and delay. Sorry for not making it clear in my previous email. You should keep in mind though that the speaker models are made out of a simple network of resistors inductors and capacitors that only roughly mimics the interaction or impedance dance that exists between a power amp and a speaker. The mechanical aspects, the interaction of the paper cone colliding with air etc. can't be simulated in an ECAD program even though they contribute a lot to the final sound. For the theory behind the speaker models (reactive loads really) have a look at this link: http://www.aikenamps.com/spkrload.html My Carvin Legacy schematic is a bit borked right now since I am messing around and experimenting on it by replacing the power section with the one of an AX84's Firefly open HW amp (see http://www.ax84.com under legacy projects). In general there seem to be a lot of problems in simulating the power section of push-pull NFB enabled amps in LTSpice... the NFB starts oscillating producing really high frequencies even at modest volumes eventually inflating the sim duration to infinity... garanted that's also what happen in reality but only when the power section is severely distorting... Also keep in mind that by feeding a large number of high pitched notes simulation times increases... i.e an F# fretted at the 2nd fret/low E string is much quicker to simulate than an F# fretted on the 19th fret/B string, I hope this makes any sense. Cheers, -Giuseppe ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Le Mon, 18 Jun 2007 21:59:25 +0200, Giuseppe Zompatori [EMAIL PROTECTED] a écrit : In general there seem to be a lot of problems in simulating the power section of push-pull NFB enabled amps in LTSpice... the NFB starts oscillating producing really high frequencies even at modest volumes eventually inflating the sim duration to infinity... garanted that's also what happen in reality but only when the power section is severely distorting... The problem here is not the simulator but the valve models. Most of them don't modelise the grid current or have a very very poor approximation, they have a poor approximation of Ig2, they don't modelise the variation of the valves characteristics when Ug2 is changing, and they have a very poor approximation of the variation of the valves characteristics when Ig2 is changing. According to the data sheet, some tetrodes can get 2 watts on the command grid at full output. That implies huge grid current. At the same time, we will get huge Ig2 variations and Ug2 will drop (even with fixed Ug2 bias) because the voltage delivered by the power supply will drop at full output (around 100V drop on some peavey amplifiers!!! The saturation we can heard is for the half the saturation in the main transformer not in the amplifier or output transformer!!!). So, in short, don't expect a good or reliable result of a push-pull class B guitar amplifier with so limited valves model. And to simulate the whole amplifier is a must do, but without more reliable models, it doesn't make sens to try to optimize something with a simulation for that kind of electronics. In consequence, for me, and as long at we don't have better valves models, practical experiences are everything. Dominique ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
thanks guys, i'll look into those models and links when i get a chance. i'm hoping to be able to learn a lot more about valve amps this way. apart from a few odds and ends it is hard to find out how they *really* work off the net. porl ps. (offtopic): anyone know the approximate b+ voltage i should using for a SE 6v6 amp through a 4k primary? i built one from odds and ends (i seem to like that phrase) and my valves started glowing blue... looked cool though ;) hehe On 19/06/07, Dominique Michel [EMAIL PROTECTED] wrote: Le Mon, 18 Jun 2007 21:59:25 +0200, Giuseppe Zompatori [EMAIL PROTECTED] a écrit : In general there seem to be a lot of problems in simulating the power section of push-pull NFB enabled amps in LTSpice... the NFB starts oscillating producing really high frequencies even at modest volumes eventually inflating the sim duration to infinity... garanted that's also what happen in reality but only when the power section is severely distorting... The problem here is not the simulator but the valve models. Most of them don't modelise the grid current or have a very very poor approximation, they have a poor approximation of Ig2, they don't modelise the variation of the valves characteristics when Ug2 is changing, and they have a very poor approximation of the variation of the valves characteristics when Ig2 is changing. According to the data sheet, some tetrodes can get 2 watts on the command grid at full output. That implies huge grid current. At the same time, we will get huge Ig2 variations and Ug2 will drop (even with fixed Ug2 bias) because the voltage delivered by the power supply will drop at full output (around 100V drop on some peavey amplifiers!!! The saturation we can heard is for the half the saturation in the main transformer not in the amplifier or output transformer!!!). So, in short, don't expect a good or reliable result of a push-pull class B guitar amplifier with so limited valves model. And to simulate the whole amplifier is a must do, but without more reliable models, it doesn't make sens to try to optimize something with a simulation for that kind of electronics. In consequence, for me, and as long at we don't have better valves models, practical experiences are everything. Dominique ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
hi Giuseppe would it be at all possible to provide a link to the ltspice file you made of the amp? i am having trouble finding out how to do things like output transformers well, and didn't even imagine the possibility of spice simulating a particular speaker. whilst i am eagerly watching the ngspice patchset i would like to play around with one that i know works so that i can make sure i'm doing things right. ps. where abouts did you get the models for the transformers, valves and speaker from? and how did you simulate the reverb section? cheers porl On 08/06/07, Giuseppe Zompatori [EMAIL PROTECTED] wrote: Hi, Some time ago I did a sim using LTSpice (http://www.linear.com/designtools/software/) under Wine of a Carvin Legacy tube amp. LTSpice was the only program that had wav in/out and would run on Linux at the time I tried this. The schematic for the amp is here (http://carvinmuseum.com/pdf/amps/VL100%20%20VL212%20Legacy%20Amp.pdf). It's a complex beast that ngspice would have lots of troubles simulating because of the infamous floating nodes and other quirks. Everything is included into the sim, preamp, phase splitter, output valves , output transformer and even the model of a greenback speaker. Naively, I haven't set the sim time step to the a sampling freq related number, nevertheless it sounds Ok to me, I dont know how LTSpice deals with transient sims involving wav files in details. The ogg for the sim is here: http://siliconjoe.googlepages.com/legacy-swcadiii-1-cab-reverb-delay.ogg I played a bounch of fast licks to have the transient sim finish before the universe will collapse, yeah you guessed it it's pretty slow... I think it took 1 day to finish on an AthlonXP 2800+... Now days I am messing around with GNUCap and QUCS (http://qucs.sf.net) to which I just ported my first tube model whose plate voltage/grid current curves look like that: http://siliconjoe.googlepages.com/Schermata.png Hopefully a way to inject wav files in both GNUCap and QUCS will come true as they both seem better than spice derived programs. Cheers, -Giuseppe ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Stefano D'Angelo wrote: Hi, I read on spicy sound website: However todays computing power allows to do so almost in real-time!... do you think you'll get it real-time? no, not any more. Without oversampling, small circuits run /almost/ in real-time. However the posted 3 seconds of guitar took almost 4 mins to be processed with ngSpice simulating at 1s/(64*48k) timesteps. robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Il giorno gio, 07/06/2007 alle 09.20 +0200, Robin Gareus ha scritto: Stefano D'Angelo wrote: Hi, I read on spicy sound website: However todays computing power allows to do so almost in real-time!... do you think you'll get it real-time? no, not any more. Without oversampling, small circuits run /almost/ in real-time. However the posted 3 seconds of guitar took almost 4 mins to be processed with ngSpice simulating at 1s/(64*48k) timesteps. 4 mins? OMG! :-\ Stefano ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Stefano D'Angelo wrote: Il giorno gio, 07/06/2007 alle 09.20 +0200, Robin Gareus ha scritto: Stefano D'Angelo wrote: Hi, I read on spicy sound website: However todays computing power allows to do so almost in real-time!... do you think you'll get it real-time? no, not any more. Without oversampling, small circuits run /almost/ in real-time. However the posted 3 seconds of guitar took almost 4 mins to be processed with ngSpice simulating at 1s/(64*48k) timesteps. 4 mins? OMG! :-\ indeed - at least it scales linearly with decreasing timesteps ;) - for guitar a *8 or *16 oversampling is sufficient. ngSpice is clearly is not suitable to be used as audio-effect; yet it's handy to testdebug audio-circuits, or even create convolution samples. Does anyone here have access to the full version of http://www.acusticaudio.com/modules.php?name=Productsfile=nebula2free VST plugin? - It would be interesting to know if ngSpice-snd samples can be used to program it. nudged by Erik at http://linuxaudio.org/pipermail/linux-audio-user/2007-May/045899.html I've Taylor-expanded a convolution integral, and started to look for some papers. The maths is not too wicked after all; but coding a volterra transfer function best with CPU optimization is no laughing matter.. - I've chatted with a physicist friend who has access to some pro-maths software to crunch integrals and product series and experience doing so - I'm gonna spend a few weeks with Florian during the summer and 'll get back to you guys. ATM my ToDo list is way too overloaded and just glimpsing at bruteFIR or aliki: this is no small project either! robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Il giorno gio, 07/06/2007 alle 12.05 +0200, Robin Gareus ha scritto: Stefano D'Angelo wrote: Il giorno gio, 07/06/2007 alle 09.20 +0200, Robin Gareus ha scritto: Stefano D'Angelo wrote: Hi, I read on spicy sound website: However todays computing power allows to do so almost in real-time!... do you think you'll get it real-time? no, not any more. Without oversampling, small circuits run /almost/ in real-time. However the posted 3 seconds of guitar took almost 4 mins to be processed with ngSpice simulating at 1s/(64*48k) timesteps. 4 mins? OMG! :-\ indeed - at least it scales linearly with decreasing timesteps ;) - for guitar a *8 or *16 oversampling is sufficient. ngSpice is clearly is not suitable to be used as audio-effect; yet it's handy to testdebug audio-circuits, or even create convolution samples. Oh well, I didn't notice the 64! :-D Anyway, keep it up. It's very interesting stuff! Stefano ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
I have not progressed to simulating tube-amps or synths yet.. lack of time, netlists and tube-models; it's low priority ATM. i don't mind making the circuits (in oregano or whatever), but i don't have decent models of tubes or transformers, and am not sure how to easily work with them in oregano (it's been a while, be kind)... i do however have access to a lot of classic amp schematics (fender, marshall, vox etc) and don't mind spending time capturing them into oregano etc if it will help. porl ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
[LAD] simulating analog audio devices part II
Hello again, I've added libsamplerate for resampling/oversampling which - as expected - dramatically improves the quality of the ngspice processed sound. Here's some example 3sec guitar sound from current testing: http://mir.dnsalias.com/_media/oss/spicesound/git-fuzz64.mp3 (left channel: resampled input-sound, right channel: fuzz-effect out) http://mir.dnsalias.com/oss/spicesound/examples#audio_example The fuzz effect still sounds a little odd, but I believe that a DI-recording would sound just like that ;) - I have not progressed to simulating tube-amps or synths yet.. lack of time, netlists and tube-models; it's low priority ATM. robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
On Wed, Jun 06, 2007 at 07:54:57PM +0200, Robin Gareus wrote: Hello again, I've added libsamplerate for resampling/oversampling which - as expected - dramatically improves the quality of the ngspice processed sound. Here's some example 3sec guitar sound from current testing: http://mir.dnsalias.com/_media/oss/spicesound/git-fuzz64.mp3 (left channel: resampled input-sound, right channel: fuzz-effect out) http://mir.dnsalias.com/oss/spicesound/examples#audio_example The fuzz effect still sounds a little odd, but I believe that a DI-recording would sound just like that ;) - I have not progressed to simulating tube-amps or synths yet.. lack of time, netlists and tube-models; it's low priority ATM. It's certainly in the ballpark of a foxxtone... hard to say without doing a direct comparison with the same input, and I've never recorded a foxxtone direct. Maybe try running the output file through Tim's CabSim plugin? hmm... I'm looking around for recordings made with my foxxtone with the octave switch on... can't find any. I have several with the octave switch off... like the choruses of both of these songs: http://www.reacharms.com/mp3/foundout.mp3 http://www.reacharms.com/mp3/separation.mp3 Both were played on a home-modified instrument with two bass strings and 4 guitar strings. ... man, those sound awful, I gotta re-encode those (I think that was bladeenc at fixed 128 kbps, bad choice for rock music.) I haven't listened to those in a while... forgot how edgy his lyrics got :) -- Paul Winkler http://www.slinkp.com ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices part II
Il giorno mer, 06/06/2007 alle 19.54 +0200, Robin Gareus ha scritto: Hello again, I've added libsamplerate for resampling/oversampling which - as expected - dramatically improves the quality of the ngspice processed sound. Here's some example 3sec guitar sound from current testing: http://mir.dnsalias.com/_media/oss/spicesound/git-fuzz64.mp3 (left channel: resampled input-sound, right channel: fuzz-effect out) http://mir.dnsalias.com/oss/spicesound/examples#audio_example The fuzz effect still sounds a little odd, but I believe that a DI-recording would sound just like that ;) - I have not progressed to simulating tube-amps or synths yet.. lack of time, netlists and tube-models; it's low priority ATM. robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev Hi, I read on spicy sound website: However todays computing power allows to do so almost in real-time!... do you think you'll get it real-time? I'd like to know since I'm working on a somehow related thing: http://naspro.sourceforge.net (I hope to speed up development this summer). Bye, Stefano ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
Pieter Palmers wrote: Pieter Palmers wrote: Erik de Castro Lopo wrote: Robin Gareus wrote: hey LADs. For those of you who have not followed the 'fuzztone' thread on LAU. I'd like to announce a /cool hack/ to ngSpice that provides soundfile I/O capabilities. - it's more a LAD than a LAU issue anyway. This is a CoolAsAllFsck (tm) hack as far as I am concerned. Congrats. Simple tests sound rather promising; but my fuzztone experiment is not really satisfying yet. well, maybe it's just meant to sound *that* weird ;) I used Spice as part of my engineering degree and also in jobs later, but my memory of this is definitely hazy. However, my memories of how spice works is my discretizing the differential equations that describe the components. I believe the specification of the time step determines how fine grained (in time) a grid will be used for operating on the diff equations. One thing you might have missed is matching up the samplerate of the input file with the time grid of the spice calculations. You alos want to be *really* careful about how you interpolate the file data to spice sample rate. Please, please, please, do not use linear interpolation. Secret Rabbit Code is probably the way to go here. hehe, right. ATM i don't interpolate at all. The input just stays for the duration of the sample. - there might even be some rounding issues here as ngSpice stores the time in (double) seconds. Can I feed the rabbit at irregular intervals: ie. specify time and sample? All spices I use (although this excludes ngspice) have an option to force them to calculate the response at specified timesteps (along with the ones they need for accuracy). In this case it seems obvious to set this timestep to 1/Fsample. So far I've only found the command to set the *maximum* time-step, not an option to enforce it. - setting it to 1/Fsample is ok. setting it to 0.25/Fsample and using only about every 4th value gives much better results.. using 0.01/Fsample makes me fetch a few more coffees; robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
Pieter Palmers wrote: All spices I use (although this excludes ngspice) Last time I looked ngspice was the same code base as the others, so I assume no difference. have an option to force them to calculate the response at specified timesteps (along with the ones they need for accuracy). In this case it seems obvious to set this timestep to 1/Fsample. Then use only the values at these timesteps. This is way better than interpolation because the differential equations are actually solved at these points. That would be true except for one factor, the input signal that Robin is trying to simulate is analogue. In addition, the Foxx fuzzbox that Robin is trying to simulate is a non-linear device. The problems you get when doing a discrete time simulation of non-linear processes are mitigated as the sample rate is increased. Therefore, the higher the sample rate the better. Erik -- - Erik de Castro Lopo - If I were on life-support, I'd rather have it run by a Gameboy than a Windows box. -- Cliff Wells in comp.lang.python ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
Pieter Palmers wrote: Erik de Castro Lopo wrote: Robin Gareus wrote: hey LADs. For those of you who have not followed the 'fuzztone' thread on LAU. I'd like to announce a /cool hack/ to ngSpice that provides soundfile I/O capabilities. - it's more a LAD than a LAU issue anyway. This is a CoolAsAllFsck (tm) hack as far as I am concerned. Congrats. Simple tests sound rather promising; but my fuzztone experiment is not really satisfying yet. well, maybe it's just meant to sound *that* weird ;) I used Spice as part of my engineering degree and also in jobs later, but my memory of this is definitely hazy. However, my memories of how spice works is my discretizing the differential equations that describe the components. I believe the specification of the time step determines how fine grained (in time) a grid will be used for operating on the diff equations. One thing you might have missed is matching up the samplerate of the input file with the time grid of the spice calculations. You alos want to be *really* careful about how you interpolate the file data to spice sample rate. Please, please, please, do not use linear interpolation. Secret Rabbit Code is probably the way to go here. All spices I use (although this excludes ngspice) have an option to force them to calculate the response at specified timesteps (along with the ones they need for accuracy). In this case it seems obvious to set this timestep to 1/Fsample. Then use only the values at these timesteps. This is way better than interpolation because the differential equations are actually solved at these points. Also worth to mention is that as far as my experience goes, you need to crank up the precision quite a lot to make sure that the 'signal vs simulation noise' is more than 100dB. Pieter ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
Erik de Castro Lopo wrote: Robin Gareus wrote: hey LADs. For those of you who have not followed the 'fuzztone' thread on LAU. I'd like to announce a /cool hack/ to ngSpice that provides soundfile I/O capabilities. - it's more a LAD than a LAU issue anyway. This is a CoolAsAllFsck (tm) hack as far as I am concerned. Congrats. Simple tests sound rather promising; but my fuzztone experiment is not really satisfying yet. well, maybe it's just meant to sound *that* weird ;) I used Spice as part of my engineering degree and also in jobs later, but my memory of this is definitely hazy. However, my memories of how spice works is my discretizing the differential equations that describe the components. I believe the specification of the time step determines how fine grained (in time) a grid will be used for operating on the diff equations. One thing you might have missed is matching up the samplerate of the input file with the time grid of the spice calculations. You alos want to be *really* careful about how you interpolate the file data to spice sample rate. Please, please, please, do not use linear interpolation. Secret Rabbit Code is probably the way to go here. All spices I use (although this excludes ngspice) have an option to force them to calculate the response at specified timesteps (along with the ones they need for accuracy). In this case it seems obvious to set this timestep to 1/Fsample. Then use only the values at these timesteps. This is way better than interpolation because the differential equations are actually solved at these points. Greets, Pieter ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
fredag 01 juni 2007 12:05 skrev Tim Goetze: [Erik de Castro Lopo] The problems you get when doing a discrete time simulation of non-linear processes are mitigated as the sample rate is increased. Therefore, the higher the sample rate the better. For guitar distortion, I've found that at 4x oversampling the quality starts to sound bearable, and 8x is what the CAPS units use (with an up- and downsampler FIR filter of 64 taps each). When I started working on virtual amps, this page helped a lot: http://web.archive.org/web/20051128104636/http://www.eecs.umich.edu/~mmccor q/tubes/simulation/simulation.html Hi, I got interested in this and found the original document at: http://www.eecs.umich.edu/~mmccorq/diversions/simulation/index.html regards, /bengan ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
[Erik de Castro Lopo] The problems you get when doing a discrete time simulation of non-linear processes are mitigated as the sample rate is increased. Therefore, the higher the sample rate the better. For guitar distortion, I've found that at 4x oversampling the quality starts to sound bearable, and 8x is what the CAPS units use (with an up- and downsampler FIR filter of 64 taps each). When I started working on virtual amps, this page helped a lot: http://web.archive.org/web/20051128104636/http://www.eecs.umich.edu/~mmccorq/tubes/simulation/simulation.html It contains a fairly detailed 12ax7 model (the best I found on the net at that time), in a roughly drafted preamp netlist: http://web.archive.org/web/20050905045956/www.eecs.umich.edu/~mmccorq/tubes/simulation/preamplifier.sp My own interest in re-running spice simulations of such circuits is pretty limited (sorry Robin!) but perhaps you may find this interesting. Cheers, Tim ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
Robin Gareus wrote: hehe, right. ATM i don't interpolate at all. The input just stays for the duration of the sample. Thats called zero order hold: http://en.wikipedia.org/wiki/Zero_Order_Hold and is a really crappy sound sample rate converter. Signal to noise ratio is about 10dB. Can I feed the rabbit at irregular intervals: ie. specify time and sample? No, not really. When Spice loads the libsndfile component, can the component find out the inter-sample period used by Spice? If so, the best solution would be to use the Rabbit to up sample to that inter-sample period. If the above is not possible, I suggest that you up sample the audio by say 128 times and then linearly interpolate to get whatever inter sample values you need. So far I've only found the command to set the *maximum* time-step, not an option to enforce it. - setting it to 1/Fsample is ok. setting it to 0.25/Fsample and using only about every 4th value gives much better results.. using 0.01/Fsample makes me fetch a few more coffees; I suspect that using 0.01/Fsample will give you a result much closer to the real device. I suspect that what you get at 1/Fsample produces results that may not match reality. Erik -- - Erik de Castro Lopo - Islam makes it incumbent on all adult males, provided they are not disabled or incapacitated, to prepare themselves for the conquest of countries so that the writ of Islam is obeyed in every country in the world. -- Ayatollah Khomeini ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
Erik de Castro Lopo wrote: Robin Gareus wrote: When Spice loads the libsndfile component, can the component find out the inter-sample period used by Spice? no. Spice does not use a constant interval; else it would be straight forward to use libsamplerate. If the above is not possible, I suggest that you up sample the audio by say 128 times and then linearly interpolate to get whatever inter sample values you need. sounds like a great idea. I should do that with the output too, but it's a little more complex there: In the beginning I've tried to take the average for all the spice-samples matching the corresponding audio-sample. I've only tried that up to 1/(4*Fsample) and it gave much worse results than just taking the closest sample... - combining interpolation and resampling could be the solution. now that I've got the framework, I'll dig into the details.. robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Re: [LAD] simulating analog audio devices
perhaps input impedance might have something to do with it? anything else that a simple spice circuit ignores? power supply sag etc (thats more prevalent in valve circuits though)? i also noticed when simulating circuits (once again valve circuits) i would get a lot of artifacts (spikes etc) in the spice output. i haven't been able to get your patch going yet (haven't really had a chance to sit down and try it properly, but when i ran your foxxfuzz through unpatched ngspice it looked... interesting :) the waveform was pretty crazy. porl On 01/06/07, Robin Gareus [EMAIL PROTECTED] wrote: hey LADs. For those of you who have not followed the 'fuzztone' thread on LAU. I'd like to announce a /cool hack/ to ngSpice that provides soundfile I/O capabilities. - it's more a LAD than a LAU issue anyway. read more about it on: http://mir.dnsalias.com/oss/spicesound/start Simple tests sound rather promising; but my fuzztone experiment is not really satisfying yet. well, maybe it's just meant to sound *that* weird ;) - I've got a hunch that the simulated voltage source does not yet represent a guitar... I will have a look again on the weekend and upload some samples then. NTL, I've just simulated and verified a RC filter: http://mir.dnsalias.com/oss/spicesound/examples I'm sure some of you guys have some spice netlists lying around that would be suitable for testing and debugging. wanna give 'em a go? robin ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev