示例#1
0
文件: echo.py 项目: MattMoony/figaro
 def parse_args(cls, args: List[str]) -> List[Any]:
     args = [a.strip() for a in args if a.strip()]
     if len(args) < 2:
         raise Exception('Missing parameters <scale> <pause> ... ')
     scale = parse_perc(args[0])
     pause = float(args[1])
     return [scale, pause,]
示例#2
0
文件: volume.py 项目: hobbit19/figaro
def start(args: List[str]) -> Volume:
    """Accepts a list of command line arguments and returns the volume filter created from those arguments"""
    args = [a.strip() for a in args if a.strip()]
    if not args:
        raise Exception('Missing parameter <factor> ... ')
    n = args[0].strip()
    return Volume(parse_perc(n))
示例#3
0
def start(args: List[str]) -> Trip:
    """Accepts a list of command line arguments and returns the trippy filter created from those arguments"""
    args = [a.strip() for a in args if a.strip()]
    if not args:
        raise Exception('Missing parameter <scale> ... ')
    n = args[0].strip()
    return Trip(parse_perc(n))
示例#4
0
文件: pitch.py 项目: MattMoony/figaro
 def parse_args(cls, args: List[str]) -> List[Any]:
     args = [a.strip() for a in args if a.strip()]
     if not args:
         raise Exception('Missing parameter <factor> ... ')
     return [
         parse_perc(args[0].strip()),
     ]
示例#5
0
def start(args: List[str]) -> Echo:
    """Accepts a list of command line arguments and returns an echo filter created from those arguments"""
    args = [a.strip() for a in args if a.strip()]
    if len(args) < 2:
        raise Exception('Missing parameters <scale> <pause> ... ')
    scale = parse_perc(args[0])
    pause = float(args[1])
    return Echo(scale, pause)
示例#6
0
def start(args: List[str]) -> Noise:
    """Accepts a list of command line arguments and returns the noise filter created from those arguments"""
    args = [a.strip() for a in args if a.strip()]
    if not args:
        raise Exception('Missing parameter <amplitude> ... ')
    return Noise(parse_perc(args[0]))