Exemple #1
0
    def disconnect(self, connection):
        """
        Disconnect two effect audio ports

        :param pluginsmanager.model.connection.Connection connection: Connection with the two effect audio ports (output and input)
        """
        self.connection.send(ProtocolParser.disconnect(connection))
    def test_disconnect(self):
        effect1_instance = 3
        effect2_instance = 4

        reverb1 = self.builder.build('http://calf.sourceforge.net/plugins/Reverb')
        reverb2 = self.builder.build('http://calf.sourceforge.net/plugins/Reverb')
        reverb1.instance = effect1_instance
        reverb2.instance = effect2_instance

        output = reverb1.outputs[0]
        input = reverb2.inputs[0]
        connection = Connection(output, input)

        correct_message = 'disconnect effect_{}:{} effect_{}:{}'.format(
            reverb1.instance,
            output.symbol,
            reverb2.instance,
            input.symbol
        )

        self.assertEqual(correct_message, ProtocolParser.disconnect(connection))