Пример #1
0
    def __init__(self,names,ordinal,dom,remove,keys):
        self.kbd_keys = keys
        agent.Agent.__init__(self,names=names,ordinal=ordinal,signature=version,subsystem='kbd',volatile=True,container=102,protocols='browse is_subsys')

        self.remover=remove

        self.domain = piw.clockdomain_ctl()
        self.domain.set_source(piw.makestring('*',0))

        self[1] = bundles.Output(1,False,names='activation output')
        self[2] = bundles.Output(2,False,names='pressure output')
        self[3] = bundles.Output(3,False,names='roll output')
        self[4] = bundles.Output(4,False,names='yaw output')

        self[5] = bundles.Output(1,False,names='strip position output',ordinal=1)

        self[7] = bundles.Output(1,False,names='breath output')
        self[10] = bundles.Output(2,False,names='absolute strip output',ordinal=1)

        self[12] = bundles.Output(1,False,names='pedal output',ordinal=1)
        self[13] = bundles.Output(1,False,names='pedal output',ordinal=2)
        self[14] = bundles.Output(1,False,names='pedal output',ordinal=3)
        self[15] = bundles.Output(1,False,names='pedal output',ordinal=4)

        self.led_backend = piw.functor_backend(1,True)
        self.status_mixer = piw.statusmixer(self.led_backend.cookie())
        self.led_input = bundles.VectorInput(self.status_mixer.cookie(),self.domain,signals=(1,))
        self[8] = atom.Atom(names='light input',protocols='revconnect',policy=self.led_input.vector_policy(1,False,False,auto_slot=True),domain=domain.Aniso())

        self[100] = VirtualKey(self.kbd_keys)

        self.koutput = bundles.Splitter(self.domain,self[1],self[2],self[3],self[4])
        self.kpoly = piw.polyctl(10,self.koutput.cookie(),False,5)
        self.s1output = bundles.Splitter(self.domain,self[5],self[10])
        self.boutput = bundles.Splitter(self.domain,self[7])
        self.poutput1 = bundles.Splitter(self.domain,self[12])
        self.poutput2 = bundles.Splitter(self.domain,self[13])
        self.poutput3 = bundles.Splitter(self.domain,self[14])
        self.poutput4 = bundles.Splitter(self.domain,self[15])

        self.kclone=piw.sclone()
        self.kclone.set_filtered_output(1,self.kpoly.cookie(),piw.first_filter(1))
        self.kclone.set_filtered_output(2,self.s1output.cookie(),piw.first_filter(2))
        self.kclone.set_filtered_output(5,self.boutput.cookie(),piw.first_filter(5)) 
        self.kclone.set_filtered_output(6,self.poutput1.cookie(),piw.first_filter(6))
        self.kclone.set_filtered_output(7,self.poutput2.cookie(),piw.first_filter(7))
        self.kclone.set_filtered_output(8,self.poutput3.cookie(),piw.first_filter(8))
        self.kclone.set_filtered_output(9,self.poutput4.cookie(),piw.first_filter(9))

        self[9] = atom.Atom(names='controller output',domain=domain.Aniso(),init=self.courses())

        self.add_verb2(4,'maximise([],None,role(None,[mass([pedal])]))',self.__maximise)
        self.add_verb2(5,'minimise([],none,role(None,[mass([pedal])]))',self.__minimise)

        self.__timestamp = piw.tsd_time()
        self.update()
Пример #2
0
    def __init__(self,agent,index):
        atom.Atom.__init__(self,names='hand',ordinal=index)

        self.__agent = agent
        self.__index = index
        
        self[1] = bundles.Output(1, False, names='palm x output')
        self[2] = bundles.Output(2, False, names='palm y output')
        self[3] = bundles.Output(3, False, names='palm z output')

        self.__output = bundles.Splitter(self.__agent.domain, self[1], self[2], self[3])
        self.__palmpoly = piw.polyctl(1, self.__output.cookie(), False, 1)
        self.__agent.eleap.create_hand(self.__index, self.__palmpoly.cookie())
Пример #3
0
    def __init__(self, agent, index):
        atom.Atom.__init__(self, names='hand', ordinal=index)

        self.__agent = agent
        self.__index = index

        self[1] = bundles.Output(1, False, names='palm x output')
        self[2] = bundles.Output(2, False, names='palm y output')
        self[3] = bundles.Output(3, False, names='palm z output')

        self.__output = bundles.Splitter(self.__agent.domain, self[1], self[2],
                                         self[3])
        self.__palmpoly = piw.polyctl(1, self.__output.cookie(), False, 1)
        self.__agent.eleap.create_hand(self.__index, self.__palmpoly.cookie())
Пример #4
0
    def __init__(self,usbname,ordinal,dom,remove):
        agent.Agent.__init__(self,names='keyboard pico',ordinal=ordinal,signature=version,subsystem='kbd',volatile=True,container=102,protocols='is_subsys')

        self.usbname=usbname
        self.remover=remove

        self.domain = piw.clockdomain_ctl()
        self.domain.set_source(piw.makestring('*',0))

        self[1] = bundles.Output(1,False, names='activation output')
        self[2] = bundles.Output(2,False, names='pressure output')
        self[3] = bundles.Output(3,False, names='roll output')
        self[4] = bundles.Output(4,False, names='yaw output')

        self[5] = bundles.Output(1,False, names='strip position output')
        self[6] = bundles.Output(1,False, names='breath output')
        self[8] = bundles.Output(2,False, names='absolute strip output')
        
        self.led_backend = piw.functor_backend(1,True)
        self.status_mixer = piw.statusmixer(self.led_backend.cookie())
        self.led_input = bundles.VectorInput(self.status_mixer.cookie(),self.domain,signals=(1,))
        self[7] = atom.Atom(names='light input',protocols='revconnect',policy=self.led_input.vector_policy(1,False,False,auto_slot=True),domain=domain.Aniso())

        self.koutput = bundles.Splitter(self.domain,self[1],self[2],self[3],self[4])
        self.kpoly = piw.polyctl(10,self.koutput.cookie(),False,5)
        self.soutput = bundles.Splitter(self.domain,self[5],self[8])
        self.boutput = bundles.Splitter(self.domain,self[6])

        self.kclone=piw.sclone()
        self.kclone.set_filtered_output(1,self.kpoly.cookie(),piw.first_filter(1))
        self.kclone.set_filtered_output(2,self.soutput.cookie(),piw.first_filter(2))
        self.kclone.set_filtered_output(3,self.boutput.cookie(),piw.first_filter(3))
        self.keyboard=pkbd_native.bundle(usbname,self.kclone.cookie(),utils.notify(self.dead),utils.changify(self.signal))

        self[100] = VirtualKey()
        #self[102] = vc

        self[251] = atom.Atom(domain=domain.BoundedFloat(0,1), init=self.keyboard.get_threshold1(), protocols='input output', names='soft threshold', policy=atom.default_policy(self.keyboard.set_threshold1))
        self[249] = atom.Atom(domain=domain.BoundedFloat(0,1), init=self.keyboard.get_threshold2(), protocols='input output', names='hard threshold', policy=atom.default_policy(self.keyboard.set_threshold2))
        self[240] = atom.Atom(domain=domain.BoundedFloat(0,1), init=self.keyboard.get_roll_axis_window(), protocols='input output', names='roll axis window', policy=atom.default_policy(self.keyboard.set_roll_axis_window))
        self[241] = atom.Atom(domain=domain.BoundedFloat(0,1), init=self.keyboard.get_yaw_axis_window(), protocols='input output', names='yaw axis window', policy=atom.default_policy(self.keyboard.set_yaw_axis_window))
        self[242] = atom.Atom(domain=domain.Bool(), init=False, protocols='input output nostage', names='k logging', policy=atom.default_policy(self.keyboard.enable_key_logging))

        f=self.keyboard.led_functor()
        self.led_backend.set_functor(piw.pathnull(0),f)

        self[9] = atom.Atom(names='controller output',domain=domain.Aniso(),init=self.__courses())
