Geek programmer procrastination at its worst

Discussion in 'Lounge' started by Xupito, Nov 10, 2020.

  1. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    So I'm a humble freelance web developer and as techie-geek-nerd as it gets. Recently I toy from time to time with VSTs using C++ and JUCE. Very different beasts than my work's tools and languages. Yesterday I had time to waste so my goal was:

    Develop a dead simple but fast convolution plugin with JUCE

    1. Convolution plugin. It's easy given the examples included in JUCE-> SUCCESS-> in 15 min

    2. Fast. As many of you know the key is a fast FFT library. The JUCE included one is nice but slow (KissFFT). For some unknown reason I happen to have downloaded and installed Intel's IPP library which is the fastest on PC.

    2.1 Fast convolution plugin with Intel's IPP. JUCE has integration for this library. Needs a bit of tweaking but not much-> SUCCESS in 30 min

    At this point I could just benchmark and enjoy the two of them but... that's where the procrastination kicked in...

    - PROCASTRINATION STRIKES: All well and good but Intel is evil and IPP library is commercial. Wouldn't be nice to use a free one? -> totally pointless for my goal, let alone I barely use legit soft at all :lmao:

    In the next four to six hours...
    - Installed the fastest free FFT library, FFTW. Still relatively easy -> SUCCESS in 40 min

    - PROCASTRINATION STRIKES AGAIN: Realized there're much newer versions of FFTW but not compiled (ready to use) for Windows->even I could tell I was asking for trouble lol
    - Tried to compile them with Visual Studio although FFTW is designed to be compiled in Linux -> FAIL: but complete success in getting in trouble :rofl:, about 50 min
    - Remembered I have a Linux server virtual machine installed for my work. No GUI at all, no C++ compilers installed-> FAIL: just too much trouble in 45 min
    - Realized there're other FFT libs almost as fast as FFTW for plugin tasks (audio FFT, 1D real signal) -> I might just had set myself on fire as well
    - Downloaded and tried to compile three of them: mufft, pFFT and fftReal-> SURPRSING SUCCESS with mufft and fftReal, about 1 hour.
    But...
    - PROCASTRINATION STRIKES YET AGAIN: Remembered that you can do CPU tasks with GPUs. No reason at all for my goal (bad for real-time, bad for plugins cross-platform) but heck, sounds cool -> plain and straight death wish :hahaha:
    - Tried to compile NVidia's CUDA cuFFT library -> FAIL: half done but dropped, fucking hell, too much pain :suicide:, 1 hour
    - Tried to compile OpenCL (GPU standard to help CPU tasks) FFT library -> FAIL: borderline S&M stuff :crazy:, 45 min
    - Tried to use Microsoft windows-only alternatives: DirectCompute, C++ AMP, Directx12 Compute Shaders...-> if you're gonna die, die with your boots on :disco::drunks::mad:

    At this point I didn't even remember what my fucking goal was and I can't tell how much time I wasted, ended up asleep in bed with the jeans and belt on. I still have slight marks in my legs and waist..

    Yeah, you can join me laughing at myself :rofl::rofl: :deep_facepalm:

    Edited: those who know me will agree with my best answer selection lol
    PS: I think @Haliax and @demberto will love this :winker:

     
    Last edited: Nov 13, 2020
    • Funny Funny x 3
    • Love it! Love it! x 3
    • Creative Creative x 1
    • List
  2.  
  3. recycle

    recycle Guest

    I didn't know you were that nerdy...
     
  4. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    Sometimes even I don't know how much :rofl:

    It's true this is one of my greatest messes with geek procrastination. I've had other nerdy-free ones quite impressive as well.
     
  5. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    Oh, I forgot. One of the things that got me worked up was reading those @Olymoon 's posts about fancy IR/convolution plugins.
    So you could say it's all Olymoon's fault...
    ... ok, may be that's stretching it a bit too much :rofl:
     
  6. RealBananas

    RealBananas Kapellmeister

    Joined:
    Jan 13, 2018
    Messages:
    61
    Likes Received:
    58
    Can you supply a link for this please? I always thought that convolution of a 1-dimensional signal is super easy. :disco:
    You just treat every sample point as dirac impulse.
     
  7. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    You're right. Technically the convolution is very easy, quite like you describe it (it applies to more dimensions too). But extremely slow as soon the length of what would be the IR increases. In DAW terms it has no latency (as long as your computer can handle it).

    The FFT-based convolution is the fastest method to compute a convolution. Not necessary if you don't need speed. It introduces latency. Much more complicated.

    I don't know how much technical you want to get, but here's one link about it:
    https://www.dsprelated.com/freebooks/sasp/FFT_versus_Direct_Convolution.html

    As a side note: cool avatar! :wink:
     
    • Like Like x 1
    • Winner Winner x 1
    • List
  8. RealBananas

    RealBananas Kapellmeister

    Joined:
    Jan 13, 2018
    Messages:
    61
    Likes Received:
    58
    Exactly what I was looking for. Thanks :mates:
     
  9. Plainview

    Plainview Rock Star

    Joined:
    Mar 9, 2020
    Messages:
    468
    Likes Received:
    480
    hey @Xupito your controller post and this one inspired me to learn more about JUCE and audio programming , can you recommend a resource to start with ?
     
  10. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    Sure thing. It's not easy but for learning JUCE:

    1. Their own nice tutorials:
    https://juce.com/learn/tutorials

    2. This is the best YT channel for the task hands down, lots of video-tutorials:
    https://www.youtube.com/c/TheAudioProgrammer/playlists


    For learning audio plugin programming this is a gem. I'd start with this. A plugin that lets you program what it does with a language similar to C++ but a bit easier:
    https://www.bluecataudio.com/Products/Product_PlugNScript/
     
    Last edited: Nov 10, 2020
  11. JMOUTTON

    JMOUTTON Audiosexual

    Joined:
    Jan 10, 2016
    Messages:
    1,065
    Likes Received:
    865
    Location:
    Virginia
    Best Answer
    Sounds like you had a nice day.

    I know everyone hates flowcharts, but what you went through is kind of normal.

    A flow chart helps you remember what you actually wanted to accomplish, because after half a bottle of scotch, countless hours of trying to make a new kind of circle, Russian you tube car crash videos, that one video you looked up for an specific API hook but the guy is telling you his life story instated of just getting to the point, your are now at the end of the day and wondering what the original purpose of your task was.

    On a more imaginative note since the liquor is flowing well today!

    Now the next time you get mad because your favorite program still hasn't fixed X bug but spent six months on feature Y that's also buggy as hell just remember that they are dealing with what you went through multiplied by 20 different people all going off the rails at different times.

    A boss that doesn't really understand any of it and keeps telling them to make things more shiny, jazzy or throw in some of that quantum computing stuff he keeps seeing people talk about on the news and he/she doesn't really care what they are doing as long as people upgrade or buy in, but when people do he always give the credit to Mona from marketing because... well it's Mona from marketing have you seen her!

    mona from marketing.jpg

    The boss is has an open door policy but is unavailable to talk to Monday-Wed-Friday between the hours of 11AM when he gets in to 4:45PM when he has to get ready to go home before traffic gets bad because he is in session with his 'therapist.'

    recruitment-dominatrix.jpg
    Tue from 9AM to 12PM he goes to see Mona form marketing and then has to leave to deliver his report to the Big Boss on a different floor and Thurs mornings are golf with the senior management 'team'​


    which would leave Thurs. afternoon if he didn't have to pick up his kids from school because that's the day his wife has her yoga lessons and spa treatments.
    combo.jpg
    Okay now I need to go pass out.
     
    • Funny Funny x 2
    • Love it! Love it! x 1
    • List
  12. Haliax

    Haliax Guest

  13. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    :rofl::rofl::rofl: too good hahahaha. Take care tooo lol

    Yeah, I followed a similar guide for the .lib creation and Juce also has almost-direct integration for FFTW
    If only I had stopped there... :rofl:
     
    Last edited: Nov 11, 2020
  14. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    UPDATE 2020.11.12 TWO DAYS LATER...

    This is good :rofl::rofl:
    A while ago I thought I may switch to "work-mode" (aka how would I do this if my salary was at stake?) and try again. The thing went like this:

    1. Search properly before throwing myself in the mud. SUCCESS: 15 min
    2. Type this on the command line:
    git clone https://github.com/microsoft/vcpkg
    bootstrap-vcpkg.bat
    vcpkg integrate install
    vcpkg install fftw3[core:avx2:openmp:sse2:threads] --triplet x64-windows-static

    SUCCESS: 10 min while having a coffee and joi... cigarette
    2.1. Last FFTW3 version installed with source code patched for Visual Studio
    2.2 Automatically compiled(ready to go) all versions I possibly need including multi-core, sse2, avx512
    2.3. Static version too. The static are the ones that you can embed in the main program, so you can have only one xupito_is_dumb_convolution_plugin.vst3

    3. Compile the plugin: plain and straight trivial shit

    I know what you're thinking. Yeah, that too :deep_facepalm::deep_facepalm::rofl::rofl::rofl:
     
    Last edited: Nov 11, 2020
  15. Haliax

    Haliax Guest

    You are becoming agile
     
  16. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    I consider myself more of a desire oriented... wait a min, that doesn't sound right...
     
  17. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    931
    Likes Received:
    325
    I never tried making plugins, because I was stuck on the VST Lister @Xupito knows about. I even posted it here somewhere, guess its probably no use. C++ is first class SHITE, but I still like it for some reason. I spent like 3 months to understand this interface system of VST3 and finally got how plugin and DAW interact with each other
     
  18. Haliax

    Haliax Guest

    C++ has come a long way since I first used it about 30 years ago. Look on the bright side, at least you don't have to code VSTs in Java
     
  19. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    I feel your pain bro ;) Especially since you went the low-level hard way.
    I'm sure someone has tried :rofl:
    But half of what @demberto says is about the concrete implementation of the VST3 standard. Is based on those over bloated OO paradigms that made many C++ programs run even slower than Java under certain conditions at the early 2000s. I'm amazed that once compiled still run as fast as the VST2 ones. Oh, but like x3 times slower compiling time.

    Anyway, right now C++ could be a complex yet cool language if they stick to a subset that doesn't require, for instance, to learn twelve ways of initializing.
     
  20. junh1024

    junh1024 Rock Star

    Joined:
    Jul 28, 2011
    Messages:
    1,395
    Likes Received:
    432
  21. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,859
    Location:
    Europe
    Gonna check that out, thanks ;)
    I already have in mind to use ReaJS or BCA Plug'n script for my midi plugin.
    I've to check the latest "available" SynthEdit too, just in case.
    Already checked long ago. So cool library but there's barely examples and no documentation.
     
    Last edited: Nov 12, 2020
Loading...
Similar Threads - Geek programmer procrastination Forum Date
GEEK Spotted - Outer Wilds Cinematic Album of Covers Our Music Dec 25, 2022
[For the Geeks] Mass Effect & Outer Wilds Albums (Covers) Our Music Jul 13, 2022
A quick question for the EQ geeks... Mixing and Mastering Jun 13, 2021
Dynamic Range & Compression: audio geeks help needed! Mixing and Mastering Jan 18, 2015
Geek help PC Nov 6, 2014
Loading...