├── icon.png ├── _external_data └── info.readme ├── data_ext ├── remap │ ├── imageline │ │ ├── wave candy.csv │ │ ├── notebook.csv │ │ ├── flangus.csv │ │ ├── fruity delay 2.csv │ │ ├── gross beat.csv │ │ └── hardcore.csv │ ├── socalabs │ │ ├── addinvert.csv │ │ ├── spectrumanalyzer.csv │ │ ├── abtester.csv │ │ ├── compensateddelay.csv │ │ ├── stereoenhancer.csv │ │ ├── hugegain.csv │ │ ├── channelmute.csv │ │ ├── maths.csv │ │ ├── limiter.csv │ │ ├── delay.csv │ │ ├── gate.csv │ │ ├── expander.csv │ │ ├── compressor.csv │ │ ├── simpleverb.csv │ │ ├── stereoprocessor.csv │ │ ├── sampledelay.csv │ │ ├── sn76489.csv │ │ ├── tonegenerator.csv │ │ ├── mverb2020.csv │ │ ├── voc.csv │ │ ├── oscilloscope.csv │ │ ├── rp2a03.csv │ │ └── papu.csv │ ├── castello_reverb.csv │ ├── wolfshaper.csv │ ├── dragonfly_hall.csv │ ├── kickmess.csv │ └── magical8bitplug2.csv ├── datadef │ └── vst2 │ │ ├── 1936747315.ddef │ │ ├── cfa-sound.ddef │ │ ├── vopm.ddef │ │ ├── tal.ddef │ │ ├── creatorum_genius_lab.ddef │ │ ├── solcito-musica_unfinished.ddef │ │ └── exakt_lite.ddef ├── plugts │ ├── soundation_ext.pltr │ ├── onlineseq_vst2.pltr │ ├── amped_vst2.pltr │ └── ableton_vst2.pltr ├── dataset │ └── castello_reverb.dset └── json │ └── socalabs.json ├── requirements.txt ├── functions ├── data_xml.py ├── data_bytes.py ├── extpluglog.py └── plug_conv.py ├── data_main ├── dataset │ ├── piyopiyo.dset │ ├── pxtone.dset │ ├── lovelycomposer.dset │ ├── trackerboy.dset │ ├── chip_nes.dset │ ├── furnace.dset │ ├── petaporon.dset │ └── pixitracker.dset ├── plugts │ ├── amped_lmms.pltr │ ├── onlineseq_univ.pltr │ ├── flstudio_lmms.pltr │ ├── univ_lmms.pltr │ ├── ableton_flstudio.pltr │ ├── caustic_univ.pltr │ ├── soundation_univ.pltr │ ├── lmms_flstudio.pltr │ ├── amped_ableton.pltr │ ├── univ_waveform.pltr │ ├── waveform_univ.pltr │ ├── directx.pltr │ ├── flstudio_univ.pltr │ └── flstudio_amped.pltr ├── idvals │ └── multichip_inst.csv ├── datadef │ └── openmpt.ddef └── json │ └── dawinst_paths.json ├── __config └── config.ini ├── functions_plugin_ext ├── data_vstw.py ├── data_vc2xml.py ├── data_nullbytegroup.py ├── params_os_tal_chorus.py ├── params_os_juicysfplugin.py └── params_os_kickmess.py ├── functions_compat ├── autopl_addrem.py ├── removecut.py ├── sep_nest_audio.py ├── loops_remove.py ├── loops_add.py ├── time_seconds.py ├── fxrack_moveparams.py ├── changestretch.py ├── nopl_track.py └── timesigblocks.py ├── objects ├── exceptions.py ├── datastore.py ├── counter.py ├── convproj │ ├── managers.py │ ├── sends.py │ ├── timemarker.py │ ├── midi_inst.py │ ├── harmonics.py │ ├── chord.py │ ├── placements_autoticks.py │ └── devicenodes.py ├── extlib │ ├── helperfunc.py │ └── c700_brr.py ├── songinput │ └── _midi_multi │ │ └── mainauto.py ├── colors.py ├── auto_id.py ├── file_proj │ ├── _ableton │ │ └── visual.py │ ├── _rpp │ │ └── source.py │ ├── proj_flipperzero.py │ ├── proj_piyopiyo.py │ └── _flp │ │ ├── fx.py │ │ └── plugin.py ├── file │ ├── preset_vst3.py │ ├── preset_clap.py │ ├── adlib_wopl.py │ └── adlib_bnk.py └── regions.py ├── _config_plugins.py ├── functions_song ├── convert_ri2r.py ├── convert_rs2r.py ├── convert_m2mi.py ├── convert_ms2rm.py └── convert_mi2m.py ├── dawvert_adpcm_dec.py ├── .github └── FUNDING.yml ├── docs ├── output_plugins.md └── vsts.md ├── dawvert_adpcm_enc.py ├── plugins ├── audiocodecs │ ├── brr.py │ ├── oki.py │ ├── qsound.py │ ├── oki6258.py │ ├── yamaha_a.py │ ├── yamaha_b.py │ ├── yanaha_aica.py │ ├── yanaha_ymz280b.py │ ├── dpcm.py │ └── sony_vag.py ├── plugconv │ ├── lmms__n_amped.py │ ├── universal__n_onlineseq.py │ ├── midi__n_flstudio.py │ ├── universal__n_symmod.py │ ├── flstudio__n_amped.py │ ├── sf2__gmmidi.py │ ├── universal__n_digibooster.py │ ├── flstudio__n_lmms.py │ ├── universal__n_serato.py │ ├── lmms__n_beepbox.py │ └── ableton__n_amped.py ├── plugconv_ext │ ├── n_ableton_shareware.py │ ├── i_soundfont2_foss.py │ ├── n_flstudio_old.py │ ├── n_onlineseq_foss.py │ ├── n_namco163_famistudio_foss.py │ ├── v_directx_foss.py │ └── n_waveform_foss.py ├── audiofile │ ├── soundfile.py │ ├── ffmpeg.py │ └── vorbisacm.py ├── audioconv │ ├── soundfile.py │ └── vorbisacm.py ├── input_old │ └── r_flipper0.py ├── input_ai │ └── r_basicpitch.py ├── input_exper │ └── r_color_art.py ├── externalsearch │ └── wavtool.py └── input │ └── m_tracker_umx.py ├── objects_midi └── vendors │ ├── sony.py │ └── universal.py ├── functions_plugin_ext_nonfree └── params_nf_spaceship_delay.py ├── devtools └── remap_to_dset.py └── functions_plugin ├── juce_memoryblock.py └── format_flp_tlv.py /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SatyrDiamond/DawVert/HEAD/icon.png -------------------------------------------------------------------------------- /_external_data/info.readme: -------------------------------------------------------------------------------- 1 | put files from 2 | https://github.com/SatyrDiamond/DawVert-Samples 3 | here. -------------------------------------------------------------------------------- /data_ext/remap/imageline/wave candy.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,def,min,max,visname,paramnum,visname 3 | hold,0,0,1,Hold,0,Hold -------------------------------------------------------------------------------- /data_ext/remap/socalabs/addinvert.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | -------------------------------------------------------------------------------- /data_ext/remap/imageline/notebook.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,def,min,max,visname,paramnum,visname 3 | currentpage,1,1,100,Page index,0,Page index 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | varint 2 | numpy 3 | mido 4 | lxml 5 | chardet 6 | av 7 | beautifulsoup4 8 | blackboxprotobuf 9 | pypng 10 | git+https://github.com/Perlence/rpp -------------------------------------------------------------------------------- /functions/data_xml.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | def find_first(xml_data, name): 5 | t = xml_data.findall(name) 6 | if t: return t[0] 7 | else: return None -------------------------------------------------------------------------------- /data_main/dataset/piyopiyo.dset: -------------------------------------------------------------------------------- 1 | { 2 | "inst": { 3 | "colorset": { 4 | "main": [[0.25, 0.38, 0.49], [0.36, 0.43, 0.46], [0.51, 0.57, 0.47], [0.58, 0.64, 0.40]] 5 | }, 6 | "objects": {} 7 | } 8 | } -------------------------------------------------------------------------------- /data_ext/remap/socalabs/spectrumanalyzer.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | mode,mode,0.0,0.0,1.0,Mode,0,Mode,0,Mode 4 | log,log,0.0,0.0,1.0,Log,1,Log,1,Log 5 | -------------------------------------------------------------------------------- /data_ext/remap/socalabs/abtester.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | ab,ab,0.0,0.0,1.0,A / B,0,A / B,0,A / B 4 | level,level,0.0,-100.0,6.0,Level,1,Level,1,Level 5 | -------------------------------------------------------------------------------- /data_ext/remap/castello_reverb.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,visname,paramnum,visname,paramnum,visname 3 | mix,mix,0.5,Mix,0,Mix,2,Mix 4 | size,size,0.330000042915344,Size,1,Size,3,Size 5 | brightness,brightness,0.660000085830689,Brightness,2,Brightness,4,Brightness 6 | -------------------------------------------------------------------------------- /data_main/plugts/amped_lmms.pltr: -------------------------------------------------------------------------------- 1 | 2 | [reverb] 3 | >input 4 | type|native:amped:Reverb 5 | param|fb 6 | param|lpf 7 | param|mix 8 | proc 11 | calc|fb|pow|2 12 | output 15 | type|native:lmms:reverbsc 16 | param|sizeinput 4 | type|native:onlineseq:eq 5 | param|eq_low 6 | param|eq_mid 7 | param|eq_high 8 | output 11 | type|universal:eq:3band 12 | param|low_gain176: 6 | chunkdata = chunkdata[172:] 7 | chunkdata = chunkdata[4:int.from_bytes(chunkdata[0:4])+8] 8 | return chunkdata 9 | else: 10 | return chunkdata 11 | -------------------------------------------------------------------------------- /data_ext/remap/socalabs/channelmute.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | mutel,muteL,0.0,0.0,1.0,Mute L,0,Mute L,0,Mute L 4 | levell,levelL,0.0,-100.0,6.0,Level L,1,Level L,1,Level L 5 | muter,muteR,0.0,0.0,1.0,Mute R,2,Mute R,2,Mute R 6 | levelr,levelR,0.0,-100.0,6.0,Level R,3,Level R,3,Level R 7 | -------------------------------------------------------------------------------- /data_ext/remap/imageline/flangus.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,def,min,max,visname,paramnum,visname 3 | ord,0,0,9,Order,0,Order 4 | depth,0,0,1024,Depth,1,Depth 5 | speed,0,0,1024,Speed,2,Speed 6 | delay,0,0,128,Delay,3,Delay 7 | spread,0,0,128,Spread,4,Spread 8 | cross,0,-128,128,Cross,5,Cross 9 | dry,0,-128,128,Dry level,6,Dry level 10 | wet,0,-128,128,Wet level,7,Wet level 11 | -------------------------------------------------------------------------------- /data_ext/plugts/soundation_ext.pltr: -------------------------------------------------------------------------------- 1 | 2 | [tremolo_airwindows] 3 | >input 4 | type|native:soundation:com.soundation.tremolo 5 | param|depth 6 | param|phase 7 | param|speed 8 | proc 11 | calc|speed|pow|0.8 12 | calc|phase|div|2 13 | output 16 | type|user:airwindows:AutoPan 17 | param|rateinput 4 | type|native:flstudio:fruity stereo shaper 5 | param|r2l 6 | param|l2l 7 | param|r2r 8 | param|l2r 9 | proc 12 | calc|r2l|div|12800 13 | calc|l2l|div|12800 14 | calc|r2r|div|12800 15 | calc|l2r|div|12800 16 | output 19 | type|native:lmms:stereomatrix 20 | param|l-rinput 4 | type|universal:bitcrush 5 | param|bits 6 | param|freq 7 | output 10 | type|native:lmms:bitcrush 11 | param|rateinput 17 | type|universal:volpan 18 | param|pan 19 | param|vol 20 | proc 23 | calc|pan|mul|100 24 | calc|vol|mul|100 25 | output 28 | type|native:lmms:amplifier 29 | param|pan> 4 8 | second = value & 0x0F 9 | return (first, second) 10 | 11 | def get_bitnums_int(x): 12 | return [i for i in range(x.bit_length()) if ((1 << i) & x)] 13 | 14 | def get_bitnums(x): 15 | return get_bitnums_int(int.from_bytes(x, 'little')) 16 | 17 | def set_bitnums(x, n): 18 | outvals = 0 19 | for v in x: outvals += (1 << v) 20 | return outvals.to_bytes(n, 'little') -------------------------------------------------------------------------------- /data_ext/remap/socalabs/stereoprocessor.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | width1,width1,0.5,0.0,1.0,Width,0,Width,0,Width 4 | center1,center1,0.5,0.0,1.0,Center,1,Center,1,Center 5 | pan1,pan1,0.0,-1.0,1.0,Pan,2,Pan,2,Pan 6 | rotation,rotation,0.5,0.0,1.0,Rotation,3,Rotation,3,Rotation 7 | pan2,pan2,0.0,-1.0,1.0,Pan,4,Pan,4,Pan 8 | center2,center2,0.5,0.0,1.0,Center,5,Center,5,Center 9 | width2,width2,0.5,0.0,1.0,Width,6,Width,6,Width 10 | output,output,0.5,0.0,1.0,Output,7,Output,7,Output 11 | -------------------------------------------------------------------------------- /functions_plugin_ext/data_vc2xml.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import xml.etree.ElementTree as ET 5 | 6 | def get(vstdata): 7 | vc2magic = vstdata[0:4] 8 | if vc2magic == b'VC2!': 9 | vc2size = int.from_bytes(vstdata[4:8], "little") 10 | vc2data = vstdata[8:8+vc2size] 11 | return ET.fromstring(vc2data) 12 | else: 13 | return None 14 | 15 | def make(xmldata): 16 | xmlout = ET.tostring(xmldata, encoding='utf-8') 17 | vst2data = b'VC2!' + len(xmlout).to_bytes(4, "little") + xmlout 18 | return vst2data 19 | -------------------------------------------------------------------------------- /data_ext/remap/socalabs/sampledelay.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | mode,mode,0.0,0.0,1.0,Mode,0,Mode,0,Mode 4 | link,link,1.0,0.0,1.0,Link,1,Link,1,Link 5 | time,time,1.0,0.0,1000.0,Time,2,Time,2,Time 6 | samples,samples,50.0,0.0,44100.0,Samples,3,Samples,3,Samples 7 | timel,timel,1.0,0.0,1000.0,Time L,4,Time L,4,Time L 8 | samplesl,samplesl,50.0,0.0,44100.0,Samples L,5,Samples L,5,Samples L 9 | timer,timer,1.0,0.0,1000.0,Time R,6,Time R,6,Time R 10 | samplesr,samplesr,50.0,0.0,44100.0,Samples R,7,Samples R,7,Samples R 11 | -------------------------------------------------------------------------------- /data_ext/remap/socalabs/sn76489.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | pulse1level,pulse1Level,1.0,0.0,1.0,Pulse 1 Level,0,Pulse 1 Level,0,Pulse 1 Level 4 | pulse2level,pulse2Level,0.0,0.0,1.0,Pulse 2 Level,1,Pulse 2 Level,1,Pulse 2 Level 5 | pulse3level,pulse3Level,0.0,0.0,1.0,Pulse 3 Level,2,Pulse 3 Level,2,Pulse 3 Level 6 | noiselevel,noiseLevel,0.0,0.0,1.0,Noise Level,3,Noise Level,3,Noise Level 7 | noisewhite,noiseWhite,0.0,0.0,1.0,Noise Type,4,Noise Type,4,Noise Type 8 | noiseshift,noiseShift,0.0,0.0,3.0,Noise Speed,5,Noise Speed,5,Noise Speed 9 | -------------------------------------------------------------------------------- /data_ext/datadef/vst2/vopm.ddef: -------------------------------------------------------------------------------- 1 | 2 | area_struct|opdata 3 | part|byte|tl 4 | part|byte|ar 5 | part|byte|d1r 6 | part|byte|d1l 7 | part|byte|d2r 8 | part|byte|rr 9 | part|byte|ks 10 | part|byte|ml 11 | part|byte|dt1 12 | part|byte|dt2 13 | part|byte|ams-en 14 | 15 | area_struct|patch 16 | part|byte|alg 17 | part|byte|fb 18 | part|byte|ams 19 | part|byte|pms 20 | part|byte|nfrq 21 | part|byte|noise 22 | part|byte|lfo_frq 23 | part|byte|lfo_amd 24 | part|byte|lfo_pmd 25 | part|byte|_7 26 | part|byte|opmsk 27 | part|struct.opdata|op1 28 | part|struct.opdata|op2 29 | part|struct.opdata|op3 30 | part|struct.opdata|op4 31 | part|string.16|name 32 | -------------------------------------------------------------------------------- /data_ext/remap/imageline/gross beat.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,def,min,max,visname,paramnum,visname 3 | param_0,0,0,35,Time slot,0,Time slot 4 | param_1,0,0,35,Volume slot,1,Volume slot 5 | param_2,0,0,256,Time mix,2,Time mix 6 | param_3,0,0,256,Volume mix,3,Volume mix 7 | param_4,0,0,10000,Vol. smoothing attack,4,Vol. smoothing attack 8 | param_5,0,0,10000,Vol. smoothing release,5,Vol. smoothing release 9 | param_6,0,-256,256,Volume envelope tension,6,Volume envelope tension 10 | param_7,0,0,1,Hold delay (bar repeat),7,Hold delay (bar repeat) 11 | param_8,0,0,65536,Time offset (scratching,8,Time offset (scratching 12 | -------------------------------------------------------------------------------- /objects/convproj/managers.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | class manager_plugts: 5 | def __init__(self): 6 | self.storedts = {} 7 | 8 | def transform(self, filepath, ts_name, convproj_obj, plugin_obj, pluginid, extra_json): 9 | if filepath not in self.storedts: 10 | self.storedts[filepath] = plugtransform() 11 | self.storedts[filepath].load_file(filepath) 12 | self.current_ts = self.storedts[filepath] 13 | self.current_ts.transform(ts_name, convproj_obj, plugin_obj, pluginid, extra_json) 14 | 15 | def get_storedval(self, name): 16 | return self.current_ts.get_storedval(name) -------------------------------------------------------------------------------- /data_main/plugts/ableton_flstudio.pltr: -------------------------------------------------------------------------------- 1 | [fruity_balance] 2 | 3 | >input 4 | type|native:flstudio:fruity balance 5 | param|pan 6 | param|vol 7 | proc 10 | calc|pan|div|128 11 | calc|vol|div|256 12 | calc|vol|addmul|-1|35 13 | output 16 | type|native:ableton:StereoGain 17 | param|Balanceinput 4 | type|native:onlineseq:eq 5 | param|eq_low 6 | param|eq_mid 7 | param|eq_high 8 | proc 11 | calc|eq_low|div|96 12 | calc|eq_mid|div|96 13 | calc|eq_high|div|96 14 | calc|eq_low|add|0.5 15 | calc|eq_mid|add|0.5 16 | calc|eq_high|add|0.5 17 | output 20 | type|external:vst2 21 | param|ext_param_0input 4 | type|native:amped:Reverb 5 | param|fb 6 | param|lpf 7 | param|mix 8 | proc 11 | calc|lpf|div|20000 12 | calc|fb|pow|2 13 | output 16 | type|user:lucianoiam:castello 17 | param|mixinput 24 | type|native:amped:CompressorMini 25 | param|squash 26 | proc 29 | calc|squash|div|2 30 | out_store|squash|squash 31 | output 34 | type|user:airwindows:PurestSquish 35 | param|squish Regular') 11 | 12 | for trackid, track_obj in convproj_obj.track__iter(): 13 | if not track_obj.is_laned: 14 | track_obj.placements.unindex_notes(track_obj.notelist_index) 15 | else: 16 | for lane_id, lane_obj in track_obj.lanes.items(): 17 | lane_obj.placements.unindex_notes(track_obj.notelist_index) 18 | 19 | convproj_obj.type = 'r' -------------------------------------------------------------------------------- /functions_compat/removecut.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | def process(convproj_obj, in__placement_cut, out__placement_cut, out_type): 5 | 6 | if in__placement_cut == True and out__placement_cut == False: 7 | if convproj_obj.type == 'm': 8 | for pl_id, playlist_obj in convproj_obj.playlist.items(): 9 | playlist_obj.placements.remove_cut() 10 | return True 11 | elif convproj_obj.type == 'r': 12 | for trackid, track_obj in convproj_obj.track__iter(): 13 | track_obj.placements.remove_cut() 14 | for trackid, lane_obj in track_obj.lanes.items(): lane_obj.placements.remove_cut() 15 | return True 16 | else: return False 17 | 18 | else: return False -------------------------------------------------------------------------------- /objects/songinput/_midi_multi/mainauto.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import numpy as np 5 | from objects.data_bytes import structalloc 6 | 7 | timesig_premake = structalloc.dynarray_premake([ 8 | ('pos', np.uint32), 9 | ('numerator', np.uint8), 10 | ('denominator', np.uint8)]) 11 | 12 | bpm_premake = structalloc.dynarray_premake([ 13 | ('pos', np.uint32), 14 | ('tempo', np.float32)]) 15 | 16 | pitchauto_premake = structalloc.dynarray_premake([ 17 | ('pos', np.uint32), 18 | ('channel', np.uint8), 19 | ('value', np.int16), 20 | ('mode', np.int16)] 21 | ) 22 | 23 | otherauto_premake = structalloc.dynarray_premake([ 24 | ('pos', np.uint32), 25 | ('value', np.uint8)]) 26 | 27 | -------------------------------------------------------------------------------- /dawvert_adpcm_dec.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 4 | # SPDX-License-Identifier: GPL-3.0-or-later 5 | 6 | import argparse 7 | from plugins import base as dv_plugins 8 | from objects import audio_data 9 | 10 | dv_plugins.load_plugindir('audiocodecs', '') 11 | 12 | parser = argparse.ArgumentParser() 13 | parser.add_argument("-i", default=None) 14 | parser.add_argument("-it", default=None) 15 | parser.add_argument("-o", default=None) 16 | args = parser.parse_args() 17 | 18 | in_file = args.i 19 | out_file = args.o 20 | in_format = args.it 21 | 22 | file_obj = open(in_file, 'rb') 23 | 24 | audio_obj = audio_data.audio_obj() 25 | audio_obj.decode_from_codec(in_format, file_obj.read()) 26 | audio_obj.to_file_wav(out_file) 27 | 28 | -------------------------------------------------------------------------------- /data_ext/remap/socalabs/mverb2020.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | mix,MIX,100.0,0.0,100.0,Mix,0,Mix,0,Mix 4 | predelay,PREDELAY,50.0,0.0,100.0,Pre delay,1,Pre delay,1,Pre delay 5 | earlymix,EARLYMIX,100.0,0.0,100.0,Early late mix,2,Early late mix,2,Early late mix 6 | size,SIZE,100.0,0.0,100.0,Size,3,Size,3,Size 7 | density,DENSITY,50.0,0.0,100.0,Density,4,Density,4,Density 8 | bandwidthfreq,BANDWIDTHFREQ,90.0,0.0,100.0,Bandwidth Frequency,5,Bandwidth Frequency,5,Bandwidth Frequency 9 | decay,DECAY,50.0,0.0,100.0,Decay,6,Decay,6,Decay 10 | dampingfreq,DAMPINGFREQ,90.0,0.0,100.0,Damping Frequency,7,Damping Frequency,7,Damping Frequency 11 | gain,GAIN,100.0,0.0,100.0,Gain,8,Gain,8,Gain 12 | -------------------------------------------------------------------------------- /functions_compat/sep_nest_audio.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from functions import xtramath 5 | 6 | def process(convproj_obj, in__placement_audio_nested, out__placement_audio_nested, out_type): 7 | if in__placement_audio_nested == True and out__placement_audio_nested == False: 8 | if convproj_obj.type == 'm': 9 | for pl_id, playlist_obj in convproj_obj.playlist.items(): playlist_obj.placements.remove_nested() 10 | return True 11 | elif convproj_obj.type == 'r': 12 | for trackid, track_obj in convproj_obj.track__iter(): 13 | track_obj.placements.remove_nested() 14 | for trackid, lane_obj in track_obj.lanes.items(): lane_obj.placements.remove_nested() 15 | return True 16 | else: 17 | return False -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: satyrdiamond 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: SatyrDiamond 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /data_ext/remap/wolfshaper.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def_one,min,max,visname,paramnum,visname,paramnum,visname 3 | pregain,pregain,0.5,0,2,Pre Gain,0,Pre Gain,2,Pre Gain 4 | wet,wet,1,0,1,Wet,1,Wet,3,Wet 5 | postgain,postgain,1,0,1,Post Gain,2,Post Gain,4,Post Gain 6 | removedc,removedc,1,0,1,Remove DC Offset,3,Remove DC Offse,5,Remove DC Offset 7 | oversample,oversample,0,0,4,Oversample,4,Oversample,6,Oversample 8 | bipolarmode,bipolarmode,0,0,1,Bipolar Mode,5,Bipolar Mode,7,Bipolar Mode 9 | warptype,warptype,0,0,6,H Warp Type,6,H Warp Type,8,H Warp Type 10 | warpamount,warpamount,0,0,1,H Warp Amount,7,H Warp Amount,9,H Warp Amount 11 | vwarptype,vwarptype,0,0,6,V Warp Type,8,V Warp Type,10,V Warp Type 12 | vwarpamount,vwarpamount,0,0,1,V Warp Amount,9,V Warp Amount,11,V Warp Amount 13 | -------------------------------------------------------------------------------- /functions_plugin_ext/data_nullbytegroup.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | def get(vstdata): 5 | nbpvstdata = vstdata.split(b'\x00') 6 | nbp = [{}] 7 | groupnum = 0 8 | isvalname = False 9 | for datavalue in nbpvstdata: 10 | #print(datavalue) 11 | if isvalname == True: 12 | nbp[groupnum][valname] = datavalue.decode() 13 | isvalname = False 14 | else: 15 | if datavalue == b'': 16 | groupnum += 1 17 | nbp.append({}) 18 | else: 19 | isvalname = True 20 | valname = datavalue.decode() 21 | return nbp 22 | 23 | def make(larr): 24 | nbp = bytes() 25 | for grouplist in larr: 26 | for param in grouplist: 27 | nbp += str(param).encode('utf-8')+b'\x00'+str(grouplist[param]).encode('utf-8')+b'\x00' 28 | nbp += b'\x00' 29 | return nbp 30 | -------------------------------------------------------------------------------- /docs/output_plugins.md: -------------------------------------------------------------------------------- 1 | 2 | # Supported Outputs 3 | ## DAWs 4 | | DataType | PluginSet | Short Name | Name | 5 | | --- | --- | --- | :--- | 6 | | R | ```main``` | ```ableton``` | Ableton Live 11 | 7 | | R | ```main``` | ```amped``` | Amped Studio | 8 | | R | ```main``` | ```dawproject``` | dawproject | 9 | | M-I | ```main``` | ```flp``` | FL Studio | 10 | | R | ```main``` | ```lmms``` | LMMS | 11 | | R | ```main``` | ```midi``` | MIDI | 12 | | R | ```main``` | ```muse``` | MusE Sequencer | 13 | | R | ```main``` | ```onlineseq``` | Online Sequencer | 14 | | R | ```main``` | ```reaper``` | Reaper | 15 | | R | ```main``` | ```soundation``` | Soundation | 16 | | R | ```main``` | ```waveform_edit``` | Waveform Edit | 17 | 18 | ## Old 19 | | DataType | PluginSet | Short Name | Name | 20 | | --- | --- | --- | :--- | 21 | | R | ```old``` | ```wavtool``` | Wavtool | -------------------------------------------------------------------------------- /data_main/plugts/caustic_univ.pltr: -------------------------------------------------------------------------------- 1 | 2 | [limiter] 3 | >input 4 | type|native:caustic:master_limiter 5 | param|35 6 | param|36 7 | param|37 8 | param|38 9 | output 12 | type|universal:limiter 13 | param|gain<35 14 | param|attack<36 15 | param|release<37 16 | param|postgain<38 17 | input 21 | type|native:caustic:master_reverb 22 | param|16 23 | param|17 24 | param|18 25 | param|19 26 | param|20 27 | param|21 28 | param|22 29 | param|23 30 | param|24 31 | param|25 32 | proc 35 | calc|18|mul|1200 36 | calc|18|add|200 37 | calc|22|add|1 38 | output 41 | type|universal:reverb 42 | param|predelay<16 43 | param|size<17 44 | param|low_xo<18 45 | param|diffusion<19 46 | param|low_mult%0.5 47 | param|decay<22 48 | param|wet<25 49 | Regular') 11 | 12 | for trackid, track_obj in convproj_obj.track__iter(): 13 | lanes = [] 14 | for _, v in track_obj.scenes.items(): 15 | for ln in v: 16 | if ln not in lanes: lanes.append(ln) 17 | 18 | for x in lanes: track_obj.add_lane(x) 19 | 20 | for scenepl in convproj_obj.scene_placements: 21 | if scenepl.id in track_obj.scenes: 22 | for laneid, scene_pl in track_obj.scenes[scenepl.id].items(): 23 | track_obj.lanes[laneid].placements.merge_crop(scene_pl, scenepl.position, scenepl.duration, convproj_obj.scenes[scenepl.id].visual) 24 | 25 | convproj_obj.type = 'r' 26 | #exit() -------------------------------------------------------------------------------- /plugins/audiocodecs/oki.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | class input_codec(plugins.base): 7 | def is_dawvert_plugin(self): return 'audiocodec' 8 | def get_shortname(self): return 'oki' 9 | 10 | def get_name(self): return 'OKI ADPCM' 11 | def get_priority(self): return 0 12 | def supported_autodetect(self): return False 13 | def get_prop(self, in_dict): 14 | in_dict['encode_supported'] = True 15 | in_dict['decode_supported'] = True 16 | 17 | def decode(self, in_bytes, audio_obj): 18 | from objects.extlib import superctr_adpcm 19 | decode_object = superctr_adpcm.oki() 20 | decode_object.decode(in_bytes, audio_obj) 21 | 22 | def encode(self, audio_obj): 23 | from objects.extlib import superctr_adpcm 24 | encode_object = superctr_adpcm.oki() 25 | outchar = encode_object.encode(audio_obj) 26 | return bytes(outchar) -------------------------------------------------------------------------------- /data_ext/remap/socalabs/oscilloscope.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | samplesperpixel,samplesPerPixel,1.0,1.0,48.0,Samp/px,0,Samp/px,0,Samp/px 4 | zoom,zoom,1.0,0.1000000014901161,100.0,Zoom,1,Zoom,1,Zoom 5 | offset_l,offset_l,0.0,-2.0,2.0,Offset L,2,Offset L,2,Offset L 6 | offset_r,offset_r,0.0,-2.0,2.0,Offset R,3,Offset R,3,Offset R 7 | trigger_chan,trigger_chan,0.0,-1.0,1.0,Trigger Chan,4,Trigger Chan,4,Trigger Chan 8 | trigger_mode,trigger_mode,1.0,0.0,2.0,Trigger Mode,5,Trigger Mode,5,Trigger Mode 9 | trigger_level,trigger_level,0.0,-1.0,1.0,Trigger Level,6,Trigger Level,6,Trigger Level 10 | trigger_pos,trigger_pos,0.0,0.0,1.0,Trigger Pos,7,Trigger Pos,7,Trigger Pos 11 | trigger_run,trigger_run,0.0,0.0,1.0,Trigger Run,8,Trigger Run,8,Trigger Run 12 | trigger_reset,trigger_reset,0.0,0.0,1.0,Trigger Reset,9,Trigger Reset,9,Trigger Reset 13 | -------------------------------------------------------------------------------- /plugins/audiocodecs/qsound.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | class input_codec(plugins.base): 7 | def is_dawvert_plugin(self): return 'audiocodec' 8 | def get_shortname(self): return 'qsound' 9 | 10 | def get_name(self): return 'QSound' 11 | def get_priority(self): return 0 12 | def supported_autodetect(self): return False 13 | def get_prop(self, in_dict): 14 | in_dict['encode_supported'] = True 15 | in_dict['decode_supported'] = True 16 | 17 | def decode(self, in_bytes, audio_obj): 18 | from objects.extlib import superctr_adpcm 19 | decode_object = superctr_adpcm.qsound() 20 | decode_object.decode(in_bytes, audio_obj) 21 | 22 | def encode(self, audio_obj): 23 | from objects.extlib import superctr_adpcm 24 | encode_object = superctr_adpcm.qsound() 25 | outchar = encode_object.encode(audio_obj) 26 | return bytes(outchar) -------------------------------------------------------------------------------- /plugins/plugconv/lmms__n_amped.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import os 5 | import plugins 6 | 7 | from functions import extpluglog 8 | 9 | class plugconv(plugins.base): 10 | def __init__(self): pass 11 | def is_dawvert_plugin(self): return 'plugconv' 12 | def get_priority(self): return -100 13 | def get_prop(self, in_dict): 14 | in_dict['in_plugins'] = [['native', 'amped', None]] 15 | in_dict['in_daws'] = ['amped'] 16 | in_dict['out_plugins'] = [['native', 'lmms', None]] 17 | in_dict['out_daws'] = ['lmms'] 18 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 19 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Reverb'): 20 | extpluglog.convinternal('Amped', 'Reverb', 'LMMS', 'ReverbSC') 21 | plugin_obj.plugts_transform('./data_main/plugts/amped_lmms.pltr', 'reverb', convproj_obj, pluginid) 22 | return 0 23 | return 2 -------------------------------------------------------------------------------- /plugins/audiocodecs/oki6258.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | class input_codec(plugins.base): 7 | def is_dawvert_plugin(self): return 'audiocodec' 8 | def get_shortname(self): return 'oki6258' 9 | 10 | def get_name(self): return 'OKI6258' 11 | def get_priority(self): return 0 12 | def supported_autodetect(self): return False 13 | def get_prop(self, in_dict): 14 | in_dict['encode_supported'] = True 15 | in_dict['decode_supported'] = True 16 | 17 | def decode(self, in_bytes, audio_obj): 18 | from objects.extlib import superctr_adpcm 19 | decode_object = superctr_adpcm.oki() 20 | decode_object.decode_oki6258(in_bytes, audio_obj) 21 | 22 | def encode(self, audio_obj): 23 | from objects.extlib import superctr_adpcm 24 | encode_object = superctr_adpcm.oki() 25 | outchar = encode_object.encode_oki6258(audio_obj) 26 | return bytes(outchar) -------------------------------------------------------------------------------- /data_main/plugts/soundation_univ.pltr: -------------------------------------------------------------------------------- 1 | 2 | [compressor] 3 | >input 4 | type|native:soundation:com.soundation.degrader 5 | param|reduction 6 | param|rate 7 | param|mix 8 | proc 11 | calc|rate|from_one|44100|1000 12 | calc|reduction|mul|50 13 | calc|attack|mul|200 14 | calc|attack|div|1000 15 | output 18 | type|universal:bitcrush 19 | param|bitsinput 26 | type|native:soundation:com.soundation.equalizer 27 | param|low 28 | param|mid 29 | param|high 30 | proc 33 | calc|low|sub|0.5 34 | calc|mid|sub|0.5 35 | calc|high|sub|0.5 36 | calc|low|mul|24 37 | calc|mid|mul|24 38 | calc|high|mul|24 39 | output 42 | type|universal:eq:3band 43 | param|low_gaininput 4 | type|native:lmms:stereomatrix 5 | param|r-l 6 | param|l-l 7 | param|r-r 8 | param|l-r 9 | proc 12 | calc|r-l|mul|12800 13 | calc|l-l|mul|12800 14 | calc|r-r|mul|12800 15 | calc|l-r|mul|12800 16 | output 19 | type|native:flstudio:fruity stereo shaper 20 | param|r2linput 32 | type|native:lmms:spectrumanalyzer 33 | output 36 | type|native:flstudio:fruity spectroman 37 | param|amp%128.0 38 | param|scale%128.0 39 | input 43 | type|native:lmms:stereoenhancer 44 | param|width 45 | output 48 | type|native:flstudio:fruity stereo enhancer 49 | param|phase_offsinput 4 | type|native:amped:Chorus 5 | param|delayLfoDepth%0.15 6 | param|delayLfoRateHz%0.7585 7 | param|mix%0.85 8 | param|tone%0.2 9 | proc 12 | calc|delayLfoDepth|mul|2 13 | calc|delayLfoDepth|clamp|0|1 14 | output 17 | type|native:ableton:Chorus2 18 | param|Rateinput 28 | type|native:amped:Phaser 29 | param|feedback%0 30 | param|hzmin%400 31 | param|hzrange%4 32 | param|mix%1 33 | param|rate%1.5 34 | param|stages%8 35 | proc 38 | calc|feedback|div|4 39 | calc|hzrange|div|20 40 | calc|rate|div|2 41 | output 44 | type|native:ableton:PhaserNew 45 | param|Feedback MultipleIndexed') 10 | 11 | existingpatterns = [] 12 | pn = 1 13 | for pl_id, playlist_obj in convproj_obj.playlist__iter(): 14 | x, pn = playlist_obj.placements.to_indexed_notes(existingpatterns, pn) 15 | 16 | for patid, nle_data in x: 17 | nle_obj = convproj_obj.notelistindex__add(patid) 18 | nle_obj.notelist = nle_data[0] 19 | nle_obj.visual.name = nle_data[1] 20 | nle_obj.visual.color = nle_data[2] 21 | 22 | existingsamples = [] 23 | pn = 1 24 | for pl_id, playlist_obj in convproj_obj.playlist__iter(): 25 | x, pn = playlist_obj.placements.to_indexed_audio(existingsamples, pn) 26 | for patid, sle_data in x: 27 | convproj_obj.sample_index[patid] = sle_data 28 | 29 | convproj_obj.type = 'mi' -------------------------------------------------------------------------------- /data_ext/datadef/vst2/tal.ddef: -------------------------------------------------------------------------------- 1 | 2 | area_struct|main 3 | part|float|__unknown_1 4 | part|float|__unknown_2 5 | part|float|__unknown_3 6 | part|float|__unknown_4 7 | part|float|__unknown_5 8 | part|float|__unknown_6 9 | part|float|__unknown_7 10 | part|float|dco_pwm 11 | part|float|dco_lfo 12 | part|float|__unknown_10 13 | part|float|__unknown_11 14 | part|float|__unknown_12 15 | part|float|__unknown_13 16 | part|float|__unknown_14 17 | part|float|__unknown_15 18 | part|float|__unknown_16 19 | part|float|__unknown_17 20 | part|float|__unknown_18 21 | part|float|__unknown_19 22 | part|float|__unknown_20 23 | part|float|__unknown_21 24 | part|float|__unknown_22 25 | part|float|lfo_rate 26 | part|float|lfo_delaytime 27 | part|float|lfo_trigmode 28 | part|float|lfo_shape 29 | part|float|lfo_tempo 30 | part|float|env_velocity 31 | part|float|__unknown_29 32 | part|float|__unknown_30 33 | part|float|__unknown_31 34 | part|float|__unknown_32 35 | part|float|chorus_1 36 | part|float|chorus_2 37 | part|float|__unknown_35 38 | part|float|__unknown_36 39 | part|float|__unknown_37 40 | part|float|__unknown_38 41 | part|float|__unknown_39 -------------------------------------------------------------------------------- /data_main/dataset/chip_nes.dset: -------------------------------------------------------------------------------- 1 | { 2 | "chip": { 3 | "objects": { 4 | "dpcm": {"visual": {"color": [0.48,0.83,0.49],"name": "DPCM"}}, 5 | "fds": {"visual": {"color": [0.94,0.94,0.65],"name": "FDS"}}, 6 | "mmc5": {"visual": {"color": [0.65,0.34,0.84],"name": "MMC5"}}, 7 | "n163": {"visual": {"color": [0.97,0.97,0.36],"name": "Namco 163"}}, 8 | "noise": {"visual": {"color": [0.33,0.74,0.9],"name": "Noise"}}, 9 | "s5b": {"visual": {"color": [0.58,0.94,0.33],"name": "Sunsoft 5B"}}, 10 | "square1": {"visual": {"color": [0.97,0.56,0.36],"name": "Square"}}, 11 | "square2": {"visual": {"color": [0.97,0.56,0.36],"name": "Square"}}, 12 | "triangle": {"visual": {"color": [0.94,0.33,0.58],"name": "Triangle"}}, 13 | "vrc6_saw": {"visual": {"color": [0.46,0.52,0.91],"name": "VRC6 Saw"}}, 14 | "vrc6_square": {"visual": {"color": [0.6,0.44,0.93],"name": "VRC6 Square"}}, 15 | "vrc7_fm": {"visual": {"color": [1.0,0.46,0.44],"name": "VRC7 FM"} 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /objects/file_proj/_ableton/visual.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from objects.file_proj._ableton.func import * 5 | 6 | import xml.etree.ElementTree as ET 7 | 8 | class ableton_ClipEnvelopeChooserViewState: 9 | __slots__ = ['SelectedDevice','SelectedEnvelope','PreferModulationVisible'] 10 | def __init__(self, xmltag): 11 | if xmltag: 12 | x_Name = xmltag.findall('ClipEnvelopeChooserViewState')[0] 13 | self.SelectedDevice = get_value(x_Name, 'SelectedDevice', 0) 14 | self.SelectedEnvelope = get_value(x_Name, 'SelectedEnvelope', 0) 15 | self.PreferModulationVisible = get_bool(x_Name, 'PreferModulationVisible', False) 16 | else: 17 | self.SelectedDevice = 0 18 | self.SelectedEnvelope = 0 19 | self.PreferModulationVisible = False 20 | 21 | def write(self, xmltag): 22 | x_Name = ET.SubElement(xmltag, "ClipEnvelopeChooserViewState") 23 | add_value(x_Name, 'SelectedDevice', self.SelectedDevice) 24 | add_value(x_Name, 'SelectedEnvelope', self.SelectedEnvelope) 25 | add_bool(x_Name, 'PreferModulationVisible', self.PreferModulationVisible) 26 | -------------------------------------------------------------------------------- /data_main/dataset/furnace.dset: -------------------------------------------------------------------------------- 1 | { 2 | "chip": { 3 | "objects": { 4 | "opn2": {"visual": {"color": [0.2,0.8,1.0],"name": "FM"}}, 5 | "square": {"visual": {"color": [0.4,1.0,0.2],"name": "Square"}}, 6 | "psg": {"visual": {"color": [0.4,1.0,0.2],"name": "PSG"}}, 7 | "noise": {"visual": {"color": [0.8,0.8,0.8],"name": "Noise"}}, 8 | "opn2-op": {"visual": {"color": [0.2,0.4,1.0],"name": "FM OP"}}, 9 | "gameboy_pulse": {"visual": {"color": [0.4,1.0,0.2],"name": "Square"}}, 10 | "gameboy_wavetable": {"visual": {"color": [1.0,0.5,0.2],"name": "Wavetable"}}, 11 | "gameboy_noise": {"visual": {"color": [0.8,0.8,0.8],"name": "Noise"}}, 12 | "pce": {"visual": {"color": [1.0,0.5,0.2],"name": "Wavetable"}}, 13 | "pcm": {"visual": {"color": [1.0,0.9,0.2],"name": "PCM"}}, 14 | "sample": {"visual": {"color": [1.0,0.9,0.2],"name": "sample"}}, 15 | "adpcma": {"visual": {"color": [1.0,0.9,0.2],"name": "ADPCM-A"}}, 16 | "c64": {"visual": {"color": [0.8,0.8,0.8],"name": "C64"}} 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /plugins/audiocodecs/dpcm.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import numpy as np 6 | from functions import xtramath 7 | 8 | class input_codec(plugins.base): 9 | def is_dawvert_plugin(self): return 'audiocodec' 10 | def get_shortname(self): return 'dpcm' 11 | 12 | def get_name(self): return 'DPCM' 13 | def get_priority(self): return 0 14 | def supported_autodetect(self): return False 15 | def get_prop(self, in_dict): 16 | in_dict['decode_supported'] = True 17 | 18 | def decode(self, in_bytes, audio_obj): 19 | dpcm_samp = np.zeros(len(in_bytes)*8, dtype=np.float32) 20 | dpcm_current = 0 21 | 22 | bytenum = 0 23 | for dpcm_byte in in_bytes: 24 | for bitnum in range(8): 25 | dpcm_current += 2 if ((dpcm_byte >> bitnum) & 1) else -2 26 | dpcm_current = xtramath.clamp(dpcm_current,-128,127) 27 | dpcm_samp[bytenum] = dpcm_current 28 | bytenum += 1 29 | 30 | if len(dpcm_samp): dpcm_samp[1:] = dpcm_samp[:-1]/2 + dpcm_samp[1:]/2 31 | 32 | audio_obj.set_codec('float') 33 | audio_obj.pcm_from_list(dpcm_samp/128) 34 | audio_obj.pcm_changecodec('uint8') 35 | -------------------------------------------------------------------------------- /data_ext/plugts/ableton_vst2.pltr: -------------------------------------------------------------------------------- 1 | 2 | [glue] 3 | >input 4 | type|native:ableton:GlueCompressor 5 | param|Attack 6 | param|DryWet 7 | param|Makeup 8 | param|PeakClipIn 9 | param|Range 10 | param|Ratio 11 | param|Release 12 | param|Threshold 13 | proc 16 | calc|Threshold|to_one|-40.0|0 17 | calc|Makeup|to_one|0|20.0 18 | calc|Range|to_one|0|70.0 19 | calc|Attack|to_one|0|6 20 | calc|Release|to_one|0|6 21 | calc|Ratio|to_one|0|2 22 | calc|Ratio|to_one|0|2 23 | output 26 | type|external:vst2 27 | param|ext_param_0%1.0 28 | name|Power 29 | param|ext_param_1 RegularMultiple') 11 | 12 | for trackid, track_obj in convproj_obj.track__iter(): 13 | lanes = [] 14 | 15 | for _, v in track_obj.scenes.items(): 16 | for ln in v: 17 | if ln not in lanes: lanes.append(ln) 18 | 19 | for x in lanes: track_obj.add_lane(x) 20 | 21 | for scenepl in convproj_obj.scene_placements: 22 | if scenepl.id in track_obj.scenes: 23 | if not out_dawinfo.audio_nested: 24 | for laneid, scene_pl in track_obj.scenes[scenepl.id].items(): 25 | track_obj.lanes[laneid].placements.merge_crop(scene_pl, scenepl.position, scenepl.duration, convproj_obj.scenes[scenepl.id].visual) 26 | else: 27 | for laneid, scene_pl in track_obj.scenes[scenepl.id].items(): 28 | track_obj.lanes[laneid].placements.merge_crop_nestedaudio(scene_pl, scenepl.position, scenepl.duration, convproj_obj.scenes[scenepl.id].visual) 29 | 30 | convproj_obj.type = 'r' -------------------------------------------------------------------------------- /plugins/plugconv_ext/n_ableton_shareware.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | import struct 7 | from functions import extpluglog 8 | from functions import xtramath 9 | from functions_plugin_ext import plugin_vst2 10 | import math 11 | 12 | class plugconv(plugins.base): 13 | def __init__(self): pass 14 | def is_dawvert_plugin(self): return 'plugconv_ext' 15 | def get_prop(self, in_dict): 16 | in_dict['in_plugin'] = ['native', 'ableton', None] 17 | in_dict['ext_formats'] = ['vst2'] 18 | in_dict['plugincat'] = ['shareware'] 19 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config, extplugtype): 20 | 21 | if plugin_obj.type.subtype == 'GlueCompressor': 22 | if 'vst2' in extplugtype: 23 | extpluglog.extpluglist.add('Shareware', 'VST2', 'The Glue', '') 24 | if plugin_vst2.check_exists('id', 1132024935): 25 | extpluglog.extpluglist.success('Ableton', 'Glue Compressor') 26 | plugin_obj.plugts_transform('./data_ext/plugts/ableton_vst2.pltr', 'glue', convproj_obj, pluginid) 27 | plugin_vst2.replace_data(convproj_obj, plugin_obj, 'id', 'any', 1132024935, 'param', None, 12) 28 | return True 29 | -------------------------------------------------------------------------------- /objects/file/preset_vst3.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from objects.data_bytes import bytereader 5 | from objects.data_bytes import bytewriter 6 | 7 | class vst3_main: 8 | def __init__(self): 9 | self.version = 1 10 | self.uuid = '00000000000000000000000000000000' 11 | self.data = b'' 12 | 13 | def read_file(self, fxfile): 14 | byr_stream = self.byr_stream = bytereader.bytereader() 15 | byr_stream.load_file(fxfile) 16 | self.parse(byr_stream) 17 | 18 | def parse(self, byr_stream): 19 | byr_stream.magic_check(b'VST3') 20 | self.version = byr_stream.uint32() 21 | self.uuid = byr_stream.string(32) 22 | size = byr_stream.uint32() 23 | byr_stream.skip(4) 24 | self.data = byr_stream.raw(size) 25 | 26 | def write(self, byw_stream): 27 | byw_stream.raw(b'VST3') 28 | byw_stream.uint32(self.version) 29 | byw_stream.string(self.uuid, 32) 30 | byw_stream.uint32(len(self.data)) 31 | byw_stream.zeros(4) 32 | byw_stream.raw(self.data) 33 | 34 | def write_to_file(self, output_file): 35 | byw_stream = bytewriter.bytewriter() 36 | self.write(byw_stream) 37 | f = open(output_file, 'wb') 38 | f.write(byw_stream.getvalue()) 39 | -------------------------------------------------------------------------------- /plugins/plugconv/midi__n_flstudio.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | import math 7 | from functions import xtramath 8 | from functions import extpluglog 9 | 10 | class plugconv(plugins.base): 11 | def __init__(self): pass 12 | def is_dawvert_plugin(self): return 'plugconv' 13 | def get_priority(self): return -100 14 | def get_prop(self, in_dict): 15 | in_dict['in_plugins'] = [['native', 'flstudio', None]] 16 | in_dict['in_daws'] = ['flp'] 17 | in_dict['out_plugins'] = [['universal', 'midi', None]] 18 | in_dict['out_daws'] = [] 19 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 20 | flpluginname = plugin_obj.type.subtype.lower() 21 | 22 | if plugin_obj.type.check_wildmatch('native', 'flstudio', 'boobass'): 23 | extpluglog.convinternal('FL Studio', 'BooBass', 'MIDI', 'Electric Bass (finger)') 24 | plugin_obj.replace('universal', 'midi', None) 25 | plugin_obj.midi.bank = 0 26 | plugin_obj.midi.patch = 33 27 | plugin_obj.midi.drum = False 28 | plugin_obj.datavals_global.add('middlenotefix', 24) 29 | #print('[plug-conv] No Soundfont Argument Defined:',pluginid) 30 | return 1 31 | 32 | return 2 -------------------------------------------------------------------------------- /data_ext/datadef/vst2/creatorum_genius_lab.ddef: -------------------------------------------------------------------------------- 1 | 2 | area_struct|grey_apparatus_2 3 | part|float|env_amp_att 4 | part|float|env_amp_dec 5 | part|float|env_amp_rel 6 | part|float|env_amp_sus 7 | part|float|delay_delay 8 | part|float|delay_fb 9 | part|float|delay_mix 10 | part|float|delay_on 11 | part|float|__unknown_9 12 | part|float|__unknown_10 13 | part|float|__unknown_11 14 | part|float|eq_high 15 | part|float|eq_low 16 | part|float|eq_mid 17 | part|float|eq_on 18 | part|float|env_filt_on 19 | part|float|env_filt_att 20 | part|float|env_filt_dec 21 | part|float|env_filt_rel 22 | part|float|env_filt_sus 23 | part|float|filter_cutoff 24 | part|float|filter_res 25 | part|float|filter_tracking 26 | part|float|filter_type 27 | part|float|__unknown_25 28 | part|float|__unknown_26 29 | part|float|osc1_detuner_fine 30 | part|float|osc2_detuner_fine 31 | part|float|osc1_detuner_oct 32 | part|float|osc2_detuner_oct 33 | part|float|osc1_vol 34 | part|float|osc2_vol 35 | part|float|osc2_waveform 36 | part|float|steplfo_on 37 | part|float|flanger_speed 38 | part|float|steplfo_on 39 | part|list.16/float|steplfo_parts 40 | part|float|steplfo_smooth 41 | part|float|steplfo_temp 42 | part|float|steplfo_waveform 43 | part|float|flanger_timedepth 44 | part|list.256/float|gate_parts -------------------------------------------------------------------------------- /data_main/plugts/univ_waveform.pltr: -------------------------------------------------------------------------------- 1 | 2 | [comp] 3 | >input 4 | type|universal:compressor 5 | param|attack 6 | param|knee 7 | param|postgain 8 | param|ratio 9 | param|release 10 | param|threshold 11 | proc 14 | calc|attack|mul|100 15 | calc|release|mul|100 16 | output 19 | type|native:tracktion:comp 20 | param|attackinput 30 | type|universal:limiter 31 | param|ceiling 32 | param|gain 33 | param|release 34 | proc 37 | calc|release|mul|1000 38 | output 41 | type|native:tracktion:limiter 42 | param|ceilinginput 49 | type|universal:gate 50 | param|attack 51 | param|hold 52 | param|release 53 | param|threshold 54 | proc 57 | calc|attack|mul|1000 58 | calc|hold|mul|1000 59 | calc|release|mul|1000 60 | output 63 | type|native:tracktion:gate 64 | param|attack= 128: self.bank = patch self.patch = (bank-128) self.drum = True else: self.bank = bank self.patch = patch self.drum = False def to_sf2(self): if self.drum: if self.device != 'xg': bank = 128 patch = self.patch else: bank = self.bank patch = self.patch else: if self.device != 'xg': bank = self.bank patch = self.patch else: bank = self.bank_hi patch = self.patch #print(bank, patch, self.drum, self.device, self.bank, self.bank_hi) return bank, patch def from_num(self, value): self.drum = bool(value&0b10000000) self.is_key = bool((value>>8)&0b10000000) if not self.is_key: self.patch = (value%128) else: self.key = (value%128) self.bank = (value>>8) def to_num(self): outval = self.patch if not self.is_key else self.key outval += self.bank*256 outval += int(self.drum)<<8 outval += int(self.is_key)<<16 return outval -------------------------------------------------------------------------------- /data_main/plugts/waveform_univ.pltr: -------------------------------------------------------------------------------- 1 | 2 | [comp] 3 | >input 4 | type|native:tracktion:comp 5 | param|attack 6 | param|inputDb 7 | param|knee 8 | param|outputDb 9 | param|ratio 10 | param|release 11 | param|threshold 12 | proc 15 | calc|attack|div|100 16 | calc|release|div|100 17 | output 20 | type|universal:compressor 21 | param|attackinput 32 | type|native:tracktion:gate 33 | param|attack 34 | param|hold 35 | param|release 36 | param|threshold 37 | proc 40 | calc|attack|div|1000 41 | calc|hold|div|1000 42 | calc|release|div|1000 43 | output 46 | type|universal:gate 47 | param|attackinput 55 | type|native:tracktion:limiter 56 | param|ceiling 57 | param|gain 58 | param|release 59 | proc 62 | calc|release|div|1000 63 | output 66 | type|universal:limiter 67 | param|ceiling>4 19 | oplo.fmfb1(byr_stream.uint8()) 20 | oplo.fmfb2(byr_stream.uint8()) 21 | for x in oplo.ops: 22 | x.avekf(byr_stream.uint8()) 23 | x.ksl_lvl(byr_stream.uint8()) 24 | x.att_dec(byr_stream.uint8()) 25 | x.sus_rel(byr_stream.uint8()) 26 | x.waveform = byr_stream.uint8() 27 | 28 | class opli_file: 29 | def __init__(self): 30 | self.patch = fm_opl.opl_inst() 31 | 32 | def read_file(self, oplifile): 33 | byr_stream = bytereader.bytereader() 34 | byr_stream.load_file(oplifile) 35 | 36 | byr_stream.magic_check(b'WOPL3-INST\x00') 37 | version = byr_stream.uint16() 38 | is_perc = byr_stream.uint8() 39 | self.patch.perc_on = bool(is_perc) 40 | read_inst(byr_stream, self.patch, False) 41 | -------------------------------------------------------------------------------- /plugins/audioconv/soundfile.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import io 6 | import os 7 | import importlib.util 8 | 9 | class input_soundfile(plugins.base): 10 | def is_dawvert_plugin(self): return 'audioconv' 11 | def get_shortname(self): return 'soundfile' 12 | def get_name(self): return 'SoundFile' 13 | def get_priority(self): return 0 14 | def supported_autodetect(self): return False 15 | def get_prop(self, in_dict): 16 | in_dict['in_file_formats'] = ['wav', 'mp3', 'flac', 'ogg', 'wav_codec'] 17 | in_dict['out_file_formats'] = ['wav', 'mp3', 'flac', 'ogg'] 18 | def usable(self): 19 | usable = importlib.util.find_spec('soundfile') 20 | usable_meg = '"soundfile" package is not installed.' if not usable else '' 21 | return usable, usable_meg 22 | def convert_file(self, sampleref_obj, to_type, outpath): 23 | import soundfile 24 | inpath = sampleref_obj.fileref.get_path(None, False) 25 | inputbuf = open(inpath, 'rb') 26 | data, samplerate = soundfile.read(inputbuf) 27 | sampleref_obj.fileref.set_folder(None, outpath, 0) 28 | outpath = sampleref_obj.fileref.copy() 29 | outpath.file.extension = 'wav' 30 | outpath = outpath.get_path(None, False) 31 | wav_buf = io.BytesIO() 32 | soundfile.write(outpath, data, samplerate) 33 | wav_buf.seek(0) 34 | sampleref_obj.fileref.file.extension = 'wav' 35 | return outpath -------------------------------------------------------------------------------- /plugins/plugconv/universal__n_symmod.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | from objects.inst_params import fx_delay 6 | from functions import extpluglog 7 | 8 | class plugconv(plugins.base): 9 | def __init__(self): pass 10 | def is_dawvert_plugin(self): return 'plugconv' 11 | def get_priority(self): return 0 12 | def get_prop(self, in_dict): 13 | in_dict['in_plugins'] = [['native', 'symmod', None]] 14 | in_dict['in_daws'] = [] 15 | in_dict['out_plugins'] = [['universal', None, None]] 16 | in_dict['out_daws'] = [] 17 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 18 | 19 | if plugin_obj.type.check_wildmatch('native', 'symmod', 'echo'): 20 | extpluglog.convinternal('SymMOD', 'Echo', 'Universal', 'Delay') 21 | 22 | p_type = plugin_obj.params.get("type", 0).value 23 | p_delay = plugin_obj.params.get("delay", 0).value/50 24 | p_fb = 1/(plugin_obj.params.get("fb", 0).value+1) 25 | 26 | delay_obj = fx_delay.fx_delay() 27 | delay_obj.feedback_first = True 28 | timing_obj = delay_obj.timing_add(0) 29 | timing_obj.set_seconds(p_delay) 30 | delay_obj.feedback[0] = p_fb 31 | 32 | if p_type in [2, 3]: 33 | delay_obj.mode = 'pingpong' 34 | delay_obj.submode = 'normal' 35 | delay_obj.feedback[0] = p_fb if p_type == 2 else 1-p_fb 36 | 37 | if p_type: plugin_obj = delay_obj.to_cvpj(convproj_obj, pluginid) 38 | return 1 39 | 40 | return 2 -------------------------------------------------------------------------------- /plugins/plugconv_ext/n_onlineseq_foss.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | import struct 7 | from functions_plugin_ext import plugin_vst2 8 | from functions import extpluglog 9 | 10 | class plugconv(plugins.base): 11 | def __init__(self): pass 12 | def is_dawvert_plugin(self): return 'plugconv_ext' 13 | def get_prop(self, in_dict): 14 | in_dict['in_plugin'] = ['native', 'onlineseq', None] 15 | in_dict['ext_formats'] = ['vst2'] 16 | in_dict['plugincat'] = ['foss'] 17 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config, extplugtype): 18 | 19 | if plugin_obj.type.subtype == 'distort': 20 | extpluglog.extpluglist.add('FOSS', 'VST', 'Density2', 'Airwindows') 21 | exttype = plugins.base.extplug_exists('airwindows', extplugtype, 'Density2') 22 | if exttype: 23 | extpluglog.extpluglist.success('Online Sequencer', 'Distortion') 24 | distort_type = plugin_obj.params.get('distort_type', 0).value 25 | if distort_type == [10, 6]: distlevel = 0.3 26 | else: distlevel = 0.5 27 | 28 | plugin_obj.replace('user', 'airwindows', 'density2') 29 | plugin_obj.params.add('density', distlevel, 'float') 30 | plugin_obj.params.add('highpass', 0, 'float') 31 | plugin_obj.params.add('output', 1, 'float') 32 | plugin_obj.params.add('dry_wet', 1, 'float') 33 | plugin_obj.user_to_external(convproj_obj, pluginid, 'vst2', 'any') 34 | return True 35 | 36 | else: return False -------------------------------------------------------------------------------- /data_ext/remap/dragonfly_hall.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def_one,min,max,visname,paramnum,visname,paramnum,visname 3 | dry_level,dry_level,0.800000011920929,0,100,Dry Level,0,Dry Level,2,Dry Level 4 | early_level,early_level,0.100000001490116,0,100,Early Level,1,Early Level,3,Early Level 5 | late_level,late_level,0.200000002980232,0,100,Late Level,2,Late Level,4,Late Level 6 | size,size,0.280000001192093,10,60,Size,3,Size,5,Size 7 | width,width,0.5,50,150,Width,4,Width,6,Width 8 | predelay,delay,0.0399999991059303,0,100,Predelay,5,Predelay,7,Predelay 9 | diffuse,diffuse,0.899999976158142,0,100,Diffuse,6,Diffuse,8,Diffuse 10 | low_cut,low_cut,0.0199999995529652,0,200,Low Cut,7,Low Cut,9,Low Cut 11 | low_cross,low_xo,0.300000011920929,200,1200,Low Cross,8,Low Cross,10,Low Cross 12 | low_mult,low_mult,0.399999976158142,0.5,2.5,Low Mult,9,Low Mult,11,Low Mult 13 | high_cut,high_cut,0.439999997615814,1000,16000,High Cut,10,High Cut,12,High Cut 14 | high_cross,high_xo,0.300000011920929,1000,16000,High Cross,11,High Cross,13,High Cross 15 | high_mult,high_mult,0.300000011920929,0.2,1.2,High Mult,12,High Mult,14,High Mult 16 | spin,spin,0.329999983310699,0,10,Spin,13,Spin,15,Spin 17 | wander,wander,0.375,0,40,Wander,14,Wander,16,Wander 18 | decay,decay,0.121212117373943,0.1,10,Decay,15,Decay,17,Decay 19 | early_send,early_send,0.200000002980232,0,100,Early Send,16,Early Send,18,Early Send 20 | modulation,modulation,0.150000005960464,0,100,Modulation,17,Modulation,19,Modulation 21 | -------------------------------------------------------------------------------- /plugins/audiocodecs/sony_vag.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import numpy as np 6 | from io import BytesIO 7 | 8 | class input_codec(plugins.base): 9 | def is_dawvert_plugin(self): return 'audiocodec' 10 | def get_shortname(self): return 'sony_vag' 11 | 12 | def get_name(self): return 'Sony VAG' 13 | def get_priority(self): return 0 14 | def get_prop(self, in_dict): 15 | in_dict['decode_supported'] = True 16 | 17 | def decode(self, in_bytes, audio_obj): 18 | import av 19 | vag_audio = BytesIO(in_bytes) 20 | 21 | try: 22 | container = av.open(vag_audio, format='vag') 23 | data = np.empty(shape=0) 24 | for packet in container.demux(): 25 | for frame in packet.decode(): 26 | if isinstance(frame, av.audio.frame.AudioFrame): 27 | array = frame.to_ndarray()[0] 28 | data = np.concatenate([data, array]) 29 | audio_obj.set_codec('int16') 30 | audio_obj.pcm_from_list(data) 31 | except: 32 | pass 33 | 34 | #vag_flag = np.frombuffer(in_bytes, dtype=np.uint8)[1::16] 35 | 36 | #loop_start = np.nonzero(vag_flag==6) 37 | #loop_end = np.nonzero(vag_flag==3) 38 | 39 | #if loop_start[0].size or loop_end[0].size: 40 | # 41 | # if not audio_obj.loop: audio_obj.loop = [0, len(data)] 42 | # if loop_start[0].size: audio_obj.loop[0] = (loop_start[0][0])*28 43 | # if loop_end[0].size: audio_obj.loop[1] = (loop_end[0][0])*28 44 | 45 | #print(audio_obj.loop, len(data)) 46 | -------------------------------------------------------------------------------- /plugins/plugconv/flstudio__n_amped.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | from functions import extpluglog 6 | 7 | class plugconv(plugins.base): 8 | def __init__(self): pass 9 | def is_dawvert_plugin(self): return 'plugconv' 10 | def get_priority(self): return -100 11 | def get_prop(self, in_dict): 12 | in_dict['in_plugins'] = [['native', 'amped', None]] 13 | in_dict['in_daws'] = ['amped'] 14 | in_dict['out_plugins'] = [['native', 'flstudio', None]] 15 | in_dict['out_daws'] = ['flp'] 16 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 17 | 18 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Phaser'): 19 | extpluglog.convinternal('Amped', 'Phaser', 'FL Studio', 'Fruity Phaser') 20 | plugin_obj.plugts_transform('./data_main/plugts/flstudio_amped.pltr', 'phaser', convproj_obj, pluginid) 21 | return 0 22 | 23 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Flanger'): 24 | extpluglog.convinternal('Amped', 'Flanger', 'FL Studio', 'Fruity Flanger') 25 | plugin_obj.plugts_transform('./data_main/plugts/flstudio_amped.pltr', 'flanger', convproj_obj, pluginid) 26 | return 0 27 | 28 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Delay'): 29 | extpluglog.convinternal('Amped', 'Delay', 'FL Studio', 'Fruity Delay 3') 30 | plugin_obj.plugts_transform('./data_main/plugts/flstudio_amped.pltr', 'delay', convproj_obj, pluginid) 31 | return 0 32 | 33 | return 2 34 | -------------------------------------------------------------------------------- /data_main/dataset/petaporon.dset: -------------------------------------------------------------------------------- 1 | { 2 | "inst": { 3 | "colorset": { 4 | "main": [ 5 | [ 6 | 0.22, 7 | 0.52, 8 | 0.35 9 | ], 10 | [ 11 | 0.51, 12 | 0.88, 13 | 0.3 14 | ], 15 | [ 16 | 1.0, 17 | 0.95, 18 | 0.46 19 | ], 20 | [ 21 | 1.0, 22 | 0.75, 23 | 0.21 24 | ], 25 | [ 26 | 0.81, 27 | 0.47, 28 | 0.34 29 | ], 30 | [ 31 | 0.88, 32 | 0.25, 33 | 0.25 34 | ], 35 | [ 36 | 1.0, 37 | 0.5, 38 | 0.67 39 | ], 40 | [ 41 | 0.75, 42 | 0.25, 43 | 0.7 44 | ], 45 | [ 46 | 0.22, 47 | 0.6, 48 | 1.0 49 | ], 50 | [ 51 | 0.43, 52 | 0.93, 53 | 1.0 54 | ] 55 | ] 56 | }, 57 | "objects": {} 58 | } 59 | } -------------------------------------------------------------------------------- /data_ext/datadef/vst2/solcito-musica_unfinished.ddef: -------------------------------------------------------------------------------- 1 | 2 | area_struct|crio 3 | part|float|amp/boost 4 | part|float|amp/sat 5 | part|float|amp/vol 6 | part|float|__unknown_3 7 | part|float|__unknown_4 8 | part|float|__unknown_5 9 | part|float|__unknown_6 10 | part|float|__unknown_7 11 | part|float|__unknown_8 12 | part|float|__unknown_9 13 | part|float|__unknown_10 14 | part|float|__unknown_11 15 | part|float|__unknown_12 16 | part|float|__unknown_13 17 | part|float|__unknown_14 18 | part|float|__unknown_15 19 | part|float|__unknown_16 20 | part|float|__unknown_17 21 | part|float|__unknown_18 22 | part|float|__unknown_19 23 | part|float|__unknown_20 24 | part|float|__unknown_21 25 | part|float|__unknown_22 26 | part|float|__unknown_23 27 | part|float|__unknown_24 28 | part|float|__unknown_25 29 | part|float|__unknown_26 30 | part|float|__unknown_27 31 | part|float|__unknown_28 32 | part|float|__unknown_29 33 | part|float|__unknown_30 34 | part|float|__unknown_31 35 | part|float|__unknown_32 36 | part|float|__unknown_33 37 | part|float|__unknown_34 38 | part|float|__unknown_35 39 | part|float|__unknown_36 40 | part|float|__unknown_37 41 | part|float|__unknown_38 42 | part|float|__unknown_39 43 | part|float|__unknown_40 44 | part|float|__unknown_41 45 | part|float|__unknown_42 46 | part|float|__unknown_43 47 | part|float|__unknown_44 48 | part|float|__unknown_45 49 | part|float|__unknown_46 50 | part|float|__unknown_47 51 | part|float|__unknown_48 52 | part|float|osc/sub_on 53 | part|float|slide 54 | part|float|lfo/rate_source 55 | part|string.32|preset_name 56 | -------------------------------------------------------------------------------- /plugins/plugconv/sf2__gmmidi.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import logging 6 | from functions import data_bytes 7 | from functions import extpluglog 8 | 9 | logger_plugconv = logging.getLogger('plugconv') 10 | 11 | class plugconv(plugins.base): 12 | def __init__(self): pass 13 | def is_dawvert_plugin(self): return 'plugconv' 14 | def get_priority(self): return -90 15 | def get_prop(self, in_dict): 16 | in_dict['in_plugins'] = [['universal', 'midi', None]] 17 | in_dict['in_daws'] = [] 18 | in_dict['out_plugins'] = [['universal', 'soundfont2', None]] 19 | in_dict['out_daws'] = [] 20 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 21 | 22 | sf2_loc = None 23 | if dv_config.path_soundfont: sf2_loc = dv_config.path_soundfont 24 | 25 | if sf2_loc == None: 26 | mididevice = plugin_obj.datavals.get('device', 'gm') 27 | if mididevice in dv_config.paths_soundfonts: 28 | if dv_config.paths_soundfonts[mididevice]: 29 | logger_plugconv.info('Using '+mididevice.upper()+' SF2.') 30 | sf2_loc = dv_config.paths_soundfonts[mididevice] 31 | 32 | if sf2_loc: 33 | extpluglog.convinternal('MIDI', 'MIDI', 'SoundFont2', 'SoundFont2') 34 | plugin_obj.replace('universal', 'soundfont2', None) 35 | convproj_obj.fileref__add(sf2_loc, sf2_loc, None) 36 | plugin_obj.filerefs['file'] = sf2_loc 37 | return 1 38 | 39 | #if sf2_loc == None: print('[plug-conv] No Soundfont Argument or Configured:',pluginid) 40 | return 2 -------------------------------------------------------------------------------- /plugins/plugconv/universal__n_digibooster.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | from objects.inst_params import fx_delay 6 | from functions import extpluglog 7 | 8 | class plugconv(plugins.base): 9 | def __init__(self): pass 10 | def is_dawvert_plugin(self): return 'plugconv' 11 | def get_priority(self): return 0 12 | def get_prop(self, in_dict): 13 | in_dict['in_plugins'] = [['native', 'digibooster', None]] 14 | in_dict['in_daws'] = [] 15 | in_dict['out_plugins'] = [['universal', None, None]] 16 | in_dict['out_daws'] = [] 17 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 18 | 19 | if plugin_obj.type.check_wildmatch('native', 'digibooster', 'pro_echo'): 20 | extpluglog.convinternal('DigiBooster', 'Pro Echo', 'Universal', 'Delay') 21 | p_delay = plugin_obj.params.get("delay", 0).value*0.004 22 | p_fb = plugin_obj.params.get("fb", 0).value/255 23 | p_wet = plugin_obj.params.get("wet", 0).value/255 24 | p_cross_echo = plugin_obj.params.get("cross_echo", 0).value/255 25 | if p_delay == 0: p_delay = 0.334 26 | 27 | delay_obj = fx_delay.fx_delay() 28 | delay_obj.feedback_first = False 29 | delay_obj.dry = 0 30 | delay_obj.feedback[0] = p_fb*(1-p_cross_echo) 31 | delay_obj.feedback_cross[0] = p_cross_echo 32 | timing_obj = delay_obj.timing_add(0) 33 | timing_obj.set_seconds(p_delay) 34 | plugin_obj, pluginid = delay_obj.to_cvpj(convproj_obj, pluginid) 35 | 36 | plugin_obj.fxdata_add(None, p_wet) 37 | return 1 38 | 39 | return 2 -------------------------------------------------------------------------------- /functions_compat/changestretch.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from functions import data_values 5 | 6 | def process(convproj_obj, in__placement_audio_stretch, out__placement_audio_stretch, out_type): 7 | target = None 8 | if 'warp' in in__placement_audio_stretch and 'warp' not in out__placement_audio_stretch: target = 'rate' 9 | if 'rate' in in__placement_audio_stretch and 'rate' not in out__placement_audio_stretch: target = 'warp' 10 | if not out__placement_audio_stretch: target = 'none' 11 | 12 | if target: 13 | tempo = convproj_obj.params.get('bpm', 120).value 14 | 15 | if convproj_obj.type in ['r', 'rm']: 16 | 17 | for trackid, track_obj in convproj_obj.track__iter(): 18 | track_obj.placements.all_stretch_set_pitch_nonsync() 19 | for laneid, lane_obj in track_obj.lanes.items(): 20 | lane_obj.placements.all_stretch_set_pitch_nonsync() 21 | 22 | for trackid, track_obj in convproj_obj.track__iter(): 23 | track_obj.placements.changestretch(convproj_obj, target, tempo) 24 | for laneid, lane_obj in track_obj.lanes.items(): 25 | lane_obj.placements.changestretch(convproj_obj, target, tempo) 26 | return True 27 | 28 | if convproj_obj.type in ['m']: 29 | 30 | for pl_id, playlist_obj in convproj_obj.playlist.items(): 31 | playlist_obj.placements.all_stretch_set_pitch_nonsync() 32 | 33 | for pl_id, playlist_obj in convproj_obj.playlist.items(): 34 | playlist_obj.placements.changestretch(convproj_obj, target, tempo) 35 | return True 36 | 37 | 38 | return False -------------------------------------------------------------------------------- /plugins/plugconv_ext/n_namco163_famistudio_foss.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import math 6 | from functions import extpluglog 7 | from functions import xtramath 8 | 9 | class plugconv(plugins.base): 10 | def __init__(self): pass 11 | def is_dawvert_plugin(self): return 'plugconv_ext' 12 | def get_prop(self, in_dict): 13 | in_dict['in_plugin'] = ['native', 'namco163_famistudio', None] 14 | in_dict['ext_formats'] = ['vst2'] 15 | in_dict['plugincat'] = ['foss'] 16 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config, extplugtype): 17 | extpluglog.extpluglist.add('FOSS', 'VST', 'Vital', '') 18 | exttype = plugins.base.extplug_exists('vital', extplugtype, None) 19 | if exttype: 20 | extpluglog.extpluglist.success('Famistudio', 'N163') 21 | wavedata = plugin_obj.datavals.get('wave', {}) 22 | plugin_obj.replace('user', 'matt_tytel', 'vital') 23 | plugin_obj.params.add('volume', 6000, 'float') 24 | plugin_obj.params.add('osc_1_level', 0.8, 'float') 25 | plugin_obj.params.add('osc_1_on', 1, 'float') 26 | 27 | wavesize = wavedata['size']/32 28 | pitch = math.log2(1/wavesize)*12 29 | 30 | transpose, finetune = xtramath.transpose_tune(pitch) 31 | 32 | plugin_obj.params.add('osc_1_tune', -finetune, 'float') 33 | 34 | plugin_obj.env_points_from_blocks('vol') 35 | plugin_obj.env_points_copy('vol', 'vital_import_lfo_2') 36 | plugin_obj.user_to_external(convproj_obj, pluginid, exttype, 'any') 37 | 38 | plugin_obj.datavals_global.add('middlenotefix', (-transpose)+12) 39 | return True 40 | -------------------------------------------------------------------------------- /plugins/plugconv/flstudio__n_lmms.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | import os 7 | import math 8 | from functions import extpluglog 9 | 10 | class plugconv(plugins.base): 11 | def __init__(self): pass 12 | def is_dawvert_plugin(self): return 'plugconv' 13 | def get_priority(self): return -100 14 | def get_prop(self, in_dict): 15 | in_dict['in_plugins'] = [['native', 'lmms', None]] 16 | in_dict['in_daws'] = ['lmms'] 17 | in_dict['out_plugins'] = [['native', 'flstudio', None]] 18 | in_dict['out_daws'] = ['flp'] 19 | 20 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 21 | if plugin_obj.type.check_wildmatch('native', 'lmms', 'stereomatrix'): 22 | extpluglog.convinternal('LMMS', 'Stereo Matrix', 'FL Studio', 'Fruity Stereo Shaper') 23 | plugin_obj.plugts_transform('./data_main/plugts/lmms_flstudio.pltr', 'stereomatrix', convproj_obj, pluginid) 24 | return 0 25 | 26 | if plugin_obj.type.check_wildmatch('native', 'lmms', 'spectrumanalyzer'): 27 | extpluglog.convinternal('LMMS', 'Spectrum Analyzer', 'FL Studio', 'Fruity Spectroman') 28 | plugin_obj.plugts_transform('./data_main/plugts/lmms_flstudio.pltr', 'spectrumanalyzer', convproj_obj, pluginid) 29 | return 0 30 | 31 | if plugin_obj.type.check_wildmatch('native', 'lmms', 'stereoenhancer'): 32 | extpluglog.convinternal('LMMS', 'Stereo Enhancer', 'FL Studio', 'Fruity Stereo Enhancer') 33 | plugin_obj.plugts_transform('./data_main/plugts/lmms_flstudio.pltr', 'stereoenhancer', convproj_obj, pluginid) 34 | return 0 35 | 36 | return 2 37 | 38 | -------------------------------------------------------------------------------- /objects/extlib/c700_brr.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from ctypes import * 5 | from objects import globalstore 6 | from objects.extlib import helperfunc 7 | 8 | class brr(): 9 | def __init__(self): 10 | self.codec_lib = None 11 | 12 | def load_lib(self): 13 | libloadstat = globalstore.extlib.load_native('brr', "brr_codec") 14 | self.codec_lib = globalstore.extlib.get('brr') 15 | if libloadstat == 1: 16 | brr_decode = self.codec_lib._Z9brrdecodePhPsii 17 | brr_decode.argtypes = [POINTER(c_ubyte), POINTER(c_short), c_int, c_int] 18 | brr_decode.restype = c_int 19 | 20 | brr_encode = self.codec_lib._Z9brrencodePsPhlbli 21 | brr_encode.argtypes = [POINTER(c_short), POINTER(c_ubyte), c_long, c_char, c_long, c_int] 22 | brr_encode.restype = c_int 23 | 24 | def decode(self, indata, audio_obj): 25 | self.load_lib() 26 | audio_obj.set_codec('int16') 27 | if self.codec_lib: 28 | p_inp = helperfunc.castptr_ubyte_data(indata) 29 | p_outp = helperfunc.castptr_int16_blank(len(indata)*2) 30 | outlen = self.codec_lib._Z9brrdecodePhPsii(p_inp, p_outp, 0, 0) 31 | audio_obj.pcm_from_list(p_outp[0:outlen]) 32 | 33 | def encode(self, audio_obj): 34 | self.load_lib() 35 | audio_obj.pcm_changecodec('int16') 36 | if self.codec_lib: 37 | rawdata = audio_obj.to_raw() 38 | outlen = len(rawdata)//2 39 | p_inp = helperfunc.castptr_int16_data(rawdata) 40 | p_outp = helperfunc.castptr_ubyte_blank(len(rawdata)*2) 41 | self.codec_lib._Z9brrencodePsPhlbli(p_inp, p_outp, outlen, 0, 1, 0) 42 | 43 | return p_outp[0:(outlen//2)+(outlen//14)] -------------------------------------------------------------------------------- /objects/convproj/chord.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import json 5 | 6 | chorddata = [] 7 | basechorddata = [] 8 | with open("./data_main/json/chords.json") as f: 9 | j = json.load(f) 10 | for n,v in j.items(): 11 | chorddata.append([n,v]) 12 | if len(v) == 2: basechorddata.append([n,v]) 13 | 14 | class cvpj_chord: 15 | def __init__(self): 16 | self.keys = [] 17 | self.base_key = 0 18 | self.chord_type = 'octave' 19 | 20 | def find_by_key(self, i_keys): 21 | global chorddata 22 | self.keys = i_keys 23 | self.base_key = min(i_keys) 24 | rest_keys = [x-self.base_key for x in i_keys[1:]] 25 | self.chord_type = None 26 | for m,v in chorddata: 27 | leftovers = v.copy() 28 | unused = [] 29 | for x in rest_keys: 30 | if x in leftovers: leftovers.remove(x) 31 | else: unused.append(x) 32 | if not leftovers and not unused: self.chord_type = m 33 | if self.chord_type == None and len(rest_keys) > 1: 34 | for m,v in basechorddata: 35 | if rest_keys[0:2] == v: 36 | self.chord_type = m 37 | break 38 | 39 | def find_by_id(self, base_key, i_id): 40 | self.chord_type = None 41 | self.base_key = base_key 42 | for m,v in chorddata: 43 | if m == i_id: 44 | self.chord_type = m 45 | self.keys = v 46 | 47 | class chromatic: 48 | def __init__(self): 49 | self.keys = [0,2,4,5,7,9,11] 50 | self.octaves = 1 51 | 52 | def get_key(self, i_num, i_offs, i_c_offs): 53 | key = i_num+i_c_offs 54 | octkey = self.octaves*7 55 | octplus = key//octkey 56 | return self.keys[key%(7*self.octaves)]+(octplus*12)+i_offs 57 | 58 | -------------------------------------------------------------------------------- /plugins/input_old/r_flipper0.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | class input_petaporon(plugins.base): 7 | def __init__(self): pass 8 | def is_dawvert_plugin(self): return 'input' 9 | def get_shortname(self): return 'flipper0' 10 | def get_name(self): return 'Flipper Zero' 11 | def get_priority(self): return 0 12 | def supported_autodetect(self): return False 13 | def get_prop(self, in_dict): 14 | in_dict['file_ext'] = ['fmf'] 15 | in_dict['track_nopl'] = True 16 | in_dict['projtype'] = 'r' 17 | def parse(self, convproj_obj, input_file, dv_config): 18 | from objects.file_proj import proj_flipperzero 19 | from functions import note_data 20 | 21 | convproj_obj.type = 'r' 22 | convproj_obj.set_timings(1, True) 23 | 24 | project_obj = proj_flipperzero.fmf_song() 25 | project_obj.load_from_file(input_file) 26 | 27 | convproj_obj.params.add('bpm', project_obj.bpm, 'float') 28 | 29 | track_obj = convproj_obj.track__add('flipper', 'instrument', 0, False) 30 | track_obj.visual.name = 'Flipper Zero' 31 | track_obj.visual.color.set_float([0.94, 0.58, 0.23]) 32 | 33 | curpos = 0 34 | for note in project_obj.notes: 35 | notedur = (project_obj.duration)*(1/note.duration) 36 | for x in range(note.dots): notedur *= 1.5 37 | #print(notedur,note.key,note.sharp,note.octave,note.dots, (1.5**note.dots)) 38 | if note.key != 'P': 39 | notekey = note_data.keyletter_to_note(note.key, note.octave-5) 40 | track_obj.placements.notelist.add_r(curpos, notedur, notekey, 1, None) 41 | curpos += notedur 42 | 43 | convproj_obj.do_actions.append('do_singlenotelistcut') -------------------------------------------------------------------------------- /plugins/audiofile/ffmpeg.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import importlib.util 6 | 7 | class input_pyav(plugins.base): 8 | def is_dawvert_plugin(self): return 'audiofile' 9 | def get_shortname(self): return 'ffmpeg' 10 | def get_name(self): return 'FFmpeg' 11 | def get_priority(self): return 0 12 | def supported_autodetect(self): return False 13 | def get_prop(self, in_dict): in_dict['file_formats'] = ['wav', 'mp3', 'flac', 'ogg', 'wv'] 14 | def usable(self): 15 | usable = importlib.util.find_spec('av') 16 | usable_meg = '"av" package is not installed.' if not usable else '' 17 | return usable, usable_meg 18 | def getinfo(self, input_file, sampleref_obj, fileextlow): 19 | import av 20 | valid = False 21 | if self.usable: 22 | avdata = av.open(input_file) 23 | if len(avdata.streams.audio) != 0: 24 | avaudio = avdata.streams.audio[0] 25 | sampleref_obj.dur_samples = avaudio.duration 26 | if sampleref_obj.dur_samples == None: sampleref_obj.dur_samples = 0 27 | sampleref_obj.timebase = avaudio.time_base.denominator 28 | audio_hz_b = avaudio.rate 29 | if audio_hz_b != None: sampleref_obj.hz = audio_hz_b 30 | sampleref_obj.dur_sec = (sampleref_obj.dur_samples/sampleref_obj.timebase) 31 | if avaudio.channels: sampleref_obj.channels = avaudio.channels 32 | valid = True 33 | sampleref_obj.fileformat = sampleref_obj.fileref.file.extension.lower() 34 | if sampleref_obj.fileformat == 'wav': 35 | if avaudio.codec.name not in ['pcm_f32le', 'pcm_s16le', 'pcm_s24le', 'pcm_u8']: 36 | sampleref_obj.fileformat = 'wav_codec' 37 | 38 | return valid -------------------------------------------------------------------------------- /plugins/input_ai/r_basicpitch.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import sys 6 | import importlib.util 7 | 8 | class input_ex_basic_pitch(plugins.base): 9 | def __init__(self): pass 10 | def is_dawvert_plugin(self): return 'input' 11 | def get_shortname(self): return 'basic_pitch' 12 | def get_name(self): return 'Basic Pitch' 13 | def get_prop(self, in_dict): 14 | in_dict['track_nopl'] = True 15 | def usable(self): 16 | usable = importlib.util.find_spec('basic_pitch') 17 | usable_meg = 'Basic Pitch is not installed. do "pip install basic_pitch"' if not usable else '' 18 | return usable, usable_meg 19 | def parse(self, convproj_obj, input_file, dv_config): 20 | from basic_pitch.inference import predict 21 | from basic_pitch import ICASSP_2022_MODEL_PATH 22 | 23 | convproj_obj.type = 'r' 24 | convproj_obj.set_timings(4, False) 25 | convproj_obj.params.add('bpm', 120, 'float') 26 | 27 | model_output, midi_data, note_events = predict(input_file) 28 | 29 | track_obj, plugin_obj = convproj_obj.track__addspec__midi('basicpitch', 'basicpitch', 0, 0, False, 1, False) 30 | 31 | for note_event in note_events: 32 | track_obj.placements.notelist.add_r( 33 | float(note_event[0])*8, 34 | float(note_event[1]-note_event[0])*8, 35 | int(note_event[2]-60), 36 | float(note_event[3]), 37 | {}) 38 | 39 | if not all(item == 0 for item in note_event[4]): 40 | for num, point in enumerate(note_event[4]): 41 | autopoint_obj = track_obj.placements.notelist.last_add_auto('pitch') 42 | autopoint_obj.pos = num*0.1 43 | autopoint_obj.value = (point-1)/4 44 | -------------------------------------------------------------------------------- /plugins/plugconv_ext/v_directx_foss.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | 6 | import struct 7 | from functions_plugin_ext import plugin_vst2 8 | from functions import extpluglog 9 | from functions import xtramath 10 | 11 | class plugconv(plugins.base): 12 | def __init__(self): pass 13 | def is_dawvert_plugin(self): return 'plugconv_ext' 14 | def get_prop(self, in_dict): 15 | in_dict['in_plugin'] = ['native', 'directx', None] 16 | in_dict['ext_formats'] = ['vst2'] 17 | in_dict['plugincat'] = ['foss'] 18 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config, extplugtype): 19 | fx_on, fx_wet = plugin_obj.fxdata_get() 20 | 21 | if plugin_obj.type.check_match('native', 'directx', 'Distortion'): 22 | extpluglog.extpluglist.add('FOSS', 'VST', 'Edge', 'Airwindows') 23 | exttype = plugins.base.extplug_exists('airwindows', extplugtype, 'Edge') 24 | if exttype: 25 | extpluglog.extpluglist.success('DirectX', 'Distortion') 26 | p_gain = plugin_obj.params.get('gain', 0).value 27 | p_edge = plugin_obj.params.get('edge', 0).value 28 | p_prelowpasscutoff = plugin_obj.params.get('prelowpasscutoff', 0).value 29 | plugin_obj.replace('user', 'airwindows', 'edge') 30 | plugin_obj.params.add('gain', (p_gain*0.1)+0.1, 'float') 31 | plugin_obj.params.add('lowpass', p_prelowpasscutoff, 'float') 32 | plugin_obj.params.add('highpass', 0, 'float') 33 | plugin_obj.params.add('output', 1, 'float') 34 | plugin_obj.params.add('dry_wet', 1, 'float') 35 | plugin_obj.user_to_external(convproj_obj, pluginid, 'vst2', 'any') 36 | return True 37 | 38 | else: return False -------------------------------------------------------------------------------- /functions_compat/nopl_track.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from objects.convproj import placements 5 | from objects import notelist_splitter 6 | 7 | def process(convproj_obj, in__track_nopl, out__track_nopl, out_type): 8 | 9 | if in__track_nopl == True and out__track_nopl == False: 10 | 11 | if convproj_obj.type in (['r'] if 'r' in out_type else ['r', 'rm']): 12 | timesigblocks_obj = notelist_splitter.timesigblocks() 13 | timesigblocks_obj.create_points_cut(convproj_obj) 14 | 15 | if 'do_singlenotelistcut' in convproj_obj.do_actions: 16 | npsplit = notelist_splitter.cvpj_notelist_splitter(timesigblocks_obj, convproj_obj.time_ppq, 1) 17 | for cvpj_trackid, track_obj in convproj_obj.track__iter(): 18 | npsplit.add_nl(track_obj.placements) 19 | npsplit.process() 20 | else: 21 | for cvpj_trackid, track_obj in convproj_obj.track__iter(): 22 | placement_obj = track_obj.placements.add_notes() 23 | placement_obj.notelist = track_obj.placements.notelist.__copy__() 24 | placement_obj.time.duration = track_obj.placements.notelist.get_dur() 25 | track_obj.placements.notelist.clear() 26 | return True 27 | else: return False 28 | 29 | elif in__track_nopl == False and out__track_nopl == True: 30 | if convproj_obj.type in ['r']: 31 | for cvpj_trackid, track_obj in convproj_obj.track__iter(): 32 | notes = [] 33 | for notespl_obj in track_obj.placements.pl_notes: 34 | track_obj.placements.notelist.merge(notespl_obj.notelist, notespl_obj.time.position) 35 | 36 | track_obj.placements.pl_notes.clear() 37 | 38 | return True 39 | 40 | else: return False 41 | -------------------------------------------------------------------------------- /plugins/input_exper/r_color_art.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import importlib.util 6 | 7 | class input_color_art(plugins.base): 8 | def __init__(self): pass 9 | def is_dawvert_plugin(self): return 'input' 10 | def get_shortname(self): return 'color_art' 11 | def get_name(self): return 'Color Art' 12 | def get_prop(self, in_dict): 13 | in_dict['placement_loop'] = ['loop', 'loop_off', 'loop_adv'] 14 | def usable(self): 15 | usable = importlib.util.find_spec('PIL') 16 | usable_meg = 'Pillow is not installed. do "pip install pillow"' if not usable else '' 17 | return usable, usable_meg 18 | def parse(self, convproj_obj, input_file, dv_config): 19 | from PIL import Image 20 | convproj_obj.type = 'r' 21 | convproj_obj.set_timings(4, False) 22 | 23 | im = Image.open(input_file) 24 | 25 | w, h = im.size 26 | 27 | if h > 28: 28 | downsize = 28/h 29 | newsize = (int(im.width*downsize), int(im.height*downsize)) 30 | im = im.resize(newsize, Image.LANCZOS) 31 | w, h = newsize 32 | 33 | for height in range(h-1): 34 | trackid = str('track'+str(height)) 35 | track_obj = convproj_obj.track__add(trackid, 'instrument', 1, False) 36 | track_obj.visual.name = '.' 37 | for width in range(w): 38 | coordinate = width, height 39 | pixel_color = im.getpixel(coordinate) 40 | placement_obj = track_obj.placements.add_notes() 41 | placement_obj.visual.color.set_int([pixel_color[0],pixel_color[1],pixel_color[2]]) 42 | placement_obj.time.position = width*16 43 | placement_obj.time.duration = 16 44 | placement_obj.notelist.add_r(0, 0.2, 0, 1, {}) 45 | 46 | 47 | -------------------------------------------------------------------------------- /functions_plugin_ext/params_os_juicysfplugin.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import lxml.etree as ET 5 | from functions_plugin_ext import plugin_vst2 6 | from functions_plugin_ext import data_vc2xml 7 | 8 | class juicysfplugin_data: 9 | def __init__(self): 10 | self.program = 0 11 | self.jsfp_xml = ET.Element("MYPLUGINSETTINGS") 12 | self.jsfp_params = ET.SubElement(self.jsfp_xml, "params") 13 | self.jsfp_uiState = ET.SubElement(self.jsfp_xml, "uiState") 14 | self.jsfp_soundFont = ET.SubElement(self.jsfp_xml, "soundFont") 15 | self.jsfp_params.set('bank', "0") 16 | self.jsfp_params.set('preset', "0") 17 | self.jsfp_params.set('attack', "0.0") 18 | self.jsfp_params.set('decay', "0.0") 19 | self.jsfp_params.set('sustain', "0.0") 20 | self.jsfp_params.set('release', "0.0") 21 | self.jsfp_params.set('filterCutOff', "0.0") 22 | self.jsfp_params.set('filterResonance', "0.0") 23 | self.jsfp_uiState.set('width', "500.0") 24 | self.jsfp_uiState.set('height', "300.0") 25 | self.jsfp_soundFont.set('path', '') 26 | 27 | def set_bankpatch(self, bank, patch, filename): 28 | self.jsfp_params.set('bank', str(bank/128)) 29 | self.jsfp_params.set('preset', str(patch/128)) 30 | self.program = patch 31 | self.jsfp_soundFont.set('path', filename) 32 | 33 | def set_param(self, name, value): 34 | self.jsfp_params.set(name, str(value)) 35 | 36 | def set_sffile(self, value): 37 | self.jsfp_soundFont.set('path', value) 38 | 39 | def to_cvpj_vst2(self, convproj_obj, plugin_obj): 40 | plugin_vst2.replace_data(convproj_obj, plugin_obj, 'id', 'any', 1249076848, 'chunk', data_vc2xml.make(self.jsfp_xml), None) 41 | plugin_obj.move_prog(self.program-1) -------------------------------------------------------------------------------- /data_ext/remap/kickmess.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,extid,def,min,max,mathtype,mathval,visname,paramnum,visname 3 | freq_start,pub/freq_start,150,5,3000,exp,2,Start Freq.,0,Start Freq. 4 | freq_end,pub/freq_end,40,5,2000,exp,2,End Freq.,1,End Freq. 5 | f_env_release,pub/f_env_release,440,5,5000,exp,1.5,Length,2,Length 6 | dist_start,pub/dist_start,0.8,0,100,lin,1,Dist. Start,3,Dist. Start 7 | dist_end,pub/dist_end,0.8,0,100,lin,1,Dist. End,4,Dist. End 8 | gain,pub/gain,1,0,2,lin,1,Gain,5,Gain 9 | env_slope,pub/env_slope,0.163,0.01,1,lin,1,Env. slope,6,Env. slope 10 | freq_slope,pub/freq_slope,0.06,0.001,1,exp,2,Freq. slope,7,Freq. slope 11 | noise,pub/noise,0,0,1,lin,1,Tone/Noise,8,Tone/Noise 12 | freq_note_start,pub/freq_note_start,0,0,1,lin,1,Note > Start Freq,9,Note > Start Freq 13 | freq_note_end,pub/freq_note_end,0,0,1,lin,1,Note > End Freq,10,Note > End Freq 14 | env_release,pub/env_release,5,1,1000,lin,1,Env Release,11,Env Release 15 | phase_offs,pub/phase_offs,0,0,1,lin,1,Click,12,Click 16 | dist_on,pub/dist_on,0,0,1,exp,2,Dist. On,13,Dist. On 17 | f1_cutoff,pub/f1_cutoff,5000,20,22050,exp,2,F1 Cutoff,14,F1 Cutoff 18 | f1_res,pub/f1_res,0,0,1,lin,1,F1 Res,15,F1 Res 19 | f1_drive,pub/f1_drive,1,0,5,lin,1,F1 Drive,16,F1 Drive 20 | main_gain,pub/main_gain,1,0,2,exp,2,Main Gain,17,Main Gain 21 | e1_attack,pub/e1_attack,50,0,5000,exp,2,E1 Attack,18,E1 Attack 22 | e1_decay,pub/e1_decay,100,0,5000,lin,1,E1 Decay,19,E1 Decay 23 | e1_sustain,pub/e1_sustain,0.75,0,1,exp,2,E1 Sustain,20,E1 Sustain 24 | e1_release,pub/e1_release,50,0,5000,lin,1,E1 Decay,21,E1 Decay 25 | f1_type,priv/f1_type,0,0,1,lin,1,F1 Type,-1, 26 | f1_on,priv/f1_on,0,0,1,lin,1,F1 On,-1, 27 | midi_chan,priv/midi_chan,0,0,16,lin,1,MIDI Channel,-1, 28 | -------------------------------------------------------------------------------- /data_ext/remap/socalabs/rp2a03.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | pulse1level,pulse1Level,1.0,0.0,1.0,Pulse 1 Level,0,Pulse 1 Level,0,Pulse 1 Level 4 | pulse1duty,pulse1Duty,0.0,0.0,3.0,Pulse 1 Duty Cycle,1,Pulse 1 Duty Cycle,1,Pulse 1 Duty Cycle 5 | pulse2level,pulse2Level,0.0,0.0,1.0,Pulse 2 Level,2,Pulse 2 Level,2,Pulse 2 Level 6 | pulse2duty,pulse2Duty,0.0,0.0,3.0,Pulse 2 Duty Cycle,3,Pulse 2 Duty Cycle,3,Pulse 2 Duty Cycle 7 | noiselevel,noiseLevel,0.0,0.0,1.0,Noise Level,4,Noise Level,4,Noise Level 8 | noiseperiod,noisePeriod,0.0,0.0,1.0,Noise Short,5,Noise Short,5,Noise Short 9 | trianglelevel,triangleLevel,0.0,0.0,1.0,Triangle Level,6,Triangle Level,6,Triangle Level 10 | output,output,1.0,0.0,1.0,Output,7,Output,7,Output 11 | pulse1tune,pulse1Tune,0.0,-48.0,48.0,Pulse 1 Tune,8,Pulse 1 Tune,8,Pulse 1 Tune 12 | pulse1tunefine,pulse1TuneFine,0.0,-100.0,100.0,Pulse 1 Tune Fine,9,Pulse 1 Tune Fine,9,Pulse 1 Tune Fine 13 | pulse2tune,pulse2Tune,0.0,-48.0,48.0,Pulse 2 Tune,10,Pulse 2 Tune,10,Pulse 2 Tune 14 | pulse2tunefine,pulse2TuneFine,0.0,-100.0,100.0,Pulse 2 Tune Fine,11,Pulse 2 Tune Fine,11,Pulse 2 Tune Fine 15 | triangletune,triangleTune,0.0,-48.0,48.0,Triangle Tune,12,Triangle Tune,12,Triangle Tune 16 | triangletunefine,triangleTuneFine,0.0,-100.0,100.0,Triangle Tune Fine,13,Triangle Tune Fine,13,Triangle Tune Fine 17 | pulse1sweep,pulse1Sweep,0.0,-8.0,8.0,Pulse 1 Sweep,14,Pulse 1 Sweep,14,Pulse 1 Sweep 18 | pulse1shift,pulse1Shift,0.0,0.0,7.0,Pulse 1 Shift,15,Pulse 1 Shift,15,Pulse 1 Shift 19 | pulse2sweep,pulse2Sweep,0.0,-8.0,8.0,Pulse 2 Sweep,16,Pulse 2 Sweep,16,Pulse 2 Sweep 20 | pulse2shift,pulse2Shift,0.0,0.0,7.0,Pulse 2 Shift,17,Pulse 2 Shift,17,Pulse 2 Shift 21 | -------------------------------------------------------------------------------- /data_main/datadef/openmpt.ddef: -------------------------------------------------------------------------------- 1 | area_struct|chorus 2 | part|skip_n.4| 3 | part|float|wetdrymix 4 | part|float|depth 5 | part|float|frequency 6 | part|float|waveshape 7 | part|float|phase 8 | part|float|feedback 9 | part|float|delay 10 | 11 | area_struct|compressor 12 | part|skip_n.4| 13 | part|float|gain 14 | part|float|attack 15 | part|float|release 16 | part|float|threshold 17 | part|float|ratio 18 | part|float|predelay 19 | 20 | area_struct|distortion 21 | part|skip_n.4| 22 | part|float|gain 23 | part|float|edge 24 | part|float|prelowpasscutoff 25 | part|float|posteqcenterfrequency 26 | part|float|posteqbandwidth 27 | 28 | area_struct|echo 29 | part|skip_n.4| 30 | part|float|wetdry 31 | part|float|feedback 32 | part|float|leftdelay 33 | part|float|rightdelay 34 | part|float|pandelay 35 | 36 | area_struct|flanger 37 | part|skip_n.4| 38 | part|float|wetdrymix 39 | part|float|waveshape 40 | part|float|frequency 41 | part|float|depth 42 | part|float|phase 43 | part|float|feedback 44 | part|float|delay 45 | 46 | area_struct|gargle 47 | part|skip_n.4| 48 | part|float|rate 49 | part|float|waveshape 50 | 51 | area_struct|i3dl2reverb 52 | part|skip_n.4| 53 | part|float|room 54 | part|float|roomhf 55 | part|float|roomrollofffactor 56 | part|float|decaytime 57 | part|float|decayhfratio 58 | part|float|reflections 59 | part|float|reflectionsdelay 60 | part|float|reverb 61 | part|float|reverbdelay 62 | part|float|diffusion 63 | part|float|density 64 | part|float|hfreference 65 | part|float|quality 66 | 67 | area_struct|parameq 68 | part|skip_n.4| 69 | part|float|center 70 | part|float|bandwidth 71 | part|float|eqgain 72 | 73 | area_struct|wavesreverb 74 | part|skip_n.4| 75 | part|float|ingain 76 | part|float|reverbmix 77 | part|float|reverbtime 78 | part|float|highfreqrtratio -------------------------------------------------------------------------------- /data_ext/remap/socalabs/papu.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2,vst3,vst3 2 | paramid,extid,def,min,max,visname,paramnum,visname,paramnum,visname 3 | ol1,OL1,1.0,0.0,1.0,Pulse 1 OL,0,Pulse 1 OL,0,Pulse 1 OL 4 | or1,OR1,1.0,0.0,1.0,Pulse 1 OR,1,Pulse 1 OR,1,Pulse 1 OR 5 | duty1,duty1,0.0,0.0,3.0,Pulse 1 Duty,2,Pulse 1 Duty,2,Pulse 1 Duty 6 | a1,A1,1.0,0.0,7.0,Pulse 1 A,3,Pulse 1 A,3,Pulse 1 A 7 | r1,R1,1.0,0.0,7.0,Pulse 1 R,4,Pulse 1 R,4,Pulse 1 R 8 | tune1,tune1,0.0,-48.0,48.0,Pulse 1 Tune,5,Pulse 1 Tune,5,Pulse 1 Tune 9 | fine1,fine1,0.0,-100.0,100.0,Pulse 1 Tune Fine,6,Pulse 1 Tune Fine,6,Pulse 1 Tune Fine 10 | sweep1,sweep1,0.0,-7.0,7.0,Pulse 1 Sweep,7,Pulse 1 Sweep,7,Pulse 1 Sweep 11 | shift1,shift1,0.0,0.0,7.0,Pulse 1 Shift,8,Pulse 1 Shift,8,Pulse 1 Shift 12 | ol2,OL2,0.0,0.0,1.0,Pulse 2 OL,9,Pulse 2 OL,9,Pulse 2 OL 13 | or2,OR2,0.0,0.0,1.0,Pulse 2 OR,10,Pulse 2 OR,10,Pulse 2 OR 14 | duty2,duty2,0.0,0.0,3.0,Pulse 2 Duty,11,Pulse 2 Duty,11,Pulse 2 Duty 15 | a2,A2,1.0,0.0,7.0,Pulse 2 A,12,Pulse 2 A,12,Pulse 2 A 16 | r2,R2,1.0,0.0,7.0,Pulse 2 R,13,Pulse 2 R,13,Pulse 2 R 17 | tune2,tune2,0.0,-48.0,48.0,Pulse 2 Tune,14,Pulse 2 Tune,14,Pulse 2 Tune 18 | fine2,fine2,0.0,-100.0,100.0,Pulse 2 Tune Fine,15,Pulse 2 Tune Fine,15,Pulse 2 Tune Fine 19 | oln,OLN,0.0,0.0,1.0,Noise OL,16,Noise OL,16,Noise OL 20 | orl,ORL,0.0,0.0,1.0,Noise OR,17,Noise OR,17,Noise OR 21 | an,AN,1.0,0.0,7.0,Noise A,18,Noise A,18,Noise A 22 | ar,AR,1.0,0.0,7.0,Noise R,19,Noise R,19,Noise R 23 | shiftn,shiftN,0.0,0.0,13.0,Noise Shift,20,Noise Shift,20,Noise Shift 24 | stepn,stepN,0.0,0.0,1.0,Noise Step,21,Noise Step,21,Noise Step 25 | ration,ratioN,0.0,0.0,7.0,Noise Ratio,22,Noise Ratio,22,Noise Ratio 26 | output,output,7.0,0.0,7.0,Output,23,Output,23,Output 27 | param,param,1.0,1.0,8.0,Voices,24,Voices,24,Voices 28 | -------------------------------------------------------------------------------- /data_ext/remap/magical8bitplug2.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,extid,def,min,max,visname,paramnum,visname 3 | arpeggiodirection,arpeggioDirection,0,0,1,Direction,11,Direction 4 | arpeggiotime,arpeggioTime,0.0299999993294478,0,0.299999982118607,Time,10,Time 5 | attack,attack,0,0,5,Attack,5,Attack 6 | bendrange,bendRange,2,0,24,Bend Range,12,Bend Range 7 | colorscheme,colorScheme,0,0,5,Color Scheme,1,Color Scheme 8 | decay,decay,0,0,5,Decay,6,Decay 9 | duty,duty,0,0,2,Duty,19,Duty 10 | gain,gain,0.5,0,1,Gain,3,Gain 11 | isadvancedpanelopen_raw,isAdvancedPanelOpen_raw,0,0,1,Advanced,0,Advanced 12 | isarpeggioenabled_raw,isArpeggioEnabled_raw,0,0,1,Arpeggio Enabled,9,Enabled 13 | isdutysequenceenabled_raw,isDutySequenceEnabled_raw,0,0,1,DutySeq Enabled,24,Enabled 14 | ispitchsequenceenabled_raw,isPitchSequenceEnabled_raw,0,0,1,PitchSeq Enabled,23,Enabled 15 | isvolumesequenceenabled_raw,isVolumeSequenceEnabled_raw,0,0,1,VolumeSeq Enabled,22,Enabled 16 | maxpoly,maxPoly,8,1,64,Max Poly,4,Max Poly 17 | noisealgorithm_raw,noiseAlgorithm_raw,0,0,2,Algorithm,20,Algorithm 18 | osc,osc,0,0,2,OSC Type,2,OSC Type 19 | pitchsequencemode_raw,pitchSequenceMode_raw,0,0,1,Mode,25,Mode 20 | release,release,0,0,5,Release,8,Release 21 | restrictstonesfrequency_raw,restrictsToNESFrequency_raw,0,0,1,Restricts to NES frequency,21,Restricts to NES frequency 22 | suslevel,suslevel,1,0,1,Sustain,7,Sustain 23 | sweepinitialpitch,sweepInitialPitch,0,-24,24,Ini.Pitch,17,Ini.Pitch 24 | sweeptime,sweepTime,0.100000001490116,0.00999999977648258,5,Time,18,Time 25 | vibratodelay,vibratoDelay,0.299999982118607,0,1,Delay,15,Delay 26 | vibratodepth,vibratoDepth,0,0,2,Depth,14,Depth 27 | vibratoignoreswheel_raw,vibratoIgnoresWheel_raw,1,0,1,Ignores Wheel,16,Ignores Wheel 28 | vibratorate,vibratoRate,0.150000005960465,0.00999999977648258,1,Rate,13,Rate 29 | -------------------------------------------------------------------------------- /data_main/plugts/directx.pltr: -------------------------------------------------------------------------------- 1 | 2 | [chorus_univ] 3 | >input 4 | type|native:directx:Chorus 5 | param|delay 6 | param|depth 7 | param|feedback 8 | param|frequency 9 | param|phase 10 | param|wetdrymix 11 | proc 14 | calc|frequency|from_one|0|10 15 | calc|phase|from_one|-0.5|0.5 16 | calc|feedback|from_one|-0.99|0.99 17 | calc|delay|from_one|0|0.02 18 | output 21 | type|universal:chorus 22 | param|delayinput 32 | type|native:directx:Compressor 33 | param|attack 34 | param|gain 35 | param|predelay 36 | param|ratio 37 | param|release 38 | param|threshold 39 | proc 42 | calc|gain|from_one|-60|60 43 | calc|attack|from_one|0.0001|0.5 44 | calc|release|from_one|0.05|3 45 | calc|threshold|from_one|-60|0 46 | calc|ratio|from_one|1|100 47 | calc|predelay|mul|1|0.004 48 | output 51 | type|universal:compressor 52 | param|attackinput 62 | type|native:directx:Flanger 63 | param|wetdrymix 64 | param|delay 65 | param|depth 66 | param|feedback 67 | param|frequency 68 | param|phase 69 | proc 72 | calc|frequency|from_one|0|10 73 | calc|phase|from_one|-0.5|0.5 74 | calc|feedback|from_one|-0.99|0.99 75 | calc|delay|from_one|0|0.004 76 | output 79 | type|universal:flanger 80 | param|wet '+lastplug.name+(' [%s]' % lastplug.vendor if lastplug.vendor else '')) 40 | 41 | def convinternal(i_type, i_name, o_type, o_name): 42 | logger_plugconv.info('INT | '+i_type+' to '+o_type+': '+i_name+' > '+o_name) 43 | 44 | def printerr(i_type, i_data): 45 | if i_type == 'ext_noncompat': 46 | logger_plugconv.info('No Equivalent Plugin Found for '+str(i_data[0])+':'+str(i_data[1])) 47 | if i_type == 'ext_notfound': 48 | logger_plugconv.info(''+i_data[0]+' Plugin Not Found: '+i_data[1]) 49 | if i_type == 'ext_notfound_multi': 50 | logger_plugconv.info('One of the plugins is not found: ') 51 | for t in i_data: 52 | logger_plugconv.info(' '+t[1]+' ('+t[0]+')') 53 | if i_type == 'ext_other': 54 | logger_plugconv.info(''+i_data[0]) 55 | -------------------------------------------------------------------------------- /objects/file_proj/_rpp/source.py: -------------------------------------------------------------------------------- 1 | from objects.file_proj._rpp import func as reaper_func 2 | 3 | robj = reaper_func.rpp_obj 4 | rvd = reaper_func.rpp_value 5 | rvs = reaper_func.rpp_value.single_var 6 | 7 | class rpp_source: 8 | def __init__(self): 9 | self.type = 'NONE' 10 | self.length = rvs('', float, False) 11 | self.mode = rvs(0, int, False) 12 | self.file = rvs('', str, False) 13 | self.startpos = rvs('', float, False) 14 | self.overlap = rvs('', float, False) 15 | self.hasdata = rvd([0,960,'QN'], ['hasdata', 'ppq', 'ppq_l'], [bool,int,str], False) 16 | self.notes = [] 17 | self.source = None 18 | 19 | def load(self, rpp_data): 20 | for name, is_dir, values, inside_dat in reaper_func.iter_rpp(rpp_data): 21 | if name == 'FILE': self.file.set(values[0]) 22 | if name == 'E': self.notes.append([True]+values) 23 | if name == 'e': self.notes.append([False]+values) 24 | if name == 'HASDATA': self.hasdata.read(values) 25 | if name == 'LENGTH': self.length.read(values) 26 | if name == 'STARTPOS': self.startpos.read(values) 27 | if name == 'OVERLAP': self.overlap.read(values) 28 | if name == 'MODE': self.mode.read(values) 29 | if name == 'SOURCE': 30 | source_obj = rpp_source() 31 | source_obj.type = values[0] 32 | source_obj.load(inside_dat) 33 | self.source = source_obj 34 | 35 | def write(self, rpp_data): 36 | self.length.write('LENGTH', rpp_data) 37 | self.mode.write('MODE', rpp_data) 38 | self.file.write('FILE', rpp_data) 39 | self.startpos.write('STARTPOS', rpp_data) 40 | self.overlap.write('OVERLAP', rpp_data) 41 | self.hasdata.write('HASDATA', rpp_data) 42 | for note in self.notes: 43 | rpp_data.children.append(['E' if note[0] else 'e']+note[1:]) 44 | if self.source: 45 | rpp_sourcedata = robj('SOURCE',[self.source.type]) 46 | self.source.write(rpp_sourcedata) 47 | rpp_data.children.append(rpp_sourcedata) -------------------------------------------------------------------------------- /plugins/plugconv/universal__n_serato.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | from functions import extpluglog 6 | 7 | class plugconv(plugins.base): 8 | def __init__(self): pass 9 | def is_dawvert_plugin(self): return 'plugconv' 10 | def get_priority(self): return 0 11 | def get_prop(self, in_dict): 12 | in_dict['in_plugins'] = [['native', 'serato-fx', None]] 13 | in_dict['in_daws'] = ['serato'] 14 | in_dict['out_plugins'] = [['universal', None, None]] 15 | in_dict['out_daws'] = [] 16 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 17 | 18 | if plugin_obj.type.check_wildmatch('native', 'serato-fx', 'Limiter.serato-effect-definition'): 19 | extpluglog.convinternal('Serato Studio', 'Limiter', 'Universal', 'Limiter') 20 | manu_obj = plugin_obj.create_manu_obj(convproj_obj, pluginid) 21 | manu_obj.from_param('amount', 'amount', 0) 22 | manu_obj.calc('amount', 'mul', 12, 0, 0, 0) 23 | plugin_obj.replace('universal', 'limiter', None) 24 | manu_obj.to_param('amount', 'gain', None) 25 | manu_obj.to_value(0, 'threshold', None, 'float') 26 | manu_obj.to_value(0.1, 'release', None, 'float') 27 | return 1 28 | 29 | if plugin_obj.type.check_wildmatch('native', 'serato-fx', 'Decimate Crusher.serato-effect-definition'): 30 | extpluglog.convinternal('Serato Studio', 'Decimate Crusher', 'Universal', 'Bitcrush') 31 | manu_obj = plugin_obj.create_manu_obj(convproj_obj, pluginid) 32 | manu_obj.from_param('amount', 'amount', 0) 33 | manu_obj.calc('amount', 'pow', 0.1, 0, 0, 0) 34 | manu_obj.calc('amount', 'mul', 15500, 0, 0, 0) 35 | manu_obj.calc('amount', 'sub_r', 16000, 0, 0, 0) 36 | plugin_obj.replace('universal', 'bitcrush', None) 37 | manu_obj.to_param('amount', 'freq', None) 38 | manu_obj.to_value(16, 'bits', None, 'float') 39 | return 1 40 | 41 | return 2 -------------------------------------------------------------------------------- /data_ext/dataset/castello_reverb.dset: -------------------------------------------------------------------------------- 1 | { 2 | "plugin": { 3 | "objects": { 4 | "main": { 5 | "params": { 6 | "mix": { 7 | "type": "float", 8 | "def": 0.5, 9 | "name": "Mix", 10 | "extplug_assoc": { 11 | "vst3": { 12 | "num": 2 13 | }, 14 | "vst2": { 15 | "num": 0 16 | } 17 | }, 18 | "extplug_paramid": "mix" 19 | }, 20 | "size": { 21 | "type": "float", 22 | "def": 0.330000042915344, 23 | "name": "Size", 24 | "extplug_assoc": { 25 | "vst3": { 26 | "num": 3 27 | }, 28 | "vst2": { 29 | "num": 1 30 | } 31 | }, 32 | "extplug_paramid": "size" 33 | }, 34 | "brightness": { 35 | "type": "float", 36 | "def": 0.660000085830689, 37 | "name": "Brightness", 38 | "extplug_assoc": { 39 | "vst3": { 40 | "num": 4 41 | }, 42 | "vst2": { 43 | "num": 2 44 | } 45 | }, 46 | "extplug_paramid": "brightness" 47 | } 48 | } 49 | } 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /objects/file_proj/proj_flipperzero.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import re 5 | from objects.exceptions import ProjectFileParserException 6 | 7 | class fmf_note: 8 | def __init__(self): 9 | self.duration = 1 10 | self.key = '' 11 | self.sharp = False 12 | self.octave = 0 13 | self.dots = 0 14 | 15 | class fmf_song: 16 | def __init__(self): 17 | self.version = 0 18 | self.bpm = 120 19 | self.duration = 0 20 | self.octave = 0 21 | self.notes = [] 22 | 23 | def load_from_file(self, input_file): 24 | try: 25 | f_fmf = open(input_file, 'r') 26 | lines_fmf = f_fmf.readlines() 27 | except UnicodeDecodeError: 28 | raise ProjectFileParserException('flipperzero: File is not text') 29 | 30 | for line in lines_fmf: 31 | if line != "\n": 32 | fmf_command, fmf_param = line.rstrip().split(': ') 33 | if fmf_command == 'Version': self.version = int(fmf_param) 34 | if fmf_command == 'BPM': self.bpm = int(fmf_param) 35 | if fmf_command == 'Duration': self.duration = int(fmf_param) 36 | if fmf_command == 'Octave': self.octave = int(fmf_param) 37 | if fmf_command == 'Notes': 38 | notes = fmf_param.strip() 39 | notes = notes.replace(',','').split(' ') 40 | 41 | for note in notes: 42 | note_obj = fmf_note() 43 | note_obj.dots = note.count('.') 44 | note_obj.octave = self.octave 45 | note = note.replace('.','').strip() 46 | note = re.split('(\\d+)',note) 47 | while '' in note: note.remove('') 48 | 49 | if note: 50 | if note[0].isnumeric(): 51 | note_obj.duration = int(note[0]) 52 | note = note[1:] 53 | 54 | if note: 55 | note_obj.key = note[0][0] 56 | note_obj.sharp = "#" in note[0] 57 | note = note[1:] 58 | 59 | if note: 60 | note_obj.octave = int(note[0]) 61 | 62 | self.notes.append(note_obj) 63 | return True -------------------------------------------------------------------------------- /objects/regions.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import numpy as np 5 | 6 | class regions: 7 | dtype = [ 8 | ('used', np.int16), 9 | ('start', np.int16), 10 | ('end', np.int16), 11 | ] 12 | 13 | def __init__(self, size): 14 | self.data = np.zeros(size, dtype=regions.dtype) 15 | self.cursor = 0 16 | 17 | def __iter__(self): 18 | for u,s,e in self.data: 19 | if u: yield s, e 20 | 21 | def add(self, i_min, i_max): 22 | self.data[self.cursor][0] = 1 23 | self.data[self.cursor][1] = i_min 24 | self.data[self.cursor][2] = i_max 25 | self.cursor += 1 26 | 27 | def from_boollist(self, boollist): 28 | poslist = [] 29 | for c, v in enumerate(boollist): 30 | if v: poslist.append(c) 31 | 32 | self.cursor = 0 33 | prev_val = -2 34 | for v in poslist: 35 | if prev_val != v-1: self.add(v, v) 36 | else: self.data[self.cursor-1][2] += 1 37 | prev_val = v 38 | 39 | 40 | def chop(self, pos): 41 | founds = np.where(np.logical_and(pos>=self.data['start'], pos<=self.data['end'], self.data['used']==1))[0] 42 | 43 | if len(founds): 44 | foundidx = founds[0] 45 | old_start = self.data['start'][foundidx] 46 | old_end = self.data['end'][foundidx] 47 | 48 | self.data['start'][foundidx] = old_start 49 | self.data['end'][foundidx] = pos-1 50 | self.add(pos, old_end) 51 | 52 | def sort(self): 53 | nums = self.data.argsort(order=['used', 'start']) 54 | nonzero = np.count_nonzero(self.data['used']) 55 | self.data = np.roll(self.data[nums], nonzero) 56 | self.cursor = nonzero-1 57 | 58 | 59 | def out_txt(self, sep): 60 | size = len(np.nonzero(self.data['used'])) 61 | 62 | txttab = [[' ']*sep for x in range(np.max(self.data['end'])+1)] 63 | for u,s,e in self.data: 64 | if u: 65 | for v in range(s,e+1): txttab[v] = ['-']*sep 66 | txttab[s][0] = '[' 67 | txttab[e][-1] = ']' 68 | 69 | return '|'.join([''.join(x) for x in txttab]) 70 | -------------------------------------------------------------------------------- /functions_compat/timesigblocks.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from functions import xtramath 5 | 6 | def create_points_cut(convproj_obj, mode): 7 | songduration = convproj_obj.get_dur() 8 | ppq = convproj_obj.time_ppq 9 | 10 | timesig_num, timesig_dem = convproj_obj.timesig 11 | if mode == 1: 12 | timesig_num *= timesig_dem 13 | 14 | timesigposs = [] 15 | 16 | if mode == 0: 17 | for p, v in convproj_obj.timesig_auto: timesigposs.append([p, v[0]*ppq]) 18 | if mode == 1: 19 | for p, v in convproj_obj.timesig_auto: timesigposs.append([p, v[0]*v[1]*ppq]) 20 | 21 | if timesigposs == []: timesigposs.append([0, int(4*ppq)]) 22 | timesigposs.append([songduration, None]) 23 | if timesigposs == []: timesigposs = [[0, timesig_num*ppq],[songduration, timesig_num*ppq]] 24 | 25 | timesigblocks = [] 26 | for timesigposnum in range(len(timesigposs)-1): 27 | timesigpos = timesigposs[timesigposnum] 28 | timesigblocks.append([timesigpos[0], timesigposs[timesigposnum+1][0], timesigpos[1]]) 29 | 30 | splitpoints = [] 31 | p_splitts = {} 32 | for t in timesigblocks: 33 | if t[0] not in splitpoints: splitpoints.append(t[0]) 34 | p_splitts[t[0]] = t[2] 35 | curpos = t[0] 36 | for x in xtramath.gen_float_blocks(t[1]-t[0],t[2]): 37 | curpos += x 38 | p_splitts[curpos] = t[2] 39 | if curpos not in splitpoints: splitpoints.append(curpos) 40 | 41 | splitts = [p_splitts[x] for x in splitpoints] 42 | 43 | 44 | #print(splitpoints, timesigposs, songduration) 45 | 46 | if False: 47 | import matplotlib.pyplot as plt 48 | import matplotlib 49 | matplotlib.interactive(True) 50 | plt.scatter(splitpoints, [0 for x in splitpoints]) 51 | plt.scatter([0,songduration], [0.3,0.3]) 52 | plt.scatter([x[0] for x in timesigposs], [0.1 for x in timesigposs]) 53 | plt.scatter([1,1], [-1,1]) 54 | plt.show(block=True) 55 | 56 | print(splitpoints) 57 | print(splitts) 58 | print(timesigposs) 59 | 60 | return splitpoints, splitts, timesigposs -------------------------------------------------------------------------------- /objects/file_proj/proj_piyopiyo.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from objects.data_bytes import bytereader 5 | from objects.exceptions import ProjectFileParserException 6 | import logging 7 | 8 | logger_projparse = logging.getLogger('projparse') 9 | 10 | class piyopiyo_melo_track: 11 | def __init__(self, song_file): 12 | self.octave = song_file.uint8() 13 | self.icon = song_file.uint8() 14 | self.unk = song_file.uint16() 15 | self.length = song_file.uint32() 16 | self.volume = song_file.uint32() 17 | self.unk2 = song_file.skip(8) 18 | self.waveform = song_file.l_int8(256) 19 | self.envelope = song_file.l_uint8(64) 20 | 21 | logger_projparse.info("piyopiyo: Track: Oct:" + str(self.octave) + ", Icon:" + str(self.icon) + ", Len:" + str(self.length) + ", Vol:" + str(self.volume)) 22 | 23 | class piyopiyo_song: 24 | def __init__(self): 25 | pass 26 | 27 | def load_from_file(self, input_file): 28 | song_file = bytereader.bytereader() 29 | song_file.load_file(input_file) 30 | 31 | try: song_file.magic_check(b'PMD') 32 | except ValueError as t: raise ProjectFileParserException('piyopiyo: '+str(t)) 33 | 34 | song_file.skip(1) 35 | 36 | ptr__tracks = song_file.uint32() 37 | self.musicwait = song_file.uint32() 38 | self.loopstart = song_file.uint32() 39 | self.loopend = song_file.uint32() 40 | self.records_per_track = song_file.uint32() 41 | logger_projparse.info("piyopiyo: MusicWait: " + str(self.musicwait)) 42 | logger_projparse.info("piyopiyo: Loop Beginning: " + str(self.loopstart)) 43 | logger_projparse.info("piyopiyo: Loop End: " + str(self.loopend)) 44 | logger_projparse.info("piyopiyo: Records Per Track: " + str(self.records_per_track)) 45 | self.tracks = [piyopiyo_melo_track(song_file) for _ in range(3)] 46 | self.perc_volume = song_file.uint32() 47 | song_file.seek(ptr__tracks) 48 | self.notes_data = [ [[song_file.flags24(), song_file.uint8()] for _ in range(self.records_per_track)] for _ in range(4)] 49 | return True -------------------------------------------------------------------------------- /data_main/plugts/flstudio_univ.pltr: -------------------------------------------------------------------------------- 1 | 2 | [fruity_reeverb] 3 | >input 4 | type|native:flstudio:fruity reeverb 5 | param|lowcut 6 | param|highcut 7 | param|room_size 8 | param|predelay 9 | param|diffusion 10 | param|decay 11 | param|hidamping 12 | param|dry 13 | param|reverb 14 | proc 17 | calc|lowcut|valrange|0|65536|20|3000 18 | calc|highcut|valrange|0|65536|500|22050 19 | calc|room_size|div|65536 20 | calc|diffusion|div|65536 21 | calc|decay|valrange|0|65536|0.1|20 22 | calc|hidamping|valrange|0|65536|500|22050 23 | calc|dry|div|65536 24 | calc|reverb|div|65536 25 | output 28 | type|universal:reverb 29 | param|low_cutinput 42 | type|native:flstudio:fruity reeverb 2 43 | param|lowcut 44 | param|highcut 45 | param|predelay 46 | param|room_size 47 | param|diffusion 48 | param|decay 49 | param|hidamping 50 | param|bass 51 | param|dry 52 | param|wet 53 | proc 56 | calc|highcut|mul|100 57 | calc|predelay|div|38.4 58 | calc|decay|div|10 59 | calc|hidamping|mul|100 60 | calc|bass|div|100 61 | calc|dry|div|128 62 | calc|wet|div|128 63 | calc|diffusion|div|100 64 | calc|room_size|div|100 65 | output 68 | type|universal:reverb 69 | param|low_cutinput 83 | type|native:flstudio:fruity balance 84 | param|pan 85 | param|vol 86 | proc 89 | calc|pan|div|128 90 | calc|vol|div|256 91 | output 94 | type|universal:volpan 95 | param|pan Multiple') 11 | 12 | do_unused = 'mi2m-output-unused-nle' in dv_config.flags_convproj 13 | 14 | nle_list = [x for x in convproj_obj.notelist_index] 15 | used_nle = [] 16 | 17 | for pl_id, playlist_obj in convproj_obj.playlist__iter(): 18 | used_nle += [x.fromindex for x in playlist_obj.placements.pl_notes_indexed.data] 19 | 20 | unused_nle = list(set(nle_list)) 21 | 22 | for x in used_nle: 23 | if x in unused_nle: unused_nle.remove(x) 24 | 25 | if do_unused: 26 | pl_obj_found = None 27 | maxdur = convproj_obj.get_dur() 28 | 29 | for pl_id, playlist_obj in convproj_obj.playlist__iter(): 30 | if not playlist_obj.placements.get_dur(): 31 | pl_obj_found = playlist_obj 32 | break 33 | 34 | usednums = list(convproj_obj.playlist) 35 | 36 | num = 0 37 | while True: 38 | if num not in usednums: 39 | pl_obj_found = convproj_obj.playlist__add(num, 1, True) 40 | pl_obj_found.visual.name = '>>> UNUSED' 41 | break 42 | num += 1 43 | 44 | startpos = maxdur 45 | for x in unused_nle: 46 | nle_obj = convproj_obj.notelist_index[x] 47 | nledur = nle_obj.notelist.get_dur() 48 | if nle_obj.visual.name: nle_obj.visual.name = '[UNUSED] '+nle_obj.visual.name 49 | else: nle_obj.visual.name = '[UNUSED]' 50 | 51 | if nledur: 52 | startpos += convproj_obj.time_ppq*4 53 | 54 | i_pl = pl_obj_found.placements.add_notes_indexed() 55 | i_pl.fromindex = x 56 | i_pl.time.set_posdur(startpos, nledur) 57 | 58 | startpos += nledur 59 | 60 | for pl_id, playlist_obj in convproj_obj.playlist__iter(): 61 | playlist_obj.placements.unindex_notes(convproj_obj.notelist_index) 62 | playlist_obj.placements.unindex_audio(convproj_obj.sample_index) 63 | 64 | convproj_obj.notelist_index = {} 65 | convproj_obj.sample_index = {} 66 | 67 | convproj_obj.type = 'm' -------------------------------------------------------------------------------- /plugins/audioconv/vorbisacm.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import io 6 | import importlib.util 7 | 8 | class input_soundfile(plugins.base): 9 | def is_dawvert_plugin(self): return 'audioconv' 10 | def get_shortname(self): return 'vorbisacm' 11 | def get_name(self): return 'VorbisACM' 12 | def get_priority(self): return -100 13 | def supported_autodetect(self): return False 14 | def get_prop(self, in_dict): 15 | in_dict['in_file_formats'] = ['wav_ogg'] 16 | in_dict['out_file_formats'] = ['wav', 'mp3', 'flac', 'ogg'] 17 | def usable(self): 18 | usable = importlib.util.find_spec('soundfile') 19 | usable_meg = '"soundfile" package is not installed.' if not usable else '' 20 | return usable, usable_meg 21 | def convert_file(self, sampleref_obj, to_type, outpath): 22 | import soundfile 23 | from objects.data_bytes import riff_chunks 24 | if sampleref_obj.fileref.file.extension == 'wav': 25 | input_file = sampleref_obj.fileref.get_path(None, False) 26 | riff_data = riff_chunks.riff_chunk() 27 | byr_stream = riff_data.load_from_file(input_file, False) 28 | 29 | data_pos = 0 30 | data_end = 0 31 | fmt_format = 0 32 | 33 | for riff_part in riff_data.in_data: 34 | if riff_part.name == b'fmt ': 35 | with byr_stream.isolate_range(riff_part.start, riff_part.end, False) as bye_stream: fmt_format = bye_stream.uint16() 36 | elif riff_part.name == b'data': 37 | data_pos = riff_part.start 38 | data_end = riff_part.end 39 | 40 | if fmt_format == 26447: 41 | with byr_stream.isolate_range(data_pos, data_end, False) as bye_stream: audiodata = bye_stream.raw(data_end-data_pos) 42 | samples, samplerate = soundfile.read(io.BytesIO(audiodata)) 43 | sampleref_obj.fileref.set_folder(None, outpath, 0) 44 | sampleref_obj.fileformat = to_type 45 | sampleref_obj.fileref.file.extension = to_type 46 | output_file = sampleref_obj.fileref.get_path(None, False) 47 | f = open(output_file, 'wb') 48 | soundfile.write(f, samples, samplerate) 49 | return True 50 | return False 51 | return False -------------------------------------------------------------------------------- /functions_plugin/juce_memoryblock.py: -------------------------------------------------------------------------------- 1 | # code from https://github.com/asb2m10/dexed/discussions/402 2 | encodingTable = ".ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+" 3 | 4 | def _setBitRange(size, data, bitRangeStart, numBits, bitsToSet): 5 | bite = bitRangeStart >> 3 6 | offsetInByte = int(bitRangeStart & 7) 7 | mask = ~(((0xffffffff) << (32 - numBits)) >> (32 - numBits)) 8 | while numBits > 0 and bite < size: 9 | bitsThisTime = min(numBits, 8 - offsetInByte) 10 | tempMask = (mask << offsetInByte) | ~(((0xffffffff) >> offsetInByte) << offsetInByte) 11 | tempBits = bitsToSet << offsetInByte 12 | data[bite] = (data[bite] & tempMask) | tempBits 13 | bite += 1 14 | numBits -= bitsThisTime 15 | bitsToSet >>= bitsThisTime 16 | mask >>= bitsThisTime 17 | offsetInByte = 0 18 | 19 | def fromJuceBase64Encoding(s): 20 | size = int(s[:s.index(".")]) 21 | b64str = s[s.index(".") + 1:] 22 | pos = 0 23 | data = [0] * size 24 | for i in range(len(b64str)): 25 | c = b64str[i] 26 | for j in range(64): 27 | if encodingTable[j] == c: 28 | _setBitRange(size, data, pos, 6, j) 29 | pos += 6 30 | break 31 | return bytes(i & 0xff for i in data) 32 | 33 | def _getBitRange(size, data, bitRangeStart, numBits): 34 | res = 0 35 | byte = bitRangeStart >> 3 36 | offsetInByte = bitRangeStart & 7 37 | bitsSoFar = 0 38 | while numBits > 0 and byte < size: 39 | bitsThisTime = min(numBits, 8 - offsetInByte) 40 | mask = (0xff >> (8 - bitsThisTime)) << offsetInByte 41 | res |= (((data[byte] & mask) >> offsetInByte) << bitsSoFar) 42 | bitsSoFar += bitsThisTime 43 | numBits -= bitsThisTime 44 | byte += 1 45 | offsetInByte = 0 46 | return res 47 | 48 | def toJuceBase64Encoding(bytes): 49 | if not bytes: return None 50 | numChars = ((len(bytes) << 3) + 5) // 6 51 | s = str(len(bytes)) + '.' 52 | for i in range(numChars): s += encodingTable[_getBitRange(len(bytes), bytes, i * 6, 6)] 53 | return s 54 | -------------------------------------------------------------------------------- /data_ext/datadef/vst2/exakt_lite.ddef: -------------------------------------------------------------------------------- 1 | 2 | area_struct|main 3 | part|int|header 4 | part|byte|unknown_0 5 | part|byte|unknown_1 6 | part|byte|unknown_2 7 | part|byte|unknown_3 8 | part|byte|unknown_4 9 | part|byte|unknown_5 10 | part|byte|unknown_6 11 | part|byte|unknown_7 12 | part|struct.op_param|op1_env 13 | part|struct.op_param|op2_env 14 | part|struct.op_param|op3_env 15 | part|struct.op_param|op4_env 16 | part|struct.op_param|filter_env 17 | part|struct.op_extra|op1_params 18 | part|struct.op_extra|op2_params 19 | part|struct.op_extra|op3_params 20 | part|struct.op_extra|op4_params 21 | part|skip_n.8| 22 | part|skip_n.8| 23 | part|skip_n.8| 24 | part|skip_n.8| 25 | part|skip_n.8| 26 | part|skip_n.8| 27 | part|double|algo 28 | part|double|feedback 29 | part|struct.filter|filter 30 | part|double|gain 31 | part|struct.lfo|lfo 32 | part|string.256|name 33 | 34 | area_struct|op_param 35 | part|int|unk1 36 | part|byte|sustain 37 | part|int|unk2 38 | part|double|point0_time 39 | part|double|point0_lvl_end 40 | part|double|point0_unk 41 | part|double|point1_time 42 | part|double|point1_lvl_start 43 | part|double|point1_lvl_end 44 | part|double|point2_unk 45 | part|double|point2_time 46 | part|double|point2_lvl_start 47 | part|double|point2_lvl_end 48 | part|double|point4_unk 49 | part|double|point3_time 50 | part|double|point3_lvl_start 51 | part|double|point3_lvl_end 52 | part|double|point4_unk 53 | part|double|point4_time 54 | 55 | area_struct|op_extra 56 | part|double|shape 57 | part|double|rate 58 | part|double|offset 59 | part|double|detune 60 | part|double|phase 61 | part|double|level 62 | part|double|pan 63 | part|double|invert 64 | part|double|vel_sens 65 | 66 | area_struct|filter 67 | part|double|type 68 | part|double|cutoff 69 | part|double|reso 70 | part|double|amount 71 | part|double|vel_sens 72 | 73 | area_struct|lfo 74 | part|double|lfo_shape 75 | part|double|lfo_rate_free 76 | part|double|lfo_rate_sync 77 | part|double|lfo_sync 78 | part|double|lfo_free 79 | part|double|lfo_depth 80 | part|double|lfo_level_a 81 | part|double|lfo_level_b 82 | part|double|lfo_level_c 83 | part|double|lfo_level_d 84 | part|double|lfo_pitch 85 | part|double|lfo_cutoff 86 | -------------------------------------------------------------------------------- /objects/convproj/devicenodes.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from objects.convproj import visual 5 | 6 | class cvpj_devnode_device: 7 | def __init__(self): 8 | self.type = '' 9 | self.subtype = '' 10 | self.data = {} 11 | self.data_internal = {} 12 | self.visual = visual.cvpj_visual() 13 | self.window = visual.cvpj_window_data() 14 | 15 | class cvpj_devnode_cable: 16 | def __init__(self): 17 | self.id = '' 18 | self.input_device = '' 19 | self.input_id = '' 20 | self.output_device = '' 21 | self.output_id = '' 22 | self.color = None 23 | 24 | class cvpj_devnode_semisep: 25 | def __init__(self): 26 | self.tracks = {} 27 | self.cables = [] 28 | 29 | def track__add(self, i_track): 30 | self.tracks[i_track] = {} 31 | 32 | def add_device(self, i_track, i_id): 33 | device_obj = cvpj_devnode_device() 34 | self.tracks[i_track][i_id] = device_obj 35 | return device_obj 36 | 37 | def add_cable(self): 38 | cable_obj = cvpj_devnode_cable() 39 | self.cables.append(cable_obj) 40 | return cable_obj 41 | 42 | def add_cable_data(self, input_device, input_id, output_device, output_id): 43 | cable_obj = cvpj_devnode_cable() 44 | cable_obj.input_device = input_device 45 | cable_obj.input_id = input_id 46 | cable_obj.output_device = output_device 47 | cable_obj.output_id = output_id 48 | self.cables.append(cable_obj) 49 | return cable_obj 50 | 51 | class cvpj_devnode: 52 | def __init__(self): 53 | self.devices = [] 54 | self.cables = [] 55 | 56 | def add_device(self, i_id): 57 | device_obj = cvpj_devnode_device() 58 | self.devices[i_id].append(device_obj) 59 | return device_obj 60 | 61 | def add_cable(self): 62 | cable_obj = cvpj_devnode_cable() 63 | self.cables.append(cable_obj) 64 | return cable_obj 65 | 66 | def add_cable_data(self, input_device, input_id, output_device, output_id): 67 | cable_obj = cvpj_devnode_cable() 68 | cable_obj.input_device = input_device 69 | cable_obj.input_id = input_id 70 | cable_obj.output_device = output_device 71 | cable_obj.output_id = output_id 72 | self.cables.append(cable_obj) 73 | return cable_obj -------------------------------------------------------------------------------- /objects/file_proj/_flp/fx.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from io import BytesIO 5 | import struct 6 | from objects.file_proj._flp import plugin 7 | 8 | class flp_fxchan: 9 | def __init__(self): 10 | self.color = None 11 | self.icon = None 12 | self.slots = [None,None,None,None,None,None,None,None,None,None] 13 | self.data = None 14 | self.name = None 15 | self.routing = [] 16 | self.inchannum = 4294967295 17 | self.outchannum = 4294967295 18 | self.reversepolarity = False 19 | self.swap_lr = False 20 | self.fx_enabled = True 21 | self.docked_center = True 22 | self.docked_pos = False 23 | self.latency = 0 24 | self.enabled = True 25 | self.disable_threaded_proc = False 26 | self.seperator = False 27 | self.solo = False 28 | 29 | def read(self, event_data): 30 | event_bio = BytesIO(event_data) 31 | self.latency, flags = struct.unpack('fI', event_bio.read(8)) 32 | 33 | #print( bool(flags&1), bool(flags&2), bool(flags&4), bool(flags&8), bool(flags&16), bool(flags&32), bool(flags&64), bool(flags&128) ) 34 | self.reversepolarity = bool(flags&1) 35 | self.swap_lr = bool(flags&2) 36 | self.fx_enabled = bool(flags&4) 37 | self.enabled = bool(flags&8) 38 | self.disable_threaded_proc = bool(flags&16) 39 | self.docked_center = bool(flags&64) 40 | self.docked_pos = bool(flags&128) 41 | self.seperator = bool(flags&1024) 42 | self.solo = bool(flags&4096) 43 | 44 | def write(self): 45 | outflags = 0 46 | outflags += int(self.reversepolarity)*1 47 | outflags += int(self.swap_lr)*2 48 | outflags += int(self.fx_enabled)*4 49 | outflags += int(self.enabled)*8 50 | outflags += int(self.disable_threaded_proc)*16 51 | outflags += int(self.docked_center)*64 52 | outflags += int(self.docked_pos)*128 53 | outflags += int(self.seperator)*1024 54 | outflags += int(self.solo)*4096 55 | return struct.pack('fI', self.latency, outflags)+b'\x00\x00\x00\x00' 56 | 57 | class flp_fxslot: 58 | def __init__(self, fxnum): 59 | self.plugin = plugin.flp_plugin() 60 | self.plugin.fxnum = fxnum 61 | self.icon = None 62 | self.color = None 63 | self.name = None 64 | self.used = False -------------------------------------------------------------------------------- /plugins/externalsearch/wavtool.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import os 5 | import plugins 6 | from os.path import exists 7 | from pathlib import Path 8 | import xml.etree.ElementTree as ET 9 | from objects import globalstore 10 | 11 | def muse_getvalue(fallback, xmldata, name): 12 | outval = xmldata.findall(name) 13 | if outval == []: return fallback 14 | else: return outval[0].text 15 | 16 | class plugsearch(plugins.base): 17 | def __init__(self): pass 18 | def get_shortname(self): return 'wavtool' 19 | def get_name(self): return 'Wavtool' 20 | def is_dawvert_plugin(self): return 'externalsearch' 21 | def get_prop(self, in_dict): in_dict['supported_os'] = ['win'] 22 | def import_plugins(self): 23 | 24 | path_wavtool = os.path.join(globalstore.home_folder, "AppData", "Roaming", "WavTool Bridge", 'WavTool Bridge.settings') 25 | vst2count = 0 26 | 27 | if os.path.exists(path_wavtool): 28 | vstxmldata = ET.parse(path_wavtool) 29 | vstxmlroot = vstxmldata.getroot() 30 | for x in vstxmlroot: 31 | if x.tag and x.get('name') == 'pluginLists': 32 | x_PluginLists = x.findall('PluginLists') 33 | if x_PluginLists: 34 | x_PluginListByArchitecture = x_PluginLists[0].findall('PluginListByArchitecture') 35 | if x_PluginListByArchitecture: 36 | x_KNOWNPLUGINS = x_PluginListByArchitecture[0].findall('KNOWNPLUGINS') 37 | for p in x_KNOWNPLUGINS[0]: 38 | if p.tag == 'PLUGIN' and p.get('format') == 'VST': 39 | descriptiveName = p.get('descriptiveName') 40 | 41 | with globalstore.extplug.add('vst2', globalstore.os_platform) as pluginfo_obj: 42 | pluginfo_obj.id = int(p.get('uniqueId'), 16) 43 | pluginfo_obj.name = descriptiveName if descriptiveName else p.get('name') 44 | pluginfo_obj.creator = p.get('manufacturer') 45 | pluginfo_obj.version = p.get('version') 46 | pluginfo_obj.path_64bit = p.get('file') 47 | pluginfo_obj.audio_num_inputs = int(p.get('numInputs')) 48 | pluginfo_obj.audio_num_outputs = int(p.get('numOutputs')) 49 | vst2count += 1 50 | 51 | print('[wavtool_bridge] VST2: '+str(vst2count)) 52 | -------------------------------------------------------------------------------- /plugins/plugconv/lmms__n_beepbox.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import os 5 | import plugins 6 | from functions import extpluglog 7 | 8 | class plugconv(plugins.base): 9 | def __init__(self): pass 10 | def is_dawvert_plugin(self): return 'plugconv' 11 | def get_priority(self): return -100 12 | def get_prop(self, in_dict): 13 | in_dict['in_plugins'] = [['native', 'jummbox', None]] 14 | in_dict['in_daws'] = ['jummbox'] 15 | in_dict['out_plugins'] = [['native', 'lmms', None]] 16 | in_dict['out_daws'] = ['lmms'] 17 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 18 | if plugin_obj.type.check_matchmulti('native', 'jummbox', ['custom chip', 'chip', 'harmonics']): 19 | extpluglog.convinternal('Beepbox', plugin_obj.type.subtype, 'LMMS', 'TripleOscillator') 20 | 21 | samplefolder = dv_config.path_samples_generated 22 | 23 | os.makedirs(samplefolder, exist_ok=True) 24 | wave_path = os.path.join(samplefolder, pluginid+'_wave.wav') 25 | 26 | if plugin_obj.type.subtype in ['custom chip', 'chip']: plugin_obj.wave_get('chipwave').to_audio(wave_path) 27 | if plugin_obj.type.subtype in ['harmonics']: plugin_obj.harmonics_get('harmonics').to_audio(wave_path) 28 | 29 | plugin_obj.replace('native', 'lmms', 'tripleoscillator') 30 | convproj_obj.sampleref__add(pluginid+'_wave', wave_path, None) 31 | 32 | sampleid = pluginid+'_wave' 33 | sp_obj = plugin_obj.samplepart_add('userwavefile0') 34 | sp_obj.sampleref = sampleid 35 | sp_obj = plugin_obj.samplepart_add('userwavefile1') 36 | sp_obj.sampleref = sampleid 37 | sp_obj = plugin_obj.samplepart_add('userwavefile2') 38 | sp_obj.sampleref = sampleid 39 | 40 | plugin_obj.params.add('vol0', 15, 'int') 41 | plugin_obj.params.add('vol1', 0, 'int') 42 | plugin_obj.params.add('vol2', 0, 'int') 43 | plugin_obj.params.add('wavetype0', 7, 'int') 44 | plugin_obj.params.add('wavetype1', 7, 'int') 45 | plugin_obj.params.add('wavetype2', 7, 'int') 46 | plugin_obj.params.add('coarse0', -12, 'int') 47 | plugin_obj.params.add('coarse1', -12, 'int') 48 | plugin_obj.params.add('coarse2', -12, 'int') 49 | return 0 50 | else: 51 | return 2 -------------------------------------------------------------------------------- /data_main/plugts/flstudio_amped.pltr: -------------------------------------------------------------------------------- 1 | [phaser] 2 | >input 3 | type|native:amped:Phaser 4 | param|stages 5 | param|rate 6 | param|feedback 7 | param|hzmin 8 | param|hzrange 9 | param|mix 10 | proc 13 | calc|pan|div|128 14 | calc|hzmin|div|2000 15 | calc|hzrange|div|10 16 | calc|mix|div|2 17 | 18 | calc|rate|mul|5000 19 | calc|feedback|mul|1000 20 | calc|hzmin|mul|1000 21 | calc|hzrange|mul|1000 22 | calc|stages|sub|1 23 | calc|mix|mul|1024 24 | output 27 | type|native:flstudio:fruity phaser 28 | param|num_stagesinput 39 | type|native:amped:Delay 40 | param|cross 41 | param|damp 42 | param|fb 43 | param|mix 44 | param|offset 45 | param|time 46 | proc 49 | calc|damp|mul|-1 50 | calc|damp|add|1 51 | calc|time|pow|0.3333 52 | calc|mix|mul|6000 53 | calc|fb|mul|4800 54 | calc|damp|mul|6000 55 | calc|time|mul|768 56 | output 59 | type|native:flstudio:fruity delay 3 60 | param|wetinput 72 | type|native:amped:Flanger 73 | param|delayLfoDepth 74 | param|delayLfoRateHz 75 | param|delayTimeMS 76 | param|mix 77 | param|tone 78 | param|voices 79 | proc 82 | calc|delayLfoRateHz|div|5 83 | calc|delayLfoRateHz|pow|0.168 84 | calc|delayTimeMS|div|20 85 | calc|delayTimeMS|pow|0.38 86 | calc|delayLfoDepth|div|2 87 | calc|delayLfoDepth|mul|5000 88 | calc|delayLfoRateHz|mul|5000 89 | calc|delayTimeMS|mul|1024 90 | output 93 | type|native:flstudio:fruity flanger 94 | param|depth= 0: 15 | outval = tlv_data.uint8() 16 | if VERBOSE: print('INT8, ', f"{event_id:#010b}"[2:],'|',str(event_id).ljust(3), f"{outval:#010b}"[2:], outval) 17 | return event_id, outval 18 | if event_id <= 127 and event_id >= 64: 19 | outval = tlv_data.uint16() 20 | if VERBOSE: print('INT16,', f"{event_id:#010b}"[2:],'|',str(event_id).ljust(3), f"{outval:#028b}"[2:], outval) 21 | return event_id, outval 22 | if event_id <= 191 and event_id >= 128: 23 | outval = tlv_data.uint32() 24 | if VERBOSE: print('INT32,', f"{event_id:#010b}"[2:],'|',str(event_id).ljust(3), f"{outval:#034b}"[2:], outval) 25 | return event_id, outval 26 | if event_id <= 224 and event_id >= 192: 27 | if VERBOSE: print('TEXT, ', f"{event_id:#010b}"[2:],'|',event_id) 28 | return event_id, tlv_data.raw(tlv_data.varint()) 29 | if event_id <= 255 and event_id >= 225: 30 | if VERBOSE: print('RAW, ', f"{event_id:#010b}"[2:],'|',event_id) 31 | return event_id, tlv_data.raw(tlv_data.varint()) 32 | 33 | def decode(song_data, endpos): 34 | eventtable = [] 35 | while song_data.tell() < endpos: 36 | event_id, event_data = read_tlv(song_data) 37 | eventtable.append([event_id, event_data]) 38 | return eventtable 39 | 40 | # ---------------------- encode 41 | 42 | def write_tlv(tlv_data, value, data): 43 | tlv_data.uint8(value) 44 | if value <= 63 and value >= 0: tlv_data.uint8(data) 45 | if value <= 127 and value >= 64: tlv_data.uint16(data) 46 | if value <= 191 and value >= 128: tlv_data.uint32(data) 47 | if value <= 224 and value >= 192: 48 | tlv_data.varint(len(data)) 49 | tlv_data.raw(data) 50 | if value <= 255 and value >= 225: 51 | tlv_data.varint(len(data)) 52 | tlv_data.raw(data) 53 | 54 | def encode(eventtable): 55 | tlv_data = bytewriter.bytewriter() 56 | for event_data in eventtable: write_tlv(tlv_data, event_data[0], event_data[1]) 57 | return tlv_data.getvalue() 58 | -------------------------------------------------------------------------------- /data_ext/remap/imageline/hardcore.csv: -------------------------------------------------------------------------------- 1 | cvpj,cvpj,cvpj,cvpj,cvpj,vst2,vst2 2 | paramid,def,min,max,visname,paramnum,visname 3 | param_0,0,0,256,Master IN Lvl,0,Master IN Lvl 4 | param_1,0,0,256,Master OUT Lvl,1,Master OUT Lvl 5 | param_2,0,0,256,EQ Enable,2,EQ Enable 6 | param_3,0,0,256,EQ Band 1,3,EQ Band 1 7 | param_4,0,0,256,EQ Band 2,4,EQ Band 2 8 | param_5,0,0,256,EQ Band 3,5,EQ Band 3 9 | param_6,0,0,256,EQ Band 4,6,EQ Band 4 10 | param_7,0,0,256,EQ Band 5,7,EQ Band 5 11 | param_8,0,0,256,EQ Band 6,8,EQ Band 6 12 | param_9,0,0,256,EQ Band 7,9,EQ Band 7 13 | param_10,0,0,256,EQ Band 8,10,EQ Band 8 14 | param_11,0,0,256,unknown,11,unknown 15 | param_12,0,0,256,unknown,12,unknown 16 | param_13,0,0,256,Box1 - Param 1,13,Box1 - Param 1 17 | param_14,0,0,256,Box1 - Param 2,14,Box1 - Param 2 18 | param_15,0,0,256,Box1 - Param 3,15,Box1 - Param 3 19 | param_16,0,0,256,Box1 - Param 4,16,Box1 - Param 4 20 | param_17,0,0,256,Box1 - Param 5,17,Box1 - Param 5 21 | param_18,0,0,256,Box2 - Param 1,18,Box2 - Param 1 22 | param_19,0,0,256,Box2 - Param 2,19,Box2 - Param 2 23 | param_20,0,0,256,Box2 - Param 3,20,Box2 - Param 3 24 | param_21,0,0,256,Box2 - Param 4,21,Box2 - Param 4 25 | param_22,0,0,256,Box2 - Param 5,22,Box2 - Param 5 26 | param_23,0,0,256,Box3 - Param 1,23,Box3 - Param 1 27 | param_24,0,0,256,Box3 - Param 2,24,Box3 - Param 2 28 | param_25,0,0,256,Box3 - Param 3,25,Box3 - Param 3 29 | param_26,0,0,256,Box3 - Param 4,26,Box3 - Param 4 30 | param_27,0,0,256,Box3 - Param 5,27,Box3 - Param 5 31 | param_28,0,0,256,Box4 - Param 1,28,Box4 - Param 1 32 | param_29,0,0,256,Box4 - Param 2,29,Box4 - Param 2 33 | param_30,0,0,256,Box4 - Param 3,30,Box4 - Param 3 34 | param_31,0,0,256,Box4 - Param 4,31,Box4 - Param 4 35 | param_32,0,0,256,Box4 - Param 5,32,Box4 - Param 5 36 | param_33,0,0,256,Box5 - Param 1,33,Box5 - Param 1 37 | param_34,0,0,256,Box5 - Param 2,34,Box5 - Param 2 38 | param_35,0,0,256,Box5 - Param 3,35,Box5 - Param 3 39 | param_36,0,0,256,Box5 - Param 4,36,Box5 - Param 4 40 | param_37,0,0,256,Box5 - Param 5,37,Box5 - Param 5 41 | param_38,0,0,256,unknown,38,unknown 42 | param_39,0,0,256,Box 1 Enable,39,Box 1 Enable 43 | param_40,0,0,256,Box 2 Enable,40,Box 2 Enable 44 | param_41,0,0,256,Box 3 Enable,41,Box 3 Enable 45 | param_42,0,0,256,Box 4 Enable,42,Box 4 Enable 46 | param_43,0,0,256,Box 5 Enable,43,Box 5 Enable 47 | -------------------------------------------------------------------------------- /plugins/audiofile/vorbisacm.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import importlib.util 6 | 7 | class input_soundfile(plugins.base): 8 | def is_dawvert_plugin(self): return 'audiofile' 9 | def get_shortname(self): return 'vorbisacm' 10 | def get_name(self): return 'VorbisACM' 11 | def get_priority(self): return 300 12 | def usable(self): 13 | usable = importlib.util.find_spec('soundfile') 14 | usable_meg = '"soundfile" package is not installed.' if not usable else '' 15 | return usable, usable_meg 16 | def supported_autodetect(self): return False 17 | def get_prop(self, in_dict): in_dict['file_formats'] = ['wav'] 18 | def getinfo(self, input_file, sampleref_obj, fileextlow): 19 | import soundfile 20 | import io 21 | from objects.data_bytes import riff_chunks 22 | 23 | if fileextlow == 'wav': 24 | riff_data = riff_chunks.riff_chunk() 25 | byr_stream = riff_data.load_from_file(input_file, False) 26 | 27 | data_pos = 0 28 | data_size = 0 29 | 30 | fmt_format = 0 31 | fmt_channels = 0 32 | fmt_rate = 0 33 | fmt_bytessec = 0 34 | fmt_datablocksize = 0 35 | fmt_bits = 0 36 | 37 | for riff_part in riff_data.in_data: 38 | if riff_part.name == b'fmt ': 39 | with byr_stream.isolate_range(riff_part.start, riff_part.end, False) as bye_stream: 40 | fmt_format = bye_stream.uint16() 41 | fmt_channels = bye_stream.uint16() 42 | fmt_rate = bye_stream.uint32() 43 | fmt_bytessec = bye_stream.uint32() 44 | fmt_datablocksize = bye_stream.uint16() 45 | fmt_bits = bye_stream.uint16() 46 | elif riff_part.name == b'data': 47 | data_pos = riff_part.start 48 | data_end = riff_part.end 49 | 50 | if fmt_format == 26447: 51 | with byr_stream.isolate_range(data_pos, data_end, False) as bye_stream: 52 | audiodata = bye_stream.raw(data_end-data_pos) 53 | 54 | samples, samplerate = soundfile.read(io.BytesIO(audiodata)) 55 | frames = len(samples) 56 | sampleref_obj.hz = samplerate 57 | sampleref_obj.timebase = samplerate 58 | sampleref_obj.dur_samples = frames 59 | sampleref_obj.dur_sec = frames/samplerate 60 | sampleref_obj.channels = 2 61 | sampleref_obj.fileformat = 'wav_ogg' 62 | return True 63 | return False 64 | return False -------------------------------------------------------------------------------- /functions_plugin_ext/params_os_kickmess.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from functions_plugin_ext import plugin_vst2 5 | 6 | import io 7 | import math 8 | 9 | class kickmess_data: 10 | def __init__(self): 11 | self.params = {} 12 | self.params['pub'] = {} 13 | self.params['pub']['freq_start'] = 440 14 | self.params['pub']['freq_end'] = 440 15 | self.params['pub']['f_env_release'] = 1000 16 | self.params['pub']['dist_start'] = 0 17 | self.params['pub']['dist_end'] = 0 18 | self.params['pub']['gain'] = 0.5 19 | self.params['pub']['env_slope'] = 0.5 20 | self.params['pub']['freq_slope'] = 0.5 21 | self.params['pub']['noise'] = 0 22 | self.params['pub']['freq_note_start'] = 0.25 23 | self.params['pub']['freq_note_end'] = 0.25 24 | self.params['pub']['env_release'] = 0 25 | self.params['pub']['phase_offs'] = 0 26 | self.params['pub']['dist_on'] = 0 27 | self.params['pub']['f1_cutoff'] = 1 28 | self.params['pub']['f1_res'] = 0 29 | self.params['pub']['f1_drive'] = 0.2 30 | self.params['pub']['main_gain'] = 0.70710677 31 | self.params['pub']['e1_attack'] = 0.1 32 | self.params['pub']['e1_decay'] = 0.14142135 33 | self.params['pub']['e1_sustain'] = 0.75 34 | self.params['pub']['e1_release'] = 0.1 35 | self.params['priv'] = {} 36 | self.params['priv']['f1_type'] = 0.5 37 | self.params['priv']['f1_on'] = 0.25 38 | self.params['priv']['midi_chan'] = 0 39 | 40 | def set_param(self, i_cat, i_name, i_value): 41 | self.params[i_cat][i_name] = i_value 42 | 43 | def data_out(self): 44 | out = io.BytesIO() 45 | out.write(b'!PARAMS;\n') 46 | 47 | for paramcat in self.params: 48 | for paramval in self.params[paramcat]: 49 | o_value = self.params[paramcat][paramval] 50 | if paramval == 'freq_start': o_value = math.sqrt((o_value-2.51)/3000) 51 | if paramval == 'freq_end': o_value = math.sqrt((o_value-2.51)/2000) 52 | if paramval == 'f_env_release': 53 | if o_value > 2.4: o_value = math.sqrt((o_value-2.51)/5000) 54 | out.write(str.encode(paramcat+' : '+paramval+'='+str(o_value)+';\n')) 55 | 56 | out.seek(0) 57 | return out.read() 58 | 59 | def to_cvpj_vst2(self, convproj_obj, plugin_obj): 60 | plugin_vst2.replace_data(convproj_obj, plugin_obj, 'id', 'any', 934843292, 'chunk', self.data_out(), None) 61 | -------------------------------------------------------------------------------- /functions/plug_conv.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from functions import data_values 5 | from plugins import base as dv_plugins 6 | import base64 7 | import json 8 | import logging 9 | import math 10 | import os 11 | import struct 12 | 13 | logger_plugconv = logging.getLogger('plugconv') 14 | 15 | ______debugtxt______ = False 16 | 17 | def load_plugins(): 18 | dv_plugins.load_plugindir('plugconv', '') 19 | dv_plugins.load_plugindir('plugconv_ext', '') 20 | dv_plugins.load_plugindir('extplug', '') 21 | 22 | # -------------------- convproj -------------------- 23 | 24 | def commalist2plugtypes(inputdata): 25 | sep_supp_plugs = [] 26 | for inputpart in inputdata: 27 | splitdata = inputpart.split(':') 28 | if len(splitdata) == 3: outputpart = splitdata 29 | elif len(splitdata) == 2: outputpart = [splitdata[0], splitdata[1], None] 30 | else: outputpart = [splitdata[0], None, None] 31 | sep_supp_plugs.append(outputpart) 32 | return sep_supp_plugs 33 | 34 | plugconv_int_selector = dv_plugins.create_selector('plugconv') 35 | 36 | def convproj(convproj_obj, in_dawinfo, out_dawinfo, out_dawname, dv_config): 37 | plugqueue = [] 38 | 39 | for shortname, dvplugin in plugconv_int_selector.iter_dvp(): 40 | if shortname in dvplugin.prop_obj.in_daws: dvplugin.priority = -1000 41 | 42 | outdaw_plugs = commalist2plugtypes(out_dawinfo.plugin_included) 43 | 44 | norepeat = [] 45 | 46 | for pluginid, plugin_obj in convproj_obj.plugins.items(): 47 | 48 | is_external = plugin_obj.check_wildmatch('external', None, None) 49 | 50 | if is_external: 51 | plugin_obj.external_make_compat(convproj_obj, out_dawinfo.plugin_ext) 52 | 53 | if not is_external: 54 | converted_val = plugin_obj.convert_internal(convproj_obj, pluginid, out_dawname, dv_config) 55 | 56 | ext_conv_val = False 57 | notsupported = not plugin_obj.check_str_multi(outdaw_plugs) 58 | 59 | if converted_val and notsupported: 60 | ext_conv_val = plugin_obj.convert_external(convproj_obj, pluginid, out_dawinfo.plugin_ext, dv_config) 61 | 62 | if converted_val==2 and not ext_conv_val and notsupported and str(plugin_obj.type) not in norepeat: 63 | logger_plugconv.warning(' | No equivalent to "'+str(plugin_obj.type)+'" found or not supported') 64 | norepeat.append(str(plugin_obj.type)) -------------------------------------------------------------------------------- /objects/file_proj/_flp/plugin.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from io import BytesIO 5 | import struct 6 | 7 | class flp_plugin: 8 | def __init__(self): 9 | self.name = None 10 | self.params = None 11 | self.fxnum = 0 12 | self.slotnum = 0 13 | self.window_p_x = 0 14 | self.window_p_y = 0 15 | self.window_s_x = 0 16 | self.window_s_y = 0 17 | self.visible = False 18 | self.detached = False 19 | self.generator = False 20 | self.smart_disable = False 21 | self.threaded_processing = True 22 | self.hide_settings = False 23 | self.minimized = False 24 | self.unk1 = 2 25 | self.unk2 = 0 26 | self.unk3 = 0 27 | self.unk4 = 0 28 | self.unk5 = 0 29 | self.unk6 = 0 30 | 31 | def read(self, event_data): 32 | event_bio = BytesIO(event_data) 33 | self.fxnum, self.slotnum, self.unk1, self.unk2, flags = struct.unpack('IIIII', event_bio.read(20)) 34 | self.unk3, self.unk4, self.unk5, self.unk6 = struct.unpack('IIII', event_bio.read(16)) 35 | self.window_p_x, self.window_p_y, self.window_s_x, self.window_s_y = struct.unpack('IIII', event_bio.read(16)) 36 | 37 | self.visible = bool(flags&1) 38 | self.detached = bool(flags&4) 39 | self.generator = bool(flags&16) 40 | self.smart_disable = bool(flags&32) 41 | self.threaded_processing = bool(flags&64) 42 | #flags&128 43 | self.hide_settings = bool(flags&256) 44 | self.minimized = bool(flags&512) 45 | 46 | #print(self.unk1, self.unk2, flags, self.unk3, self.unk4, self.unk5, self.unk6) 47 | 48 | def write(self): 49 | outflags = 0 50 | outflags += int(self.visible)<<0 51 | outflags += int(self.detached)<<2 52 | outflags += int(self.generator)<<4 53 | outflags += int(self.smart_disable)<<5 54 | outflags += int(self.threaded_processing)<<6 55 | #outflags += 128 56 | outflags += int(self.hide_settings)<<8 57 | #outflags += int(self.minimized)<<9 58 | 59 | out_data = b'' 60 | out_data += struct.pack('IIIII', self.fxnum, self.slotnum, self.unk1, self.unk2, outflags) 61 | out_data += struct.pack('IIII', self.unk3, self.unk4, self.unk5, self.unk6) 62 | out_data += struct.pack('IIII', self.window_p_x, self.window_p_y, self.window_s_x, self.window_s_y) 63 | 64 | 65 | #print(self.unk1, self.unk2, outflags, self.unk3, self.unk4, self.unk5, self.unk6) 66 | 67 | 68 | return out_data -------------------------------------------------------------------------------- /data_ext/json/socalabs.json: -------------------------------------------------------------------------------- 1 | { 2 | "ab_tester": {"vst2_id": 1094874227, "vst3_id": "56535441427473616220746573746572"}, 3 | "add_and_invert": {"vst2_id": 1097091446, "vst3_id": "5653544164497661646420616E642069"}, 4 | "channelmute": {"vst2_id": 1129149812, "vst3_id": "565354434D75746368616E6E656C6D75"}, 5 | "compensated delay": {"vst2_id": 1397515108, "vst3_id": "565354534C6364636F6D70656E736174"}, 6 | "compressor": {"vst2_id": 1397515120, "vst3_id": "565354534C6370636F6D70726573736F"}, 7 | "delay": {"vst2_id": 1397515372, "vst3_id": "565354534C646C64656C617900000000"}, 8 | "expander": {"vst2_id": 1397515640, "vst3_id": "565354534C6578657870616E64657200"}, 9 | "gate": {"vst2_id": 1397516148, "vst3_id": "565354534C6774676174650000000000"}, 10 | "hugegain": {"vst2_id": 1397516391, "vst3_id": "565354534C6867687567656761696E00"}, 11 | "limiter": {"vst2_id": 1397517421, "vst3_id": "565354534C6C6D6C696D697465720000"}, 12 | "maths": {"vst2_id": 1296135272, "vst3_id": "5653544D4174686D6174687300000000"}, 13 | "mverb2020": {"vst2_id": 1299604850, "vst3_id": "5653544D7665726D7665726232303230"}, 14 | "organ": {"vst2_id": 1397518194, "vst3_id": "ABCDEF019182FAEB536F6361534C6F72"}, 15 | "oscilloscope": {"vst2_id": 1332962156, "vst3_id": "5653544F73636C6F7363696C6C6F7363"}, 16 | "papu": {"vst2_id": 1348563061, "vst3_id": "56535450617075706170750000000000"}, 17 | "rp2a03": {"vst2_id": 1383084641, "vst3_id": "56535452703261727032613033000000"}, 18 | "sfx8": {"vst2_id": 1296135272, "vst3_id": "5653544D417468736678380000000000"}, 19 | "sid": {"vst2_id": 1399415908, "vst3_id": "56535453696464736964000000000000"}, 20 | "sn76489": {"vst2_id": 1399732022, "vst3_id": "565354536E3736736E37363438390000"}, 21 | "sample_delay": {"vst2_id": 1397519204, "vst3_id": "565354534C736473616D706C65206465"}, 22 | "simpleverb": {"vst2_id": 1282830946, "vst3_id": "5653544C76726273696D706C65766572"}, 23 | "spectrumanalyzer": {"vst2_id": 1399874915, "vst3_id": "56535453706563737065637472756D61"}, 24 | "stereoenhancer": {"vst2_id": 1282631022, "vst3_id": "5653544C73656E73746572656F656E68"}, 25 | "stereoprocessor": {"vst2_id": 1282634853, "vst3_id": "5653544C73746573746572656F70726F"}, 26 | "tonegenerator": {"vst2_id": 1416588901, "vst3_id": "565354546F6E65746F6E6567656E6572"}, 27 | "voc": {"vst2_id": 1450140515, "vst3_id": "565354566F6363766F63000000000000"}, 28 | "wavetable": {"vst2_id": 146600509, "vst3_id": "56535457617665776176657461626C65"} 29 | } 30 | -------------------------------------------------------------------------------- /plugins/plugconv/ableton__n_amped.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | from functions import extpluglog 6 | 7 | class plugconv(plugins.base): 8 | def __init__(self): pass 9 | def is_dawvert_plugin(self): return 'plugconv' 10 | def get_priority(self): return -100 11 | def get_prop(self, in_dict): 12 | in_dict['in_plugins'] = [['native', 'amped', None]] 13 | in_dict['in_daws'] = ['amped'] 14 | in_dict['out_plugins'] = [['native', 'ableton', None]] 15 | in_dict['out_daws'] = ['ableton'] 16 | def convert(self, convproj_obj, plugin_obj, pluginid, dv_config): 17 | 18 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Vibrato'): 19 | extpluglog.convinternal('Amped', 'Vibrato', 'Ableton', 'Chorus2') 20 | plugin_obj.plugts_transform('./data_main/plugts/ableton_amped.pltr', 'vibrato', convproj_obj, pluginid) 21 | return 0 22 | 23 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Tremolo'): 24 | extpluglog.convinternal('Amped', 'Tremolo', 'Ableton', 'AutoPan') 25 | plugin_obj.plugts_transform('./data_main/plugts/ableton_amped.pltr', 'tremolo', convproj_obj, pluginid) 26 | return 0 27 | 28 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Phaser'): 29 | extpluglog.convinternal('Amped', 'Phaser', 'Ableton', 'PhaserNew') 30 | plugin_obj.plugts_transform('./data_main/plugts/ableton_amped.pltr', 'phaser', convproj_obj, pluginid) 31 | return 0 32 | 33 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Flanger'): 34 | extpluglog.convinternal('Amped', 'Flanger', 'Ableton', 'PhaserNew') 35 | plugin_obj.plugts_transform('./data_main/plugts/ableton_amped.pltr', 'flanger', convproj_obj, pluginid) 36 | return 0 37 | 38 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Chorus'): 39 | extpluglog.convinternal('Amped', 'Chorus', 'Ableton', 'Chorus2') 40 | plugin_obj.plugts_transform('./data_main/plugts/ableton_amped.pltr', 'chorus', convproj_obj, pluginid) 41 | return 0 42 | 43 | if plugin_obj.type.check_wildmatch('native', 'amped', 'Delay'): 44 | extpluglog.convinternal('Amped', 'Delay', 'Ableton', 'Delay') 45 | cross_val = plugin_obj.params.get("cross", 0).value 46 | plugin_obj.plugts_transform('./data_main/plugts/ableton_amped.pltr', 'delay', convproj_obj, pluginid) 47 | plugin_obj.params.add('DelayLine_PingPong', cross_val>=0.5, 'bool') 48 | return 0 49 | 50 | return 2 51 | -------------------------------------------------------------------------------- /data_main/json/dawinst_paths.json: -------------------------------------------------------------------------------- 1 | { 2 | "win": { 3 | "lmms": [ 4 | "C:\\Program Files\\LMMS\\data\\samples\\" 5 | ], 6 | "flp": [ 7 | "C:\\Program Files\\Image-Line\\FL Studio 2024\\", 8 | "C:\\Program Files\\Image-Line\\FL Studio 21\\", 9 | "C:\\Program Files\\Image-Line\\FL Studio 20\\", 10 | "C:\\Program Files\\Image-Line\\FL Studio 8\\", 11 | "C:\\Program Files\\Image-Line\\FL Studio 7\\", 12 | "C:\\Program Files\\Image-Line\\FLStudio5\\", 13 | "C:\\Program Files\\FLStudio4\\", 14 | "C:\\Program Files\\FruityLoops3.5\\", 15 | "C:\\Program Files\\FruityLoops3\\", 16 | "C:\\Program Files (x86)\\Image-Line\\FL Studio 2024\\", 17 | "C:\\Program Files (x86)\\Image-Line\\FL Studio 21\\", 18 | "C:\\Program Files (x86)\\Image-Line\\FL Studio 20\\", 19 | "C:\\Program Files (x86)\\Image-Line\\FL Studio 8\\", 20 | "C:\\Program Files (x86)\\Image-Line\\FL Studio 7\\", 21 | "C:\\Program Files (x86)\\Image-Line\\FLStudio5\\", 22 | "C:\\Program Files (x86)\\FLStudio4\\", 23 | "C:\\Program Files (x86)\\FruityLoops3.5\\", 24 | "C:\\Program Files (x86)\\FruityLoops3\\", 25 | ], 26 | "serato": [ 27 | "%%user_win%%\\Music\\Serato Studio\\Content\\" 28 | ], 29 | }, 30 | "unix": { 31 | "lmms": [ 32 | "/usr/share/lmms/samples/" 33 | ], 34 | "flp": [ 35 | "%%wine_c%%\\Program Files\\Image-Line\\FL Studio 2024\\", 36 | "%%wine_c%%\\Program Files\\Image-Line\\FL Studio 21\\", 37 | "%%wine_c%%\\Program Files\\Image-Line\\FL Studio 20\\", 38 | "%%wine_c%%\\Program Files\\Image-Line\\FL Studio 8\\", 39 | "%%wine_c%%\\Program Files\\Image-Line\\FL Studio 7\\", 40 | "%%wine_c%%\\Program Files\\Image-Line\\FLStudio5\\", 41 | "%%wine_c%%\\Program Files\\FLStudio4\\", 42 | "%%wine_c%%\\Program Files\\FruityLoops3.5\\", 43 | "%%wine_c%%\\Program Files\\FruityLoops3\\", 44 | "%%wine_c%%\\Program Files (x86)\\Image-Line\\FL Studio 2024\\", 45 | "%%wine_c%%\\Program Files (x86)\\Image-Line\\FL Studio 21\\", 46 | "%%wine_c%%\\Program Files (x86)\\Image-Line\\FL Studio 20\\", 47 | "%%wine_c%%\\Program Files (x86)\\Image-Line\\FL Studio 8\\", 48 | "%%wine_c%%\\Program Files (x86)\\Image-Line\\FL Studio 7\\", 49 | "%%wine_c%%\\Program Files (x86)\\Image-Line\\FLStudio5\\", 50 | "%%wine_c%%\\Program Files (x86)\\FLStudio4\\", 51 | "%%wine_c%%\\Program Files (x86)\\FruityLoops3.5\\", 52 | "%%wine_c%%\\Program Files (x86)\\FruityLoops3\\", 53 | ], 54 | } 55 | } -------------------------------------------------------------------------------- /objects/file/adlib_bnk.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | from objects.inst_params import fm_opl 5 | from objects.data_bytes import bytereader 6 | 7 | class bnk_file: 8 | def __init__(self): 9 | self.index = [] 10 | self.used = [] 11 | self.names = [] 12 | self.num_used = 0 13 | self.offset_data = 0 14 | self.byr_stream = None 15 | 16 | def read_file(self, oplifile): 17 | bio_in = open(oplifile, 'rb') 18 | 19 | byr_stream = self.byr_stream = bytereader.bytereader() 20 | byr_stream.load_file(oplifile) 21 | 22 | verMajor = byr_stream.uint8() 23 | verMinor = byr_stream.uint8() 24 | byr_stream.magic_check(b'ADLIB-') 25 | self.num_used = byr_stream.uint16() 26 | num_insts = byr_stream.uint16() 27 | offset_name = byr_stream.uint32() 28 | self.offset_data = byr_stream.uint32() 29 | byr_stream.skip(8) 30 | 31 | byr_stream.seek(offset_name) 32 | for _ in range(num_insts): 33 | self.index.append(byr_stream.uint16()) 34 | self.used.append(byr_stream.uint8()) 35 | self.names.append(byr_stream.string(9)) 36 | 37 | def get_inst_index(self, num): 38 | instindex = self.index[num] 39 | instused = self.used[num] 40 | instname = self.names[num] 41 | 42 | opli = fm_opl.opl_inst() 43 | opli.set_opl2() 44 | 45 | if instused and self.byr_stream: 46 | opli.name = instname 47 | instloc = (30*(instindex))+self.offset_data 48 | self.byr_stream.seek(instloc) 49 | opli.perc_mode = bool(self.byr_stream.uint8()) 50 | opli.perc_voicenum = self.byr_stream.uint8() 51 | for n in range(2): 52 | opd = opli.ops[n] 53 | opd.ksl = self.byr_stream.uint8() 54 | opd.freqmul = self.byr_stream.uint8() 55 | fb = self.byr_stream.uint8() 56 | opd.env_attack = self.byr_stream.uint8() 57 | opd.env_sustain = self.byr_stream.uint8() 58 | opd.sustained = bool(self.byr_stream.uint8()) 59 | opd.env_decay = self.byr_stream.uint8() 60 | opd.env_release = self.byr_stream.uint8() 61 | opd.level = self.byr_stream.uint8() 62 | opd.tremolo = bool(self.byr_stream.uint8()) 63 | opd.vibrato = bool(self.byr_stream.uint8()) 64 | opd.ksr = bool(self.byr_stream.uint8()) 65 | con = self.byr_stream.uint8() 66 | 67 | if n == 0: 68 | opli.feedback_1 = fb 69 | opli.fm_1 = not bool(con) 70 | 71 | for n in range(2): opli.ops[1-n].waveform = self.byr_stream.uint8() 72 | 73 | else: opli.is_blank = True 74 | 75 | return opli -------------------------------------------------------------------------------- /plugins/input/m_tracker_umx.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 SatyrDiamond and B0ney 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import plugins 5 | import os 6 | import numpy as np 7 | import math 8 | 9 | from plugins.input.m_tracker_s3m import input_s3m as s3m 10 | from plugins.input.m_tracker_mod import input_mod as mod 11 | from plugins.input.m_tracker_it import input_it as it 12 | from plugins.input.m_tracker_xm import input_xm as xm 13 | 14 | import logging 15 | logger_input = logging.getLogger('input') 16 | 17 | FORMATS = ["it", "xm", "s3m", "mod"] 18 | 19 | TRACKER_FORMATS = { 20 | "s3m": s3m(), 21 | "it": it(), 22 | "xm": xm() 23 | } 24 | 25 | IGNORE_ERRORS = False 26 | 27 | class input_mod(plugins.base): 28 | def __init__(self): pass 29 | def is_dawvert_plugin(self): return 'input' 30 | def get_shortname(self): return 'umx' 31 | def get_name(self): return 'Unreal Package Container' 32 | def get_priority(self): return 0 33 | def get_prop(self, in_dict): 34 | in_dict['file_ext'] = ['umx'] 35 | in_dict['track_lanes'] = True 36 | in_dict['audio_filetypes'] = ['wav'] 37 | in_dict['plugin_included'] = ['universal:sampler:single', 'universal:sampler:multi'] 38 | in_dict['projtype'] = 'm' 39 | def supported_autodetect(self): return True 40 | def detect(self, input_file): 41 | bytestream = open(input_file, 'rb') 42 | bytesdata = bytestream.read(4) 43 | if bytesdata == b'\xc1\x83\x2a\x9e': return True 44 | else: return False 45 | 46 | def parse(self, convproj_obj, input_file, dv_config): 47 | from objects.file_proj import proj_umx 48 | project_obj = proj_umx.umx_file() 49 | if not project_obj.load_from_file(input_file): exit() 50 | 51 | isdetected = None 52 | if "Music" not in project_obj.nametable: 53 | logger_input.error("Unreal Package does not contain music") 54 | exit() 55 | elif project_obj.nametable: 56 | firstname = project_obj.nametable[0] 57 | for (extension, tracker) in TRACKER_FORMATS.items(): 58 | if tracker.detect_bytes(project_obj.outdata): 59 | isdetected = extension 60 | logger_input.info(f"Detected inner UMX format: { tracker.get_name() }") 61 | tracker.parse_bytes(convproj_obj, project_obj.outdata, dv_config, input_file) 62 | if not isdetected: 63 | if firstname in FORMATS: 64 | modo = mod() 65 | modo.parse_bytes(convproj_obj, project_obj.outdata, dv_config, input_file) 66 | else: 67 | logger_input.error(firstname+" is not supported") 68 | exit() --------------------------------------------------------------------------------