iffirstRun:#in case of re-scan we don't need to do this a second time. The default lib cannot be updated through the download manager and will always be present.
logger.info(f"Loading Default Instrument Library from {defaultLibraryPath}. This message must only appear once in the log.")
defaultLib=Library(parentData=self,tarFilePath=defaultLibraryPath)#If this fails we let the program crash. The default samples must exist and be accessible.
self.libraries[defaultLib.id]=defaultLib
@ -111,8 +111,8 @@ class Data(TemplateData):
checkForDuplicateLibraryFiles=set()#lib ids. only one lib with the same id is allowed.
forfinbasePath.glob('*.tar'):
iff.is_file()andf.suffix==".tar":
forfinbasePath.glob('*.tembro'):
iff.is_file()andf.suffix==".tembro":
#First load the library (this is .ini parsing, not sample loading, so it is cheap) and create a library object
#TODO: Is this still valid with the guaranteed 000 - Default.tar?
#TODO: Is this still valid with the guaranteed 000 - Default.tembro?
logger.error("There were no sample libraries to parse! This is correct on an empty run, since you still need to choose a sample directory.")
self.instrumentMidiNoteOnActivity=instrumentMidiNoteOnActivity# the api will inject a callback function here which takes (libId, instrId) as parameter to indicate midi noteOn activity for non-critical information like a GUI LED blinking or checking for new keyswitch states. The instruments individiual midiprocessor will call this as a parent-call.
@ -199,7 +199,7 @@ class Data(TemplateData):
self.auditioner=Auditioner(self)
defexportMetadata(self)->dict:
"""Data we sent in callbacks. This is the initial 'build-the-instrument-database' function.
"""Data we sent in callbacks. This is the 'build-the-instrument-database' function.