Пример #5
0
    def __init__(self, address, ordinal):
        #
        agent.Agent.__init__(self,
                             signature=version,
                             names='t3d device',
                             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(1, False, names='key output')
        self[1][2] = bundles.Output(2, False, names='pressure output')
        self[1][3] = bundles.Output(3, False, names='roll output')
        self[1][4] = bundles.Output(4, False, names='yaw output')
        self[1][5] = bundles.Output(5, False, names='frequency')

        self[1][6] = bundles.Output(1, False, names='breath output')

        self[1][7] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=1)
        self[1][8] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=1)
        self[1][9] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=2)
        self[1][10] = bundles.Output(2,
                                     False,
                                     names='absolute strip output',
                                     ordinal=2)

        self[1][11] = bundles.Output(1, False, names='pedal output', ordinal=1)
        self[1][12] = bundles.Output(1, False, names='pedal output', ordinal=2)
        self[1][13] = bundles.Output(1, False, names='pedal output', ordinal=3)
        self[1][14] = bundles.Output(1, False, names='pedal output', ordinal=4)

        # key outputs
        self.koutput = bundles.Splitter(self.domain, self[1][1], self[1][2],
                                        self[1][3], self[1][4], self[1][5])
        self.kpoly = piw.polyctl(10, self.koutput.cookie(), False, 6)
        # breath
        self.boutput = bundles.Splitter(self.domain, self[1][6])
        # strips
        self.s1output = bundles.Splitter(self.domain, self[1][7], self[1][8])
        self.s2output = bundles.Splitter(self.domain, self[1][9], self[1][10])
        # pedals
        self.poutput1 = bundles.Splitter(self.domain, self[1][11])
        self.poutput2 = bundles.Splitter(self.domain, self[1][12])
        self.poutput3 = bundles.Splitter(self.domain, self[1][13])
        self.poutput4 = bundles.Splitter(self.domain, self[1][14])

        # now we need to set of outputs
        self.output = piw.sclone()
        self.output.set_filtered_output(OUT_KEY, self.kpoly.cookie(),
                                        piw.first_filter(OUT_KEY))
        self.output.set_filtered_output(OUT_STRIP_1, self.s1output.cookie(),
                                        piw.first_filter(OUT_STRIP_1))
        self.output.set_filtered_output(OUT_STRIP_2, self.s2output.cookie(),
                                        piw.first_filter(OUT_STRIP_2))
        self.output.set_filtered_output(OUT_BREATH, self.boutput.cookie(),
                                        piw.first_filter(OUT_BREATH))
        self.output.set_filtered_output(OUT_PEDAL_1, self.poutput1.cookie(),
                                        piw.first_filter(OUT_PEDAL_1))
        self.output.set_filtered_output(OUT_PEDAL_2, self.poutput2.cookie(),
                                        piw.first_filter(OUT_PEDAL_2))
        self.output.set_filtered_output(OUT_PEDAL_3, self.poutput3.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_PEDAL_4, self.poutput4.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))

        self.device = t3d_device(self.domain, self.output.cookie())

        self[1][15] = atom.Atom(names='controller output',
                                domain=domain.Aniso(),
                                init=self.controllerinit())

        self[3] = atom.Atom(domain=domain.BoundedInt(1, 30),
                            init=30,
                            policy=atom.default_policy(self.__row_size),
                            names='row size')
        self[4] = atom.Atom(domain=domain.BoundedInt(1, 5),
                            init=5,
                            policy=atom.default_policy(self.__col_size),
                            names='col size')
        self[5] = atom.Atom(domain=domain.Bool(),
                            init=False,
                            policy=atom.default_policy(self.__whole_roll),
                            names='whole roll')
        self[6] = atom.Atom(domain=domain.Bool(),
                            init=False,
                            policy=atom.default_policy(self.__whole_yaw),
                            names='whole yaw')
        self[7] = atom.Atom(domain=domain.BoundedInt(0, 9999),
                            init=3123,
                            policy=atom.default_policy(self.__server_port),
                            names='server port')

        self.input = bundles.VectorInput(self.device.cookie(),
                                         self.domain,
                                         signals=(IN_LIGHT, ))
        self[8] = atom.Atom(domain=domain.BoundedInt(0, 9999),
                            init=0,
                            policy=atom.default_policy(self.__light_port),
                            names='light port')
        self[9] = atom.Atom(domain=domain.Aniso(),
                            protocols='revconnect',
                            policy=self.input.vector_policy(IN_LIGHT,
                                                            False,
                                                            clocked=False),
                            names="light input")
        self[10] = atom.Atom(domain=domain.Bool(),
                             init=False,
                             policy=atom.default_policy(self.__continuous_key),
                             names='continuous key')
        self[11] = atom.Atom(domain=domain.Bool(),
                             init=True,
                             policy=atom.default_policy(self.__touch_mode),
                             names='touch mode')
        self[12] = atom.Atom(domain=domain.Bool(),
                             init=True,
                             policy=atom.default_policy(self.__quantize),
                             names='quantize')

        print "t3d device connect ", self[7], ",", self[8]
        self.device.connect(self[7].get_value(), self[8].get_value())
