var AudioletParameter = new Class({
    initialize: function(node, inputIndex, value) {
        this.node = node;
        if (typeof inputIndex != 'undefined' && inputIndex != null) {
            this.input = node.inputs[inputIndex];
        }
        else {
            this.input = null;
        }
        this.value = value || 0;
    },

    isStatic: function() {
        var input = this.input;
        return (!(input &&
                  input.connectedFrom.length &&
                  !(input.buffer.isEmpty)));
    },

    isDynamic: function() {
        var input = this.input;
        return (input && input.connectedFrom.length && !(input.buffer.isEmpty));
    },

    setValue: function(value) {
        this.value = value;
    },

    getValue: function() {
        return this.value;
    },

    getChannel: function() {
        return this.input.buffer.channels[0];
    }
});

var AudioletParameter = new Class({
    initialize: function(node, inputIndex, value) {
        this.node = node;
        if (typeof inputIndex != 'undefined' && inputIndex != null) {
            this.input = node.inputs[inputIndex];
        }
        else {
            this.input = null;
        }
        this.value = value || 0;
    },

    isStatic: function() {
        var input = this.input;
        return (input == null ||
                input.connectedFrom.length == 0 ||
                input.buffer.isEmpty);
    },

    isDynamic: function() {
        var input = this.input;
        return (input != null &&
                input.connectedFrom.length > 0 &&
                !input.buffer.isEmpty);
    },

    setValue: function(value) {
        this.value = value;
    },

    getValue: function() {
        return this.value;
    },

    getChannel: function() {
        return this.input.buffer.channels[0];
    }
});

Simplify isStatic and isDynamic logic, and make sure they return boolean values
Simplify isStatic and isDynamic logic, and make sure they return boolean values
