SDK V2 Feedbacks, it's here
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Hello Martin,
I've donwloaded and unpacked this SDK V2, and I'm very desappointed 'cause I cann't open any solution with my version of Visual C++ Express (the free one )!
cheers
I've donwloaded and unpacked this SDK V2, and I'm very desappointed 'cause I cann't open any solution with my version of Visual C++ Express (the free one )!
cheers
vincent michel
composer & novelist
composer & novelist
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hi vincent,
It's very strange, I've made the SDK V2 on VC++ Express, exactly on this version :
.
what kind of message VC Express bring you ?
It's very strange, I've made the SDK V2 on VC++ Express, exactly on this version :
.what kind of message VC Express bring you ?
Martin FLEURENT - Usine Developer - SDK maintainer
OK!!!!
Not strange at all!
I don't know how I did this, but I run a Visual C++ 2005!
Tell me pleazzze: where did you dwnload this C++ 2008?!
Thanks and sorry for this stupid post!
I'm impatient to start!
cheers
Not strange at all!
I don't know how I did this, but I run a Visual C++ 2005!
Tell me pleazzze: where did you dwnload this C++ 2008?!
Thanks and sorry for this stupid post!
I'm impatient to start!
cheers
vincent michel
composer & novelist
composer & novelist
Hello Yan,
Thanks for the link. Google doesn't like me and makes some jokes I don't appreciate!
I had to know that there was a 2008 edition and ask for it...
Now, let's go!
cheers
Thanks for the link. Google doesn't like me and makes some jokes I don't appreciate!
I had to know that there was a 2008 edition and ask for it...
Now, let's go!
cheers
vincent michel
composer & novelist
composer & novelist
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
ok, good news,
let us know your 'not coder' feeling about it
let us know your 'not coder' feeling about it
Martin FLEURENT - Usine Developer - SDK maintainer
'Not coder', exactly. I'll talk, don't worry!martignasse wrote:let us know your 'not coder' feeling about it
vincent michel
composer & novelist
composer & novelist
Evrything works fine now.
Thanks Yan for the right link.
I had a look in the user modules.
Looks simple, but unfortunately for me, all what I know in coding is in Visual Basic (VB 2008 is nice!).
With Visual C++, I have to spend some time to re-learn...
And time, you know...
Yeah, I'll take it, every day.
cheers
Thanks Yan for the right link.
I had a look in the user modules.
Looks simple, but unfortunately for me, all what I know in coding is in Visual Basic (VB 2008 is nice!).
With Visual C++, I have to spend some time to re-learn...
And time, you know...
Yeah, I'll take it, every day.
cheers
vincent michel
composer & novelist
composer & novelist
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Even if it's not directly related to Usine,
i'll try to put some links to CPP basics on the WIKI, as it can help to understand the syntaxe, and how to manipulate data.
Can't promise you 'll become a master, but you should arrive to make some user module pretty easly.
A+
i'll try to put some links to CPP basics on the WIKI, as it can help to understand the syntaxe, and how to manipulate data.
Can't promise you 'll become a master, but you should arrive to make some user module pretty easly.
A+
Martin FLEURENT - Usine Developer - SDK maintainer
Thanks, Martin.
Yes, I think I'll be able to have some good time!
Anyway, I won't make modules just as a game, I think that when I'll have do what I need, I'll comme back to Usine.
cheers
Yes, I think I'll be able to have some good time!
Anyway, I won't make modules just as a game, I think that when I'll have do what I need, I'll comme back to Usine.
cheers
vincent michel
composer & novelist
composer & novelist
Bouh...
C++ give me headaches. I understand absolutely nothing, it seems *very* different from VB that I now know a little...
Architecture is different, concepts are different, ways of conception and ways to build... I'm just lost.
And the MSDN in this release is so poor! 2/3 help files are missing. I've tryed to download the whole ISO stuff, but download is bugged here. Maybe with Firefox... I'll try.
Could you please give me a couple of links toward efficient french tutos for newbleubite?
I had a clear project for a sync module, I think it will wait a while. But when I'll be somewhat ready, i'll come back for tons of questions!
Thanks for this SDK, Martin, it is really a good stuff.
cheers
C++ give me headaches. I understand absolutely nothing, it seems *very* different from VB that I now know a little...
Architecture is different, concepts are different, ways of conception and ways to build... I'm just lost.
And the MSDN in this release is so poor! 2/3 help files are missing. I've tryed to download the whole ISO stuff, but download is bugged here. Maybe with Firefox... I'll try.
Could you please give me a couple of links toward efficient french tutos for newbleubite?
I had a clear project for a sync module, I think it will wait a while. But when I'll be somewhat ready, i'll come back for tons of questions!
Thanks for this SDK, Martin, it is really a good stuff.
cheers
vincent michel
composer & novelist
composer & novelist
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Quick answer :Vincent wrote:Could you please give me a couple of links toward efficient french tutos for newbleubite?
Apprenez à programmer en C !
Apprenez à programmer en C++ !
they are french tutorials from 'le site du zero' so, especially for 'newbleubite'
C++ is built on top of C language, so it's recommended to read the C one before, has it speak about very basic and important things to understand C++.
PS : I'll add those links on the WIKI when i'll make the french pages.
Hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
Yes it helps! Anything helps where I am. Well, let's have a drink...
Thanks Martin.
I'll come back later.
Thanks Martin.
I'll come back later.
vincent michel
composer & novelist
composer & novelist
Yes! Tremendously.martignasse wrote:Quick answer :
Apprenez à programmer en C !
Apprenez à programmer en C++ !
they are french tutorials from 'le site du zero' so, especially for 'newbleubite'.
Hope it help
Nice tutos, clears and realy well thought.
I don't specialy like Bible, but actually...
vincent michel
composer & novelist
composer & novelist
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hello Vincent,
you are in ideal position to make a 'User module tutorial for C++ newbie'
you are in ideal position to make a 'User module tutorial for C++ newbie'
Martin FLEURENT - Usine Developer - SDK maintainer
Not yet!martignasse wrote:you are in ideal position to make a 'User module tutorial for C++ newbie'
I'm still with C++ learning tutos and I positively understand nothing in all your threads about SDK and user modules.
In some words: i'm not as good as a newbie and it seems to me that i'm far to be!
vincent michel
composer & novelist
composer & novelist
Hi,
Just checking:
Are all the projects included in the CPP SDK supposed to build succesfully?
With UserDrawPad I get:
1>UseDrawPad.cpp
1>c:audiousine sdkcppusine cpp sdk v2auserdrawpadexampleusedrawpad.cpp(300) : error C2664: 'DrawTextW' : cannot convert parameter 2 from 'LPSTR' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Build log was saved at "file://c:audioUsine SDKCPPUsine CPP SDK V2aUserDrawPadExampleDebugBuildLog.htm"
1>UserDrawPadExample - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
With TemplateModule I get:
1>------ Build started: Project: TemplateModule, Configuration: Debug Win32 ------
1>Compiling...
1>TemplateModule.cpp
1>c:audiousine sdkcppusine cpp sdk v2atemplateprojecttemplatemodule.cpp(59) : warning C4065: switch statement contains 'default' but no 'case' labels
1>c:audiousine sdkcppusine cpp sdk v2atemplateprojecttemplatemodule.cpp(83) : warning C4065: switch statement contains 'default' but no 'case' labels
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1> Creating library DebugTemplateModuleCPP_D.lib and object DebugTemplateModuleCPP_D.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>C:audioUsine SDKCPPUsine CPP SDK V2abinTemplateModuleCPP_D.usr : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:audioUsine SDKCPPUsine CPP SDK V2aTemplateProjectDebugBuildLog.htm"
1>TemplateModule - 3 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
UserPrototypeExample builds succesfully...
I thought I'd just ask before getting any deeper into this world
Thanks,
antwan
Just checking:
Are all the projects included in the CPP SDK supposed to build succesfully?
With UserDrawPad I get:
1>UseDrawPad.cpp
1>c:audiousine sdkcppusine cpp sdk v2auserdrawpadexampleusedrawpad.cpp(300) : error C2664: 'DrawTextW' : cannot convert parameter 2 from 'LPSTR' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Build log was saved at "file://c:audioUsine SDKCPPUsine CPP SDK V2aUserDrawPadExampleDebugBuildLog.htm"
1>UserDrawPadExample - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
With TemplateModule I get:
1>------ Build started: Project: TemplateModule, Configuration: Debug Win32 ------
1>Compiling...
1>TemplateModule.cpp
1>c:audiousine sdkcppusine cpp sdk v2atemplateprojecttemplatemodule.cpp(59) : warning C4065: switch statement contains 'default' but no 'case' labels
1>c:audiousine sdkcppusine cpp sdk v2atemplateprojecttemplatemodule.cpp(83) : warning C4065: switch statement contains 'default' but no 'case' labels
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1> Creating library DebugTemplateModuleCPP_D.lib and object DebugTemplateModuleCPP_D.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>C:audioUsine SDKCPPUsine CPP SDK V2abinTemplateModuleCPP_D.usr : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:audioUsine SDKCPPUsine CPP SDK V2aTemplateProjectDebugBuildLog.htm"
1>TemplateModule - 3 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
UserPrototypeExample builds succesfully...
I thought I'd just ask before getting any deeper into this world
Thanks,
antwan
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Hi antwan,
Normally, all projects should build without errors, in release and debug mode...
But the fact is, there are some inconsistence in projects properties between release and debug configs.
So, will go for a V2b update shortly...
In the mean time, i can explain what is wrong to let you play with the SDK
for the DrawPad | Debug :
For the ModuleTemplate | Debug :
Note that the ModuleTemplate is here as a base to make new project easier, even if it should build out of the box, it miss some important code to be functional. You have to add at least what mentioned in code comments.
The best solution would be to make a VC wizard for new user module... if someone can do that, it will be perfect
Anyway, thanks a lot for the feedback, and sorry for these troubles, i haven't test enough before release :/
Normally, all projects should build without errors, in release and debug mode...
But the fact is, there are some inconsistence in projects properties between release and debug configs.
So, will go for a V2b update shortly...
In the mean time, i can explain what is wrong to let you play with the SDK
for the DrawPad | Debug :
In Project properties(Debug), you have to change the Configuration Properties->Ceneral->Character Set to No Set instead of Unicode, which cause this invalid cast.1>c:audiousine sdkcppusine cpp sdk v2auserdrawpadexampleusedrawpad.cpp(300) : error C2664: 'DrawTextW' : cannot convert parameter 2 from 'LPSTR' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Build log was saved at "file://c:audioUsine SDKCPPUsine CPP SDK V2aUserDrawPadExampleDebugBuildLog.htm"
1>UserDrawPadExample - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
For the ModuleTemplate | Debug :
In Project properties(Debug), you have to change the Configuration Properties->C/C++->Runtime Library to Multi-threaded Debug (/MTd) instead of Multi-threaded (/MT), which cause this libs conflict.1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>C:audioUsine SDKCPPUsine CPP SDK V2abinTemplateModuleCPP_D.usr : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:audioUsine SDKCPPUsine CPP SDK V2aTemplateProjectDebugBuildLog.htm"
1>TemplateModule - 3 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Note that the ModuleTemplate is here as a base to make new project easier, even if it should build out of the box, it miss some important code to be functional. You have to add at least what mentioned in code comments.
The best solution would be to make a VC wizard for new user module... if someone can do that, it will be perfect
Anyway, thanks a lot for the feedback, and sorry for these troubles, i haven't test enough before release :/
Martin FLEURENT - Usine Developer - SDK maintainer
Hi Martin,
Thanks for the clarification. That'll get me started. Though I'm still a bit scared of it all
antwan
Thanks for the clarification. That'll get me started. Though I'm still a bit scared of it all
antwan
Hello once again,
Okay, so I got these things to compile okay.
But how do I actually get from compiling/building to having an actual module in usine? I can't find any usr-file etc. created as a result of the release-build.
Cheers,
antwan
Okay, so I got these things to compile okay.
But how do I actually get from compiling/building to having an actual module in usine? I can't find any usr-file etc. created as a result of the release-build.
Cheers,
antwan
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hi,
Normally, the result of compilation for all projects are in the bin folder, named like the project and with a '_D' for debug version and a '.usr' extension.
If it's not the case, you have to check in the project properties (for Release and Debug mode) Configuration Properties->General->Output Directory it should be $(SolutionDir)bin. If it's something else, follow the path to find the file.
Those files should be copied or moved in the Usine folder installFilesModulesUser to be visible in the Usine Browser->Modules->User and usable.
Let me know if you get it right.
Normally, the result of compilation for all projects are in the bin folder, named like the project and with a '_D' for debug version and a '.usr' extension.
If it's not the case, you have to check in the project properties (for Release and Debug mode) Configuration Properties->General->Output Directory it should be $(SolutionDir)bin. If it's something else, follow the path to find the file.
Those files should be copied or moved in the Usine folder installFilesModulesUser to be visible in the Usine Browser->Modules->User and usable.
Let me know if you get it right.
Martin FLEURENT - Usine Developer - SDK maintainer
Ah, of course the bin-folder! Found it.
Sorry I was looking in the ProjectDir/Release-folder... Silly me.
All good. Thanks,
antwan
Sorry I was looking in the ProjectDir/Release-folder... Silly me.
All good. Thanks,
antwan
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
no problems,
The Release and Debug folders of each projects are user for intermediates files in the compilation process (and there a few...).
I decided to 'centralize' the place where to found finales files.... in a bin folder. It will be more praticable when you'll have tones of users modules projects
Have fun
The Release and Debug folders of each projects are user for intermediates files in the compilation process (and there a few...).
I decided to 'centralize' the place where to found finales files.... in a bin folder. It will be more praticable when you'll have tones of users modules projects
Have fun
Martin FLEURENT - Usine Developer - SDK maintainer
hallo!
thanks for the c++ SDK.
Is there a way to create or communicate with an audio buffer?
thanks
thanks for the c++ SDK.
Is there a way to create or communicate with an audio buffer?
thanks
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Hi gizzeta,
What do you mean by audio buffer ?
If you make an audio input parameter in your module, you have access to his audio blocks as usine inject them in the module.
(assuming there is an effective connexion with some audio flux)
Also, you can create some audio blocks inside your module and put them in an audio output parameter too.
The related structure in the SDK is TEVT, which contain the event data of your parameter.
In fact, i believe the SDK work quite similar as the VST SDK V2.4.
Hope it help
What do you mean by audio buffer ?
If you make an audio input parameter in your module, you have access to his audio blocks as usine inject them in the module.
(assuming there is an effective connexion with some audio flux)
Also, you can create some audio blocks inside your module and put them in an audio output parameter too.
The related structure in the SDK is TEVT, which contain the event data of your parameter.
In fact, i believe the SDK work quite similar as the VST SDK V2.4.
Hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
Hi Martin,
I come from MaxMSP and within it there is a buffer object to store sounds or big datas.I can acces it from the C++ module programming.
In Usine, if I need to store for examle a 60 seconds incoming sound inside my module, have I to do a memory allocation myself?
Or there's a function to acces at, to create a 4Mb buffer?
thanks
I come from MaxMSP and within it there is a buffer object to store sounds or big datas.I can acces it from the C++ module programming.
In Usine, if I need to store for examle a 60 seconds incoming sound inside my module, have I to do a memory allocation myself?
Or there's a function to acces at, to create a 4Mb buffer?
thanks
you have to manage memory yourself:
allocate in the create procedure and free it in the 'destroy'
allocate in the create procedure and free it in the 'destroy'
Olivier Sens
www.brainmodular.com
www.brainmodular.com
hem....what kind of allocation?
an array of 7.000.000 floats elements? Or there's something better?
an array of 7.000.000 floats elements? Or there's something better?
yes, it a good starting point to create an array of float; it's the easiest way.
you also have the possibility to allocate a PCHAR pointer (7.000.000 x sizeof(float)) and deal with pointers, often more efficient.
but allocating such a buffer can take a long time so don't do that in the main 'audio proceed' function.
try to do that in
- during the creation procedure
- the callback procedure
you also have the possibility to allocate a PCHAR pointer (7.000.000 x sizeof(float)) and deal with pointers, often more efficient.
but allocating such a buffer can take a long time so don't do that in the main 'audio proceed' function.
try to do that in
- during the creation procedure
- the callback procedure
Olivier Sens
www.brainmodular.com
www.brainmodular.com
ok, thank you
and is there a function to print from an user module on the Usine console? (for debugging purpose...)
and is there a function to print from an user module on the Usine console? (for debugging purpose...)
Actually no way, except to create a text outlet and connect it to a 'trace' module
It's a good suggestion I'll try to add this fuction as soon as possible.
Also Usine contains around 350.000 lines of reusable code. Maybe I could start to find a way to have an access to those functions.
For example reading audio samples from the hard disk, midi tools, etc.
It's a good suggestion I'll try to add this fuction as soon as possible.
Also Usine contains around 350.000 lines of reusable code. Maybe I could start to find a way to have an access to those functions.
For example reading audio samples from the hard disk, midi tools, etc.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
hello
martignasse , in the CPPQuickStartEN.pdf and in french version too, you say :
"The last thing to do is to replace, in these two files, the world TemplateProject by
the name of your module (be sure to uncheck the Match case and Match whole
word options to replace all occurences)."
but i can't find the word "TemplateProject" in this two files, do you rather mean the word "TemplateModule" is to changed
with the project name ?
thanks
martignasse , in the CPPQuickStartEN.pdf and in french version too, you say :
"The last thing to do is to replace, in these two files, the world TemplateProject by
the name of your module (be sure to uncheck the Match case and Match whole
word options to replace all occurences)."
but i can't find the word "TemplateProject" in this two files, do you rather mean the word "TemplateModule" is to changed
with the project name ?
thanks
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Yes, you are totally right it's "TemplateModule" that should be replaced by "MyModule" or what ever.pansoul wrote:but i can't find the word "TemplateProject" in this two files, do you rather mean the word "TemplateModule" is to changed with the project name ?
Excuse me for the typo, i'll correct this for the next release.
Martin FLEURENT - Usine Developer - SDK maintainer
hello
correct me if i am wrong, in your example you use win api to code the graphical part of your draw pad.
i have read the two tutorial about c and c++ on le site du zero and i am not able to understand correctly your code.
is a tutorial like http://www.siteduzero.com/tutoriel-3-87 ... ndows.html pertinent for a good undertanding ?
if you are thinking to others ressources...
thanks
Vincent
correct me if i am wrong, in your example you use win api to code the graphical part of your draw pad.
i have read the two tutorial about c and c++ on le site du zero and i am not able to understand correctly your code.
is a tutorial like http://www.siteduzero.com/tutoriel-3-87 ... ndows.html pertinent for a good undertanding ?
if you are thinking to others ressources...
thanks
Vincent
i try to add some an new output (data, midi or anything else) on a patch inspired by drawpad and prototype example.
compilation works but when a put my .usr file into usine, i can't connect it to others modules.
i suppose that i did a mistake but i don't find where
i add some line code in :
- get param info method (i add a new case)
-set event adress (new case too)
- i changed the number of params in get module info and try to change the value of pModuleInfo->ModuleType
anyone no what is to change to add output or have others sources codes available to see how they works ?
thanks
Vincent
compilation works but when a put my .usr file into usine, i can't connect it to others modules.
i suppose that i did a mistake but i don't find where
i add some line code in :
- get param info method (i add a new case)
-set event adress (new case too)
- i changed the number of params in get module info and try to change the value of pModuleInfo->ModuleType
anyone no what is to change to add output or have others sources codes available to see how they works ?
thanks
Vincent
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Partialy right, in fact, the 'simplest' way to code the graphical part is to use the GDI or the GDI+ (who are really little part of the Windows API), has they are used by Usine itself.pansoul wrote:in your example you use win api to code the graphical part of your draw pad.
The difference between those is that GDI+ has OOP interface, and has more polished graphical result, but is slower than GDI, who is typical C interface.
The UserDrawPad example use the GDI library.
The link you provided seems to generic about the whole Windos API, here some specific resources for GDI and GDI+ :
MSDN for GDI+
MSDN for GDI
(added to the wiki)
You'll find a lot of tutorials with google for GDI+, less for GDI, don't hesitate to add them to the wiki.
as a note, you have to know that in theory, it's possible to draw the graphical part with DirextX or OpenGL, it's just that no one have made it for now. I even wanted to make test for vector graphic with SVG or OpenVG....but really no time for that theses days.
Hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Seems ok, but did you add the corresponding TEVT* pointer in the include file ?pansoul wrote:i try to add some an new output (data, midi or anything else) on a patch inspired by drawpad and prototype example.
compilation works but when a put my .usr file into usine, i can't connect it to others modules.
i suppose that i did a mistake but i don't find where
i add some line code in :
- get param info method (i add a new case)
-set event adress (new case too)
- i changed the number of params in get module info and try to change the value of pModuleInfo->ModuleType
anyone no what is to change to add output or have others sources codes available to see how they works ?
thanks
Vincent
Code: Select all
// DrawPad class
class TDrawPad : public TUserModule
{
public:
TEVT* pButtonClear; // ClearButton Event pointer
TEVT* pPointsCount; // PointsCount Event pointer
TEVT* pMyNewOutput; // <----------------HERE
...Martin FLEURENT - Usine Developer - SDK maintainer
Hi,
I've tried, but i didn't find how to create a text outlet. Can you help me?
thanks
I've tried, but i didn't find how to create a text outlet. Can you help me?
thanks
Another question:
how can I get the Usine sample rate?
thanks
how can I get the Usine sample rate?
thanks
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Hi Gizzeta,
Sorry, seems like i forget you'r last question...
As a workaround for now, you can always extend the module in usine (the little white square in topleft) to access the outlet part.
Hope it help
Sorry, seems like i forget you'r last question...
Well, after testing, it seems like the text field param is always shown as inlet, whatever the IsInput/IsOutput values, which is anormal. I have to see with senso.Gizzeta wrote:I've tried, but i didn't find how to create a text outlet. Can you help me?
As a workaround for now, you can always extend the module in usine (the little white square in topleft) to access the outlet part.
Something like should do the trick (not tested) :Gizzeta wrote:Another question:
how can I get the Usine sample rate?
Code: Select all
double sampleRate = pMasterInfo->VstTimeInfo->sampleRate;Martin FLEURENT - Usine Developer - SDK maintainer
it's an usine pb fixed now.Well, after testing, it seems like the text field param is always shown as inlet, whatever the IsInput/IsOutput values, which is anormal. I have to see with senso.Gizzeta wrote:I've tried, but i didn't find how to create a text outlet. Can you help me?
next release very very soon!
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
ok, cool
Martin FLEURENT - Usine Developer - SDK maintainer
thanks for your answers.martignasse wrote:Hi Gizzeta,
Something like should do the trick (not tested) :Code: Select all
double sampleRate = pMasterInfo->VstTimeInfo->sampleRate;
for the sampling rate I checked: it's not VstTimeInfo, but pTimeInfo.
Code: Select all
SampleRate = PointerToMyModule->pMasterInfo->pTimeInfo->sampleRate-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
....nearly good...Gizzeta wrote:thanks for your answers.martignasse wrote:Hi Gizzeta,
Something like should do the trick (not tested) :Code: Select all
double sampleRate = pMasterInfo->VstTimeInfo->sampleRate;
for the sampling rate I checked: it's not VstTimeInfo, but pTimeInfo.
Code: Select all
SampleRate = PointerToMyModule->pMasterInfo->pTimeInfo->sampleRate
Can you confirm if the textfield problem is solved with the new version 4.20 ?
Martin FLEURENT - Usine Developer - SDK maintainer
It's ok for the text outlet, it appears normally.martignasse wrote:Can you confirm if the textfield problem is solved with the new version 4.20 ?
But how can I pass my text to the outlet?
througt DATA?(but it is an array of floats, not char...)
or througt the UserData pointer to void?
Have I to set TFlowType to ftEvtText?
...?
thanks
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
coolGizzeta wrote:It's ok for the text outlet, it appears normally.
In fact, i don't knowGizzeta wrote:But how can I pass my text to the outlet?
througt DATA?(but it is an array of floats, not char...)
or througt the UserData pointer to void?
Have I to set TFlowType to ftEvtText?
Seems there is no exposed method to access the text variable by code... or we lack some infos.
Have to ask to senso.
Martin FLEURENT - Usine Developer - SDK maintainer
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
Ok so,Gizzeta wrote:But how can I pass my text to the outlet?
througt DATA?(but it is an array of floats, not char...)
or througt the UserData pointer to void?
Have I to set TFlowType to ftEvtText?
I have the solution (directly from the boss
the text data is stored in the DATA array, one char per float !
so the way you have to code your text is a bit tricky....you need to cast each char as float per DATA array element.
for example (tested OK), assuming 'PTextTest' is your textfiel param:
Code: Select all
char test[] = "hello";
for (i = 0; i < 5; i++) {
pPrototype->PTextTest->DATA[i] = (float)test[i];
}
pPrototype->PTextTest->len = 5;Hope it help
edit : I've updated the wiki with this precious info
here is the link, feedback are welcome.
Martin FLEURENT - Usine Developer - SDK maintainer
hi,
need help again...
I create a module that fill a buffer with a waveform stored in an external file and read it as a loop (oscillator).
it works nice, but when I add a second instance of the same module (even if not connected) it affect the output of the first module (it sounds like a frequency modulation). WHY???
Normally all the variables and pointers are internals to every instance of the module(private)...or not?
Thanks for your help
need help again...
I create a module that fill a buffer with a waveform stored in an external file and read it as a loop (oscillator).
it works nice, but when I add a second instance of the same module (even if not connected) it affect the output of the first module (it sounds like a frequency modulation). WHY???
Normally all the variables and pointers are internals to every instance of the module(private)...or not?
Thanks for your help
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
I opened a new thread for this question, for better visibility and because it's not directly SDK feedback, but more a technical question.Gizzeta wrote:hi,
need help again...
I create a module that fill a buffer with a waveform stored in an external file and read it as a loop (oscillator).
it works nice, but when I add a second instance of the same module (even if not connected) it affect the output of the first module (it sounds like a frequency modulation). WHY???
Normally all the variables and pointers are internals to every instance of the module(private)...or not?
Thanks for your help
here it is
Martin FLEURENT - Usine Developer - SDK maintainer
Hi,
is there a way to get the "name" you can give to the module (when you right-click on a module)?
thanks
is there a way to get the "name" you can give to the module (when you right-click on a module)?
thanks
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hi Gizzeta,
For what use do you need this ?
No, it's not exposed on SDK level.is there a way to get the "name" you can give to the module (when you right-click on a module)?
For what use do you need this ?
Martin FLEURENT - Usine Developer - SDK maintainer
I thaught about an "argument" for a module.
The "name" would be a good way to provide it.
just to know, but it's not really important.
thanks
The "name" would be a good way to provide it.
just to know, but it's not really important.
thanks
Who is online
Users browsing this forum: No registered users and 13 guests
