pysynth/seq.py
def _resolve_name(self, name):

        """
        Takes the given name and resolves it.

        If the name exists and is valid,
        then we simply return it.

        If the name is None,
        then we return the first name registered.

        If the name is invalid and does not exist,
        then we raise an exception.

        :param name: Name to be found
        :type name: str
        :return: Resolved name
        :rtype: str
        """

        # Determine if the synth is None:

        if name is None:

            # Simply return the first name:

            return list(self._synths.keys())[0]

        # Determine if name does not exist:

        if name not in self._synths.keys():

            # Raise an exception!

            raise Exception("Name not valid!")

        # Otherwise, return the name as usual:

        return name

        Takes the given name and resolves it.

        If the name exists and is valid,
        then we simply return it.

        If the name is None,
        then we return the first name registered.

        If the name is invalid and does not exist,
        then we raise an exception.

        :param name: Name to be found
        :type name: str
        :return: Resolved name
        :rtype: str
        
Takes the given name and resolves it.
If the name exists and is valid,
then we simply return it.

If the name is None,
then we return the first name registered.

If the name is invalid and does not exist,
then we raise an exception.
Takes the given name and resolves it . If the name exists and is valid then we simply return it . If the name is None then we return the first name registered . If the name is invalid and does not exist then we raise an exception .
def _resolve_name(self, name):
        if name is None:
            return list(self._synths.keys())[0]
        if name not in self._synths.keys():
            raise Exception("Name not valid!")
        return name
def _resolve_name ( self , name ) : if name is None : return list ( self . _synths . keys ( ) ) [ 0 ] if name not in self . _synths . keys ( ) : raise Exception ( "Name not valid!" ) return name
Takes the given name and resolves it.
Takes the given name and resolves it .
"""
        Takes the given name and resolves it.

        If the name exists and is valid,
        then we simply return it.

        If the name is None,
        then we return the first name registered.

        If the name is invalid and does not exist,
        then we raise an exception.

        :param name: Name to be found
        :type name: str
        :return: Resolved name
        :rtype: str
        """ # Determine if the synth is None: # Simply return the first name: # Determine if name does not exist: # Raise an exception! # Otherwise, return the name as usual:
None
str
self
name
Name to be found
Name to be found