Send Usine Message
I know I've brought this up before, and I have since grasped some of the simpler messages, but I am thinking it should be possible to create a sort of script for almost any action in Usine, right?
For example, when dropping a fader on a patch the console shows:
SET_VAR patch SENDER_PATCH=D:UsineSavestestsendmessagetest.pat
SET_VAR integer MOUSE_X=712
SET_VAR integer MOUSE_Y=362
SET_VAR integer CONTROL_PRESSED=0
SET_VAR integer SHIFT_PRESSED=0
SET_VAR integer ALT_PRESSED=0
SET_VAR integer ON_WIRE=0
SET_VAR integer SRC_TERM_IN_OUT=0
SET_VAR String DROP_FILENAME=C:Program Files (x86)((Audio))Usine 5FilesModulesInterface Designa - Fader Horizontal.plg
SET_VAR String DROP_SHORT_FILENAME=a - Fader Horizontal
Create module : TpgFader 3
so that would make me think that I should be able to send a message that says:
SET_TARGET_PATCH SENDER_PATCH
SET_VAR patch SENDER_PATCH=D:UsineSavestestsendmessagetest.pat
SET_VAR integer MOUSE_X=712
SET_VAR integer MOUSE_Y=362
SET_VAR integer CONTROL_PRESSED=0
SET_VAR integer SHIFT_PRESSED=0
SET_VAR integer ALT_PRESSED=0
SET_VAR integer ON_WIRE=0
SET_VAR integer SRC_TERM_IN_OUT=0
SET_VAR String DROP_FILENAME=C:Program Files (x86)((Audio))Usine 5FilesModulesInterface Designa - Fader Horizontal.plg
SET_VAR String DROP_SHORT_FILENAME=a - Fader Horizontal
Create module : TpgFader 3
and have a fader created in my patch? It doesn't work though. Am I on the right path or are Usine messages not intended for this type of use?
For example, when dropping a fader on a patch the console shows:
SET_VAR patch SENDER_PATCH=D:UsineSavestestsendmessagetest.pat
SET_VAR integer MOUSE_X=712
SET_VAR integer MOUSE_Y=362
SET_VAR integer CONTROL_PRESSED=0
SET_VAR integer SHIFT_PRESSED=0
SET_VAR integer ALT_PRESSED=0
SET_VAR integer ON_WIRE=0
SET_VAR integer SRC_TERM_IN_OUT=0
SET_VAR String DROP_FILENAME=C:Program Files (x86)((Audio))Usine 5FilesModulesInterface Designa - Fader Horizontal.plg
SET_VAR String DROP_SHORT_FILENAME=a - Fader Horizontal
Create module : TpgFader 3
so that would make me think that I should be able to send a message that says:
SET_TARGET_PATCH SENDER_PATCH
SET_VAR patch SENDER_PATCH=D:UsineSavestestsendmessagetest.pat
SET_VAR integer MOUSE_X=712
SET_VAR integer MOUSE_Y=362
SET_VAR integer CONTROL_PRESSED=0
SET_VAR integer SHIFT_PRESSED=0
SET_VAR integer ALT_PRESSED=0
SET_VAR integer ON_WIRE=0
SET_VAR integer SRC_TERM_IN_OUT=0
SET_VAR String DROP_FILENAME=C:Program Files (x86)((Audio))Usine 5FilesModulesInterface Designa - Fader Horizontal.plg
SET_VAR String DROP_SHORT_FILENAME=a - Fader Horizontal
Create module : TpgFader 3
and have a fader created in my patch? It doesn't work though. Am I on the right path or are Usine messages not intended for this type of use?
if you want create a fader in your patch , just write this :
CREATE_MODULE my_fader 3 200 300
my_fader is the name you want
3 is the number of the fader module
200 300 the place in pixels..
CREATE_MODULE my_fader 3 200 300
my_fader is the name you want
3 is the number of the fader module
200 300 the place in pixels..
This module use the Internal Message Language.
With IML, to create a fader you could have the message below:
SET_TARGET_PATCH SENDER_PATCH
CREATE_MODULE fader 3 100 100
In this message, "fader" is the name that will be given to the module. "3" gives the module id...The id for the module "fader vertical" is 172.
Have a look at the IML help in the wiki:
http://www.sensomusic.com/wiki/doku.php ... l_messages
P.S: Templates use the IML
With IML, to create a fader you could have the message below:
SET_TARGET_PATCH SENDER_PATCH
CREATE_MODULE fader 3 100 100
In this message, "fader" is the name that will be given to the module. "3" gives the module id...The id for the module "fader vertical" is 172.
Have a look at the IML help in the wiki:
http://www.sensomusic.com/wiki/doku.php ... l_messages
P.S: Templates use the IML
Seb.Dub
cool that works..
but beyond just creating a fader, I'm thinking complex automations like loading a module or a VST plugin or even a sub patch and then wiring them to other modules or replacing one module with another...I take it then that copying and pasting the messages from the console is not the way to achieve this? I thought for some reason it might be possible to recreate actions this way...
I guess I'll study the Internal messages language some more and try and see what is actually possible...
but beyond just creating a fader, I'm thinking complex automations like loading a module or a VST plugin or even a sub patch and then wiring them to other modules or replacing one module with another...I take it then that copying and pasting the messages from the console is not the way to achieve this? I thought for some reason it might be possible to recreate actions this way...
I guess I'll study the Internal messages language some more and try and see what is actually possible...
Have a look at IML, and fell free to ask question. I could perhaps give you a little help...
With templates, you can create automatically more than one modules linked as you desire. You can also delete module, create new ones, link them to other modules...
It corresponds perhaps moreto your needs than the "Send usine message" module...
With templates, you can create automatically more than one modules linked as you desire. You can also delete module, create new ones, link them to other modules...
It corresponds perhaps moreto your needs than the "Send usine message" module...
Seb.Dub
This is gonna take a long time for me to learn
It seems you really need to be eficient at "Usine speak" to be at all efficient with this...
I was sort of hoping you could do an action and then cut and paste from the console messages to tell Usine to repeat the action, but I guess there's no room for lazy here...
"It corresponds perhaps moreto your needs than the "Send usine message" module..."
but isn't the "Send usine message" module how you send these types of messages. I've tried some stuff from the templates and this seems to be the way..?
Truth is, I don't even know specificly what I am hoping to accomplish by creating these types of "scripts", I am just exploring all the parts of Usine that I don't understand yet so I can be as informed as possible in the best ways to accomplish s tasks...
I was sort of hoping you could do an action and then cut and paste from the console messages to tell Usine to repeat the action, but I guess there's no room for lazy here...
"It corresponds perhaps moreto your needs than the "Send usine message" module..."
but isn't the "Send usine message" module how you send these types of messages. I've tried some stuff from the templates and this seems to be the way..?
Truth is, I don't even know specificly what I am hoping to accomplish by creating these types of "scripts", I am just exploring all the parts of Usine that I don't understand yet so I can be as informed as possible in the best ways to accomplish s tasks...
It's the same language , but not the same way to use it ;
the "Send usine message" is a module where you have to press a button to send the message
Template are text file you add in the templates folder of Usine and you access with a right click
Ethnix is the boss for this , check the "Templates by ethnix73" folder and read/ use for example the
" midiOut05-PianoRoll+transformer.txt"
the "Send usine message" is a module where you have to press a button to send the message
Template are text file you add in the templates folder of Usine and you access with a right click
Ethnix is the boss for this , check the "Templates by ethnix73" folder and read/ use for example the
" midiOut05-PianoRoll+transformer.txt"
hello,
I know where the templates folder is, I see the .txt templates but I am sorry, I cannot see how or where I am supposed to "right click" in Usine to access or use these?
I did a search in the wiki and came up with nothing other than the description of templates but not how to use?
I know I am going to feel pretty silly when you have to point to what's right in front of me...
I know where the templates folder is, I see the .txt templates but I am sorry, I cannot see how or where I am supposed to "right click" in Usine to access or use these?
I did a search in the wiki and came up with nothing other than the description of templates but not how to use?
I know I am going to feel pretty silly when you have to point to what's right in front of me...
sorry ; my fault..
it's not a right click , just a normal click on an inlet or outlet and you see the menu : data outlet, send to bus and so..
This is template...
it's not a right click , just a normal click on an inlet or outlet and you see the menu : data outlet, send to bus and so..
This is template...
Ah, it finally all comes together...thanks!
A bit off topic, but does anyone know how to use the Usine Msg module to tell Usine to save the current patch without confirmation?
SET_TARGET_PATCH SENDER_PATCH
PROMPT_FOR_SAVE
saves the patch after confirming, and
SET_TARGET_PATCH SENDER_PATCH
SAVE_PATCH 'path and file name here'
saves the patch without confirmation but I would like to not have to enter the path and filename for the current patch as I use many different copies of the same base patch.
If I use:
SET_TARGET_PATCH SENDER_PATCH
SAVE_PATCH
the patch saves to somewhere...? but with a blank name...
SET_TARGET_PATCH SENDER_PATCH
PROMPT_FOR_SAVE
saves the patch after confirming, and
SET_TARGET_PATCH SENDER_PATCH
SAVE_PATCH 'path and file name here'
saves the patch without confirmation but I would like to not have to enter the path and filename for the current patch as I use many different copies of the same base patch.
If I use:
SET_TARGET_PATCH SENDER_PATCH
SAVE_PATCH
the patch saves to somewhere...? but with a blank name...
I'm not sure to understand. You want to save the patch with his current name?
Do you have different name for the same base patch?
Do you have different name for the same base patch?
Seb.Dub
Have you tried to feed the parameter "lines msg" with "concat strings" and "current patch name" modules?
Seb.Dub
Yes I have copies of a base patch in a folder, ie: MyPatch (copy1).pat, MyPatch (copy2).pat, MyPatch (copy3).pat etc.
I want to be able to use a Send Message to save the version of the patch that is currently open. I can probably do something with concat strings > lines msg but it seems like it should be easy to tell Usine the same command as "File > Save Patch" ?
edit:
ha, you posted again while I was typing
But yes, Strings are an option... (and, oh wait! Current patch name! That might just do it!
I want to be able to use a Send Message to save the version of the patch that is currently open. I can probably do something with concat strings > lines msg but it seems like it should be easy to tell Usine the same command as "File > Save Patch" ?
edit:
ha, you posted again while I was typing
I'm having trouble with spaces in the lines msg input, but the sapces are needed in the Usine Message module.
Here is what I get as a result and also it immediately saves the patch to a no name file when I connect the string out to the lines msg in...
SET_TARGET_PATCH
SENDER_PATCH
SAVE_PATCH
D:UsineLoad1VSTITrack-
How can I make this work?
edit:
nevermind. I found the answer by connecting a text module to the lines msg output on the Usine Msg module.
For the curious, here's an example of a complete string to send the module to have the message properly formatted.
"SET_TARGET_PATCH SENDER_PATCH","SAVE_PATCH D:UsineSavestest2testpatchsave.pat"
A bit to my annoyance, the module does not wait for the send msg button to be pushed, rather it sends the message any time the incoming text string changes, but I this is easy snough to work around with a Pass Event Flow module and a button to trigger save.
Also, when using the Current Patch Name module to generate the name, a second Concat String module is needed to add .pat" to the end of the string or else the patch is saved without any file extension and the name may be missing the last character.

(not sure the Stop is actually necessary, just avoiding telling the module to do the same thing twice...)
Here is what I get as a result and also it immediately saves the patch to a no name file when I connect the string out to the lines msg in...
SET_TARGET_PATCH
SENDER_PATCH
SAVE_PATCH
D:UsineLoad1VSTITrack-
How can I make this work?
edit:
nevermind. I found the answer by connecting a text module to the lines msg output on the Usine Msg module.
For the curious, here's an example of a complete string to send the module to have the message properly formatted.
"SET_TARGET_PATCH SENDER_PATCH","SAVE_PATCH D:UsineSavestest2testpatchsave.pat"
A bit to my annoyance, the module does not wait for the send msg button to be pushed, rather it sends the message any time the incoming text string changes, but I this is easy snough to work around with a Pass Event Flow module and a button to trigger save.
Also, when using the Current Patch Name module to generate the name, a second Concat String module is needed to add .pat" to the end of the string or else the patch is saved without any file extension and the name may be missing the last character.
(not sure the Stop is actually necessary, just avoiding telling the module to do the same thing twice...)
OK, so this doesn't work properly and probably won't ever work.
I'm script illiterate and don't quite feel like spending the rest of the week studying how to write one from beginning to end.
Can someone give me a leg up on writing a script that will tell Usine to save the current patch on the current track on the current line without any prompt?
(just like selecting File > Save Patch from the patch menu would do)
A bonus would be a pin that sends a button value of 1 when the operation was complete, but this is not so important.
I'm script illiterate and don't quite feel like spending the rest of the week studying how to write one from beginning to end.
Can someone give me a leg up on writing a script that will tell Usine to save the current patch on the current track on the current line without any prompt?
(just like selecting File > Save Patch from the patch menu would do)
A bonus would be a pin that sends a button value of 1 when the operation was complete, but this is not so important.
Who is online
Users browsing this forum: No registered users and 10 guests
