Welcome to %s forums

BrainModular Users Forum

Login Register

Is there a way to determine the number of racks currently in a wks

I need help on a Patch
Post Reply
ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 22 Nov 2014, 17:40

Is there a way to determine how many racks are currently loaded in a workspace?

Thanks!
Regards,

Scott

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 22 Nov 2014, 20:22

Interesting question, although I couldn't find any direct modules or ways either.
I assume you could create an ID for each track such as a buss name, and get the available bus names and parse the number of racks out to get your value, then you would have a secondary reference for each.

Probably a method via IML, but I am not seeing a direct method right off.
The links obviously do exist for what you want, as you can drag racks into the other inputs of other racks....so a way does exist but probably only through IML...I will keep it in mind and see if I can find another way.

-S
"Every act of creation is first an act of destruction." -Picasso

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 22 Nov 2014, 20:27

So looking at the .wkp file too I did notice this

[WK]
VERSION=64
CNT=6

If you create a blank workspace and the amount of racks seem to correspond to the CNT value.
So you could do a fastscript and parse the count in. If I feel better later I might try this out too.

-S
"Every act of creation is first an act of destruction." -Picasso

ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 22 Nov 2014, 20:48

Thanks sephult. I've only toyed with scripting and would prefer not to break my flow (at the moment) to plumb the matter. I would certainly appreciate any scripting effort on your part.
Regards,

Scott

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 22 Nov 2014, 21:15

No problem ahonoe,

I will try to take a look at tonight if I am feeling any better. Shouldn't be that difficult.

-S
"Every act of creation is first an act of destruction." -Picasso

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 23 Nov 2014, 18:50

http://www.sensomusic.org/forums/upload ... kCount.pat


So the difficulty in this one.
You need to save the workspace every rack you add to update the wkp file, then the refresh button will read and update the fader.

I tried to comment the hell out of the fastscript to hopefully help you understand, as far as string parsing I didn't do it the most efficient way. I basically just got what I wanted by debugging and parsed that.

I also tried to create a save workspace IML, I did not see any functions in the IML for SAVE_WORKSPACE, but I did find a LOAD_WORKSPACE.

I am wondering if it is there, or possibly the list is not complete.

I hope this helps, at least understand some of the fastscript as well, usually if there is not something direct there is a way to make it happen.

-S
"Every act of creation is first an act of destruction." -Picasso

ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 23 Nov 2014, 19:08

Thanks very much, sephult. I'll put this use directly!
Regards,

Scott

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 24 Nov 2014, 01:25

I hope the saving isn't too much of a hinder, hopefully find some new info on the IML or something.
If we could find there might be a possible way to save after each rack added, or save before refresh....etc.
Like I said I commented the script up a lot to help show what I did, if you want to modify should be explanatory, or ask me and Ill help.

-S
"Every act of creation is first an act of destruction." -Picasso

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 24 Nov 2014, 09:36

good job sephult !!

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests