update
This commit is contained in:
parent
0c467d936d
commit
cfd850312f
|
@ -61,12 +61,14 @@ def db_search(in_data, platformtype, bycat):
|
|||
if platformtype == 'win': out_paths = db_plugins.execute("SELECT path_32bit_win, path_64bit_win FROM vst3 WHERE name = ?", (in_data,)).fetchone()
|
||||
else: out_paths = db_plugins.execute("SELECT path_32bit_unix, path_64bit_unix FROM vst3 WHERE name = ?", (in_data,)).fetchone()
|
||||
vst_name = in_data
|
||||
vst_id = db_plugins.execute("SELECT id FROM vst3 WHERE name = ?", (in_data,)).fetchone()[0]
|
||||
vst_id_d = db_plugins.execute("SELECT id FROM vst3 WHERE name = ?", (in_data,)).fetchone()
|
||||
if vst_id_d: vst_id = vst_id_d[0]
|
||||
|
||||
if bycat == 'id':
|
||||
if platformtype == 'win': out_paths = db_plugins.execute("SELECT path_32bit_win, path_64bit_win FROM vst3 WHERE id = ?", (in_data,)).fetchone()
|
||||
else: out_paths = db_plugins.execute("SELECT path_32bit_unix, path_64bit_unix FROM vst3 WHERE id = ?", (in_data,)).fetchone()
|
||||
vst_name = db_plugins.execute("SELECT name FROM vst3 WHERE id = ?", (in_data,)).fetchone()[0]
|
||||
vst_name_d = db_plugins.execute("SELECT name FROM vst3 WHERE id = ?", (in_data,)).fetchone()
|
||||
if vst_name_d: vst_name = vst_name_d[0]
|
||||
vst_id = in_data
|
||||
|
||||
if bycat == 'path':
|
||||
|
@ -118,16 +120,19 @@ def replace_data(cvpj_plugindata, bycat, platform, in_name, data):
|
|||
if plugintype[0] != 'vst3': cvpj_plugindata.replace('vst3', platformtxt)
|
||||
|
||||
if bycat == 'name':
|
||||
if plugintype[0] == None and plugintype[1] == None: print('[plugin-vst3] ' + vst_name + ' (vst3 '+str(vst_cpuarch)+'-bit)')
|
||||
if plugintype[0] != None and plugintype[1] == None: print('[plugin-vst3] ' + plugintype[0] +' > ' + vst_name + ' (vst3 '+str(vst_cpuarch)+'-bit)')
|
||||
if plugintype[0] != None and plugintype[1] != None: print('[plugin-vst3] ' + ':'.join(plugintype) +' > ' + vst_name + ' (vst3 '+str(vst_cpuarch)+'-bit)')
|
||||
if plugintype[0] == None and plugintype[1] == None: print('[plugin-vst3] ' + vst_name + ' (VST3 '+str(vst_cpuarch)+'-bit)')
|
||||
if plugintype[0] != None and plugintype[1] == None: print('[plugin-vst3] ' + plugintype[0] +' > ' + vst_name + ' (VST3 '+str(vst_cpuarch)+'-bit)')
|
||||
if plugintype[0] != None and plugintype[1] != None: print('[plugin-vst3] ' + ':'.join(plugintype) +' > ' + vst_name + ' (VST3 '+str(vst_cpuarch)+'-bit)')
|
||||
|
||||
cvpj_plugindata.dataval_add('name', vst_name)
|
||||
cvpj_plugindata.dataval_add('path', vst_path)
|
||||
cvpj_plugindata.dataval_add('cpu_arch', vst_cpuarch)
|
||||
cvpj_plugindata.dataval_add('id', vst_id)
|
||||
cvpj_plugindata.dataval_add('guid', vst_id)
|
||||
cvpj_plugindata.dataval_add('version', vst_version)
|
||||
|
||||
vst_num_params_d = db_plugins.execute("SELECT num_params FROM vst3 WHERE id = ?", (vst_id,)).fetchone()
|
||||
if vst_num_params_d: cvpj_plugindata.dataval_add('numparams', vst_num_params_d[0])
|
||||
|
||||
cvpj_plugindata.dataval_add('datatype', 'chunk')
|
||||
cvpj_plugindata.rawdata_add(data)
|
||||
else:
|
||||
|
|
|
@ -66,12 +66,14 @@ def getparams(cvpj_l, pluginid, pluginname, chunkpdata, foldername, datadef, dat
|
|||
chunksize = int.from_bytes(fl_plugstr.read(4), "little")
|
||||
fl_plugstr.read(4)
|
||||
chunkdata = fl_plugstr.read(chunksize)
|
||||
|
||||
if chunktype == 1: wrapperdata['midi'] = chunkdata
|
||||
if chunktype == 2: wrapperdata['flags'] = chunkdata
|
||||
if chunktype == 30: wrapperdata['io'] = chunkdata
|
||||
if chunktype == 32: wrapperdata['outputs'] = chunkdata
|
||||
if chunktype == 50: wrapperdata['plugin_info'] = chunkdata
|
||||
if chunktype == 51: wrapperdata['fourid'] = int.from_bytes(chunkdata, "little")
|
||||
if chunktype == 52: wrapperdata['16id'] = chunkdata
|
||||
if chunktype == 53: wrapperdata['state'] = chunkdata
|
||||
if chunktype == 54: wrapperdata['name'] = chunkdata.decode()
|
||||
if chunktype == 55: wrapperdata['file'] = chunkdata.decode()
|
||||
|
@ -120,21 +122,36 @@ def getparams(cvpj_l, pluginid, pluginname, chunkpdata, foldername, datadef, dat
|
|||
|
||||
plugin_vst2.replace_data(cvpj_plugindata, 'name' ,'win', wrapperdata['name'], 'bank', cvpj_programs, None)
|
||||
cvpj_plugindata.dataval_add('current_program', wrapper_vstprogram)
|
||||
else:
|
||||
pluginstate = wrapperdata['state']
|
||||
pluginstate_str = BytesIO(pluginstate)
|
||||
stateheader = pluginstate_str.read(80)
|
||||
|
||||
vststatedata = {}
|
||||
#elif '16id' in wrapperdata:
|
||||
# pluginstate = wrapperdata['state']
|
||||
# pluginstate_str = BytesIO(pluginstate)
|
||||
# stateheader = pluginstate_str.read(80)
|
||||
|
||||
while pluginstate_str.tell() < len(pluginstate):
|
||||
chunktype = int.from_bytes(pluginstate_str.read(4), 'little')
|
||||
chunksize = int.from_bytes(pluginstate_str.read(4), 'little')
|
||||
pluginstate_str.read(4)
|
||||
chunkdata = pluginstate_str.read(chunksize)
|
||||
vststatedata[chunktype] = chunkdata
|
||||
# vststatedata = {}
|
||||
|
||||
plugin_vst3.replace_data(cvpj_plugindata, 'name', 'win', wrapperdata['name'], vststatedata[3] if 3 in vststatedata else b'')
|
||||
# while pluginstate_str.tell() < len(pluginstate):
|
||||
# chunktype = int.from_bytes(pluginstate_str.read(4), 'little')
|
||||
# chunksize = int.from_bytes(pluginstate_str.read(4), 'little')
|
||||
# pluginstate_str.read(4)
|
||||
# chunkdata = pluginstate_str.read(chunksize)
|
||||
# vststatedata[chunktype] = chunkdata
|
||||
|
||||
#print(vststatedata[3])
|
||||
|
||||
# somedata = BytesIO(vststatedata[4])
|
||||
# somedata_num = int.from_bytes(somedata.read(4), 'little')
|
||||
|
||||
#print(wrapperdata['name'])
|
||||
|
||||
#for _ in range(somedata_num):
|
||||
# somedata_b = somedata.read(4)
|
||||
# somedata_p = int.from_bytes(somedata_b, 'little')
|
||||
# print(somedata_b.hex(), end=' ')
|
||||
|
||||
#exit()
|
||||
|
||||
# plugin_vst3.replace_data(cvpj_plugindata, 'name', 'win', wrapperdata['name'], vststatedata[3] if 3 in vststatedata else b'')
|
||||
|
||||
|
||||
elif pluginname == 'fruity compressor':
|
||||
|
|
|
@ -56,7 +56,7 @@ def setparams(cvpj_plugdata, datadef, dataset):
|
|||
fl_pluginparams += b'\xff\xff\xff\xff\x00\xff\xff\xff\xff\x00\x00'
|
||||
|
||||
if plug_type[0] == 'vst2':
|
||||
vst_chunk = cvpj_plugdata.dataval_get('chunk', '')
|
||||
vst_chunk = cvpj_plugdata.rawdata_get()
|
||||
vst_programs = cvpj_plugdata.dataval_get('programs', '')
|
||||
vst_numparams = cvpj_plugdata.dataval_get('numparams', 0)
|
||||
vst_current_program = cvpj_plugdata.dataval_get('current_program', 0)
|
||||
|
@ -114,8 +114,34 @@ def setparams(cvpj_plugdata, datadef, dataset):
|
|||
if vst_path != None: wrapper_data += wrapper_addchunk(55, vst_path.encode() )
|
||||
wrapper_data += wrapper_addchunk(53, wrapper_state )
|
||||
|
||||
|
||||
fl_plugin = 'fruity wrapper'
|
||||
fl_pluginparams = wrapper_data
|
||||
|
||||
#if plug_type[0] == 'vst3':
|
||||
# vst_chunk = cvpj_plugdata.rawdata_get()
|
||||
# vst_id = cvpj_plugdata.dataval_get('guid', None)
|
||||
# vst_name = cvpj_plugdata.dataval_get('name', None)
|
||||
# vst_path = cvpj_plugdata.dataval_get('path', None)
|
||||
# vst_numparams = cvpj_plugdata.dataval_get('numparams', None)
|
||||
|
||||
# if vst_numparams != None:
|
||||
# wrapper_state = b'\x01\x00\x00\x00\x01\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
# wrapper_state += wrapper_addchunk(3, vst_chunk)
|
||||
# fourchunkdata = vst_numparams.to_bytes(4, "little")
|
||||
# for paramnum in range(vst_numparams):
|
||||
# fourchunkdata += paramnum.to_bytes(4, "little")
|
||||
# wrapper_state += wrapper_addchunk(4, fourchunkdata)
|
||||
# wrapper_data = b'\n\x00\x00\x00'
|
||||
|
||||
# print(54, vst_name.encode())
|
||||
# print(55, vst_path.encode())
|
||||
|
||||
# if vst_name != None: wrapper_data += wrapper_addchunk(54, vst_name.encode() )
|
||||
# if vst_path != None: wrapper_data += wrapper_addchunk(55, vst_path.encode() )
|
||||
|
||||
# wrapper_data += wrapper_addchunk(53, wrapper_state )
|
||||
# #print(wrapper_state.hex())
|
||||
# fl_plugin = 'fruity wrapper'
|
||||
# fl_pluginparams = wrapper_data
|
||||
|
||||
return fl_plugin, fl_pluginparams
|
Loading…
Reference in New Issue