Realtime Strumming { SynthEdit, FlowStone, Plogue Bidule, C++ }

Discussion in 'Education' started by Jasmine, Jun 4, 2016.

?

...doable?

  1. That's easy.

    5 vote(s)
    35.7%
  2. Can't help, but good idea.

    4 vote(s)
    28.6%
  3. Yes, in Plogue Bidule

    0 vote(s)
    0.0%
  4. Yes, in Reaktor

    2 vote(s)
    14.3%
  5. Yes, in SynthEdit

    0 vote(s)
    0.0%
  6. Yes, in FlowStone

    2 vote(s)
    14.3%
  7. I do this in C++, every day - just for fun. :-)

    1 vote(s)
    7.1%
  8. Yes, in Pure Data

    0 vote(s)
    0.0%
  9. Artificial strumming never convinced me... maybe your chance.

    3 vote(s)
    21.4%
  10. Don

    1 vote(s)
    7.1%
Multiple votes are allowed.
  1. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    I nearly finished the mission in plogue bidule with pizmidi components. The concept was right and it worked. Then it turns out bidule cannot serve the original pizmidi delaytime parameter in reasonable milliseconds units while cc automation- so it gives me unequal delay time intervals between the notes in a chord. I' m pissed off now.:sad:
     
  2. tulamide

    tulamide Audiosexual

    Joined:
    Feb 13, 2016
    Messages:
    847
    Likes Received:
    761
    @Jasmine
    Sorry, I read that you solved it somehow, so I didn't give it priority amongst my projects. May be worth to work on it again. But before, just to make sure, are you aware that CC, as part of the midi protocol, only has a range of 128 values? You better prepare some kind of arrays with delay time intervals and just map the the CC value to one of those arrays (mapping the notes to the array's content)
     
  3. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    I'm aware of it. I used the CCmudulator from PizzMidi to somehow model specific ranges of the delay time parameter of the pizzmidi midi delay.

    As far as I know there are no arrays available in bidule/Pizzmidi. The problem lies in the bidule architecture. How it serves the parameter of external plugins. For example the Bidule value 0.98 equals exactly 40 ms. But Bidule can only handle floats like 0.98000. While automation I only get floats like 0.98567. So I would to have to shorten the value to 0.98. That's not possible in Bidule. To say give me only two decimals is not possible too, since the decimals are static. Bidule has a unit converter but only for audio. The most features are for audio.:disco:

    I saw no midi delay in SynthEdit.

    Meanwhile I also try it out in Reaktor. But this is the most complicated way except C++:rofl:.

    Bidule (deprecated), white ports = midi, blue ports = audio:

    Untitled-1.png
     
    Last edited: Jun 13, 2016
  4. junh1024

    junh1024 Rock Star

    Joined:
    Jul 28, 2011
    Messages:
    1,395
    Likes Received:
    432
    This might have to do with precision of MIDI automation, some parameters go from -128 to 127 or something
     
  5. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Yep, and this means Bidule can't be helpful in this project...after weeks :sad:.
    I'm excited to see what you can get with FlowStone.
     
    Last edited: Jun 14, 2016

    Attached Files:

  6. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Update: Talked with some Reaktor pros and tested some things out.
    It turned out that Reaktor isn't designed/prepared for such a missions (as supposed).

    Additionally to monophonic/polyphonic-requirements, it has accuracy/timing problems when building this with standard components.

    I would have to build a custom internal buffer in core and hint a vast amount of other structural limitations.
    So Reaktor isn't really fun/smart when it comes to midi developing.

    It's a shame that NI didn't improved this things by providing some easy to use, sample accurate midi modules, over all this years. They have the expertise and man power.

    Seems not to be a selling factor.
     
    Last edited: Jun 17, 2016
  7. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    Are you just wanting functionality so that incoming MIDI notes that are really close together (implying they are a chord) are output with a configurable delay period between each note?
     
  8. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Yes.
     
  9. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    OK that sounds pretty neat to have, actually. Also I don't think the implementation is too difficult. I'm finishing some AAX stuff with my current plugin then it'll go Beta. I'll have a go at making a quick plugin that does this MIDI strum once my beta's out and I'm waiting on feedback from it. Send me a message in a couple days please to remind me and I'll poke at it and see if it really is as easy as it seems
     
  10. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Thank you, I would appreciate this very much.

    I forget to mention, it should have note order (up/down strumming) and define able velocity for each note.
    There is free C++ source for all this, provided by pizzMidi. As I said the containing complex mode has a bug and is not functional, so it only provides down strums in the so called simple mode.

    VST (midiStrum.dll):
    http://thepiz.org/pizmidi/pizmidi.zip

    Source Code:
    https://github.com/jpauwels/pizmidi/tree/master/pizmidi/midiStrum

    Unfortunately I'm not a C++ coder and have no compiler.

    If you can read C++ it could be very easy to extract the 'simple mode' and extend it with note order. The script is relatively short.

    By the way, is there a JavaScript Framework where someone could code this and compile it to a VST?
    I heard some rumor, but nothing sure yet.
     
    Last edited: Jun 17, 2016
  11. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    K that makes it even easier. That's well written C++, so I can just jack most all of it and dump it straight into my process block.

    Re: Javascript, I don't know of any way to natively compile JS to an actual VST. The VST SDK is C, so it's possible I suppose, but I wouldn't have any idea how to go about actually creating bindings or anything. I know the C++ framework I use for VST development (JUCE) recently added some sort of JS integrations, but no clue how extensive they are. I *think* it's primarily intended for android / OSC integration stuff rather than actual VST processing. Reaper has a JS engine for writing JS-based FX that works like what you're wanting, but obv only compatible with Reaper
     
  12. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Ah OK I'm not on Reaper, so hoping you get it.
    JUCE sounds interesting.
    Do I have to be a C++ pro to make a Hello World as VST? Can I get a free compiler? Would I need Visual Studio?
    My languages are web standards, no Java, no C++ until now, but Action Script, JavaScript, PHP and such things.
     
    Last edited: Jun 18, 2016
  13. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    Ummm, that's a good question actually. My first language was C ~15 years ago and by the time I decided to try making VSTs, I already had enough experience to where I'm not really a good judge of how difficult the basics are. You can get a VERY simple hello world type VST up and running no problem for sure. JUCE abstracts almost everything. It auto generates for you a barebones VST project that compiles into a working VST and has a graphical GUI editor, so you could make something like a plugin that just has a big slider that controls volume and not have to actually type more than 4 or 5 lines of code. If you're cool with your plugins looking pretty ugly, to a certain point you can mostly avoid having to write any code at all except the actual DSP stuff

    Theres a ton of free compilers/IDEs out there, so you don't have to spend a dime. If you're on Windows, you'll want Visual Studio for sure. The free version of VS has everything you need for C++ coding, so no money spent there, and it has the requisite compiler already built in too. JUCE generates projects directly for Vis Studio 2015, so you just download VS 2015 Community free, install it, download JUCE, then follow the tutorials on JUCE's site. By the time you're done with them, you end up with a gain plugin and a little synth I think? It'll be kinda confusing/frustrating at first since you don't have any experience managing memory or dealing with pointers, but really all the concepts are identical from PHP, so don't fear it too much :)
     
  14. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    So, pretty interesting...I've got an implementation working and it was pretty much as easy as I thought it'd be. Here's a question though about how you think it should work. MIDI data doesn't have any concept of "chords", it just reports notes in series. I played some chords via my midi controller and watched - chords are essentially identical to playing the notes REALLY fast after one another. Strumming is the same thing, only not playing the notes quite as quickly. That is, turning a chord into strum can be thought of as just lengthening the time period between each note of the chord, right?

    I looked at how Piz does it and his method is the same as my first idea. He collects incoming MIDI into a delay buffer then checks the time between them. Any notes with times lower than a set period he considers as a chord. Once that time period's up, he takes the MIDI from the buffer and outputs it staggered as a strum. That works fine, but you eat that delay on all MIDI. It's not very long, but it does cause latency. I don't like that, so here's my new proposal. No buffer, no delay. Instead, if a new note comes into the plugin and the time period between the last note and it is short enough, it's immediately considered part of a chord and the timestamp is just directly moved forward to the set time between strum notes. Doing it that way means you still get "latency" on the strummed notes (which is what you want) but you don't eat latency on any of the notes that aren't parts of chords.

    Does that sound good to you, or do you just want it strictly the way Piz does it?
     
  15. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Thank you very much Zentropy for your efford.

    Hm, from the view of performance your approach seems plausible. But will this be case-harden? Should we test something?

    What I really like about PizMidi is, it produces very soft strummings which even don't fit in a 128 grid qunatize of Cubase when I examines the strum result in the note editor of Cubase.

    Maybe it has to do with an uneven offset or individual latencies. I'n not really sure yet.

    But mainly, I think its because the delay is ms-based. So no way to archive this with an Arpeggiator.

    Actually I'm very busy with other bread and butter projects, but I'm playing with the thoughts to install VS Community Free and the whole JUCE peace.

    Do you see a chance to exchange the sources and enable me to compile versions of this- in acceptable parts of rare free time?

    I learned all my programming skills with real projects and always needed real cases (in the last 20 years).

    I never had one for C++ until now. :)

    Thank you in advance.

    PS: I know it sounds a little strange to begin with an abstracting framework.
     
    Last edited: Jun 18, 2016
  16. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    Well sure you can have the source! It'll be a bit of extra effort on your part though, because I use some libraries of my own in my plugins and they rely on slightly modified JUCE source (I changed some fields/methods from private to protected to make it easier to subclass them, added virtual to a lot of stuff for the same reason). That means you'll have to download and use my JUCE version instead of the normal one.

    Re: the strums not being quantized: it's indirectly related to the delay being ms-based. My new method preserves that aspect of Piz. Full tech explanation: you can view "time" in audio as it relates to a DAW/processing in different ways. The most direct method is sample count. This relates to time such that time = sample count / sample rate. This is the method Piz and I both use. It effectively totally ignores the DAW's set tempo/time signature because those don't change the raw sample # you're working on. Quantize uses that tempo/time sig data to function, so there actually is no way to "quantize" this strum output natively by the plugin...it's always going to "strum" with a raw time delay. My algorithm just takes the time you want between each note in the strum (say: 2ms) and converts it into how many samples that is (samplesBetweenNotes = sampleRate * .002). In this case, at 44100 sample rate, you get ~88 samples between notes. Then I take any incoming notes less than 88 samples away from the previous note and I change their start time to 88 samples after the previous

    In practice, that time delay is way higher than 2ms, but that's how I've got 'er set up now.

    Edit: PS, in most cases I agree with avoiding abstraction frameworks as you're learning a new language, but it def doesn't apply here! JUCE doesn't abstract ANY of the language features. It has some holdover stuff from before C++0x came about, but C++0x has standardized versions of all of it now, so JUCE doesn't abstract anything that C++ doesn't already abstract on its own these days. The abstraction JUCE provides is all abstraction from SDK APIs (VST, VST3, AU, AAX) and you really, really don't want to mess with that stuff while you're learning. I've written C++ for over half my life at this point and I STILL don't want to mess with that stuff :D
     
    Last edited: Jun 19, 2016
  17. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    OK, this will be a hot ride. :wink:
    Just installed VS...I'm excited.
     
    Last edited: Jun 19, 2016
  18. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Update: Just tested some C# shit out. Oh my god, it's like Flash Action Script.
    Nearly identical with its event handler and ECMA standards etc..
    If I would have known this earlier, I would have made Windows applications on mass. :rofl:...damn.

    C++ will be much more difficult, right?
     
    Last edited: Jun 19, 2016
  19. Zentropy

    Zentropy Kapellmeister

    Joined:
    Dec 22, 2015
    Messages:
    53
    Likes Received:
    47
    HAHA yes, C# is awesome. It was my favorite language for a longass time. It's honestly extremely fast these days too. .Net means it doesn't compile to machine code, it compiles to an intermediate language that's then translated to machine code, so you can do some really cool/shady shit with it. The Unity game engine uses C# behind the scenes, so you can decompile and reverse engineer the crap out of Unity games. A couple guys made an injection framework last year that I worked on a bit (CECIL/Patchwork) -- it lets you hook any Unity game's DLL and transparently replace any of the DLL's code with arbitrary code of your own. Combined with a Unity resource extractor, you can essentially write your own entire game using some other game's engine. We targeted it at Pillars of Eternity but it technically works for any Unity-based game that uses C# for its scripting. I managed to import a bunch of Diablo 2 resources and removed the turn-based aspects so everything happened instantly, so you could run around like in Diablo firing off spells as fast as you could mash the button. Got bored eventually but it made me love C#

    C++ is (way) more difficult TO LEARN. It is also way easier to do something horribly wrong because the language essentially exists to let you do whatever you want. That said, once you get past the initial learning stage, IMO its much easier than any other language. It's not hard to avoid making horribly wrong mistakes because almost all of them tend to be a result of the same few screwups. On the flipside, it's very easy to make sure your code does what you want because nothing at all is abstracted. You know at all times exactly what you're doing down to the bit level instead of just handing data into black box functions. I feel somewhat out of control in other languages because I don't entirely know how any of the stuff works under the hood :(
     
  20. Jasmine

    Jasmine Producer

    Joined:
    Jan 19, 2016
    Messages:
    199
    Likes Received:
    87
    Location:
    Nassau, Bahamas
    Yes game creation is another interesting thing. Unfortunately I never had time to dive deeper into it.
    Sometimes I make multimedia stuff incl. 3D for tutorials, product boxes and presentations etc., but I'm not a pro grade modeler or animator.

    By the way, you are a pro grade 'C-sharpler'.

    Let's say I would have to build a JSON based Webservice, requesting my server, editing on client side, temporary storing data local, via SQLite, sending data back to Server and so on. Is there a commonly used, specialized all in one CRUD framework for C# available (further abstracting, extremely time saving and idiot prooved)? I already made some Webservices in other languages, but every time it's a hell of work.

    Thank you.
     
    Last edited: Jun 19, 2016
Loading...
Similar Threads - Realtime Strumming SynthEdit Forum Date
Audio to MIDI in realtime!? Software Feb 16, 2022
Looking for non-realtime analyzer Mixing and Mastering Aug 14, 2021
What's your opinion on KARMA? (Kay Algorithmic Realtime Music Architecture) Software Jul 18, 2021
Windows 10 - Anyone setting their interface process as "realtime"? Software Dec 9, 2020
Plugins for realtime polyphonic sample transposition Working with Sound Nov 18, 2020
Loading...