ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2009-08-19T09:49:53+02:00 https://brainmodular.com/forums/app.php/feed/topic/1262 2009-08-19T09:49:53+02:00 2009-08-19T09:49:53+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9961#p9961 <![CDATA[testing module]]>

Statistics: Posted by martignasse — 19 Aug 2009, 09:49


]]>
2009-08-19T04:44:30+02:00 2009-08-19T04:44:30+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9958#p9958 <![CDATA[testing module]]> It works great, and it's much more efficient than my "french" cooking.
Thanx a lot, Mister Tignasse.
See you !

Statistics: Posted by LevraiBernardo — 19 Aug 2009, 04:44


]]>
2009-08-17T12:09:31+02:00 2009-08-17T12:09:31+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9949#p9949 <![CDATA[testing module]]>
and thanks for the trick,
To finish, show a modal window with the message :
MessageBox(NULL,msg.data(), TEXT("Title of the window"), MB_OK );
just to let you know, next version will have trace functions to write directly in the usine console.

You can also debug your module with some VC++ breakpoints.

Short version :
To do that, there is some infos to add to the Project properties panel.
in 'Configuration properties->debug->command ' add the path to the UsineMain.exe (not the Usine.exe, but UsineMain.exe)
example : 'E:AudioUsine Pro StandAlone 4.22dFilesUsineMain.exe'

and in the 'build event->Post-build event->command line' add a shell command to copy the generated .usr file in the usine folder
example : 'xcopy /e /i /y "$(OutDir)$(ProjectName)_D.usr" "E:AudioUsine Pro StandAlone 4.22dFilesModulesUserExamples"'

like that, when you start debug your module (F5), VC++ automatically copy it in the usine module folder and start usine.
make sure usine has the autoload option to on in the setup panel, and make a workspace that use your module, save it.

and if you place breakpoint in your module code, you can inspect the code execution at runtime.

to finish the debug session, simply close usine and you are back in VC++

PS : I began a wiki page on this chapter
http://www.sensomusic.com/wiki/doku.php?id=sdk:cpp_area:how_to:debug

Statistics: Posted by martignasse — 17 Aug 2009, 12:09


]]>
2009-08-16T03:32:30+02:00 2009-08-16T03:32:30+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9934#p9934 <![CDATA[testing module]]> #include <sstream>

then, in the function, create a stream string and a string formatting the message :
std::ostringstream Oss;
std::string msg;

Go on filling the stream with a message containing the var value, then make it a string :
Oss << "m_var value :" << m_var;
msg = Oss.str();

To finish, show a modal window with the message :
MessageBox(NULL,msg.data(), TEXT("Title of the window"), MB_OK );

(One window can contain several values : Oss << "m_var1 value :" << m_var1 << "m_var2 value :" << m_var2 ... No matter the var type this way.)

Statistics: Posted by LevraiBernardo — 16 Aug 2009, 03:32


]]>
2008-12-31T14:56:29+02:00 2008-12-31T14:56:29+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=6864#p6864 <![CDATA[testing module]]>
1. How to test user module in visual c++? how to trace variables etc ... I never work with dll's... its impossible to make module testing it like this: compile, copy to usine, restart usine, test in patch just to look at one variable state.
What do you mean by 'to test user module' ?
Normally, compile, copy to usine, restart usine should let you see your module and use it. After that, the simplest way to trace values is to look what you have on the module pin. For intermediate or internal values, module with panel who write the concerned value seems to be the way.
2. how to send data to ArrayOut?

for (i = 0; i < 8; i++) {
pPrototype->PArrayOut->DATA = tab;
}
it's good way to do that? it's not work ....

You're nearly good (assuming you do this in the Process methode), but did you tell usine the length of the pArrayOut array, like this ?

CODE:

void Process &#40;void* pModule&#41; &#123;// make convenient pointer to the moduleTArrayTest* pArrayTest = &#40;&#40;TArrayTest*&#41;pModule&#41;;// used for loopint i;// test to fill the arraypArrayTest->PArrayOut->len = 8;for &#40;i = 0; i < pArrayTest->PArrayOut->len; i++&#41; &#123;pArrayTest->PArrayOut->DATA&#91;i&#93; = i;&#125;&#125;
tested and working for me, tell me if you want i upload an example project on the wiki.

a+

Statistics: Posted by martignasse — 31 Dec 2008, 13:56


]]>
2008-12-31T13:34:40+02:00 2008-12-31T13:34:40+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=6863#p6863 <![CDATA[testing module]]>
1. How to test user module in visual c++? how to trace variables etc ... I never work with dll's... its impossible to make module testing it like this: compile, copy to usine, restart usine, test in patch just to look at one variable state.

2. how to send data to ArrayOut?

for (i = 0; i < 8; i++) {
pPrototype->PArrayOut->DATA = tab;
}

it's good way to do that? it's not work ....

