What are the most important parts of C++ for coding plug-ins?
-
- KVRist
- 190 posts since 28 Nov, 2003
I think another important lesson (which ties in with what jackle&hyde writes) is to stick with it when you get bugs or problems with your algorithms, even if you have resources (i.e., friends, siblings, the internet) which might provide a "quick fix". It may not always be practical, but there's something to be said, I think, for (with an algorithm or filter code) working it out on paper from scratch or (with a bug) stepping through your code, adding asserts or whatever.
When I was much younger, I'd always get my older brother to help me whenever I ran into a problem with my code. This was fantastic in terms of fixing the problems quickly, but unless you face the challenge of solving the bug by yourself, you'll never really increase your fundamental understanding of the language or algorithm.
When I was much younger, I'd always get my older brother to help me whenever I ran into a problem with my code. This was fantastic in terms of fixing the problems quickly, but unless you face the challenge of solving the bug by yourself, you'll never really increase your fundamental understanding of the language or algorithm.
-
- KVRist
- 391 posts since 28 Jul, 2003
Take some time to read papers on Hoare logics for proving loop terminations and invariants, specify pre- and post conditions for all your functions, and make extensive use of assertions (#include "assert.h") while in the dev phase to check wether your pre and post are met at runtime and if your program behaves as you expect it to do. That's how you're going to improve your understanding of your code and speed up fault diagnosis. And don't mess around with void* pointers and this sort of stuff, there's already plenty of room for other errors to creep in your code before you need to get rid of compile time type cheking.
Code writing is not some sort of cooking or handcrafting, it's serious shit.
Code writing is not some sort of cooking or handcrafting, it's serious shit.
-
- KVRist
- 190 posts since 28 Nov, 2003
-
- KVRer
- 26 posts since 30 Jul, 2004
If you are learning C++ check out this unreal C++ library:
http://www.wxwindows.org/
Learn to mix C++, C, and assembly code. Check this out:
http://briancbecker.com/site/index.php?id=43
Get a copy of Octave:
http://www.octave.org/
Look at this DSP guru's intelligence:
http://ccrma.stanford.edu/~jos/
Only now get a copy of the VST SDK:
http://www.steinberg.net/Steinberg/Deve ... angue_ID=7
Perhaps join or create a project at this place:
http://sourceforge.net/index.php
On an Apple get Code Warrior, on Linux the Gnu compiler is sweet. Open source Gnu gcc compiler IDE for Win here:
http://www.bloodshed.net/devcpp.html
Student needs a free (Non) Visual C++ compiler, here is way to do it:
http://www.winprog.org/tutorial/msvc.html
http://www.wxwindows.org/
Learn to mix C++, C, and assembly code. Check this out:
http://briancbecker.com/site/index.php?id=43
Get a copy of Octave:
http://www.octave.org/
Look at this DSP guru's intelligence:
http://ccrma.stanford.edu/~jos/
Only now get a copy of the VST SDK:
http://www.steinberg.net/Steinberg/Deve ... angue_ID=7
Perhaps join or create a project at this place:
http://sourceforge.net/index.php
On an Apple get Code Warrior, on Linux the Gnu compiler is sweet. Open source Gnu gcc compiler IDE for Win here:
http://www.bloodshed.net/devcpp.html
Student needs a free (Non) Visual C++ compiler, here is way to do it:
http://www.winprog.org/tutorial/msvc.html
-
Karbon L. Forms Karbon L. Forms https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=29033
- KVRian
- 1372 posts since 10 Jun, 2004 from Inverness, Scotland
Agreed. That's what I'm doing. Me mate is reading a book and claims to be "getting it". I keep telling him to DO something. He has'nt yet!jackle&hyde wrote:My tip is very simple: Learn it by doing.koolkeys wrote:As I've said a few times, I am learning C++(along with planning a wedding, moving, going back to school, working full time, recording for my church, and trying to do too much other stuff). But since I'm still beginning at it, I was curious. What parts of C++ will come in handy the most when doing VST plug-ins? What parts should I spend the most time with? I am learning all I can, but I want to make sure I don't miss something important. I want to focus on the main things I'll need. Thanks guys! Cheers!
Koolkeys
Simply start a plugin project (there are starter examples enougth there) and begin to realize your imagination. Do all problems solve in the order it occurs. (You should have a good book by the hands to immediately find the solutions for your problems.)
I have seen ppl trying to teach themselfes a hole stack of C/C++ books and white papers only by reading...
...they where not really able to code the simplest algorithms and projects in practice finally...
.
.................................
"Hell is other People" J.P.Sartre
.................................
"Hell is other People" J.P.Sartre
.................................
-
- KVRist
- 327 posts since 13 Nov, 2002 from Germany, Darmstadt
Hmm, if you got the paradigms used by the language you actually can learn the language very quickly by just reading books. But you won't learn the language's idioms.
-
- KVRian
- 699 posts since 31 Jan, 2003 from C@L
Just curious, is there any downside to using the new safe StringCchCopy functions in the new Platform SDK? Seems like those cover the buffer overrun scenarios, but I haven't checked to see if they have a perf hit or other side effects.
Brian
Brian
-
- KVRian
- 922 posts since 26 Mar, 2003 from Guildford, England
Are you liekly to be using StringCchCopy in time-critical code?thenumber23 wrote:Just curious, is there any downside to using the new safe StringCchCopy functions in the new Platform SDK? Seems like those cover the buffer overrun scenarios, but I haven't checked to see if they have a perf hit or other side effects.
If its just for something like the VST string interface, then there is probably little point in worrying about the performance.
-
- KVRist
- 453 posts since 16 Sep, 2002 from Malaga (Spain)
Never take a look to the damned VST SDK examples from the outer space. That's the most important f**king part.What is the most important parts of C++ for coding plug-ins?
-
- KVRer
- 11 posts since 19 Nov, 2002
One thing you need to know, above all else. Above knowing loops, knowing how to optimise, how to real algorithms, before math before anything else....
Three words: have a plan
Without a plan you have no chance.
You need to answer the following questions:
1) What will this do?
2) How will it work?
3) What type of user interface are you going to have?
4) How will it flow?
Then you can begin to throw in all the loops, algorithms, effects or whatever else you see fit.
Because without a plan, it won't matter how cool your toy is, or how fast it is, or how efficient it is ...etc...
It's best to know all this stuff BEFORE you rush to the keyboard typing in code.
Even the worst programmer out there can make a solid application so long as he/she plans it all first. In my 10+ years of professional programming I've seen many top-notch genius programmers defile themselves because they didn't have a plan, because they didn't have any thought as to how it will really function.
I know this may sound a bit corny but nonetheless it's 100% true: Plan the work and work the plan ...everything else is trivial compared to that ... even if you don't know C++, you can learn as you go
True Story:
This one guy wanted to make an application but he had no idea how to program. He didn't know any programming languages at all. However, he did know what his application was going to do and how it would work. So he picked up Visual Basic and learned as he went. Later on, in a few months, his application was finished and he called it "Napster".
Three words: have a plan
Without a plan you have no chance.
You need to answer the following questions:
1) What will this do?
2) How will it work?
3) What type of user interface are you going to have?
4) How will it flow?
Then you can begin to throw in all the loops, algorithms, effects or whatever else you see fit.
Because without a plan, it won't matter how cool your toy is, or how fast it is, or how efficient it is ...etc...
It's best to know all this stuff BEFORE you rush to the keyboard typing in code.
Even the worst programmer out there can make a solid application so long as he/she plans it all first. In my 10+ years of professional programming I've seen many top-notch genius programmers defile themselves because they didn't have a plan, because they didn't have any thought as to how it will really function.
I know this may sound a bit corny but nonetheless it's 100% true: Plan the work and work the plan ...everything else is trivial compared to that ... even if you don't know C++, you can learn as you go
True Story:
This one guy wanted to make an application but he had no idea how to program. He didn't know any programming languages at all. However, he did know what his application was going to do and how it would work. So he picked up Visual Basic and learned as he went. Later on, in a few months, his application was finished and he called it "Napster".
-
- KVRian
- 626 posts since 29 Jul, 2003 from Paris - France
did anyone mentionned "design patterns"?
factory, iterator, interface, MVC ...
Because sometime you have a plan, but it's not really clearly defined nor easy to express. Design patterns are good landmarks to express your ideas.
I have 3 books beside me:
the "C++ language" by Bjarne Stroustrup
"Design patterns" by Erich Gamma , Richard Helm...
"STL pocket reference" O'Reilly
that I explore iteratively when I have the need for something.
There's something else that I try to do as often as possible:
code first what you want you app to do.
then write the rest to make it working.
It's a top-down approach. from the most abstract layer to the more concrete low-level layer. I've heard Alan Kay saying that "hardware is just what makes software run".
It's also reminiscent of extreme programming: writing the tests first.
cheers
rémy
factory, iterator, interface, MVC ...
Because sometime you have a plan, but it's not really clearly defined nor easy to express. Design patterns are good landmarks to express your ideas.
I have 3 books beside me:
the "C++ language" by Bjarne Stroustrup
"Design patterns" by Erich Gamma , Richard Helm...
"STL pocket reference" O'Reilly
that I explore iteratively when I have the need for something.
There's something else that I try to do as often as possible:
code first what you want you app to do.
then write the rest to make it working.
It's a top-down approach. from the most abstract layer to the more concrete low-level layer. I've heard Alan Kay saying that "hardware is just what makes software run".
It's also reminiscent of extreme programming: writing the tests first.
cheers
rémy
-
LIMITAPROACHINGINFINITY LIMITAPROACHINGINFINITY https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=47871
- KVRAF
- 1850 posts since 13 Nov, 2004
IS there any free compilers I would be able to develop Vst's with, along with the supplied vst sdk from steinberg. Is the SDK in a Microsoft VC++ Project that wont open in other compilers? I am very new to this so thanks for your patience. I am a student so maybe even a really cheap compiler with a student discount would work.
Also, What would get me started learning how to do cool GUI's. I am only interested in windows dev. Would i simply want a good handle on API's? IS MFC neccessary when i'm not using standard type of controls? Are there any good resources for the graphic stuff?
Also, What would get me started learning how to do cool GUI's. I am only interested in windows dev. Would i simply want a good handle on API's? IS MFC neccessary when i'm not using standard type of controls? Are there any good resources for the graphic stuff?
The following statement is true.
The previous statement is false.
The previous statement is false.
-
- KVRian
- 626 posts since 29 Jul, 2003 from Paris - France
there is gcc which is a freesoftware compiler available through mingw on windows.
http://www.mingw.org/
However if you're new to this that's maybe not the easiest compiler to use.
you can maybe try VC++ express instead
http://lab.msdn.microsoft.com/express/v ... fault.aspx
the vstsdk provides it's own GUI toolkit called vstgui which does it's job and is crossplateform.
and there's also a very good framefork called JUCE by julian storer who wrote traktion:
http://www.rawmaterialsoftware.com/juce/
It has a nice graphic engine, and there are example about how to make vst plugins with it.
http://www.mingw.org/
However if you're new to this that's maybe not the easiest compiler to use.
you can maybe try VC++ express instead
http://lab.msdn.microsoft.com/express/v ... fault.aspx
the vstsdk provides it's own GUI toolkit called vstgui which does it's job and is crossplateform.
and there's also a very good framefork called JUCE by julian storer who wrote traktion:
http://www.rawmaterialsoftware.com/juce/
It has a nice graphic engine, and there are example about how to make vst plugins with it.