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
Machine.add & variables
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 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: Thu May 13, 2010 2:38 am    Post subject: Machine.add & variables Reply with quote  Mark this post and the followings unread

I want to use machine.add to add a file where I have mapped my midi controller. So I have a main script and I call the midi_mapping_file with machine.add, but how can I use the variables that are in the midi_mapping_file inside my main script?

Any help will be much appreciated.

Cheers

_J
Back to top
View user's profile Send private message
kurtk



Joined: Jan 27, 2010
Posts: 8
Location: usa

PostPosted: Thu May 13, 2010 3:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Yo,
I think you may want to wrap your midi mapping code in a public class and perhaps use static functions/variables inside said class? Then you can add the mapping function only once at the begging of you chuck session and access its functions/variables in any shred. See here for a start:

http://chuck.cs.princeton.edu/doc/language/class.html#static

I think that is what you are going for, I may have misinterpreted your post.
Later
kurt

_________________
.............................................
http://kurtkotheimer.com
.............................................
Back to top
View user's profile Send private message Visit poster's website
jirko



Joined: Dec 15, 2009
Posts: 59

PostPosted: Thu May 13, 2010 6:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi kurtk,

thanks a lot for this link. I've got the class working now!
Static variables Very Happy

Cheers,

_J
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 [3 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