Exemplo n.º 1
0
    def __init__(self, connector):
        Sampler.__init__(self, connector)
        self.setup_tools()

        self.sysextools.enable_msg_notification(False)
        self.sysextools.enable_item_sync(False)
        
        self.setup_model()
Exemplo n.º 2
0
    def __init__(self, connector):
        Sampler.__init__(self, connector)
        self.setup_tools()

        self.sysextools.enable_msg_notification(False)
        self.sysextools.enable_item_sync(False)

        self.setup_model()
Exemplo n.º 3
0
def collect_files(args):
    collected = []
    for f in args:
        if os.path.isfile(f):
            if Sampler.is_filetype_supported(f):
                collected.append(f)
        elif os.path.isdir(f):
            collected.extend(collect_dir(f))
        else:
            raise IOError("File not found: " + repr(f))
    return collected
Exemplo n.º 4
0
def collect_files(args):
    collected = []
    for f in args:
        if os.path.isfile(f):
            if Sampler.is_filetype_supported(f):
                collected.append(f)
        elif os.path.isdir(f):
            collected.extend(collect_dir(f))
        else:
            raise IOError("File not found: " + repr(f))
    return collected
Exemplo n.º 5
0
    def __init__(self, connector, debug=1): 
        # TODO: enable call to super class c'tor
        Sampler.__init__(self, connector)
        self.connector = connector
        self.debug = debug
        self.setup_tools()

        self._patch_disktools_get_disklist()
        
        self._patch_systemtools()
        
        self.programtools.get_handles_names = lambda : (1, 'program', 2, 'program 2')
        self.songtools.get_handles_names = lambda : (1, 'song',)
        self.multitools.get_handles_names = lambda : (1, 'multi', 2, 'multi 2')
        self.sampletools.get_handles_names = lambda : (1, 'sample', 2, 'sample 2')
        self.recordingtools.get_name = lambda : 'sample'
        
        self.setup_model()

        self._populate_fs()

        self._patch_rootdisk_getdir()
Exemplo n.º 6
0
def collect_dir(args):
    for root, dir, files in os.walk(args):
        for found in files:
            if Sampler.is_filetype_supported(found):
                yield os.path.join(root, found)
Exemplo n.º 7
0
def collect_dir(args):
    for root, dir, files in os.walk(args):
        for found in files:
            if Sampler.is_filetype_supported(found):
                yield os.path.join(root, found)