first of all, I realy like book. I didn't think, it would be able to get into DSP so fast. But for the next time, an optional hard cover would be great. (People would spend the money on that.)
To the topic. I am not the best C++- Programmer. I am currently studying CS in Germany but we only had Java and C so far and only the basics of programming. Right now, in Chapter 7, I start making some funny mistakes while programming and I would realy like to have an additional output-console wich I can use with in the project.
Is there a simple way to do this? For example a bit of code i write in the constructor wich opens a console in the background?
PS: I hope my english is not that bad.
Hi William -
Glad you are enjoying the book!
RackAFX has a built-in Debug Window called the "Status Window" that you can send strings to from anywhere in your code EXCEPT the constructor. This makes it easy to send these messages directly into RackAFX. You can get details about how to use the Status Window on the Tips page here:
If you want to use something similar to TRACE (a macro only available with MFC - RackAFX plug-ins do not use MFC for several reasons; first, to be lean and secondly to be as compatible as possible with XCode/MacOS). If you want to use a similar macro, add the following code to the top of your .cpp file (NOTE: you will need to remove this (or comment it out) and all references to it if you use the Export To AU and compile in XCode.)
Get the code from here (its the first answer)
You can then use it like this:
TRACE("This is a debug message!\n");
The \n forces a carriage return (new line). The message appears in the Output Window in Visual Studio.
You can also use the helper functions I describe on the Tips page above to do things like convert ints and floats to strings or concatenate strings; then you can use the TRACE macro above to log them.
I have used a custom console window in the past, but it was a pain and very slow; it used Windows Pipes to send text. I don't remember the name of the debug window app, though Anyone else have a console debug logger that works with Win32 (and not MFC)? If so, please post it here!
The Status Window and/or TRACE macro should help you out with your debugging.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:Jas, Rowan, sojourn, fabhenr, rg1, Niklas, Wutru, Tim Campbell, Danny Jonel, Valentin
Moderators: W Pirkle: 573
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 573, VariableCook: 3