Example #1
0
    def add(self, effect):
        """
        Add an LV2 plugin encapsulated as a jack client

        :param Lv2Effect effect: Effect that will be loaded as LV2 plugin encapsulated
        """
        effect.instance = self.instance_index
        self.instance_index += 1

        self.connection.send(ProtocolParser.add(effect))
    def test_add(self):
        effect_uri = 'http://calf.sourceforge.net/plugins/Reverb'
        effect_instance = 3

        reverb = self.builder.build(effect_uri)
        reverb.instance = effect_instance

        message = ProtocolParser.add(reverb)

        correct_message = "add {} {}".format(effect_uri, effect_instance)
        self.assertEqual(correct_message, message)