recycle C++ code
Is it a long shot to adapt such a C++ code to build a module with Usine SDK ?
https://freddie.witherden.org/tools/dou ... /#download
this one is in Java but seems more simple :
http://www.openprocessing.org/sketch/57589
https://freddie.witherden.org/tools/dou ... /#download
this one is in Java but seems more simple :
http://www.openprocessing.org/sketch/57589
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hey oli_lab,
after a quick look at the sources, the first one rely on 3 file for the algorythm, the rest is for QT integration.
it should be pretty easy to isolate the algo part, the 'big' work is to reconstruct the graphic part and how you sync that with the audio...
But you should be pretty comfortable with C++ coding to understand the file and code organisation and plug code at the right place
the second on is more simple, only one file for the algo and one for processing integration, but it's java, maybe require some code modif.
i suggest the second one,if it take you only few hours to make a module from it, you are on the right track.
after a quick look at the sources, the first one rely on 3 file for the algorythm, the rest is for QT integration.
it should be pretty easy to isolate the algo part, the 'big' work is to reconstruct the graphic part and how you sync that with the audio...
But you should be pretty comfortable with C++ coding to understand the file and code organisation and plug code at the right place
the second on is more simple, only one file for the algo and one for processing integration, but it's java, maybe require some code modif.
i suggest the second one,if it take you only few hours to make a module from it, you are on the right track.
Martin FLEURENT - Usine Developer - SDK maintainer
thank you, that's encouraging
I was thinking of using the coordinates and angular datas of the 2 pendulae as modulation sources for spatialisation and/or FX...
I was thinking of using the coordinates and angular datas of the 2 pendulae as modulation sources for spatialisation and/or FX...
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
yep, seems like it makes sense, but what does it mean in term of module params inputs/outputsoli_lab wrote:thank you, that's encouraging
I was thinking of using the coordinates and angular datas of the 2 pendulae as modulation sources for spatialisation and/or FX...
it's the big job (other than putting an algo in) about module...
how you control it and what they deliver (in a params point of view)
answer it and 50% of the job is done
Martin FLEURENT - Usine Developer - SDK maintainer
inputs :
pendulum 1 length (0 - 10m)
pendulum 2 length (0 - 10m)
pendulum 1 mass (0- 10kg)
pendulum 2 mass (0- 10kg)
friction (0-1)
gravity (= 981)
reset (button 0-1)
outputs
xy coordinates of mass 1 (origin is a fix point as in XY pad)
xy coordinates of mass 2 (origin is a fix point as in XY pad)
xy coordinates of mass 2 (origin is mass 1)
all outputs will be 0 to 1
pendulum 1 length (0 - 10m)
pendulum 2 length (0 - 10m)
pendulum 1 mass (0- 10kg)
pendulum 2 mass (0- 10kg)
friction (0-1)
gravity (= 981)
reset (button 0-1)
outputs
xy coordinates of mass 1 (origin is a fix point as in XY pad)
xy coordinates of mass 2 (origin is a fix point as in XY pad)
xy coordinates of mass 2 (origin is mass 1)
all outputs will be 0 to 1
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
ben voila
y a plus qu'à 
Martin FLEURENT - Usine Developer - SDK maintainer
I identified something I need to do but don't know how...
in the Processing program, there is a framerate that is setup by default in Processing but here in SDK I'd need some sort of a clock to trigger the callback section at regular interval...
?
in the Processing program, there is a framerate that is setup by default in Processing but here in SDK I'd need some sort of a clock to trigger the callback section at regular interval...
?
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hey oli,
we don't have timer callback exposed in the sdk for now, but you can do it pretty easily.
in the onProcess you check the time with sdkGetTimeMs(), when it pass the period of your framerate goal , you send a callback notification to usine.
using sdkNotifyUsine (int Target, int Msg, int Param1=0, int Param2=0) with
Target = NOTIFY_TARGET_USER_MODULE
Msg = NOTIFY_MSG_USINE_CALLBACK
Param1 correspond to the Message->wParam (so the param index)
Param2 = MSG_CHANGE
make sure your pParamInfo->CallBackType = ctImmediate; for the concerned param
but depending on what you are doing in this callback, making a dedicated thread is maybe more appropriate
tell me if you need more
we don't have timer callback exposed in the sdk for now, but you can do it pretty easily.
in the onProcess you check the time with sdkGetTimeMs(), when it pass the period of your framerate goal , you send a callback notification to usine.
using sdkNotifyUsine (int Target, int Msg, int Param1=0, int Param2=0) with
Target = NOTIFY_TARGET_USER_MODULE
Msg = NOTIFY_MSG_USINE_CALLBACK
Param1 correspond to the Message->wParam (so the param index)
Param2 = MSG_CHANGE
make sure your pParamInfo->CallBackType = ctImmediate; for the concerned param
but depending on what you are doing in this callback, making a dedicated thread is maybe more appropriate
tell me if you need more
Martin FLEURENT - Usine Developer - SDK maintainer
it's done, after "few" hours !
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
cool, i want to see that 
Martin FLEURENT - Usine Developer - SDK maintainer
Who is online
Users browsing this forum: No registered users and 112 guests