Пример #6
0
    def __init__(self, address, ordinal):
        #
        agent.Agent.__init__(self,
                             signature=version,
                             names='ableton push',
                             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(1, False, names='key output')
        self[1][2] = bundles.Output(2, False, names='pressure output')
        self[1][3] = bundles.Output(3, False, names='roll output')
        self[1][4] = bundles.Output(4, False, names='yaw output')

        self[1][5] = bundles.Output(1, False, names='breath output')

        self[1][6] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=1)
        self[1][7] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=1)
        self[1][8] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=2)
        self[1][9] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=2)

        self[1][10] = bundles.Output(1, False, names='pedal output', ordinal=1)
        self[1][11] = bundles.Output(1, False, names='pedal output', ordinal=2)
        self[1][12] = bundles.Output(1, False, names='pedal output', ordinal=3)
        self[1][13] = bundles.Output(1, False, names='pedal output', ordinal=4)

        # key outputs
        self.koutput = bundles.Splitter(self.domain, self[1][1], self[1][2],
                                        self[1][3], self[1][4])
        self.kpoly = piw.polyctl(10, self.koutput.cookie(), False, 5)
        # breath
        self.boutput = bundles.Splitter(self.domain, self[1][5])
        # strips
        self.s1output = bundles.Splitter(self.domain, self[1][6], self[1][7])
        self.s2output = bundles.Splitter(self.domain, self[1][8], self[1][9])
        # pedals
        self.poutput1 = bundles.Splitter(self.domain, self[1][10])
        self.poutput2 = bundles.Splitter(self.domain, self[1][11])
        self.poutput3 = bundles.Splitter(self.domain, self[1][12])
        self.poutput4 = bundles.Splitter(self.domain, self[1][13])

        self[5] = bundles.Output(OUT_MIDI, False, names="midi output")
        self.midi_output = bundles.Splitter(self.domain, self[5])

        # now we need to set of outputs
        self.output = piw.sclone()
        self.output.set_filtered_output(OUT_KEY, self.kpoly.cookie(),
                                        piw.first_filter(OUT_KEY))
        self.output.set_filtered_output(OUT_STRIP_1, self.s1output.cookie(),
                                        piw.first_filter(OUT_STRIP_1))
        self.output.set_filtered_output(OUT_STRIP_2, self.s2output.cookie(),
                                        piw.first_filter(OUT_STRIP_2))
        self.output.set_filtered_output(OUT_BREATH, self.boutput.cookie(),
                                        piw.first_filter(OUT_BREATH))
        self.output.set_filtered_output(OUT_PEDAL_1, self.poutput1.cookie(),
                                        piw.first_filter(OUT_PEDAL_1))
        self.output.set_filtered_output(OUT_PEDAL_2, self.poutput2.cookie(),
                                        piw.first_filter(OUT_PEDAL_2))
        self.output.set_filtered_output(OUT_PEDAL_3, self.poutput3.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_PEDAL_4, self.poutput4.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_MIDI, self.midi_output.cookie(),
                                        piw.first_filter(OUT_MIDI))

        self.device = midi_device(self.domain, self.output.cookie())

        self[1][14] = atom.Atom(names='controller output',
                                domain=domain.Aniso(),
                                init=self.controllerinit())

        self.input = bundles.VectorInput(self.device.cookie(),
                                         self.domain,
                                         signals=(
                                             IN_MIDI,
                                             IN_LIGHT,
                                         ))
        self[2] = atom.Atom(domain=domain.Aniso(),
                            policy=self.input.vector_policy(IN_MIDI, False),
                            names="midi input")
        self[4] = atom.Atom(domain=domain.Aniso(),
                            protocols='revconnect',
                            policy=self.input.vector_policy(IN_LIGHT,
                                                            False,
                                                            clocked=False),
                            names="light input")

        #values required for push
        self.device.channel(1)
        self.device.velocity_sample(4)
        self.device.enable_notes(True)
        self.device.enable_velocity(True)
        self.device.enable_poly_at(PRESSURE, True)
        self.device.set_data_freq(0)
        self.device.enable_control_notes(True)
        self.device.set_colour(1, 87)  # green
        self.device.set_colour(2, 4)  # red
        self.device.set_colour(3, 124)  #orange
        self.device.set_pb_map(STRIP_1, True)
