flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 10, 2018 13:51:50 GMT 1
Hi There, I'm new to Synthedit, bought it and installed version 1.3, and I'm busy creating a trancegate. With the Tempo Sync LFO example I got quite far and also managed to successfully load and use my basic VST in Cubase and have it synced to the BPM of Cubase.
The only thing I'm really breaking my head over is how to get the gate to consider the current playback location. I've read I can directly communicate to the VST host by a callhost opcode, which could give me the required input in order to do this. I just have no clue on how to achieve that. Even searching for opcode and synthedit doesn't give me any results that could lead me on the right track. Trying to load Se1 projects I find online often results in crashing the program (I assume that's because of missing mods, or program version differences).
Please consider I'm not familiar with processes and terminology but I am willing to learn, I even installed CodeBlocks and MinGW but when I try to build anything with the SDK it gives me errors it cannot find the required lib files (in MinGW the filenames are libfilename.a , while it's looking got filename.lib). So that kinda blocks me from getting furher into the code as well..
Since SynthEdit is a very nice tool, and is still being developed going to 1.4 I sadly do have the feeling being 'late to the party' as it comes to momentum, but I do feel the curve that makes people turn away is not the program, it's a large amount of dead links, old information, tutorials from versions with different GUI and options, and mostly focusing on the basics. One really needs to spend a LOT of time trying to get pieces of a puzzle not even knowing what it should look like in the end. I did visit the user group sites that are linked and went through a big amount of messages but I didn't find anything that could help for my problem, or maybe I didn't recognize it as such.
If somebody could give me a push in the right direction that would be great, thanks!
|
|
Andrew
Developer
Posts: 110
Posts: 110
|
Post by Andrew on Aug 10, 2018 17:53:08 GMT 1
I highly recommend that you rather use MS Visual as a compiler/IDE - it's free and all the SDK3 examples should compile right off the bat. With MinGW it depends on what version you have, and if you have a problem you generally need to dumpster-dive through it's 400+ page manual to find a fix sometimes i.e. not recommended for beginners. And if you are wondering - the compiled code uses about the same amount of CPU on average.
I also recommend brushing up on basic algebra and c++ if you intent to code a module like that, keeping time in DAWs is a real PITA, it all depends on PPQN and then there is a bunch of corner cases because finite systems(like PCs) have precision issues representing float numbers which will bite you in the behind if you don't keep track of the error. It's actually pretty tricky.
If you don't know c++, I'd go through this first.
If you believe your math/c++ knowledge is sufficient, check out the BPM Clock4 example in the SDK3 files, note that it is actually under "BPMClock3" folder, some of the basic math is already in there.
G'd Luck!
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 10, 2018 19:40:43 GMT 1
Thanks Andrew! Will definitely try going with Ms Visual instead, got to try MinGW and CodeBlocks as advised on synthedit.com . Also thanks for the C++ material, I'm not new to the material, but I also wouldn't consider myself a coder at all. I did buy both books from Will Pirkle that cover designing audio plugins and effects in C++ specifically so I definitely am aiming to go that route. Time however is always short and I hope to save a lot of time using SynthEdit as a platform getting familiar with the building blocks and signal types and values in a visual way. Downloading the latest community edition of Visual and will give it a go, thanks again!
O, and btw, as a lot of links to older mods are dead, if you do happen to stumble on an existing mod (preferably a recent one 64-bit) that achieves what I'm going for with the host playback location I'd be happy to know!
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 11, 2018 11:11:40 GMT 1
I've installed MS Visual and some required C++ components in order to load the BPM Clock modules in the SynthEdit SDK, I can compile them, I can open them in Synthedit, but the moment I try to connect something to a pin and run it the program crashes. At first I thought it's something I changed in BPM Clock4, so I tried again with a fresh copy (just change the ID's) and the problem remains, I can compile it, I can load it, but I cannot use it.
Looking at the module code I was very surprised to find all the inputs are there to get the required data from the host, but no outputs to actually use it. I do think I can easily alter that but even if I don't change anything with the pin setup, the compiled sem file is not useable in SynthEdit. I must be missing something..
Steps I did: - Install latest Visual Studio community edition, with option: Desktop Development with C++, Windows XP support fot C++, C++/CLI support, Visual C++ MFC for x86 and x64, and VC++ 2015,3 v14.00 (v140) toolset for desktop. - Made sure SE SDK files are available for build - Open project BPMClock3 , change the IDs in the xml files to make sure SynthEdit does not cry about duplicate naming. - Build - Load the sem in synthedit, open the BPM Clock4b (I edited the ID to 4b) plugin, connect the Pulse Out to a volt meter, run it and crash..
|
|
Andrew
Developer
Posts: 110
Posts: 110
|
Post by Andrew on Aug 11, 2018 20:34:07 GMT 1
Steps I did: - Install latest Visual Studio community edition, with option: Desktop Development with C++, Windows XP support fot C++, C++/CLI support, Visual C++ MFC for x86 and x64, and VC++ 2015,3 v14.00 (v140) toolset for desktop. - Made sure SE SDK files are available for build - Open project BPMClock3 , change the IDs in the xml files to make sure SynthEdit does not cry about duplicate naming. - Build - Load the sem in synthedit, open the BPM Clock4b (I edited the ID to 4b) plugin, connect the Pulse Out to a volt meter, run it and crash..
Seems like you've skipped a step, I've made this very mistake a couple of times myself. You also need to change the ID in the .cpp. So for your example, in the .xml ID = "4b". in .cpp REGISTER_PLUGIN2(BpmClock4, L"4b");
FYI, as far as I understand it there is a reason for the two IDs(that should be exatly the same - c++ is CaSe sensitive): the xml registers the pins for SE the program, this gets stripped out when you export as VST, kind of like copy protectionfor your modules. The REGISTER_PLUGIN2 or REGISTER_PLUGIN method registers with the audio 'factory'(in SDK speak), which is the audio engine.
|
|
Andrew
Developer
Posts: 110
Posts: 110
|
Post by Andrew on Aug 11, 2018 21:36:35 GMT 1
Thanks Andrew! Will definitely try going with Ms Visual instead, got to try MinGW and CodeBlocks as advised on synthedit.com . Also thanks for the C++ material, I'm not new to the material, but I also wouldn't consider myself a coder at all. I did buy both books from Will Pirkle that cover designing audio plugins and effects in C++ specifically so I definitely am aiming to go that route. Time however is always short and I hope to save a lot of time using SynthEdit as a platform getting familiar with the building blocks and signal types and values in a visual way. Downloading the latest community edition of Visual and will give it a go, thanks again!
O, and btw, as a lot of links to older mods are dead, if you do happen to stumble on an existing mod (preferably a recent one 64-bit) that achieves what I'm going for with the host playback location I'd be happy to know! Just remember that SE is 19 years old so some of it is examples may not load, generally stuff made with SE1.1 and above should load okay(made about 2008/2009 or after if my memory isn't failing me), I would suggest to steer clear of any GUI/sub-control stuff as that might give headaches. Been a SE user for just over a decade myself, but only coding for 4 years and I generally suck at it - basically just learned c++ purely to use SDK3 to get around some of the SE limitations(i.e. feedback delay). DSP coding is very complicated, so be prepared to fail multiple times before you succeed. I've sometimes taken up to 2 years just to get some of my modules/code working correctly, and some are still 'broken'...3 years and counting.
I'd suggest to first mess around with simpler modules, i.e. take the gain example and make it stereo, check out how 'sleep mode' works(filter examples - use the Diagnostic 'Monitor' module in SE to see if it sleeps properly), make an LFO(super easy) - then make a on/off switch(not as easy as you might think) etc etc. Achieving small goals will help to learn the SDK as well as SE, and will give you the courage and hopefully the patience to implement more advanced stuff via the SDK.
I'd consider a 'host playback positioning' module to be a bit above beginner level. That being said, I don't really understand why you need it though. For a super simple bread n butter Trancegate, you can start with a BPM Clock4, Level Adjust and a Step Counter2 module like so:
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 12, 2018 0:04:02 GMT 1
Thanks, the .cpp register name was indeed the problem.. I have no problem creating a trancegate that only considers BPM tempo, I had that down before I got stuck trying to find a way to get the host playback position, it has buttons to control what steps are gated and ADSR controls to shape the steps.. A trancegate completely loses its functional use if it doesn't sync to host playback position correctly.. When making music you don't start your project at fixed positions, you expect the trancegate to be on the right spot on the right time all the time when it's synced to BPM.
Since I found the existing Clock4 module already gathers the data I need, I think all I need to do is create output pins to make use of it.
About SE being old that's fine to me, it's just that it's a bit weird to go to the main webpage of a living product and company and it being neglected the way it is.. It gives a certain impression, and that impression continues looking for information online.. It's a pity since it's still being worked on and it has quite a lot of potential.
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 21, 2018 18:15:42 GMT 1
Ok.. so I think I've successfully created output pins in BPM Clock 4 that give the desired output in SynthEdit, just when loading the exported dll in Cubase it says the sem cannot be loaded. I do think it's because BPM Clock 4 needs MinGW libraries (although it compiles without errors in Visual Studio I noticed includes that point to what looks like MinGW files)..
I did encounter the same issue loading the dll to the host compiled from the original BPM Clock 4 in Visual Studio so I don't think it's the outputs being the issue.
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 22, 2018 17:05:50 GMT 1
I finally got to build it successfully in CodeBlocks with MinGW.. After setting the compiler executables, and loading the .a library files from MinGW instead of the standard lib files, and then setting the define instructions, it compiled AND was able to load the dll in Cubase.. I then found that the QN_Pos value is spot on at all times , the bpm is working as expected, but the Transport Run and BarStart behavior need reviewing (they have the expected output in SynthEdit tho).
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Aug 31, 2018 20:37:50 GMT 1
Just an update, I'm moving along nicely trying my best to create a bpm clock step multitool with aim to use with a stepsequencer and I've learned how to properly communicate with the host.. The clock even outputs step locations for easy sync based on the step divide and a 16 step sequencer..
I ditched the swing option as it seemed to complicate things, and kept adding things that I though was useful at the time or what I wanted to experiment with. I might ditch some pins or add on others but so far my aim is to get sync spot on at all times as that's not achieved yet but it does a nice job most of the time.. I found the Synth Edit monitor tool extremely useful when it comes for troubleshooting timing issues.
I was wondering... I'm using SE 1.3 and I'm kind of doubting about switching to 1.4 until it's fully released. Would you recommend it?
|
|
|
Post by Rob on Sept 16, 2018 10:59:36 GMT 1
Nice module, version 1.4 has more bugs so only switch if that's not a problem for you.
|
|
flip
New Member
Posts: 14
Posts: 14
|
Post by flip on Oct 10, 2018 9:32:16 GMT 1
ah, just saw your reply thanks! I had a bit of an issue with different module behavior using 1.3 build 267 I had installed and the newest build. Suddenly timing exceptions I had to make in the code were no longer necessary, so I guess it wasn't my logic requiring the correction, but it did require altering the module again. If this is the stable release, I will not touch 1.4 for now.. Thanks again!
|
|
Andrew
Developer
Posts: 110
Posts: 110
|
Post by Andrew on Oct 20, 2018 18:38:53 GMT 1
P.S. Jeff made a small tweak to improve the precision of the timing(SE side not module side) a couple of weeks ago, it shouldn't in theory require any code re-writes, but ya never know. Change is stated in changelog.
|
|