Moderator: Moderators (Main)
by pieroni; Thu Jan 10, 2013 3:05 am
I'm attempting to learn how to code VSTs... I've done all the examples that come in the Steinberg SDK, modified them to do slightly different things, but now I'm trying to teach myself how to do more. I've found some useful sources on the internet... more specifically from here:
I've been trying to compile this without the gui, just plain and simple, but for some reason when I try to use it there is no sound output. If anyone has seen this or knows what the issue might be, it would be greatly appreciated.
I've pulled all the code together into this vis studio project...
Any help would be greatly appreciated
by pieroni; Mon Jan 21, 2013 2:52 am
After checking to see whether that works though, it appears I do get some sort of output, but its incredibly distorted and quiet and doesnt do anything near to what I want it to.
by kuniklo; Tue Jan 22, 2013 1:36 am
bitwise wrote:It could be the std::vector class inside the audio loop, which is not fast enough. The fact that it starts working in Release mode seems to show that, in fact, some checks are removed in the Release code.
I'd expect this to increase the CPU load but not to prevent the VST from working entirely.
by bitwise; Tue Jan 22, 2013 4:46 am
by Mayae; Tue Jan 22, 2013 1:36 pm
by bitwise; Tue Jan 22, 2013 2:48 pm
pieroni wrote:so do you think it would be this area causing me the grief? is this where i should be spending most of my time and efforts?
I had to compile your code. I couldn't hear any sound, not even in the Release version. So it doesn't depend on some lag.
I noticed that the output was always zero.
You were not incrementing "fPhase1". And why you were not?
Because of this commented line:
- Code: Select all
//fPhase1 += baseFreq + (parent->fModIndex * MAX_MOD_INDEX * modulation * parent->fScaler);
Once uncommented, i got a couple of errors:
"fModIndex" and "MAX_MOD_INDEX" not defined.
They are not defined in your example, but they are in the original code that i can find online.
Anyway, i replaced "parent->fModIndex * MAX_MOD_INDEX" with "1" and i could hear sounds in the Debug version.
by whyterabbyt; Sat Jan 26, 2013 2:19 am
pieroni wrote:thankyou so much for checking it over for me, like I said, I'm new to this I'm just trying to learn so all I'm doing at the moment is changing things and seeing what does what.
my opinion so just a suggestion but if you're changing things to see what it does, and then you get no sound, then revert the change rather than ask for someone to tell you why its making no sound. given that you know you changed stuff, and they dont, its just a touch rude to expect someone to spend time 'fixing' something you randomly broke. especially if you dont tell people until after they did all the work.
as for trying to work out what stuff does, you'd be far better off tracing what's going on than just changing stuff to see what happens. break it down into smaller steps, and keep track of what things are doing (which you cant do by just removing them).
what'll almost invariably happen is that you break something that had a purpose, and if you dont know what it was originally doing, you're not going to discover what if its not there. thats a bit like bashing some component in a car our of shape to see how the car runs with it in a new shape...