Пример #7
0
    def __init__(self, address, ordinal):
        agent.Agent.__init__(self, signature=version, names='kmapper', icon='plg_simple/kgroup.png',container=17,ordinal=ordinal)

        self.__cur_size = 0
        self.__choices=[]
        self.__coursekeys=[]
        self.__course=1

        self.__private = node.Server(value=piw.makestring('[]',0),change=self.__set_members)
        self.set_private(self.__private)

        self.domain = piw.clockdomain_ctl()
        self.domain.set_source(piw.makestring('*',0))

        self.mapper = piw.kgroup_mapper()

        self[1] = bundles.Output(1,False, names='light output',protocols='revconnect')

        self.loutput = bundles.Splitter(self.domain,self[1])
        self.lmapper = piw.clone(True)
        self.lmapper.set_filtered_output(1,self.loutput.cookie(),self.mapper.light_filter())
        self.lmux = piw.multiplexer(self.lmapper.cookie(),self.domain)

        self.linput = bundles.VectorInput(self.lmux.get_input(1),self.domain,signals=(1,))

        self[2] = atom.Atom(names='light input',protocols='revconnect',policy=self.linput.vector_policy(1,False,False),domain=domain.Aniso())

        self[3] = bundles.Output(1,False, names='strip position output',ordinal=1)
        self[4] = bundles.Output(2,False, names='strip position output',ordinal=2)
        self[5] = bundles.Output(3,False, names='breath output')

        self.soutput = bundles.Splitter(self.domain,self[3],self[4],self[5])
        self.sgate = piw.gate(self.soutput.cookie(),True)
        self.sinput = bundles.VectorInput(self.sgate.cookie(),self.domain,signals=(1,2,3))

        self[6] = atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.sinput.vector_policy(1,False),names='strip position input',ordinal=1)
        self[7] = atom.Atom(domain=domain.BoundedFloat(-1,1),policy=self.sinput.vector_policy(2,False),names='strip position input',ordinal=2)
        self[8] = atom.Atom(domain=domain.BoundedFloat(0,1),policy=self.sinput.vector_policy(3,False),names='breath input')

        self[9] = bundles.Output(1,False, names='activation output')
        self[10] = bundles.Output(2,False, names='pressure output')
        self[11] = bundles.Output(3,False, names='roll output')
        self[12] = bundles.Output(4,False, names='yaw output')

        self.koutput = bundles.Splitter(self.domain,self[9],self[10],self[11],self[12])
        self.kpoly = piw.polyctl(10,self.koutput.cookie(),False,5)

        self.kclone = piw.clone(True)
        self.kclone.set_policy(False)
        self.kinput = bundles.VectorInput(self.kclone.cookie(),self.domain,signals=(1,2,3,4),filter=self.mapper.key_filter())

        self[13] = atom.Atom(domain=domain.BoundedFloat(0,1), policy=self.kinput.vector_policy(1,False), names='activation input')
        self[14] = atom.Atom(domain=domain.BoundedFloat(0,1), policy=self.kinput.vector_policy(2,False), names='pressure input')
        self[15] = atom.Atom(domain=domain.BoundedFloat(-1,1), policy=self.kinput.vector_policy(3,False), names='roll input')
        self[16] = atom.Atom(domain=domain.BoundedFloat(-1,1), policy=self.kinput.vector_policy(4,False), names='yaw input')

        self.kclone.set_output(1,self.kpoly.cookie())

        #self.add_verb2(2,'choose([],None,role(None,[matches([k])]),option(from,[numeric,singular]))',self.__choose2)
        #self.add_verb2(3,'choose([],None,role(None,[mass([k])]))',self.__choose3)
        #self.add_verb2(4,'clear([],None)',self.__clear)
        #self.add_verb2(5,'add([],None,role(None,[mass([k])]))',self.__add)

        self.add_verb2(7,'choose([],None,role(None,[matches([k])]),option(as,[numeric]))',self.__choose)
        self.add_verb2(8,'set([],None,role(None,[tagged_ideal([~server,course],[offset])]),role(to,[mass([semitone])]))',callback=self.__set_course_semi)
        self.add_verb2(9,'set([],None,role(None,[tagged_ideal([~server,course],[offset])]),role(to,[mass([interval])]))',callback=self.__set_course_int)
        self.add_verb2(12,'clear([],None,option(None,[mass([course])]))',self.__kclear)
        self.add_verb2(13,'add([],None,role(None,[mass([k])]),option(to,[mass([course])]))',self.__kadd)
        self.add_verb2(14,'add([],None,role(None,[mass([k])]),role(to,[mass([k])]),option(as,[mass([course])]))',self.__radd)

        self[20] = VirtualKey(lambda: self.__cur_size)

        self.statusbuffer = piw.statusbuffer(self.lmux.gate_input(),2,self.lmux.get_input(2))
        self.selgate = piw.functor_backend(1,True)
        self.kclone.set_output(2,self.selgate.cookie())

        self.statusbuffer.enable(1)
        self.kclone.enable(1,True)
        self.sgate.enable(True)

        self.__upstream_size = 0
        self.__set_poly()
        self[21] = atom.Atom(domain=domain.Aniso(),policy=atom.default_policy(self.__upstream),names='controller input')

        self[22] = VirtualChannel()
        
        self[23] = bundles.Output(1,False, names='controller output', continuous=True)
        self.coutput = bundles.Splitter(self.domain,self[23])
        self.controller = Controller(self.coutput.cookie())
        self.__private[2]=self.controller.state()
        self.cgate = piw.gate(self.controller.cookie(),True)
        self.cinput = bundles.ScalarInput(self.cgate.cookie(),self.domain,signals=(1,))
        self[24] = atom.Atom(domain=domain.Aniso(), policy=self.cinput.nodefault_policy(1,False),names='controller input')
        self[25] = VirtualCourse(self.controller)