Statistics: Posted by nelson — 31 Dec 2008, 12:34


]]>
BrainModular BrainModular Users Forum 2009-08-19T09:49:53+02:00 https://brainmodular.com/forums/app.php/feed/topic/1262 2009-08-19T09:49:53+02:00 2009-08-19T09:49:53+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9961#p9961 <![CDATA[testing module]]>

Statistics: Posted by martignasse — 19 Aug 2009, 09:49


]]>
2009-08-19T04:44:30+02:00 2009-08-19T04:44:30+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9958#p9958 <![CDATA[testing module]]> It works great, and it's much more efficient than my "french" cooking.
Thanx a lot, Mister Tignasse.
See you !

Statistics: Posted by LevraiBernardo — 19 Aug 2009, 04:44


]]>
2009-08-17T12:09:31+02:00 2009-08-17T12:09:31+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9949#p9949 <![CDATA[testing module]]>
and thanks for the trick,
To finish, show a modal window with the message :
MessageBox(NULL,msg.data(), TEXT("Title of the window"), MB_OK );
just to let you know, next version will have trace functions to write directly in the usine console.

You can also debug your module with some VC++ breakpoints.

Short version :
To do that, there is some infos to add to the Project properties panel.
in 'Configuration properties->debug->command ' add the path to the UsineMain.exe (not the Usine.exe, but UsineMain.exe)
example : 'E:AudioUsine Pro StandAlone 4.22dFilesUsineMain.exe'

and in the 'build event->Post-build event->command line' add a shell command to copy the generated .usr file in the usine folder
example : 'xcopy /e /i /y "$(OutDir)$(ProjectName)_D.usr" "E:AudioUsine Pro StandAlone 4.22dFilesModulesUserExamples"'

like that, when you start debug your module (F5), VC++ automatically copy it in the usine module folder and start usine.
make sure usine has the autoload option to on in the setup panel, and make a workspace that use your module, save it.

and if you place breakpoint in your module code, you can inspect the code execution at runtime.

to finish the debug session, simply close usine and you are back in VC++

PS : I began a wiki page on this chapter
http://www.sensomusic.com/wiki/doku.php?id=sdk:cpp_area:how_to:debug

Statistics: Posted by martignasse — 17 Aug 2009, 12:09


]]>
2009-08-16T03:32:30+02:00 2009-08-16T03:32:30+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=9934#p9934 <![CDATA[testing module]]> #include <sstream>

then, in the function, create a stream string and a string formatting the message :
std::ostringstream Oss;
std::string msg;

Go on filling the stream with a message containing the var value, then make it a string :
Oss << "m_var value :" << m_var;
msg = Oss.str();

To finish, show a modal window with the message :
MessageBox(NULL,msg.data(), TEXT("Title of the window"), MB_OK );

(One window can contain several values : Oss << "m_var1 value :" << m_var1 << "m_var2 value :" << m_var2 ... No matter the var type this way.)

Statistics: Posted by LevraiBernardo — 16 Aug 2009, 03:32


]]>
2008-12-31T14:56:29+02:00 2008-12-31T14:56:29+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=6864#p6864 <![CDATA[testing module]]>
1. How to test user module in visual c++? how to trace variables etc ... I never work with dll's... its impossible to make module testing it like this: compile, copy to usine, restart usine, test in patch just to look at one variable state.
What do you mean by 'to test user module' ?
Normally, compile, copy to usine, restart usine should let you see your module and use it. After that, the simplest way to trace values is to look what you have on the module pin. For intermediate or internal values, module with panel who write the concerned value seems to be the way.
2. how to send data to ArrayOut?

for (i = 0; i < 8; i++) {
pPrototype->PArrayOut->DATA = tab;
}
it's good way to do that? it's not work ....

You're nearly good (assuming you do this in the Process methode), but did you tell usine the length of the pArrayOut array, like this ?

CODE:

void Process &#40;void* pModule&#41; &#123;// make convenient pointer to the moduleTArrayTest* pArrayTest = &#40;&#40;TArrayTest*&#41;pModule&#41;;// used for loopint i;// test to fill the arraypArrayTest->PArrayOut->len = 8;for &#40;i = 0; i < pArrayTest->PArrayOut->len; i++&#41; &#123;pArrayTest->PArrayOut->DATA&#91;i&#93; = i;&#125;&#125;
tested and working for me, tell me if you want i upload an example project on the wiki.

a+

Statistics: Posted by martignasse — 31 Dec 2008, 13:56


]]>
2008-12-31T13:34:40+02:00 2008-12-31T13:34:40+02:00 https://brainmodular.com/forums/viewtopic.php?t=1262&p=6863#p6863 <![CDATA[testing module]]>
1. How to test user module in visual c++? how to trace variables etc ... I never work with dll's... its impossible to make module testing it like this: compile, copy to usine, restart usine, test in patch just to look at one variable state.

2. how to send data to ArrayOut?

for (i = 0; i < 8; i++) {
pPrototype->PArrayOut->DATA = tab;
}

it's good way to do that? it's not work ....

Statistics: Posted by nelson — 31 Dec 2008, 12:34


]]>