Exemple #1
0
    def build(self):
        logo_pd = Image(source='pd.png', 
                        allow_stretch=True,)
        logo_kivy = Image(source='kivy.png', 
                          allow_stretch=True,)
        label = Label(text="kivy+pd://bloopy.pd",
                      font_size=30)
                          
        self.widget = StackLayout()
        self.widget.add_widget(logo_pd)
        self.widget.add_widget(label)
        self.widget.add_widget(logo_kivy)
        self.stream = AudioStream(channels=CHANNELS, buffersize=BUFSIZE, rate=SAMPLERATE)
        self.source = PatchSource(self.stream, 'bloopy.pd')
        self.source.start()

        return self.widget
Exemple #2
0
    def build(self):
        logo_pd = Image(
            source='pd.png',
            allow_stretch=True,
        )
        logo_kivy = Image(
            source='kivy.png',
            allow_stretch=True,
        )
        label = Label(text="kivy+pd://funpad.pd", font_size=30)

        self.widget = TouchableStack(self)
        self.widget.add_widget(logo_pd)
        self.widget.add_widget(label)
        self.widget.add_widget(logo_kivy)
        self.stream = get_output(channels=CHANNELS,
                                 buffersize=BUFSIZE,
                                 rate=SAMPLERATE)
        self.source = PatchSource(self.stream, 'funpad.pd')
        self.source.start()

        return self.widget