Пример #8
0
    def __init__(self, address, ordinal):
        self.domain = piw.clockdomain_ctl()
        agent.Agent.__init__(self, signature=version, names='recorder', protocols='bind',icon='plg_recorder/recorder.png',container=(3,'agent',atom.VerbContainer(clock_domain=self.domain)),ordinal=ordinal)

        self[2] = atom.Atom()
        self[2][1] = bundles.Output(1,False,names='activation output', protocols='')
        self[2][2] = bundles.Output(2,False,names='pressure output', protocols='')
        self[2][3] = bundles.Output(3,False,names='roll output', protocols='')
        self[2][4] = bundles.Output(4,False,names='yaw output', protocols='')
        self[2][5] = bundles.Output(1,False,names='auxilliary output', ordinal=1, protocols='')
        self[2][6] = bundles.Output(1,False,names='auxilliary output', ordinal=2, protocols='')
        self[2][7] = bundles.Output(1,False,names='auxilliary output', ordinal=3, protocols='')
        self[2][8] = bundles.Output(1,False,names='auxilliary output', ordinal=4, protocols='')
        self[2][9] = bundles.Output(1,False,names='auxilliary output', ordinal=5, protocols='')
        self[2][10] = bundles.Output(1,False,names='auxilliary output', ordinal=6, protocols='')
        self[2][11] = bundles.Output(1,False,names='auxilliary output', ordinal=7, protocols='')
        self[2][12] = bundles.Output(1,False,names='auxilliary output', ordinal=8, protocols='')
        self[2][13] = bundles.Output(1,False,names='auxilliary output', ordinal=9, protocols='')
        self[2][14] = bundles.Output(1,False,names='auxilliary output', ordinal=10, protocols='')

        self.output_data = bundles.Splitter(self.domain,self[2][1],self[2][2],self[2][3],self[2][4])
        self.output_aux1 = bundles.Splitter(self.domain,self[2][5])
        self.output_aux2 = bundles.Splitter(self.domain,self[2][6])
        self.output_aux3 = bundles.Splitter(self.domain,self[2][7])
        self.output_aux4 = bundles.Splitter(self.domain,self[2][8])
        self.output_aux5 = bundles.Splitter(self.domain,self[2][9])
        self.output_aux6 = bundles.Splitter(self.domain,self[2][10])
        self.output_aux7 = bundles.Splitter(self.domain,self[2][11])
        self.output_aux8 = bundles.Splitter(self.domain,self[2][12])
        self.output_aux9 = bundles.Splitter(self.domain,self[2][13])
        self.output_aux10 = bundles.Splitter(self.domain,self[2][14])

        self.poly_data = piw.polyctl(poly_data_initial,self.output_data.cookie(),False,poly_data_headroom)
        self.poly_aux1 = piw.polyctl(poly_aux_initial,self.output_aux1.cookie(),False,poly_aux_headroom)
        self.poly_aux2 = piw.polyctl(poly_aux_initial,self.output_aux2.cookie(),False,poly_aux_headroom)
        self.poly_aux3 = piw.polyctl(poly_aux_initial,self.output_aux3.cookie(),False,poly_aux_headroom)
        self.poly_aux4 = piw.polyctl(poly_aux_initial,self.output_aux4.cookie(),False,poly_aux_headroom)
        self.poly_aux5 = piw.polyctl(poly_aux_initial,self.output_aux5.cookie(),False,poly_aux_headroom)
        self.poly_aux6 = piw.polyctl(poly_aux_initial,self.output_aux6.cookie(),False,poly_aux_headroom)
        self.poly_aux7 = piw.polyctl(poly_aux_initial,self.output_aux7.cookie(),False,poly_aux_headroom)
        self.poly_aux8 = piw.polyctl(poly_aux_initial,self.output_aux8.cookie(),False,poly_aux_headroom)
        self.poly_aux9 = piw.polyctl(poly_aux_initial,self.output_aux9.cookie(),False,poly_aux_headroom)
        self.poly_aux10 = piw.polyctl(poly_aux_initial,self.output_aux10.cookie(),False,poly_aux_headroom)

        self.output_clone = piw.clone(True)
        self.output_clone.set_filtered_output(2,self.poly_data.cookie(),piw.grist_deaggregation_filter2(2,100))
        self.output_clone.set_filtered_output(3,self.poly_aux1.cookie(),piw.grist_deaggregation_filter(3))
        self.output_clone.set_filtered_output(4,self.poly_aux2.cookie(),piw.grist_deaggregation_filter(4))
        self.output_clone.set_filtered_output(5,self.poly_aux3.cookie(),piw.grist_deaggregation_filter(5))
        self.output_clone.set_filtered_output(6,self.poly_aux4.cookie(),piw.grist_deaggregation_filter(6))
        self.output_clone.set_filtered_output(7,self.poly_aux5.cookie(),piw.grist_deaggregation_filter(7))
        self.output_clone.set_filtered_output(8,self.poly_aux6.cookie(),piw.grist_deaggregation_filter(8))
        self.output_clone.set_filtered_output(9,self.poly_aux7.cookie(),piw.grist_deaggregation_filter(9))
        self.output_clone.set_filtered_output(10,self.poly_aux8.cookie(),piw.grist_deaggregation_filter(10))
        self.output_clone.set_filtered_output(11,self.poly_aux9.cookie(),piw.grist_deaggregation_filter(11))
        self.output_clone.set_filtered_output(12,self.poly_aux10.cookie(),piw.grist_deaggregation_filter(12))

        self.output_aggregator = piw.aggregator(self.output_clone.cookie(), self.domain)

        self.player = recorder_native.kplayer(self.domain, 16, 9, self.output_aggregator.get_output(2))
        self.recorder = Recorder(self.domain,9)

        self.input_clone = piw.clone(True)
        self.input_clone.set_output(1,self.output_aggregator.get_output(1))
        self.input_clone.set_output(2,self.player.cookie())
        self.input_clone.set_output(3,self.recorder.cookie())

        self.input_aggregator = piw.aggregator(self.input_clone.cookie(), self.domain)

        self.input_clock = bundles.ScalarInput(self.input_aggregator.get_filtered_output(1,piw.grist_aggregation_filter(1)), self.domain, signals=(1,2,3))
        self.input_clock.add_upstream(self.verb_container().clock)

        self.input_poly = piw.polyctl(10,self.input_aggregator.get_filtered_output(2,piw.grist_aggregation_filter(2)), False,5)
        self.input_data = bundles.VectorInput(self.input_poly.cookie(), self.domain, signals=(1,2,3,4))

        self.input_aux1 = bundles.VectorInput(self.input_aggregator.get_filtered_output(3,piw.grist_aggregation_filter(3)), self.domain, signals=(1,))
        self.input_aux2 = bundles.VectorInput(self.input_aggregator.get_filtered_output(4,piw.grist_aggregation_filter(4)), self.domain, signals=(1,))
        self.input_aux3 = bundles.VectorInput(self.input_aggregator.get_filtered_output(5,piw.grist_aggregation_filter(5)), self.domain, signals=(1,))
        self.input_aux4 = bundles.VectorInput(self.input_aggregator.get_filtered_output(6,piw.grist_aggregation_filter(6)), self.domain, signals=(1,))
        self.input_aux5 = bundles.VectorInput(self.input_aggregator.get_filtered_output(7,piw.grist_aggregation_filter(7)), self.domain, signals=(1,))
        self.input_aux6 = bundles.VectorInput(self.input_aggregator.get_filtered_output(8,piw.grist_aggregation_filter(8)), self.domain, signals=(1,))
        self.input_aux7 = bundles.VectorInput(self.input_aggregator.get_filtered_output(9,piw.grist_aggregation_filter(9)), self.domain, signals=(1,))
        self.input_aux8 = bundles.VectorInput(self.input_aggregator.get_filtered_output(10,piw.grist_aggregation_filter(10)), self.domain, signals=(1,))
        self.input_aux9 = bundles.VectorInput(self.input_aggregator.get_filtered_output(11,piw.grist_aggregation_filter(11)), self.domain, signals=(1,))
        self.input_aux10 = bundles.VectorInput(self.input_aggregator.get_filtered_output(12,piw.grist_aggregation_filter(12)), self.domain, signals=(1,))

        self.nplayer = recorder_native.nplayer(self.output_aggregator.get_filtered_output(3,piw.gristchaff_aggregation_filter(100,3)),16,2,self.domain)
        self.input_clock.add_upstream(self.nplayer.get_clock())

        self[1] = atom.Atom()

        self[1][1]=atom.Atom(domain=domain.BoundedFloat(0,1), policy=self.input_data.vector_policy(1,False),names='activation input')
        self[1][2]=atom.Atom(domain=domain.BoundedFloat(0,1), policy=self.input_data.vector_policy(2,False),names='pressure input')
        self[1][3]=atom.Atom(domain=domain.BoundedFloat(-1,1), policy=self.input_data.vector_policy(3,False),names='roll input')
        self[1][4]=atom.Atom(domain=domain.BoundedFloat(-1,1), policy=self.input_data.vector_policy(4,False),names='yaw input')

        self[1][5]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux1.vector_policy(1,False),names='auxilliary input', ordinal=1)
        self[1][6]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux2.vector_policy(1,False),names='auxilliary input', ordinal=2)
        self[1][7]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux3.vector_policy(1,False),names='auxilliary input', ordinal=3)
        self[1][8]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux4.vector_policy(1,False),names='auxilliary input', ordinal=4)
        self[1][9]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux5.vector_policy(1,False),names='auxilliary input', ordinal=5)
        self[1][10]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux6.vector_policy(1,False),names='auxilliary input', ordinal=6)
        self[1][11]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux7.vector_policy(1,False),names='auxilliary input', ordinal=7)
        self[1][12]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux8.vector_policy(1,False),names='auxilliary input', ordinal=8)
        self[1][13]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux9.vector_policy(1,False),names='auxilliary input', ordinal=9)
        self[1][14]=atom.Atom(domain=domain.Aniso(), policy=self.input_aux10.vector_policy(1,False),names='auxilliary input', ordinal=10)

        self[1][16]=atom.Atom(domain=domain.BoundedFloat(0,10000000), policy=self.input_clock.nodefault_policy(1,False),names='song beat input')
        self[1][17]=atom.Atom(domain=domain.BoundedFloat(0,100), policy=self.input_clock.nodefault_policy(2,False),names='bar beat input')
        self[1][18]=atom.Atom(domain=domain.Bool(), init=False, policy=self.input_clock.nodefault_policy(3,False),names='running input')

        c = dict(c=schedproxy.get_constraints(),
                 x='[ideal([~server,take]),singular]',
                 o='option(with,[or([[matches([stretch],stretch)],[matches([un,stretch],unstretch)],[matches([chop],chop)]])])'
            )

        a = dict(create_action=self.__create_deferred, destroy_action=self.__destroy_deferred,clock=True)

        self.add_verb2(1,'record([],None,role(None,[mass([bar])]),%(o)s)'%c,self.__record)
        self.add_verb2(2,'play([un],None,option(None,%(x)s))'%c,self.__unplay)
        self.add_verb2(3,'play([],None,role(None,%(x)s),%(o)s)'%c,callback=self.__play_now,**a)
        self.add_verb2(4,'play([],None,role(None,%(x)s),role(at,%(c)s),option(until,%(c)s),option(every,%(c)s),%(o)s)'%c,callback=self.__play_aue,**a)
        self.add_verb2(5,'play([],None,role(None,%(x)s),role(until,%(c)s),option(every,%(c)s),%(o)s)'%c,callback=self.__play_ue,**a)
        self.add_verb2(6,'play([],None,role(None,%(x)s),role(every,%(c)s),%(o)s)'%c,callback=self.__play_e,**a)
        self.add_verb2(7,'play([dont],None,option(None,%(x)s))'%c,self.__unplay)
        self.add_verb2(8,'repeat([],None,role(None,%(x)s),%(o)s)'%c,callback=self.__repeat,**a)
        self.add_verb2(9,'name([],None,role(None,[ideal([~server,take]),singular]),role(to,[abstract]))',self.__name)
        self.add_verb2(10,'copy([],None,role(None,[gideal(take),singular]))',callback=self.__copy)
        self.add_verb2(11,'use([],None,role(None,[concrete,proto(scheduler),singular]))',callback=self.__usesched)
        self.add_verb2(12,'delete([],None,role(None,[ideal([~server,take]),singular]))',self.__delete)
        self.add_verb2(13,'play([],None,role(None,[mass([note])]),role(with,[mass([velocity])]))',create_action=self.__playnv,clock=True)
        self.add_verb2(14,'play([],None,role(None,[mass([note])]),role(with,[mass([velocity])]),role(for,[mass([second])]))',create_action=self.__playnvl,clock=True)

        self.add_verb2(15,'play([toggle],None,role(None,%(x)s),%(o)s)'%c,callback=self.__tog_play_now,**a)
        self.add_verb2(16,'play([toggle],None,role(None,%(x)s),role(at,%(c)s),option(until,%(c)s),option(every,%(c)s),%(o)s)'%c,callback=self.__tog_play_aue,**a)
        self.add_verb2(17,'play([toggle],None,role(None,%(x)s),role(until,%(c)s),option(every,%(c)s),%(o)s)'%c,callback=self.__tog_play_ue,**a)
        self.add_verb2(18,'play([toggle],None,role(None,%(x)s),role(every,%(c)s),%(o)s)'%c,callback=self.__tog_play_e,**a)
        self.add_verb2(19,'repeat([toggle],None,role(None,%(x)s),%(o)s)'%c,callback=self.__tog_repeat,**a)

        self.add_verb2(20,'cancel([],None)',self.__cancel)

        self[4] = TakeBrowser(self)
        self.library = TakeLibrary(self)

        self.__scheduler = schedproxy.SchedProxy(delegate=self)
        self.set_private(node.server(value=piw.makestring('',0),change=self.__schedchange))

        self.__schedready = False

        self[5] = Voice(self)

        # don't use self[6], it was previously used by a legacy status output that was removed in 1.2

        self[7]=toggle.Toggle(None,self.domain,container=(None,'overdub',self.verb_container()),init=False,names='overdub',transient=True)
