1

kivy 1.9.0

from kivy.app import App

from kivy.uix.floatlayout import FloatLayout

from kivy.uix.boxlayout import BoxLayout

from kivy.uix.button import Button

from kivy.uix.gridlayout import GridLayout

from kivy.uix.widget import Widget

from kivy.lang import Builder

from simpleOSC import initOSCClient, initOSCServer, closeOSC, \ setOSCHandler, sendOSCMsg

class OscShowcase(BoxLayout):

pass

class TestOscApp(App):

def build(self):
    return OscShowcase()

def send_Osc(self, *l):
    #pass
    sendOSCMsg('activate', [3.0])

if name == 'main':

host = '127.0.0.1'
sport = 9000
rport = 9001
# osc
initOSCClient(host, sport)
initOSCServer(host, rport)
TestOscApp().run()

.kv file below

<OscShowcase>:

BoxLayout:

    Widget:

        Button:

            text: 'OSC'
            pos: (500, 400)
            on_press: app.send_Osc()

Do you think I can edit the OSC messages directly in the kv.file in order to separate every button with its assigned osc message?

0 Answers0