electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
dependency between functions
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
jirko



Joined: Dec 15, 2009
Posts: 59

PostPosted: Sat Dec 19, 2009 8:40 am    Post subject: dependency between functions Reply with quote  Mark this post and the followings unread

How can I make a dependency between two or more functions. f.e. change some filter values when function 1 is playing. Do I have to use ZeroX or is there a another way? If so, can someone be so kind and show me an example?

Thanks a lot!
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Dec 19, 2009 9:16 am    Post subject: Reply with quote  Mark this post and the followings unread

I'd like to help you, but I really don't understand the question. could you please re-explain?
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jirko



Joined: Dec 15, 2009
Posts: 59

PostPosted: Mon Dec 21, 2009 2:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Kassen,

thanks for offering your help. I now, my english is a bit poor..
I want to make some conditionals between functions.
something like:

if (functionone==active)
{
(functiontwo==off)
}
//to avoid overlapping

if (filtercut_one==12000hz)
{
(filtercut_two==6000hz)
}

Do I have to save the state in a global value?
hope this make seens.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Dec 22, 2009 9:26 am    Post subject: Reply with quote  Mark this post and the followings unread

So, basically you want one function to run only when the other doesn't?

Yes, you can use global variables for that. Any int in the file that both functions are in will do. that is of course assuming both functions are in the same file.

Another thing you could think about is using Events, that might also be good for your case. They are in the manual and the examples directory. It all depends on what you want to do.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MusicMan11712



Joined: Aug 08, 2009
Posts: 1082
Location: Out scouting . . .

PostPosted: Sat Dec 26, 2009 5:17 am    Post subject: Reply with quote  Mark this post and the followings unread

I am not sure if I understand, but I will make a suggestion in case it helps.

Can you: set a flag, then check the flag, and if its true, send the script to the dependent process? If so, reset the flag when done with the second process.

If there is any overlapping that might confuse the script, perhaps a buffer could be used.

Hope this helps.
--Steve
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org