Пример #9
0
    def __init__(self, address, ordinal):
        #
        agent.Agent.__init__(self,
                             signature=version,
                             names='continuum',
                             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(1, False, names='key output')
        self[1][2] = bundles.Output(2, False, names='pressure output')
        self[1][3] = bundles.Output(3, False, names='roll output')
        self[1][4] = bundles.Output(4, False, names='yaw output')

        self[1][5] = bundles.Output(1, False, names='breath output')

        self[1][6] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=1)
        self[1][7] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=1)
        self[1][8] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=2)
        self[1][9] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=2)

        self[1][10] = bundles.Output(1, False, names='pedal output', ordinal=1)
        self[1][11] = bundles.Output(1, False, names='pedal output', ordinal=2)
        self[1][12] = bundles.Output(1, False, names='pedal output', ordinal=3)
        self[1][13] = bundles.Output(1, False, names='pedal output', ordinal=4)

        # key outputs
        self.koutput = bundles.Splitter(self.domain, self[1][1], self[1][2],
                                        self[1][3], self[1][4])
        self.kpoly = piw.polyctl(10, self.koutput.cookie(), False, 5)
        # breath
        self.boutput = bundles.Splitter(self.domain, self[1][5])
        # strips
        self.s1output = bundles.Splitter(self.domain, self[1][6], self[1][7])
        self.s2output = bundles.Splitter(self.domain, self[1][8], self[1][9])
        # pedals
        self.poutput1 = bundles.Splitter(self.domain, self[1][10])
        self.poutput2 = bundles.Splitter(self.domain, self[1][11])
        self.poutput3 = bundles.Splitter(self.domain, self[1][12])
        self.poutput4 = bundles.Splitter(self.domain, self[1][13])

        self[5] = bundles.Output(OUT_MIDI, False, names="midi output")
        self.midi_output = bundles.Splitter(self.domain, self[5])

        # now we need to set of outputs
        self.output = piw.sclone()
        self.output.set_filtered_output(OUT_KEY, self.kpoly.cookie(),
                                        piw.first_filter(OUT_KEY))
        self.output.set_filtered_output(OUT_STRIP_1, self.s1output.cookie(),
                                        piw.first_filter(OUT_STRIP_1))
        self.output.set_filtered_output(OUT_STRIP_2, self.s2output.cookie(),
                                        piw.first_filter(OUT_STRIP_2))
        self.output.set_filtered_output(OUT_BREATH, self.boutput.cookie(),
                                        piw.first_filter(OUT_BREATH))
        self.output.set_filtered_output(OUT_PEDAL_1, self.poutput1.cookie(),
                                        piw.first_filter(OUT_PEDAL_1))
        self.output.set_filtered_output(OUT_PEDAL_2, self.poutput2.cookie(),
                                        piw.first_filter(OUT_PEDAL_2))
        self.output.set_filtered_output(OUT_PEDAL_3, self.poutput3.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_PEDAL_4, self.poutput4.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_MIDI, self.midi_output.cookie(),
                                        piw.first_filter(OUT_MIDI))

        self.device = midi_device(self.domain, self.output.cookie())

        self[1][14] = atom.Atom(names='controller output',
                                domain=domain.Aniso(),
                                init=self.controllerinit())

        self.input = bundles.VectorInput(self.device.cookie(),
                                         self.domain,
                                         signals=(IN_MIDI, ))
        self[2] = atom.Atom(domain=domain.Aniso(),
                            policy=self.input.vector_policy(IN_MIDI, False),
                            names="midi input")

        self[3] = atom.Atom(names="inputs")
        self[3][1] = atom.Atom(domain=domain.BoundedInt(0, 16),
                               init=0,
                               policy=atom.default_policy(self.__channel),
                               names='midi channel')

        self.device.set_data_freq(500)
        self.device.enable_notes(True)
        self.device.enable_velocity(True)
        self.device.velocity_sample(
            0
        )  #? Id have thought this should be >1, but perhaps we were using pressure only
        self.device.set_pb_map(ROLL, True)
        self.device.set_hires_pb_map(ROLL, 85)

        self.device.enable_hires_cc(True)
        self.device.enable_chan_at(PRESSURE, False)
        self.device.enable_poly_at(PRESSURE, False)

        self.device.set_cc_map(PRESSURE, 11)
        self.device.set_hires_cc_map(PRESSURE, 86)
        self.device.set_cc_map(ROLL, -1)
        self.device.set_hires_cc_map(ROLL, -1)
        self.device.set_cc_map(YAW, 74)
        self.device.set_hires_cc_map(YAW, 87)
        self.device.set_cc_map(STRIP_1, 1)
        self.device.set_cc_map(STRIP_2, 6)
        self.device.set_cc_map(PEDAL_1, -1)
        self.device.set_cc_map(PEDAL_2, -1)
        self.device.set_cc_map(PEDAL_3, -1)
        self.device.set_cc_map(PEDAL_4, -1)
