Class FactorOracleTop

    • Constructor Detail

      • FactorOracleTop

        public FactorOracleTop​(CompositeEntity container,
                               java.lang.String name)
                        throws IllegalActionException,
                               NameDuplicationException
        Construct a modal controller with a name and a container. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
      • FactorOracleTop

        public FactorOracleTop​(CompositeEntity container,
                               java.lang.String name,
                               java.lang.Object[] trainingSequence,
                               double repetitionFactor,
                               boolean pitch,
                               boolean validate)
                        throws NameDuplicationException,
                               IllegalActionException
        Constructs a FactorOracleTop object.
        Parameters:
        container - The container.
        name - Name of this actor.
        trainingSequence - The training sequence as an Object array.
        repetitionFactor - a double indicating the repetition factor on the forward links.
        pitch - a boolean -- true if music pitch specifications are being used.
        validate - a boolean -- true if pitches are subject to validation.
        Throws:
        NameDuplicationException - ...
        IllegalActionException - ...
      • FactorOracleTop

        public FactorOracleTop​(Workspace workspace,
                               java.lang.Object[] trainingSequence,
                               double repetitionFactor,
                               boolean pitch,
                               boolean validate)
                        throws NameDuplicationException,
                               IllegalActionException
        Constructs a FactorOracleTop object.
        Parameters:
        workspace - The workspace.
        trainingSequence - The training sequence as an Object array.
        repetitionFactor - a double indicating the repetition factor on the forward links.
        pitch - a boolean -- true if music pitch specifications are being used.
        validate - a boolean -- true if pitches are subject to validation.
        Throws:
        NameDuplicationException - ...
        IllegalActionException - ...
    • Method Detail

      • setController

        public void setController​(FactorOracle f)
        Specify the controller.
        Parameters:
        f - The controller
      • _createController

        protected FactorOracle _createController​(java.lang.Object[] trainingSequence,
                                                 double repetitionFactor,
                                                 boolean pitch,
                                                 boolean validate)
                                          throws IllegalActionException,
                                                 NameDuplicationException
        Create a Factor Oracle to be used within the hierarchical FO that is used for generation of improvised jazz "licks".
        Parameters:
        trainingSequence - the training sequence
        repetitionFactor - the repetition factor on the forward links
        pitch - boolean indicating a pitch oracle
        validate - boolean indicating whether the pitches should be validated
        Returns:
        A controller to be used in the top level hierarchical FO
        Throws:
        IllegalActionException - If the modal model is incompatible with the controller.
        NameDuplicationException - If the name of the controller collides with a name already in the container.
      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Override the base class to ensure that the _controller private variable is reset to the controller of the cloned object.
        Overrides:
        clone in class ModalModel
        Parameters:
        workspace - The workspace for the cloned object.
        Returns:
        The new Entity.
        Throws:
        java.lang.CloneNotSupportedException - If cloned ports cannot have as their container the cloned entity (this should not occur), or if one of the attributes cannot be cloned.
        See Also:
        NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)