Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Tube stage emulation.

Post any examples or modules that you want to share here

Re: Tube stage emulation.

Postby Tepeix » Thu Jul 27, 2023 2:33 pm

That's very interesting, and the article too ! Thanks to share ! And welcome !!)

But please, do not let an asio out activated in a shared schematic.
It could cause problems when we open it, the file remember the asio parameter of your computer and try to apply it on another one.

It seams to have a little difference with the harmonics in your article.
Using a windoned fft display we could see that the 3rd harmonic is present.
(i don't know how to change that, trying yet to understand your code)
Tepeix
 
Posts: 355
Joined: Sat Oct 16, 2021 3:11 pm

Re: Tube stage emulation.

Postby martinvicanek » Thu Jul 27, 2023 9:22 pm

Emil, you are progressing fast! :geek:
I have attached a suggestion to further simplify the math. Furthermore, you use the variable y3 for streamout, then it is not good to declare it as float y3 below. I find this type of error in my own ccode quite often. :oops:

Luckily, there is an active development for the next Flowstone release 4. It is a complete overhaul with many subtantial improvements and loads of new features. For instance the above type of error would be immediately highlighted, so it is easy to find and fix.

Experienced flowstoners can test the latest alphas and report bugs to the developer in an agile process. At your pace, I can imagine you could join in, too, if you like. Ask Spogg for further details.
Attachments
Fetzer waveshaper MVed.fsm
(578.76 KiB) Downloaded 458 times
User avatar
martinvicanek
 
Posts: 1322
Joined: Sat Jun 22, 2013 8:28 pm

Re: Tube stage emulation.

Postby Emil » Sat Jul 29, 2023 9:44 am

I tried to create a simulation of Power Amp class A and class AB and got rather complicated mathematical expressions. I did not try to simplify them cause my head is already swollen.
Attachments
Power Amps waveshapers.fsm
(249.14 KiB) Downloaded 460 times
Emil
 
Posts: 16
Joined: Fri May 19, 2023 2:37 pm

Re: Tube stage emulation.

Postby Emil » Thu Aug 17, 2023 6:43 am

Hi to all! This is DSP code of Soft clip. It's rather complicated, but it might be useful to someone.
Attachments
Soft clip.fsm
(139.76 KiB) Downloaded 428 times
Emil
 
Posts: 16
Joined: Fri May 19, 2023 2:37 pm

Re: Tube stage emulation.

Postby R&R » Fri Aug 18, 2023 9:05 pm

Emil wrote:Hi to all! This is DSP code of Soft clip. It's rather complicated, but it might be useful to someone.


Thanks! This is of good use for me...

Seems ideal for me as beginner, to do some refactoring and also practice at ASM... or maybe also convert to Poly. Because why not 8-)
R&R
 
Posts: 448
Joined: Fri Jul 15, 2022 2:28 pm

Re: Tube stage emulation.

Postby Emil » Fri Aug 25, 2023 8:52 pm

Hello everyone!!! I've just made another "Soft clipper" but a softer one. For this I wrote DSP code and then optimized it according to martinvicanek's recommendations. So I have two codes: one optimized and another not. Pay attention to the video from 19 to 23 sec. The scope clearly shows "peaks" appearing chaotically when the signal is processed by "Soft clipper opt". When the signal goes through "Soft clipper" (not optimized) not. I can't understand what is this. Can anyone explain to me what is going on?
https://youtu.be/OIQYiaf-CcQ
Attachments
Softer clipper with gain factor 1.fsm
(150.05 KiB) Downloaded 435 times
Emil
 
Posts: 16
Joined: Fri May 19, 2023 2:37 pm

Re: Tube stage emulation.

Postby martinvicanek » Sat Aug 26, 2023 7:58 am

xb gets zero for x=0.25, xt gets zero for x=-0.25. In your code there are divisions by xb and xt. Even though your piecewise definition of the curve is not supposed to use those ill-conditioned values when x is near 0.25 or -0.25, they still get evaluated, added, subtracted, masked and whatnot. The result then depends on the order of operations. In the non-optimized code you are just lucky.

Avoid divisions by zero (or even nearly zero).
User avatar
martinvicanek
 
Posts: 1322
Joined: Sat Jun 22, 2013 8:28 pm

Re: Tube stage emulation.

Postby Emil » Sat Aug 26, 2023 10:32 am

martinvicanek wrote:xb gets zero for x=0.25, xt gets zero for x=-0.25. In your code there are divisions by xb and xt. Even though your piecewise definition of the curve is not supposed to use those ill-conditioned values when x is near 0.25 or -0.25, they still get evaluated, added, subtracted, masked and whatnot. The result then depends on the order of operations. In the non-optimized code you are just lucky.
Avoid divisions by zero (or even nearly zero).

Thanks a lot, Martin! The problem's just been solved.
Attachments
Softer clipper opt corrected.fsm
(147.55 KiB) Downloaded 421 times
Emil
 
Posts: 16
Joined: Fri May 19, 2023 2:37 pm

Previous

Return to User Examples

Who is online

Users browsing this forum: No registered users and 25 guests