Пример #10
0
    def __init__(self, address, ordinal):
        #
        agent.Agent.__init__(self,
                             signature=version,
                             names='midi device',
                             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(1, False, names='key output')
        self[1][2] = bundles.Output(2, False, names='pressure output')
        self[1][3] = bundles.Output(3, False, names='roll output')
        self[1][4] = bundles.Output(4, False, names='yaw output')

        self[1][5] = bundles.Output(1, False, names='breath output')

        self[1][6] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=1)
        self[1][7] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=1)
        self[1][8] = bundles.Output(1,
                                    False,
                                    names='strip position output',
                                    ordinal=2)
        self[1][9] = bundles.Output(2,
                                    False,
                                    names='absolute strip output',
                                    ordinal=2)

        self[1][10] = bundles.Output(1, False, names='pedal output', ordinal=1)
        self[1][11] = bundles.Output(1, False, names='pedal output', ordinal=2)
        self[1][12] = bundles.Output(1, False, names='pedal output', ordinal=3)
        self[1][13] = bundles.Output(1, False, names='pedal output', ordinal=4)

        # key outputs
        self.koutput = bundles.Splitter(self.domain, self[1][1], self[1][2],
                                        self[1][3], self[1][4])
        self.kpoly = piw.polyctl(10, self.koutput.cookie(), False, 5)
        # breath
        self.boutput = bundles.Splitter(self.domain, self[1][5])
        # strips
        self.s1output = bundles.Splitter(self.domain, self[1][6], self[1][7])
        self.s2output = bundles.Splitter(self.domain, self[1][8], self[1][9])
        # pedals
        self.poutput1 = bundles.Splitter(self.domain, self[1][10])
        self.poutput2 = bundles.Splitter(self.domain, self[1][11])
        self.poutput3 = bundles.Splitter(self.domain, self[1][12])
        self.poutput4 = bundles.Splitter(self.domain, self[1][13])

        self[5] = bundles.Output(OUT_MIDI, False, names="midi output")
        self.midi_output = bundles.Splitter(self.domain, self[5])

        # now we need to set of outputs
        self.output = piw.sclone()
        self.output.set_filtered_output(OUT_KEY, self.kpoly.cookie(),
                                        piw.first_filter(OUT_KEY))
        self.output.set_filtered_output(OUT_STRIP_1, self.s1output.cookie(),
                                        piw.first_filter(OUT_STRIP_1))
        self.output.set_filtered_output(OUT_STRIP_2, self.s2output.cookie(),
                                        piw.first_filter(OUT_STRIP_2))
        self.output.set_filtered_output(OUT_BREATH, self.boutput.cookie(),
                                        piw.first_filter(OUT_BREATH))
        self.output.set_filtered_output(OUT_PEDAL_1, self.poutput1.cookie(),
                                        piw.first_filter(OUT_PEDAL_1))
        self.output.set_filtered_output(OUT_PEDAL_2, self.poutput2.cookie(),
                                        piw.first_filter(OUT_PEDAL_2))
        self.output.set_filtered_output(OUT_PEDAL_3, self.poutput3.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_PEDAL_4, self.poutput4.cookie(),
                                        piw.first_filter(OUT_PEDAL_4))
        self.output.set_filtered_output(OUT_MIDI, self.midi_output.cookie(),
                                        piw.first_filter(OUT_MIDI))

        self.device = midi_device(self.domain, self.output.cookie())

        self[1][14] = atom.Atom(names='controller output',
                                domain=domain.Aniso(),
                                init=self.controllerinit())

        self.input = bundles.VectorInput(self.device.cookie(),
                                         self.domain,
                                         signals=(
                                             IN_MIDI,
                                             IN_LIGHT,
                                         ))
        self[2] = atom.Atom(domain=domain.Aniso(),
                            policy=self.input.vector_policy(IN_MIDI, False),
                            names="midi input")
        self[4] = atom.Atom(domain=domain.Aniso(),
                            protocols='revconnect',
                            policy=self.input.vector_policy(IN_LIGHT,
                                                            False,
                                                            clocked=False),
                            names="light input")

        self[3] = atom.Atom(names="inputs")
        self[3][1] = atom.Atom(domain=domain.BoundedInt(0, 16),
                               init=0,
                               policy=atom.default_policy(self.__channel),
                               names='midi channel')
        self[3][2] = atom.Atom(domain=domain.BoundedInt(0, 64),
                               init=4,
                               policy=atom.default_policy(
                                   self.__velocity_sample),
                               names='velocity sample')
        self[3][3] = atom.Atom(domain=domain.Bool(),
                               init=True,
                               policy=atom.default_policy(self.__enable_notes),
                               names='notes enable')
        self[3][4] = atom.Atom(domain=domain.Bool(),
                               init=True,
                               policy=atom.default_policy(
                                   self.__enable_velocity),
                               names='notes velocity enable')
        self[3][5] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                               init=-1,
                               policy=atom.default_policy(self.__set_note_cc),
                               names='note control')
        self[3][6] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                               init=-1,
                               policy=atom.default_policy(
                                   self.__set_note_cc_pressure),
                               names='note pressure control')
        # here we are just setting up some common ones to start with, and reasonable defaults
        self[3][7] = atom.Atom(domain=domain.Bool(),
                               init=True,
                               policy=atom.default_policy(
                                   self.__enable_pb_roll),
                               names='pitch bend roll enable')
        self[3][8] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                               init=-1,
                               policy=atom.default_policy(
                                   self.__set_yaw_control),
                               names='yaw control')
        self[3][9] = atom.Atom(domain=domain.Bool(),
                               init=False,
                               policy=atom.default_policy(
                                   self.__set_chan_at_cc),
                               names='channel pressure')
        self[3][10] = atom.Atom(domain=domain.Bool(),
                                init=False,
                                policy=atom.default_policy(
                                    self.__set_poly_at_cc),
                                names='polyphonic pressure')
        self[3][11] = atom.Atom(domain=domain.Bool(),
                                init=False,
                                policy=atom.default_policy(
                                    self.__set_hires_cc),
                                names='high resolution control')

        self[3][12] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=2,
                                policy=atom.default_policy(
                                    self.__set_breath_control),
                                names='breath control')
        self[3][13] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__set_breath_release),
                                names='breath release')
        self[3][14] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__set_breath_bipolar),
                                names='breath bipolar')
        self[3][15] = atom.Atom(domain=domain.Bool(),
                                init=False,
                                policy=atom.default_policy(
                                    self.__set_breath_relative),
                                names='breath relative')
        self[3][16] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=1,
                                policy=atom.default_policy(
                                    self.__set_strip_1_control),
                                names='strip 1 control')
        self[3][17] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__set_strip_1_release),
                                names='strip 1 release')
        self[3][18] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__set_strip_1_bipolar),
                                names='strip 1 bipolar')
        # self[3][19]  = atom.Atom(domain=domain.Bool(),init=False,policy=atom.default_policy(self.__set_strip_1_relative),names='strip 1 relative')
        self[3][20] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_strip_2_control),
                                names='strip 2 control')
        self[3][21] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__set_strip_2_release),
                                names='strip 2 release')
        self[3][22] = atom.Atom(domain=domain.Bool(),
                                init=False,
                                policy=atom.default_policy(
                                    self.__set_strip_2_bipolar),
                                names='strip 2 bipolar')
        # self[3][23]  = atom.Atom(domain=domain.Bool(),init=True,policy=atom.default_policy(self.__set_strip_2_relative),names='strip 1 relative')

        self[3][24] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_roll_control),
                                names='roll control')
        self[3][25] = atom.Atom(domain=domain.BoundedInt(0, 5000),
                                init=0,
                                policy=atom.default_policy(
                                    self.__set_data_freq),
                                names='data frequency')
        self[3][26] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_pressure_control),
                                names='pressure control')

        self[3][27] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_hires_pressure_control),
                                names='pressure high control')
        self[3][28] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_hires_roll_control),
                                names='roll high control')
        self[3][29] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_hires_yaw_control),
                                names='yaw high control')
        self[3][30] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_hires_pb_control),
                                names='pitch bend high control')

        self[3][31] = atom.Atom(domain=domain.Bool(),
                                init=False,
                                policy=atom.default_policy(
                                    self.__enable_control_notes),
                                names='notes control enable')
        self[3][32] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_pedal_1_control),
                                names='pedal 1 control')
        self[3][33] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_pedal_2_control),
                                names='pedal 2 control')
        self[3][34] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_pedal_3_control),
                                names='pedal 3 control')
        self[3][35] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=-1,
                                policy=atom.default_policy(
                                    self.__set_pedal_4_control),
                                names='pedal 4 control')

        self[3][36] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=0,
                                policy=atom.default_policy(
                                    self.__set_off_colour),
                                names='off colour')
        self[3][37] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=4,
                                policy=atom.default_policy(
                                    self.__set_red_colour),
                                names='red colour')
        self[3][38] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=124,
                                policy=atom.default_policy(
                                    self.__set_orange_colour),
                                names='orange colour')
        self[3][39] = atom.Atom(domain=domain.BoundedInt(-1, 127),
                                init=87,
                                policy=atom.default_policy(
                                    self.__set_green_colour),
                                names='green colour')
        self[3][40] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__enable_pb_strip_1),
                                names='pitch bend strip 1 enable')
        self[3][41] = atom.Atom(domain=domain.Bool(),
                                init=True,
                                policy=atom.default_policy(
                                    self.__enable_pb_strip_2),
                                names='pitch bend strip 2 enable')