# HG changeset patch # User Emmanouil Theofanis Chourdakis # Date 1506689184 -3600 # Node ID 6352dffb2d5b1f426c4b900f4662e1449fa27653 # Parent 42f325cb495de8d57c43a2e629b1e5447c64d013 added minimal usage arguments diff -r 42f325cb495d -r 6352dffb2d5b simscene.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/simscene.py Fri Sep 29 13:46:24 2017 +0100 @@ -0,0 +1,59 @@ +#!/bin/python +# -*- coding: utf-8 -*- +# For licensing please see: LICENSE +# Copyright (c) Emmanouil Theofanis Chourdakis +import argparse + + +def run_demo(): + print("TODO: Implement run_demo()") + +def simscene(input_path, + output_path, + scene_duration, + score_events, + score_backgrounds, + **kwargs): + print("TODO: Implement simscene()") + + + +if __name__=="__main__": + argparser = argparse.ArgumentParser( + description="SimScene.py audio scene generator", + ) + argparser.add_argument( + '--demo', + help="runs a scene generation demo", + action='store_true', + ) + argparser.add_argument( + 'input_path', + type=str, + help="Path of a directory containing wave files for sound backgrounds (in the `background' sub-directory) or events (in `event')" + ) + argparser.add_argument( + 'scene_duration', + type=float, + help="Duration of scene in seconds", + ) + argparser.add_argument( + 'score_events', + type=str, + help="Score events file as a comma-separated text file (.csv, .txt), JSON (.json), or Excel (.xls) file" + ) + argparser.add_argument( + 'score_backgrounds', + type=str, + help="Score backgrounds file as a comma-separated text file (.csv, .txt), JSON (.json), or Excel (.xls) file" + ) + + args = argparser.parse_args() + if args.demo: + run_demo() + elif args.input_path: + print(args.input_path) + else: + argparser.print_usage() + +