Welcome to %s forums

BrainModular Users Forum

Login Register

just a little warning

Create your own modules in C++
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 04 Apr 2015, 20:47

adressed to Felow Usiner Martignasse : im back to usine and think it's time for me to dive into the looking so good next level sdk stuff you worked on with senso ill probably ask tons of question soon as im quite a noob in C :/ !!! so sorry in advance :D
First tons of thanks for the SDK work and quality of your invest, and i do hope to met ya back soon!.

after scripting a bit in usine, i finally made the step trying to understand a bit get in Cpp.. (woa haem, i feel like a cosmonaut in space^^)
my first attenpt was trying to convert a usine delphi script i recently made to compile Cpp .exe.
the script init goal was to build a custom 'kick generator', basically letting user input amplitude and frequency over time enveloppes, few other tweaks and get a rendered .wav file on output.
the said script was/is working quite nicely, but 'j'ai concience que c un peu bourrin :P' ,so reaaaalllly heavy in cpu (some 80 percent peaks on a 6 core for a 2s gen lol);
so, with a lot of tries/trial and errors/net search, ect isee the way will be very long but exciting, and im quite proud that i finally could get something working out of recoding main functions in a cpp project .
(input array of XY points as bezier segment controls and tangents ---> cubic bezier Curve ----> 're-linear' the bezier if asked at t time ------> generate the instantaneous phase/freq for sinus & amp -----> finally write samples to binary wav after header. pfffiouuu was an hard fight^^ But so far, so good, the compiled .exe seems fine and does generate my wav file relating to params args i input and is much much faster and cpu friendly enven if probably could be moar optimized :)

so, next planned is to get in that magical world 'usine sdk', in order to try converting it to module with in/outs, so i could plug back all the nice usine UI interface objects,stay inside usine and maybe directly stream the wav or write to disk/relad in sampler instead of my first weid stuff (script generate .txt file with datas, exe read the file and process out of usine).

my first of a probably very long incoming list ^^ question is. Do you think it's a good working method to prepare all the stuff 'separately' ie as an exe, linking/reducing to the wanted inputs args, and debuging/checking the c code, then later convert to usine module via sdk ,would it be #relatively of course# easy to convert/include? or should i procceed diferently directly dealing with sdk (sry i must admit i didn't investigate that much the sdk part yet, tbh im totally un-aware of sdk for now, but i will read and check all the provided ex ASAP :) , global advices maybe?
cheerz mate!

martignasse
Site Admin
Posts: 611
Location: Lyon, FRANCE
Contact:

Unread post by martignasse » 13 Apr 2015, 09:30

hey 23fx23,

welcome back :) sorry for the lag, i was in vacation

what i can suggest you it to begin by simple module with the sdk. and gradually experiment with feature you are interested in.
in parallel, you can work on your mega super complex awesome algo in a separate exe and 'prepair' it for the sdk integration.

you'll face essentially two problems:
- C/C++ is not trivial and it's a necessity to have a clear understanding of how work the memory, variable lifetime and pointers of course. plus the compiling process who can be tricky too.
- Usine SDK have a learning curve, even if this version is far more user friendly, becoming comfortable with where to do things and what helpers to use take some time.

anyway, welcome in the SDK world

happy coding
Martin FLEURENT - Usine Developer - SDK maintainer

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests