def __init__(self, controller, index, tag): atom.Atom.__init__(self, names="connector", ordinal=index, protocols='remove') self.controller = controller self.index = index self.control = None self.monitor = None self[1] = atom.Atom(domain=domain.BoundedInt(-32767, 32767), names='key column', init=0, policy=atom.default_policy( self.__change_key_column), protocols="input explicit") self[2] = atom.Atom(domain=domain.BoundedInt(-32767, 32767), names='key row', init=0, policy=atom.default_policy(self.__change_key_row), protocols="input explicit") self[3] = atom.Atom(domain=domain.Bool(), names='key column end relative', init=False, policy=atom.default_policy( self.__change_key_column_endrel), protocols="input explicit") self[5] = atom.Atom(domain=domain.Bool(), names='key row end relative', init=False, policy=atom.default_policy( self.__change_key_row_endrel), protocols="input explicit") self[4] = ConnectorOutput(self)
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version,names='ranger',ordinal=ordinal) self[2] = atom.Atom() self[2][1] = bundles.Output(1,False,names='output') self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*',0)) self.output = bundles.Splitter(self.domain,*self[2].values()) self.ranger = piw.ranger(self.domain,self.output.cookie()) self.ctl_input = bundles.ScalarInput(self.ranger.ctl_cookie(), self.domain,signals=(1,2,3)) self.data_input = bundles.VectorInput(self.ranger.data_cookie(), self.domain,signals=(1,)) self[1] = atom.Atom() self[1][1]=atom.Atom(domain=domain.BoundedFloat(-10000000,10000000),init=-1,policy=self.ctl_input.policy(1,False),names='minimum') self[1][2]=atom.Atom(domain=domain.BoundedFloat(-10000000,10000000),init=1,policy=self.ctl_input.policy(2,False),names='maximum') self[1][3]=atom.Atom(domain=domain.BoundedFloat(-10000000,10000000),init=0,policy=self.ctl_input.policy(3,False),names='rest') self[1][4]=atom.Atom(domain=domain.BoundedFloat(-1,1),init=0,policy=self.data_input.vector_policy(1,False),names='input') self[3]=atom.Atom(domain=domain.Bool(),policy=atom.default_policy(self.__setsticky),names='sticky') self[4]=atom.Atom(domain=domain.BoundedFloat(-10,10),policy=atom.default_policy(self.__setcurve),names='curve') self[5]=atom.Atom(domain=domain.Bool(),policy=atom.default_policy(self.__setmono),names='mono') self[6]=atom.Atom(domain=domain.Bool(),init=True,policy=atom.default_policy(self.__setabsolute),names='absolute') self.ranger.set_absolute(True) self.add_verb2(1,'reset([],None)',self.__reset)
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='envelope', ordinal=ordinal) self[2] = atom.Atom() self[2][2] = bundles.Output(2, False, names='pressure output') self[2][100] = bundles.Output(1, True, names='volume output') self.domain = piw.clockdomain_ctl() self.output = bundles.Splitter(self.domain, *self[2].values()) self.adsr = synth_native.adsr(self.output.cookie(), self.domain) self.vel = piw.velocitydetect(self.adsr.cookie(), 2, 1) self.input = bundles.VectorInput(self.vel.cookie(), self.domain, signals=(1, 2, 8, 9, 10, 11), threshold=5) time = (T('inc', 0.01), T('biginc', 0.2), T('control', 'updown')) self[1] = atom.Atom() self[1][1] = atom.Atom(domain=domain.BoundedFloat(0, 1), names='activation input', policy=self.input.merge_policy(1, False)) self[1][2] = atom.Atom(domain=domain.BoundedFloat(0, 1), init=0, policy=self.input.vector_policy(2, False), names='pressure input') self[1][8] = atom.Atom(domain=domain.BoundedFloat(0, 60, hints=time), init=0.01, names="attack input", policy=self.input.merge_policy(8, False)) self[1][9] = atom.Atom(domain=domain.BoundedFloat(0, 60, hints=time), init=0.05, names="decay input", policy=self.input.merge_policy(9, False)) self[1][10] = atom.Atom(domain=domain.BoundedFloat(0, 1), init=0, policy=self.input.merge_policy( 10, policy.IsoStreamPolicy(1, 0, 0)), names='sustain input', fuzzy='++++pressure') self[1][11] = atom.Atom(domain=domain.BoundedFloat(0, 60, hints=time), init=0.25, names="release input", policy=self.input.merge_policy(11, False)) self[3] = atom.Atom(domain=domain.BoundedInt(1, 1000), init=4, names="velocity sample", policy=atom.default_policy(self.__set_samples)) self[4] = atom.Atom(domain=domain.BoundedFloat(0.1, 10), init=4, names="velocity curve", policy=atom.default_policy(self.__set_curve)) self[5] = atom.Atom(domain=domain.BoundedFloat(0.1, 10), init=4, names="velocity scale", policy=atom.default_policy(self.__set_scale))
def __init__(self, agent): self.__agent = agent audio.AudioInput.__init__(self, self.__agent.audio_input, 1, 2, names='headphone') self[100] = toggle.Toggle(self.__enable, self.__agent.domain, container=(None, 'headphone', self.__agent.verb_container()), names='enable') self[101] = atom.Atom(domain=domain.BoundedInt( 0, 127, hints=(T('stageinc', 1), T('inc', 1), T('biginc', 5), T('control', 'updown'))), names='gain', init=70, policy=atom.default_policy(self.__gain)) self[102] = atom.Atom(domain=domain.BoundedInt(0, 4), names='quality', init=0, policy=atom.default_policy(self.__quality)) self[103] = atom.Atom(domain=domain.Bool(), names='limit', init=True, policy=atom.default_policy(self.__limit)) self[103].set_property_string( 'show_warning', 'BY CHANGING THE PRESET HEADPHONE LIMIT YOU ABSOLVE EIGENLABS LTD OF ALL LIABILITY FOR ANY HEARING DAMAGE THAT MAY BE CAUSED AS A RESULT OF SUCH ACTIONS' )
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='labeler', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[1] = atom.Atom( domain=domain.Aniso(hints=(logic.make_term('continuous'), )), names='controller output', policy=atom.readonly_policy()) self[2] = atom.Atom(domain=domain.String(), init='Label', names='label category', policy=atom.default_policy(self.__set_category)) self[3] = atom.Atom(domain=domain.String(), init='', names='label', policy=atom.default_policy(self.__set_label)) self.ctl_functor = piw.functor_backend(1, True) self.ctl_input = bundles.VectorInput(self.ctl_functor.cookie(), self.domain, signals=(1, )) self[4] = atom.Atom(domain=domain.Aniso(), policy=self.ctl_input.vector_policy(1, False), names='controller input') self.ctl_functor.set_functor( piw.pathnull(0), utils.make_change_nb( piw.slowchange(utils.changify(self.__controller_input)))) self.__ctl = []
def __init__(self, address, ordinal): # agent.Agent.__init__(self, signature=version, names='scale illuminator', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*',0)) self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(OUT_LIGHT, False, names='light output', protocols='revconnect') self.output = bundles.Splitter(self.domain, self[1][1]) self.illuminator = scale_illuminator(self.domain, self.output.cookie()) th=(T('stageinc',1),T('inc',1),T('biginc',1),T('control','updown')) sh=(T('choices','[0,2,4,5,7,9,11,12]','[0,1,2,3,4,5,6,7,8,9,10,11,12]','[0,2,4,6,8,10,12]','[0,2,3,5,7,8,10,12]','[0,3,5,6,7,10,12]', '[0,2,3,6,7,8,11,12]','[0,3,5,7,10,12]','[0,2,4,7,9,12]'), T('control','selector')) self.control_input = bundles.VectorInput(self.illuminator.cookie(), self.domain, signals=(1,)) self[2] = atom.Atom(names="inputs") self[2][1] =atom.Atom(domain=domain.Aniso(),policy=self.control_input.vector_policy(1,False),names='controller input') self[2][2] = atom.Atom(domain=domain.String(hints=sh), policy=atom.default_policy(self.__change_scale), names='scale',protocols='bind set',container=(None,'scale',self.verb_container())) self[2][2].add_verb2(1,'set([],~a,role(None,[instance(~self)]),role(to,[ideal([None,scale]),singular]))',callback=self.__tune_scale) self[2][3] = atom.Atom(domain=domain.BoundedFloatOrNull(0,12,hints=th),init=None,policy=atom.default_policy(self.__change_tonic),names='tonic',protocols='bind set',container=(None,'tonic',self.verb_container())) self[2][3].add_verb2(1,'set([],~a,role(None,[instance(~self)]),role(to,[ideal([None,note]),singular]))',callback=self.__tune_tonic) self[2][4] = atom.Atom(domain=domain.Bool(),init=False,policy=atom.default_policy(self.__change_inverted),names='inverted') self[2][5] = atom.Atom(domain=domain.Bool(),init=True,policy=atom.default_policy(self.__change_root_light),names='root') self.add_verb2(3,'clear([],None,role(None,[matches([scale])]))', callback=self.__clear_scale )
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='frequency detector', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(1, False, names='frequency output') self.output = bundles.Splitter(self.domain, self[1][1]) self.frequency_detector = frequency_detector_native.frequency_detector( self.output.cookie(), self.domain) self.input = bundles.VectorInput(self.frequency_detector.cookie(), self.domain, signals=(1, )) self[2] = atom.Atom(names='inputs') self[2][1] = atom.Atom(domain=domain.BoundedFloat(0, 1), names="audio input", policy=self.input.vector_policy(1, True)) self[3] = atom.Atom(domain=domain.BoundedFloat(0, 1), init=0.01, policy=atom.default_policy(self.__threshold), names='threshold') self[4] = atom.Atom(domain=domain.BoundedInt(5, 20), init=10, policy=atom.default_policy(self.__buffer_count), names='buffer count')
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='shaper', ordinal=ordinal) self[3] = bundles.Output(1, False, names='output') self.domain = piw.clockdomain_ctl() self.output = bundles.Splitter(self.domain, self[3]) Z = piw.makefloat_bounded(1, 0, 0, 0, 0) self.compress = piw.function1(False, 1, 1, Z, self.output.cookie()) self.compress.set_functor(synth_native.compressor(0)) self.sharpen = piw.function1(False, 1, 1, Z, self.compress.cookie()) self.sharpen.set_functor(synth_native.sharpener(0)) self.input = bundles.VectorInput(self.sharpen.cookie(), self.domain, signals=(1, )) self[2] = atom.Atom(domain=domain.BoundedFloat(-1, 1), policy=self.input.vector_policy(1, False), names='input') self[1] = atom.Atom(names='controls') self[1][1] = atom.Atom(domain=domain.BoundedFloat(0, 1), names="compression", policy=atom.default_policy(self.__compression)) self[1][2] = atom.Atom(domain=domain.BoundedFloat(0, 1), names="sharpness", policy=atom.default_policy(self.__sharpness))
def __init__(self,address,ordinal): agent.Agent.__init__(self, signature=version, names='system input events', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.sysin_events = sysin_events_native.sysin_events(self.domain) self.__input = bundles.VectorInput(self.sysin_events.mouse_input(), self.domain, signals=(1,2,3,4)) self[1] = atom.Atom(names='mouse inputs') self[1][1] = atom.Atom(domain=domain.BoundedFloat(-1,1), names="mouse horizontal input", policy=self.__input.vector_policy(1,True)) self[1][2] = atom.Atom(domain=domain.BoundedFloat(-1,1), names="mouse vertical input", policy=self.__input.vector_policy(2,True)) self[1][3] = atom.Atom(domain=domain.BoundedFloat(-1,1), names="left mouse button input", policy=self.__input.vector_policy(3,True)) self[1][4] = atom.Atom(domain=domain.BoundedFloat(-1,1), names="right mouse button input", policy=self.__input.vector_policy(4,True)) self[2] = KeyPresses(self) self[3] = atom.Atom(names='velocity curve controls') self[3][1] = atom.Atom(domain=domain.BoundedInt(1,1000), init=4, names="velocity sample", policy=atom.default_policy(self.__set_samples)) self[3][2] = atom.Atom(domain=domain.BoundedFloat(0.1,10), init=4, names="velocity curve", policy=atom.default_policy(self.__set_curve)) self[3][3] = atom.Atom(domain=domain.BoundedFloat(0.1,10), init=4, names="velocity scale", policy=atom.default_policy(self.__set_scale)) self[4] = atom.Atom(names='mouse controls') self[4][1] = atom.Atom(domain=domain.BoundedFloat(-10,10), init=2.0, policy=atom.default_policy(self.__set_mouse_x_scale), names='mouse horizontal scale') self[4][2] = atom.Atom(domain=domain.BoundedFloat(-10,10), init=-1.0, policy=atom.default_policy(self.__set_mouse_y_scale), names='mouse vertical scale') self[4][3] = atom.Atom(domain=domain.BoundedFloat(0,1), init=0.1, policy=atom.default_policy(self.__set_mouse_x_deadband), names='mouse horizontal deadband') self[4][4] = atom.Atom(domain=domain.BoundedFloat(0,1), init=0.1, policy=atom.default_policy(self.__set_mouse_y_deadband), names='mouse vertical deadband') self[4][5] = atom.Atom(domain=domain.BoundedFloat(-1,1), names='mouse button threshold 1', init=0.0, policy=atom.default_policy(self.__set_mouse_button_threshold1)) self[4][6] = atom.Atom(domain=domain.BoundedFloat(-1,1), names='mouse button threshold 2', init=0.0, policy=atom.default_policy(self.__set_mouse_button_threshold2)) self[4][7] = atom.Atom(domain=domain.Bool(), names='mouse button velocity 1', init=False, policy=atom.default_policy(self.__set_mouse_button_velocity1)) self[4][8] = atom.Atom(domain=domain.Bool(), names='mouse button velocity 2', init=False, policy=atom.default_policy(self.__set_mouse_button_velocity2)) self.add_verb2(1,'press([],~a,role(None,[matches([key])]),role(as,[numeric]))',create_action=self.__press_key) self.add_verb2(2,'press([],~a,role(None,[matches([character])]),role(as,[abstract]))',create_action=self.__press_character) self.add_verb2(3,'move([],~a,role(None,[matches([mouse])]),role(to,[numeric]),role(with,[numeric]))',create_action=self.__move_mouse)
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='vu meter', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(OUT_LIGHT, True, names='light output', protocols='revconnect') self.output = bundles.Splitter(self.domain, self[1][1]) self.native = vu_meter_native.vu_meter(self.output.cookie(), self.domain) self.input = bundles.VectorInput(self.native.cookie(), self.domain, signals=(IN_AUDIO,)) self[2] = atom.Atom(names='inputs') self[2][1] = atom.Atom(domain=domain.BoundedFloat(-1,1), names="audio input", policy=self.input.vector_policy(IN_AUDIO,policy.IsoStreamPolicy(1,-1,0))) self[3] = atom.Atom(names='thresholds') self[3][1] = atom.Atom(domain=domain.BoundedFloat(-90,0), init=-40.0, policy=atom.default_policy(self.__signal_level), names='signal threshold') self[3][2] = atom.Atom(domain=domain.BoundedFloat(-90,0), init=-6.0, policy=atom.default_policy(self.__high_level), names='high threshold') self[3][3] = atom.Atom(domain=domain.BoundedFloat(-90,0), init=-1, policy=atom.default_policy(self.__clip_level), names='clip threshold') self[4] = atom.Atom(domain=domain.BoundedInt(1,100), init=5, policy=atom.default_policy(self.__size), names='size') self[5] = atom.Atom(domain=domain.BoundedFloat(0.0,30), init=5, policy=atom.default_policy(self.__clip_hold), names='clip hold') self.__send_parameters()
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='midi program chooser', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(1, False, names='light output', protocols='revconnect') self[1][2] = bundles.Output(2, False, names='midi output') self.output = bundles.Splitter(self.domain, self[1][1], self[1][2]) self.chooser = midi_native.midi_pgm_chooser(self.output.cookie(), self.domain) self.input = bundles.VectorInput(self.chooser.cookie(), self.domain, signals=( 1, 2, )) self[2] = atom.Atom(names='inputs') self[2][1] = atom.Atom(domain=domain.Aniso(), policy=self.input.vector_policy(1, False), names='key input') self[2][2] = atom.Atom(domain=domain.Aniso(), policy=self.input.vector_policy(2, False), names='controller input') self[3] = atom.Atom(domain=domain.Bool(), init=False, policy=atom.default_policy(self.__bankview), names='bank view') self[4] = atom.Atom(domain=domain.BoundedInt(0, 127), init=0, policy=atom.default_policy(self.__program), names='program') self[5] = atom.Atom(domain=domain.BoundedInt(0, 16), init=1, policy=atom.default_policy(self.__channel), names='midi channel') self[6] = atom.Atom(domain=domain.BoundedInt(0, 127), init=0, policy=atom.default_policy(self.__window), names='window') self[7] = atom.Atom(domain=domain.BoundedInt(0, 127), init=0, policy=atom.default_policy(self.__bank), names='bank') self.add_verb2(1, 'reset([],None)', callback=self.__reset) self.add_verb2(2, 'up([],None)', callback=self.__up) self.add_verb2(3, 'down([],None)', callback=self.__down)
def __init__(self, agent): self.__agent = agent audio.AudioOutput.__init__(self, self.__agent.audio_output, 1, 1, names='microphone') self[100] = toggle.Toggle(self.__enable, self.__agent.domain, container=(None, 'microphone enable', self.__agent.verb_container()), names='enable', transient=True) self[101] = atom.Atom( domain=domain.StringEnum(*sorted(self.mic_types.keys())), init='electret', names='type', policy=atom.default_policy(self.__type)) self[102] = atom.Atom(domain=domain.BoundedInt( 0, 50, hints=(T('stageinc', 1), T('inc', 1), T('biginc', 5), T('control', 'updown'))), names='gain', init=30, policy=atom.default_policy(self.__gain)) self[103] = toggle.Toggle(self.__pad, self.__agent.domain, container=(None, 'microphone pad', self.__agent.verb_container()), names='pad') self[104] = toggle.Toggle(self.__loop_enable, self.__agent.domain, container=(None, 'microphone loop', self.__agent.verb_container()), names='loop') self[105] = atom.Atom(domain=domain.BoundedInt( 0, 120, hints=(T('stageinc', 1), T('inc', 1), T('biginc', 5), T('control', 'updown'))), names='loop gain', init=100, policy=atom.default_policy(self.__loop_gain)) self[106] = toggle.Toggle(self.__mute_enable, self.__agent.domain, container=(None, 'microphone mute', self.__agent.verb_container()), names='automute') self[109] = atom.Atom(domain=domain.BoundedInt(0, 4), names='quality', init=2, policy=atom.default_policy(self.__quality))
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='vu meter', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(OUT_LIGHT, True, names='light output', protocols='revconnect') self.output = bundles.Splitter(self.domain, self[1][1]) self.native = vu_meter_native.vu_meter(self.output.cookie(), self.domain) self.input = bundles.VectorInput(self.native.cookie(), self.domain, signals=(IN_AUDIO, )) self[2] = atom.Atom(names='inputs') self[2][1] = atom.Atom(domain=domain.BoundedFloat(-1, 1), names="audio input", policy=self.input.vector_policy( IN_AUDIO, policy.IsoStreamPolicy(1, -1, 0))) self[3] = atom.Atom(names='thresholds') self[3][1] = atom.Atom(domain=domain.BoundedFloat(-90, 0), init=-40.0, policy=atom.default_policy(self.__signal_level), names='signal threshold') self[3][2] = atom.Atom(domain=domain.BoundedFloat(-90, 0), init=-6.0, policy=atom.default_policy(self.__high_level), names='high threshold') self[3][3] = atom.Atom(domain=domain.BoundedFloat(-90, 0), init=-1, policy=atom.default_policy(self.__clip_level), names='clip threshold') self[4] = atom.Atom(domain=domain.BoundedInt(1, 100), init=5, policy=atom.default_policy(self.__size), names='size') self[5] = atom.Atom(domain=domain.BoundedFloat(0.0, 30), init=5, policy=atom.default_policy(self.__clip_hold), names='clip hold') self.__send_parameters()
def __init__(self): atom.Atom.__init__(self, domain=domain.Blob(), names='Clip Pool', transient=True, policy=atom.default_policy(self.__changed), protocols="widget-clippool")
def __init__(self,agent): self.__agent = agent audio.AudioInput.__init__(self,self.__agent.audio_input,1,2,names='headphone') self[100] = toggle.Toggle(self.__enable,self.__agent.domain,container=(None,'headphone',self.__agent.verb_container()),names='enable') self[101] = atom.Atom(domain=domain.BoundedInt(0,127,hints=(T('inc',1),T('biginc',5),T('control','updown'))),names='gain',init=70,policy=atom.default_policy(self.__gain)) self[102] = atom.Atom(domain=domain.BoundedInt(0,4),names='quality',init=0,policy=atom.default_policy(self.__quality)) self[103] = atom.Atom(domain=domain.Bool(),names='limit',init=True,policy=atom.default_policy(self.__limit))
def __init__(self,agent,voice): self.agent = agent self.voice = voice self.__timestamp = piw.tsd_time() atom.Atom.__init__(self,domain=domain.String(),names='voice',ordinal=voice,protocols='remove browse',policy=atom.default_policy(self.set_loop)) self.looper = loop_native.player(agent.aggregator.get_output(voice),agent.domain,utils.statusify(self.__loop_status)) agent.clock_cloner.set_output(voice,self.looper.cookie()) self.loop_off = self.looper.player(0) self.loop_on = self.looper.player(1) self.loop_toggle = self.looper.player(3) self.loop_once = self.looper.player(2) self.agent.lights.set_status(self.voice,const.status_inactive) self[1] = atom.Atom(domain=domain.BoundedFloat(0.0,100.0,0.0,hints=(T('stageinc',1),T('inc',1),T('biginc',10),T('control','updown')),verbinc=10.0),init=100.0,policy=atom.default_policy(self.set_volume),names='volume') self[2] = atom.Atom(domain=domain.BoundedFloat(0.0,100.0,0.0,hints=(T('stageinc',1),T('inc',1),T('biginc',10),T('control','updown')),verbinc=10.0),init=10.0,policy=atom.default_policy(self.set_chop),names='chop') self[3] = atom.Atom(domain=domain.Bool(),init=False,names='enable',policy=atom.default_policy(self.set_playing),protocols='set',container=(None,'voice%d'%voice,agent.verb_container())) self[3].add_verb2(1,'set([],~a,role(None,[instance(~self)]))', create_action=self.__enable_set, status_action=self.__enable_status) self[3].add_verb2(2,'set([un],~a,role(None,[instance(~self)]))', create_action=self.__enable_unset, status_action=self.__enable_status) self[3].add_verb2(3,'set([toggle],~a,role(None,[instance(~self)]))', create_action=self.__enable_toggle, status_action=self.__enable_status) self.looper.set_chop(10.0) self.looper.set_volume(1.0) piw.changelist_connect(agent.loop_on,self.loop_on) piw.changelist_connect(agent.loop_off,self.loop_off) piw.changelist_connect(agent.loop_toggle,self.loop_toggle) self.first()
def __init__(self): atom.Atom.__init__(self, domain=domain.Blob(), names='Scene View', transient=True, policy=atom.default_policy(self.__changed), protocols="widget-sceneview")
def __init__(self, *clients): self.__clients = clients atom.Atom.__init__(self, domain=domain.BoundedInt(0, 128), names='channel count', init=1, policy=atom.default_policy(self.__set_channels)) self.__set_channels(1)
def set_keybounce(self): self[230] = atom.Atom(domain=domain.BoundedFloat(0, 31500), init=20000, protocols='input output', names='debounce time', policy=atom.default_policy( self.keyboard.debounce_time)) self.keyboard.debounce_time(self[230].get_value())
def __init__(self,agent,sessionChanges): self.__agent = agent self.__sessionChanges = sessionChanges atom.Atom.__init__(self,domain=domain.String(),policy=atom.default_policy(self.setXML),protocols='nostage') self.set_property_long('tabIndex',-1) self[1] = WidgetList(self)
def __init__(self, chan_agent, cookie, name, ordinal_str, fx_chan_num, is_fx_chan): self.chan_agent = chan_agent self.fx_chan_num = fx_chan_num self.__is_fx_chan = is_fx_chan if ordinal_str != '': ordinal = int(ordinal_str) else: ordinal = None self.label = '%s %s' % (name, ordinal_str) atom.Atom.__init__(self, names=name, ordinal=ordinal) self.set_property_string('cname', 'effect') self.set_property_long('cordinal', fx_chan_num) # ------- effect send levels and enables ------- # enable self[1] = atom.Atom(domain=domain.Bool(), init=False, names='enable', policy=atom.default_policy( self.__set_fx_send_enable)) # send self.send_input = bundles.ScalarInput(cookie, chan_agent.main_agent.clk, signals=(1, )) self[2] = atom.Atom( domain=domain.BoundedFloat(0, 120, hints=(T('inc', 1), T('biginc', 10), T('control', 'updown'))), init=120, names='send', policy=self.send_input.notify_policy( 1, policy.LopassStreamPolicy(1000, 0.97), notify=self.chan_agent.main_agent.volume_changed), protocols='bind input') self[3] = atom.Atom(domain=domain.Bool(), init=False, names='prefader', policy=atom.default_policy( self.__set_fx_send_prefader))
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='frequency detector', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(1, False, names='frequency output') self.output = bundles.Splitter(self.domain, self[1][1]) self.frequency_detector = frequency_detector_native.frequency_detector(self.output.cookie(), self.domain) self.input = bundles.VectorInput(self.frequency_detector.cookie(), self.domain, signals=(1,)) self[2] = atom.Atom(names='inputs') self[2][1] = atom.Atom(domain=domain.BoundedFloat(0,1), names="audio input", policy=self.input.vector_policy(1,True)) self[3] = atom.Atom(domain=domain.BoundedFloat(0,1), init=0.01, policy=atom.default_policy(self.__threshold), names='threshold') self[4] = atom.Atom(domain=domain.BoundedInt(5,20), init=10, policy=atom.default_policy(self.__buffer_count), names='buffer count')
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='scaler',protocols='bind set',icon='plg_simple/scaler.png',container=5,ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*',0)) self.__fixed = False self.set_private(node.Server(value=piw.makebool(False,0),change=self.__changefix)) self[1] = atom.Atom() self[1][1] = bundles.Output(1,False,names='activation output', protocols='') self[1][2] = bundles.Output(2,False,names='pressure output', protocols='') self[1][3] = bundles.Output(3,False,names='roll output', protocols='') self[1][4] = bundles.Output(4,False,names='yaw output', protocols='') self[1][5] = bundles.Output(5,False,names='scale note output', protocols='') self[1][6] = bundles.Output(6,False,names='frequency output', protocols='') self.ctl = piw.scaler_controller() self.ctl_input = bundles.VectorInput(self.ctl.cookie(),self.domain,signals=(1,)) self.output = bundles.Splitter(self.domain,*self[1].values()) self.filter = piw.scaler(self.ctl,self.output.cookie(),cubic()) self.input = bundles.VectorInput(self.filter.cookie(), self.domain,signals=(1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17)) self.input.correlator.clocksink().add_upstream(self.ctl_input.correlator.clocksink()) self[4]=atom.Atom() self[4][1]=atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.input.merge_policy(1,False),names='activation input') self[4][2]=atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.input.vector_policy(2,False),names='pressure input') self[4][3]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.input.merge_policy(3,False),names='roll input') self[4][4]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.input.merge_policy(4,False),names='yaw input') th=(T('inc',1),T('biginc',1),T('control','updown')) bh=(T('inc',1),T('biginc',1),T('control','updown')) sh=(T('choices','[0,2,4,5,7,9,11,12]','[0,1,2,3,4,5,6,7,8,9,10,11,12]','[0,2,4,6,8,10,12]','[0,2,3,5,7,8,10,12]','[0,3,5,6,7,10,12]', '[0,2,3,6,7,8,11,12]','[0,3,5,7,10,12]','[0,2,4,7,9,12]'), T('control','selector')) self[4][5]=atom.Atom(domain=domain.BoundedFloat(0,12,hints=th),policy=self.input.merge_policy(5,False),names='tonic input',protocols='bind set',container=(None,'tonic',self.verb_container())) self[4][6]=atom.Atom(domain=domain.BoundedFloat(-20,20,hints=bh),policy=self.input.merge_policy(6,False),names='base note input',protocols='bind') self[4][7]=atom.Atom(domain=domain.String(hints=sh),init='[0,2,4,5,7,9,11,12]',policy=self.input.merge_policy(7,False),names='scale input',protocols='bind set',container=(None,'scale',self.verb_container())) self[4][8]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.input.merge_policy(9,policy.LopassStreamPolicy(200,0.6)),names='k pitch bend input') self[4][9]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.input.merge_policy(10,False),names='global pitch bend input') self[4][10]=atom.Atom(domain=domain.BoundedFloat(0,72),init=1,policy=self.input.merge_policy(11,False),names='k bend range input',protocols='bind') self[4][11]=atom.Atom(domain=domain.BoundedFloat(0,72),init=12,policy=self.input.merge_policy(12,False),names='global bend range input',protocols='bind') self[4][12]=atom.Atom(domain=domain.Aniso(),policy=self.ctl_input.vector_policy(1,False),names='controller input') self[4][13]=atom.Atom(domain=domain.Bool(),policy=self.input.merge_policy(14,False),names='override',protocols='bind') self[4][14]=atom.Atom(domain=domain.BoundedFloat(-1,9,hints=th),init=3,policy=self.input.merge_policy(15,False),names='octave input',protocols='bind',container=(None,'octave',self.verb_container())) self[4][15]=atom.Atom(domain=domain.BoundedInt(1,4),init=2,policy=atom.default_policy(self.__set_curve),names='curve',protocols='bind') self[4][16]=atom.Atom(domain=domain.BoundedFloat(0,1000),policy=self.input.merge_nodefault_policy(16,False),names='key input') self[4][17]=atom.Atom(domain=domain.BoundedFloat(-10,10,hints=th),init=0,policy=self.input.merge_policy(17,False),names='relative octave input',protocols='bind') self.add_verb2(3,'choose([],None,role(none,[ideal([None,scale]),singular]))',callback=self.__tune_scale) self.add_verb2(5,'fix([],None)',callback=self.__fix) self.add_verb2(6,'fix([un],None)',callback=self.__unfix) self[4][5].add_verb2(1,'set([],~a,role(None,[instance(~self)]),role(to,[ideal([None,note]),singular]))',callback=self.__tune_tonic) self[4][7].add_verb2(2,'set([],~a,role(None,[instance(~self)]),role(to,[ideal([None,scale]),singular]))',callback=self.__tune_scale)
def __init__(self, key_cookie,cc_cookie,pc_cookie,trig_cookie,midi_cookie): self.__timestamp = piw.tsd_time() self.__midi = MidiDelegate(key_cookie,cc_cookie,pc_cookie,trig_cookie,midi_cookie,self.__sinks_changed) atom.Atom.__init__(self,domain=domain.String(),names='midi port',policy=atom.default_policy(self.set_port),protocols='virtual browse') self.__midi.set_port(0) self.__midi.set_destination('') self.__selected=None self.__update() self.__index = 1
def __init__(self, agent): self.__scan() self.__selected = None self.agent = agent atom.Atom.__init__(self, names='impulse', protocols='virtual browse', domain=domain.String(), policy=atom.default_policy(self.__setcurrent)) self.__timestamp = piw.tsd_time() self.__update()
def __init__(self, address, ordinal): # agent.Agent.__init__(self, signature=version, names='osc pad', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*',0)) self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(OUT_LIGHT, False, names='light output', protocols='revconnect') self.output = bundles.Splitter(self.domain, self[1][1]) self.osc = osc_pad(self.domain, self.output.cookie(),"localhost", "9000","9001") self.key_input = bundles.VectorInput(self.osc.cookie(), self.domain, signals=(1,2,3,4)) self[2] = atom.Atom(names="inputs") self[2][1] = atom.Atom(domain=domain.Aniso(), policy=self.key_input.vector_policy(1,False), names='key input') self[2][2] = atom.Atom(domain=domain.BoundedFloat(0,1), policy=self.key_input.vector_policy(2,False), names='pressure input') self[2][3] = atom.Atom(domain=domain.BoundedFloat(-1,1), policy=self.key_input.vector_policy(3,False), names='roll input') self[2][4] = atom.Atom(domain=domain.BoundedFloat(-1,1), policy=self.key_input.vector_policy(4,False), names='yaw input') self.left = 1; self.width = 50; self.top =1; self.height = 25; self[3] = atom.Atom(names='view') self[3][1] = atom.Atom(domain=domain.BoundedInt(1,100), policy=atom.default_policy(self.__top), init=self.top, names='top') self[3][2] = atom.Atom(domain=domain.BoundedInt(1,100), policy=atom.default_policy(self.__height), init=self.height, names='height') self[3][3] = atom.Atom(domain=domain.BoundedInt(1,100), policy=atom.default_policy(self.__left), init=self.left, names='left') self[3][4] = atom.Atom(domain=domain.BoundedInt(1,100), policy=atom.default_policy(self.__width), init=self.width, names='width') self[4] = atom.Atom(domain=domain.BoundedInt(0,100), policy=atom.default_policy(self.__arrangement), init=0, names='arrangement') self.add_verb2(1,'reset([],None)', callback=self.__reset) self.add_verb2(2,'play([],None)', callback=self.__play) self.add_verb2(3,'stop([],None)', callback=self.__stop) self.add_verb2(4,'undo([],None)', callback=self.__undo) self.add_verb2(5,'undo([un],None)', callback=self.__redo) self.osc.set_window(self.top,self.height,self.left,self.width);
def __init__(self, agent): self.agent = agent atom.Atom.__init__(self, domain=domain.String(), names='audio port', protocols='virtual browse', policy=atom.default_policy(self.__change_device), init='') self.__mapping = [] # (uid,name) self.__timestamp = piw.tsd_time() self.__selected = None self.__update()
def __init__(self, channel, fx_chan_num, is_fx_chan): self.channel = channel self.fx_chan_num = fx_chan_num self.__is_fx_chan = is_fx_chan atom.Atom.__init__(self, names='effect', ordinal=fx_chan_num) cookie = channel.aggregator.get_output(2 + fx_chan_num) # ------- effect send levels and enables ------- # enable self[1] = atom.Atom(domain=domain.Bool(), init=False, names='enable', policy=atom.default_policy( self.__set_fx_send_enable)) # send self.send_input = bundles.ScalarInput(cookie, channel.main_agent.clk, signals=(1, )) self[2] = atom.Atom( domain=domain.BoundedFloat(-70, 14, hints=(T('stageinc', 0.1), T('inc', 1), T('biginc', 10), T('control', 'updown'), T('distribution', 'tapered'))), init=0, names='send', policy=self.send_input.notify_policy( 1, policy.LopassStreamPolicy(1000, 0.97), notify=self.channel.main_agent.changes_pending), protocols='bind input') self[3] = atom.Atom(domain=domain.Bool(), init=False, names='prefader', policy=atom.default_policy( self.__set_fx_send_prefader))
def __init__(self, callback, *args, **kwds): self.__scroller = piw.scroller2(utils.changify(callback)) atom.Atom.__init__(self, *args, **kwds) self[1] = atom.Atom(domain=domain.BoundedInt(-32767, 32767), names='column', init=None, policy=atom.default_policy(self.__change_column)) self[2] = atom.Atom(domain=domain.BoundedInt(-32767, 32767), names='row', init=None, policy=atom.default_policy(self.__change_row)) self[3] = atom.Atom(domain=domain.Bool(), names='column end relative', init=False, policy=atom.default_policy( self.__change_column_endrel)) self[4] = atom.Atom(domain=domain.Bool(), names='row end relative', init=False, policy=atom.default_policy( self.__change_row_endrel)) self.__key_changed()
def __init__(self, scheduler, index): self.scheduler = scheduler self.index = index self.event = piw.event(scheduler.scheduler, False, utils.changify(self.__enable_changed)) self.event.set_self_light(const.status_selector_off) talker.Talker.__init__( self, scheduler.finder, self.event.fastdata(), self.scheduler.light_aggregator.get_output(index), names='event', ordinal=index, protocols='remove') self[3] = atom.Atom(domain=domain.String(), policy=atom.default_policy(self.__change_schema), names='schema') self[4] = atom.Atom(domain=domain.Bool(), init=False, policy=atom.default_policy(self.__change_enabled), names='enabled')
def __init__(self, func1, func2, *args, **kwds): self.__delegate = ScrollerDelegate(func1, func2) self.__scroller = piw.scroller(self.__delegate, 0.5, 0.5, 100) atom.Atom.__init__(self, *args, **kwds) self[1] = atom.Atom(domain=domain.BoundedInt(-32767, 32767), names='column', init=None, policy=atom.default_policy(self.__change_column)) self[2] = atom.Atom(domain=domain.BoundedInt(-32767, 32767), names='row', init=None, policy=atom.default_policy(self.__change_row)) self[3] = atom.Atom(domain=domain.Bool(), names='column end relative', init=False, policy=atom.default_policy( self.__change_column_endrel)) self[4] = atom.Atom(domain=domain.Bool(), names='row end relative', init=False, policy=atom.default_policy( self.__change_row_endrel)) self.__key_changed()
def __init__(self, address, ordinal): self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*',0)) agent.Agent.__init__(self, signature=version, names='stringer',protocols='bind set',container=(5,'stringer',atom.VerbContainer(clock_domain=self.domain)),ordinal=ordinal) self[1] = atom.Atom(names='outputs') self[1][1] = bundles.Output(1,False, names='controller output', continuous=True) self[1][2] = bundles.Output(2,False,names='pressure output', protocols='') self[1][3] = bundles.Output(3,False,names='roll output', protocols='') self[1][4] = bundles.Output(4,False,names='yaw output', protocols='') self[1][5] = bundles.Output(5,False,names='key output', protocols='') self.output = bundles.Splitter(self.domain,self[1][2],self[1][3],self[1][4],self[1][5]) self.coutput = bundles.Splitter(self.domain,self[1][1]) # stringer self.stringer = piw.stringer(self.output.cookie()) # clone controller input to copy it to an output and the stringer self.cclone = piw.clone(True) self.cclone.set_output(1,self.coutput.cookie()) self.ctl_input = bundles.VectorInput(self.cclone.cookie(),self.domain,signals=(1,)) self.data_input = bundles.VectorInput(self.stringer.data_cookie(),self.domain,signals=(2,3,4,5)) self[4]=atom.Atom(names='inputs') self[4][1]=atom.Atom(domain=domain.Aniso(),policy=self.ctl_input.vector_policy(1,False),names='controller input') self[4][2]=atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.data_input.merge_policy(2,False),names='pressure input',protocols='nostage') self[4][3]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.data_input.merge_policy(3,False),names='roll input',protocols='nostage') self[4][4]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.data_input.merge_policy(4,False),names='yaw input',protocols='nostage') self[4][5]=atom.Atom(domain=domain.Aniso(),policy=self.data_input.vector_policy(5,False), names='key input') # self[5] is the verb container # enable, to deactivate the stringer self[6] = atom.Atom(domain=domain.Bool(),init=True,names="enable",policy=atom.default_policy(self.__enable)) # status output to drive the talker lights self[7]=bundles.Output(1,False,names='status output') self.light_output=bundles.Splitter(self.domain,self[7]) self.lights=piw.lightsource(piw.change_nb(),0,self.light_output.cookie()) self.lights.set_size(1) self.__set_lights(self[6].get_value()) # toggle enable verb, has status action to ensure the status output will be connected to a talker self.add_verb2(1,'enable([toggle],None)',callback=self.__toggle_enable,status_action=self.__status)
def __init__(self,agent,index): atom.Atom.__init__(self,names='key press',ordinal=index,protocols='remove') self.__agent = agent self.__index = index self.__inputcookie = self.__agent.sysin_events.create_keypress_input(self.__index) self.__input = bundles.VectorInput(self.__inputcookie, agent.domain, signals=(1,)) self[1] = atom.Atom(domain=domain.BoundedFloat(-1,1), names="pressure input", policy=self.__input.vector_policy(1,True)) self[2] = atom.Atom(domain=domain.BoundedInt(0,127), names='key code', policy=atom.default_policy(self.__set_code)) self[3] = atom.Atom(domain=domain.String(), names='character', init='', policy=atom.default_policy(self.__set_character)) self[4] = atom.Atom(domain=domain.Bool(), names='hold', init=True, policy=atom.default_policy(self.__set_hold)) self[5] = atom.Atom(domain=domain.BoundedFloat(-1,1), names='threshold', init=0.0, policy=atom.default_policy(self.__set_threshold)) self[6] = atom.Atom(domain=domain.Bool(), names='velocity', init=False, policy=atom.default_policy(self.__set_velocity)) self[7] = atom.Atom(domain=domain.String(), names='description', init='', policy=atom.default_policy(self.__set_description))
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='audio player', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.output = bundles.Splitter(self.domain) self[1] = audio.AudioOutput(self.output, 1, 2) file = wav_resource('output.wav') self.xplayer = loop_native.xplayer(self.output.cookie(), self.domain, file) self.xplayer.play(True) self[2] = atom.Atom(domain=domain.BoundedFloat(0, 1), names='gain input', init=0.25, policy=atom.default_policy(self.__setgain))
def __init__(self, address, ordinal): self.domain = piw.clockdomain_ctl() agent.Agent.__init__(self, signature=version, names='player', container=(const.verb_node,'player',atom.VerbContainer(clock_domain=self.domain)), ordinal=ordinal) self[2] = atom.Atom(names='outputs') self[2][1] = bundles.Output(1,False,names='pressure output', protocols='') self[2][2] = bundles.Output(2,False,names='key output', protocols='') self[2][3] = bundles.Output(3,False,names='controller output', protocols='') self.data_output = bundles.Splitter(self.domain,self[2][1],self[2][2]) self.ctl_output = bundles.Splitter(self.domain,self[2][3]) self.player = recorder_native.nplayer(self.data_output.cookie(),self.ctl_output.cookie(),16,100,self.domain) self[3] = atom.Atom(domain=domain.BoundedInt(1,10000,100), policy=atom.default_policy(self.player.set_size), names="size") self.add_verb2(1,'play([],None,role(None,[mass([note])]),role(with,[mass([velocity])]))',create_action=self.__playnv,clock=True) self.add_verb2(2,'play([],None,role(None,[mass([note])]),role(with,[mass([velocity])]),role(for,[mass([second])]))',create_action=self.__playnvl,clock=True)
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version,names='cycler',container=10,ordinal=ordinal) self.set_private(node.Server()) self.get_private()[1]=node.Server(change=self.__cycle_set,value=piw.makebool(True,0)) self.get_private()[2]=node.Server(change=self.__invert_set,value=piw.makebool(False,0)) self[2] = atom.Atom(names='outputs') self[2][2] = bundles.Output(2,False,names='pressure output') self[2][3] = bundles.Output(3,False,names='roll output') self[2][4] = bundles.Output(4,False,names='yaw output') self[2][5] = bundles.Output(5,False,names='scale note output') self[2][6] = bundles.Output(6,False,names='frequency output') self[2][7] = bundles.Output(16,False,names='damper output') self[3] = atom.Atom(names="cycling",domain=domain.Bool(),init=True,policy=atom.default_policy(self.__setcycling)) self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*',0)) self.main_output = bundles.Splitter(self.domain,self[2][2],self[2][3],self[2][4],self[2][5],self[2][6]) self.damp_output = bundles.Splitter(self.domain,self[2][7]) self.cycler = piw.cycler(self.domain,32,self.main_output.cookie(),self.damp_output.cookie(),False) self.input = bundles.VectorInput(self.cycler.main_cookie(),self.domain,signals=(2,3,4,5,6,16,17),threshold=5) self.feedback = bundles.VectorInput(self.cycler.feedback_cookie(),self.domain,signals=(1,),threshold=5) self.cycler.set_cycle(True) self.cycler.set_maxdamp(1.0) self.cycler.set_invert(True) self.cycler.set_curve(1.0) self[1] = atom.Atom(names='inputs') self[1][2]=atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.input.vector_policy(2,False),names='pressure input') self[1][3]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.input.vector_policy(3,False),names='roll input') self[1][4]=atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.input.vector_policy(4,False),names='yaw input') self[1][5]=atom.Atom(domain=domain.BoundedFloat(0,1000),policy=self.input.vector_policy(5,False),names='scale note input') self[1][6]=atom.Atom(domain=domain.BoundedFloat(0,96000),policy=self.input.vector_policy(6,False),names='frequency input') self[1][7]=atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.feedback.vector_policy(1,False,clocked=False),names='feedback input') self[1][8]=atom.Atom(domain=domain.BoundedFloat(0,1),init=0.0,policy=self.input.linger_policy(16,False),names='damper pedal input',container=(None,'damper',self.verb_container())) self[1][10]=atom.Atom(domain=domain.BoundedFloat(0,1,hints=(T('stageinc',0.01),T('inc',0.01),T('biginc',0.1),T('control','updown'))),init=1.0,policy=atom.default_policy(self.__setmaxdamp),names='damper maximum input') self[1][12]=atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.input.latch_policy(17,False),names='hold pedal input') self[1][13]=atom.Atom(domain=domain.BoundedFloat(0.1,10,hints=(T('stageinc',0.1),T('inc',0.1),T('biginc',1),T('control','updown'))),init=1,names="damper curve",policy=atom.default_policy(self.__setdcurve)) self[4] = atom.Atom(names="inverted damper",domain=domain.Bool(),init=True,policy=atom.default_policy(self.__setinverted))
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='tabulator', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self[5] = bundles.Output(1, False, names='status output') self.status_output = bundles.Splitter(self.domain, self[5]) self.lights = piw.lightsource(piw.change_nb(), 0, self.status_output.cookie()) self.lights.set_size(1) self.cfunctor = piw.functor_backend(1, False) self.cinput = bundles.VectorInput(self.cfunctor.cookie(), self.domain, signals=(1,)) self[1] = atom.Atom(domain=domain.Aniso(), policy=self.cinput.vector_policy(1,False), names='controller input') self.cfunctor.set_gfunctor(utils.make_change_nb(piw.slowchange(utils.changify(self.__controller)))) self.keyfunctor = piw.functor_backend(1, False) self.keyinput = bundles.VectorInput(self.keyfunctor.cookie(), self.domain, signals=(1,)) self[2] = atom.Atom(domain=domain.Aniso(), policy=self.keyinput.vector_policy(1,False), names='key input') self.keyfunctor.set_gfunctor(utils.make_change_nb(piw.slowchange(utils.changify(self.__key)))) self[3] = atom.Atom(domain=domain.BoundedInt(1,100), init=DEFAULT_CHORD_TIMEOUT, policy=atom.default_policy(self.__set_chordtimeout), names='chord timeout') self[4] = atom.Atom(domain=domain.BoundedInt(80,200), init=DEFAULT_PAGE_WIDTH, policy=atom.default_policy(self.__set_pagewidth), names='page width') self[6] = atom.Atom(domain=domain.Bool(), init=False, names='start', policy=atom.default_policy(self.__change_start)) self.add_verb2(1,'start([],None)',self.__start,status_action=self.__status) self.add_verb2(2,'stop([],None)',self.__stop,status_action=self.__status) self.add_verb2(3,'start([toggle],None)',self.__toggle,status_action=self.__status) self.__set_chordtimeout(DEFAULT_CHORD_TIMEOUT) self.__set_pagewidth(DEFAULT_PAGE_WIDTH) self.__courselen = None self.__coursesqueue = None self.__coursesrender = None self.__lasttime = None self.__update_status()