diff --git a/default_presets/add_factory_extras.sh b/default_presets/add_factory_extras.sh new file mode 100755 index 0000000..3170a0c --- /dev/null +++ b/default_presets/add_factory_extras.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash +export SRC_ZIP="V3 Factory Presets.piBank" +export DST_ZIP="Factory Presets.piBank" + + +rm "presets/$DST_ZIP" +cd presets +rm -rf temp_folder +echo Unpacking "$SRC_ZIP" +unzip "$SRC_ZIP" -d ./temp_folder +cd temp_folder +cp -r ../Factory_Presets_Extra/* ./ +echo Repacking "../$DST_ZIP" +zip -r9 "../$DST_ZIP" . +cd .. +rm -rf temp_folder + +cd .. diff --git a/default_presets/presets/Default+Bank.bank b/default_presets/presets/Default+Bank.bank deleted file mode 100644 index fe47723..0000000 --- a/default_presets/presets/Default+Bank.bank +++ /dev/null @@ -1 +0,0 @@ -{"name": "","nextInstanceId": 13,"selectedPreset": 7,"presets": [{"instanceId": 7,"preset": {"name": "Heavy","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -23.1093884},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 49,"uri": "http://two-play.com/plugins/toob-noise-gate","isEnabled": true,"controlValues": [{"key": "threshold","value": -60},{"key": "hysteresis","value": -6},{"key": "trigger_led","value": 0},{"key": "reduction","value": -60},{"key": "attack","value": 1},{"key": "hold","value": 100},{"key": "release","value": 330},{"key": "gate_level","value": -60}],"pluginName": "TooB Noise Gate","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 41,"uri": "http://two-play.com/plugins/toob-delay","isEnabled": false,"controlValues": [{"key": "delay","value": 340},{"key": "level","value": 27},{"key": "feedback","value": 39.1666679}],"pluginName": "TooB Delay","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 39,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": 1},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "model","value": 18},{"key": "gain","value": 2.41666675},{"key": "master","value": -4.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 2,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/BossDistortionDs1_highGain.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/BossDistortionDs1_highGain.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 31,"uri": "http://two-play.com/plugins/toob-freeverb","isEnabled": true,"controlValues": [{"key": "dryWet","value": 0.25},{"key": "roomSize","value": 0.733333349},{"key": "damping","value": 0.574999988},{"key": "bypass","value": 1},{"key": "tails","value": 1}],"pluginName": "TooB Freeverb","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 51,"uri": "http://two-play.com/plugins/toob-parametric-eq","isEnabled": true,"controlValues": [{"key": "loCut","value": 50.7010994},{"key": "hiCut","value": 21},{"key": "lfLevel","value": 0},{"key": "lfC","value": 120},{"key": "lmfLevel","value": 0},{"key": "lmfC","value": 400},{"key": "lmfQ","value": 1.5},{"key": "hmfLevel","value": 0},{"key": "hmfC","value": 2},{"key": "hmfQ","value": 1.5},{"key": "hfLevel","value": -3.25},{"key": "hfC","value": 3.875},{"key": "gain","value": 0}],"pluginName": "TooB Parametric EQ","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 54,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}},{"instanceId": 8,"preset": {"name": "Sparkling Clean","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -23.1093884},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 55,"uri": "http://two-play.com/plugins/toob-noise-gate","isEnabled": true,"controlValues": [{"key": "threshold","value": -65},{"key": "hysteresis","value": -6},{"key": "trigger_led","value": 0},{"key": "reduction","value": -60},{"key": "attack","value": 1},{"key": "hold","value": 100},{"key": "release","value": 330},{"key": "gate_level","value": -60}],"pluginName": "TooB Noise Gate","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 53,"uri": "http://two-play.com/plugins/toob-phaser","isEnabled": true,"controlValues": [{"key": "rate","value": 0.424131542},{"key": "dryWet","value": 0.400000006}],"pluginName": "TooB Phaser","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 41,"uri": "http://two-play.com/plugins/toob-delay","isEnabled": false,"controlValues": [{"key": "delay","value": 340},{"key": "level","value": 36.6666679},{"key": "feedback","value": 33.1666679}],"pluginName": "TooB Delay","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 39,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": -2.5},{"key": "bass","value": 0.5},{"key": "mid","value": 0.625},{"key": "treble","value": 0.5},{"key": "model","value": 19},{"key": "gain","value": 0},{"key": "master","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/MesaBoogie_Studio22_Clean.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"/var/pipedal/audio_uploads/ToobMlModels/MesaBoogie_Studio22_Clean.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 51,"uri": "http://two-play.com/plugins/toob-convolution-reverb-stereo","isEnabled": true,"controlValues": [{"key": "bypass","value": 1},{"key": "time","value": 30},{"key": "direct_mix","value": -6},{"key": "reverb_mix","value": -4},{"key": "width","value": 1},{"key": "pan","value": 0},{"key": "predelay","value": -1},{"key": "predelay_new","value": 1},{"key": "stretch","value": 1},{"key": "decay","value": 0},{"key": "tails","value": 1},{"key": "loading_state","value": 0}],"pluginName": "TooB Convolution Reverb (Stereo)","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-impulse#impulseFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ReverbImpulseFiles/Genesis 6 Studio Live Room.wav"}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-impulse#impulseFile": "{\"otype_\": \"Path\",\"value\": \"/var/pipedal/audio_uploads/ReverbImpulseFiles/Genesis 6 Studio Live Room.wav\"}"},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 55,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}},{"instanceId": 12,"preset": {"name": "Clean-Lead Split","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -54},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 66,"uri": "http://two-play.com/plugins/toob-noise-gate","isEnabled": true,"controlValues": [{"key": "threshold","value": -96},{"key": "hysteresis","value": -6},{"key": "trigger_led","value": 0},{"key": "reduction","value": -60},{"key": "attack","value": 1},{"key": "hold","value": 31.622776},{"key": "release","value": 330},{"key": "gate_level","value": -60}],"pluginName": "TooB Noise Gate","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 54,"uri": "uri://two-play/pipedal/pedalboard#Split","isEnabled": true,"controlValues": [{"key": "splitType","value": 0},{"key": "select","value": 1},{"key": "mix","value": 0},{"key": "panL","value": 0},{"key": "volL","value": -3},{"key": "panR","value": 0},{"key": "volR","value": -3}],"pluginName": "","topChain": [{"instanceId": 72,"uri": "http://two-play.com/plugins/toob-chorus","isEnabled": true,"controlValues": [{"key": "rate","value": 0.5},{"key": "depth","value": 0.5},{"key": "dryWet","value": 0.575000048}],"pluginName": "TooB CE-2 Chorus","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 58,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": 0},{"key": "trimOut","value": -35},{"key": "model","value": -1},{"key": "gain","value": 2.25},{"key": "master","value": 0},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13},{"key": "gainEnable","value": 0}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 1,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/BluesJR.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/BluesJR.json\"}"},"title": "Blues Jr","useModUi": false,"iconColor": ""},{"instanceId": 64,"uri": "http://two-play.com/plugins/toob-cab-ir","isEnabled": true,"controlValues": [{"key": "reverb_mix","value": -6},{"key": "reverb_mix2","value": 0},{"key": "reverb_mix3","value": 0},{"key": "time","value": 1.5},{"key": "direct_mix","value": -40},{"key": "predelay","value": 0},{"key": "loading_state","value": 0}],"pluginName": "TooB Cab IR","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-cab-ir#impulseFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/Modern US 001.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile2": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/Modern US 002.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile3": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#String","value": ""}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-cab-ir#impulseFile": "{\"otype_\": \"Path\",\"value\": \"CabIR/Modern US 001.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile2": "{\"otype_\": \"Path\",\"value\": \"CabIR/Modern US 002.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile3": "{\"otype_\": \"Path\",\"value\": \"\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 87,"uri": "http://two-play.com/plugins/toob-volume","isEnabled": true,"controlValues": [{"key": "vol","value": -7.5}],"pluginName": "TooB Volume","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 69,"uri": "http://two-play.com/plugins/toob-convolution-reverb-stereo","isEnabled": true,"controlValues": [{"key": "bypass","value": 1},{"key": "time","value": 30},{"key": "direct_mix","value": -0.666666687},{"key": "reverb_mix","value": -1.39999998},{"key": "width","value": 1},{"key": "pan","value": 0},{"key": "predelay","value": -1},{"key": "predelay_new","value": 1},{"key": "stretch","value": 1.27456057},{"key": "decay","value": 0},{"key": "tails","value": 1},{"key": "loading_state","value": 0}],"pluginName": "TooB Convolution Reverb (Stereo)","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 1,"lv2State": [true,{"http://two-play.com/plugins/toob-impulse#impulseFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ReverbImpulseFiles/St. Margaret's Church.wav"}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-impulse#impulseFile": "{\"otype_\": \"Path\",\"value\": \"ReverbImpulseFiles/St. Margaret's Church.wav\"}"},"title": "","useModUi": false,"iconColor": ""}],"bottomChain": [{"instanceId": 81,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": 0},{"key": "trimOut","value": -35},{"key": "model","value": -1},{"key": "gain","value": 8.83333302},{"key": "master","value": 0},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13},{"key": "gainEnable","value": 0}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 4,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/DumbleClone_highGain.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/DumbleClone_highGain.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 62,"uri": "http://two-play.com/plugins/toob-cab-ir","isEnabled": true,"controlValues": [{"key": "reverb_mix","value": -18.5},{"key": "reverb_mix2","value": -5.5},{"key": "reverb_mix3","value": 0},{"key": "time","value": 1.5},{"key": "direct_mix","value": -13.5},{"key": "predelay","value": 0},{"key": "loading_state","value": 0}],"pluginName": "TooB Cab IR","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-cab-ir#impulseFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/Modern US 002.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile2": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/Modern US 004.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile3": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#String","value": ""}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-cab-ir#impulseFile": "{\"otype_\": \"Path\",\"value\": \"CabIR/Modern US 002.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile2": "{\"otype_\": \"Path\",\"value\": \"CabIR/Modern US 004.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile3": "{\"otype_\": \"Path\",\"value\": \"\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 85,"uri": "http://two-play.com/plugins/toob-volume","isEnabled": true,"controlValues": [{"key": "vol","value": -3}],"pluginName": "TooB Volume","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 83,"uri": "http://two-play.com/plugins/toob-freeverb","isEnabled": true,"controlValues": [{"key": "bypass","value": 1},{"key": "dryWet","value": 0.383333325},{"key": "roomSize","value": 0.683333337},{"key": "damping","value": 0},{"key": "tails","value": 1}],"pluginName": "TooB Freeverb","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 90,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}},{"instanceId": 9,"preset": {"name": "Screaming Lead","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -54},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 17,"uri": "http://two-play.com/plugins/toob-input_stage","isEnabled": true,"controlValues": [{"key": "trim","value": -15.75},{"key": "locut","value": 196.5},{"key": "bright","value": 0},{"key": "brightf","value": 1300},{"key": "hicut","value": 13000},{"key": "gate_t","value": -66.5},{"key": "boost","value": 0}],"pluginName": "TooB Input Stage","midiBindings": [{"channel": -1,"symbol": "__bypass","bindingType": 2,"note": 72,"control": 4,"minControlValue": 0,"maxControlValue": 127,"minValue": 0,"maxValue": 1,"rotaryScale": 1,"linearControlType": 0,"switchControlType": 0}],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 41,"uri": "http://two-play.com/plugins/toob-delay","isEnabled": true,"controlValues": [{"key": "delay","value": 340},{"key": "level","value": 18.666666},{"key": "feedback","value": 13.3333349}],"pluginName": "TooB Delay","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 42,"uri": "http://two-play.com/plugins/toob-chorus","isEnabled": false,"controlValues": [{"key": "rate","value": 0.291666657},{"key": "depth","value": 0.375},{"key": "dryWet","value": 1}],"pluginName": "TooB CE-2 Chorus","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 47,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": 12.5},{"key": "model","value": 29},{"key": "gain","value": 3},{"key": "master","value": -0.5},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/TS9_FullD.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/TS9_FullD.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 39,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": -4},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "model","value": 12},{"key": "gain","value": 10},{"key": "master","value": -5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/HT40_Overdrive.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/HT40_Overdrive.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 51,"uri": "http://two-play.com/plugins/toob-flanger-stereo","isEnabled": true,"controlValues": [{"key": "manual","value": 0.5},{"key": "depth","value": 0.5},{"key": "rate","value": 0.5},{"key": "lfo","value": 0},{"key": "res","value": 0.5},{"key": "dryWet","value": 0.508333325}],"pluginName": "TooB BF-2 Stereo Flanger","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 53,"uri": "http://two-play.com/plugins/toob-freeverb","isEnabled": true,"controlValues": [{"key": "bypass","value": 1},{"key": "dryWet","value": 0.150000006},{"key": "roomSize","value": 0.649999976},{"key": "damping","value": 0},{"key": "tails","value": 1}],"pluginName": "TooB Freeverb","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 56,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}},{"instanceId": 10,"preset": {"name": "Light Crunch","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -23.1093884},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 49,"uri": "http://two-play.com/plugins/toob-noise-gate","isEnabled": true,"controlValues": [{"key": "threshold","value": -102},{"key": "hysteresis","value": -6},{"key": "trigger_led","value": 0},{"key": "reduction","value": -60},{"key": "attack","value": 1},{"key": "hold","value": 100},{"key": "release","value": 330},{"key": "gate_level","value": -60}],"pluginName": "TooB Noise Gate","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 42,"uri": "http://two-play.com/plugins/toob-chorus","isEnabled": false,"controlValues": [{"key": "rate","value": 0.291666657},{"key": "depth","value": 0.375},{"key": "dryWet","value": 1}],"pluginName": "TooB CE-2 Chorus","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 41,"uri": "http://two-play.com/plugins/toob-delay","isEnabled": true,"controlValues": [{"key": "delay","value": 340},{"key": "level","value": 27},{"key": "feedback","value": 39}],"pluginName": "TooB Delay","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 39,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": -0.5},{"key": "bass","value": 0.650000036},{"key": "mid","value": 0.5},{"key": "treble","value": 0.266666681},{"key": "model","value": 17},{"key": "gain","value": 7.75},{"key": "master","value": -4},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 1,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/ProCoRat.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"/var/pipedal/audio_uploads/ToobMlModels/ProCoRat.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 51,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": -3},{"key": "trimOut","value": -35},{"key": "model","value": -1},{"key": "gain","value": 3},{"key": "master","value": -6},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13},{"key": "gainEnable","value": 0}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/FenderPrinceton_highLevel.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"/var/pipedal/audio_uploads/ToobMlModels/FenderPrinceton_highLevel.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 58,"uri": "http://two-play.com/plugins/toob-nam","isEnabled": true,"controlValues": [{"key": "inputGain","value": -12.666667},{"key": "inputGainOut","value": -35},{"key": "outputGain","value": 0},{"key": "gate","value": -120},{"key": "gateOut","value": 0},{"key": "buffer","value": 0},{"key": "toneStack","value": 3},{"key": "bass","value": 5},{"key": "mid","value": 5},{"key": "treble","value": 5},{"key": "inputCalibrationMode","value": 1},{"key": "calibration","value": -6},{"key": "outputCalibration","value": 0},{"key": "version","value": 1}],"pluginName": "TooB Neural Amp Modeler","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 1,"lv2State": [true,{}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-nam#modelFile": "{\"otype_\": \"Path\",\"value\": \"\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 53,"uri": "http://two-play.com/plugins/toob-parametric-eq","isEnabled": true,"controlValues": [{"key": "loCut","value": 27.2704601},{"key": "hiCut","value": 21},{"key": "lfLevel","value": 0},{"key": "lfC","value": 120},{"key": "lmfLevel","value": -6.5},{"key": "lmfC","value": 551.471313},{"key": "lmfQ","value": 0.850504637},{"key": "hmfLevel","value": -7.5},{"key": "hmfC","value": 2.5746665},{"key": "hmfQ","value": 1.5},{"key": "hfLevel","value": -6.5},{"key": "hfC","value": 2.25},{"key": "gain","value": 0}],"pluginName": "TooB Parametric EQ","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 31,"uri": "http://two-play.com/plugins/toob-freeverb","isEnabled": true,"controlValues": [{"key": "dryWet","value": 0.416666687},{"key": "roomSize","value": 0.625},{"key": "damping","value": 0.574999988},{"key": "bypass","value": 1},{"key": "tails","value": 1}],"pluginName": "TooB Freeverb","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 58,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}},{"instanceId": 11,"preset": {"name": "Jazz","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -23.1093884},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 45,"uri": "http://two-play.com/plugins/toob-noise-gate","isEnabled": true,"controlValues": [{"key": "threshold","value": -53},{"key": "hysteresis","value": -6},{"key": "trigger_led","value": 0},{"key": "reduction","value": -60},{"key": "attack","value": 1},{"key": "hold","value": 100},{"key": "release","value": 330},{"key": "gate_level","value": -60}],"pluginName": "TooB Noise Gate","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 41,"uri": "http://two-play.com/plugins/toob-chorus","isEnabled": false,"controlValues": [{"key": "rate","value": 0.208333328},{"key": "depth","value": 0.5},{"key": "dryWet","value": 1}],"pluginName": "TooB CE-2 Chorus","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 47,"uri": "http://two-play.com/plugins/toob-parametric-eq","isEnabled": true,"controlValues": [{"key": "loCut","value": 41.8936462},{"key": "hiCut","value": 21},{"key": "lfLevel","value": 0},{"key": "lfC","value": 120},{"key": "lmfLevel","value": -5.5},{"key": "lmfC","value": 238.107834},{"key": "lmfQ","value": 0.837899804},{"key": "hmfLevel","value": 0},{"key": "hmfC","value": 2},{"key": "hmfQ","value": 1.5},{"key": "hfLevel","value": -12},{"key": "hfC","value": 1},{"key": "gain","value": 5.83333349}],"pluginName": "TooB Parametric EQ","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 39,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": -13},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "model","value": 0},{"key": "gain","value": 4.66666651},{"key": "master","value": 5},{"key": "sag","value": 0.550000012},{"key": "sagd","value": 0.900000036},{"key": "sagf","value": 13}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 2,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/FenderPrinceton_clean.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/FenderPrinceton_clean.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 31,"uri": "http://two-play.com/plugins/toob-freeverb","isEnabled": true,"controlValues": [{"key": "dryWet","value": 0.416666657},{"key": "roomSize","value": 0.625},{"key": "damping","value": 0.574999988},{"key": "bypass","value": 1},{"key": "tails","value": 1}],"pluginName": "TooB Freeverb","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 48,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}},{"instanceId": 13,"preset": {"name": "Stereo Vibro","input_volume_db": 0,"output_volume_db": 0,"items": [{"instanceId": 16,"uri": "http://two-play.com/plugins/toob-tuner","isEnabled": true,"controlValues": [{"key": "REFFREQ","value": 440},{"key": "THRESHOLD","value": -54},{"key": "MUTE","value": 0}],"pluginName": "TooB Tuner","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 61,"uri": "http://two-play.com/plugins/toob-tremolo","isEnabled": true,"controlValues": [{"key": "rate","value": 5},{"key": "depth","value": 0.566666663},{"key": "harmonic","value": 1},{"key": "shape","value": 0}],"pluginName": "TooB Tremolo (Stereo)","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 64,"uri": "uri://two-play/pipedal/pedalboard#Split","isEnabled": true,"controlValues": [{"key": "splitType","value": 2},{"key": "select","value": 0},{"key": "mix","value": 0},{"key": "panL","value": -1},{"key": "volL","value": 0},{"key": "panR","value": 1},{"key": "volR","value": -1}],"pluginName": "","topChain": [{"instanceId": 67,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": 0},{"key": "trimOut","value": -35},{"key": "model","value": -1},{"key": "gain","value": 8.16666698},{"key": "master","value": 0},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13},{"key": "gainEnable","value": 0}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 2,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/BluesJR.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/BluesJR.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 71,"uri": "http://two-play.com/plugins/toob-cab-ir","isEnabled": true,"controlValues": [{"key": "reverb_mix","value": -8.5},{"key": "reverb_mix2","value": -4.5},{"key": "reverb_mix3","value": -3},{"key": "time","value": 1.5},{"key": "direct_mix","value": -40},{"key": "predelay","value": 0},{"key": "loading_state","value": 0}],"pluginName": "TooB Cab IR","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-cab-ir#impulseFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/80s UK 001.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile2": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/80s UK 002.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile3": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#String","value": ""}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-cab-ir#impulseFile": "{\"otype_\": \"Path\",\"value\": \"CabIR/80s UK 001.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile2": "{\"otype_\": \"Path\",\"value\": \"CabIR/80s UK 002.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile3": "{\"otype_\": \"Path\",\"value\": \"\"}"},"title": "","useModUi": false,"iconColor": ""}],"bottomChain": [{"instanceId": 68,"uri": "http://two-play.com/plugins/toob-ml","isEnabled": true,"controlValues": [{"key": "trim","value": 0},{"key": "trimOut","value": -35},{"key": "model","value": -1},{"key": "gain","value": 4},{"key": "master","value": -2},{"key": "bass","value": 0.5},{"key": "mid","value": 0.5},{"key": "treble","value": 0.5},{"key": "sag","value": 0},{"key": "sagd","value": 0},{"key": "sagf","value": 13},{"key": "gainEnable","value": 0}],"pluginName": "TooB ML Amplifier","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [true,{"http://two-play.com/plugins/toob-ml#modelFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "ToobMlModels/BluesJR.json"},"http://two-play.com/plugins/toob-ml#version": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Float","value": 1}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-ml#modelFile": "{\"otype_\": \"Path\",\"value\": \"ToobMlModels/BluesJR.json\"}"},"title": "","useModUi": false,"iconColor": ""},{"instanceId": 73,"uri": "http://two-play.com/plugins/toob-cab-ir","isEnabled": true,"controlValues": [{"key": "reverb_mix","value": -3},{"key": "reverb_mix2","value": -3},{"key": "reverb_mix3","value": -3},{"key": "time","value": 1.5},{"key": "direct_mix","value": -40},{"key": "predelay","value": 0},{"key": "loading_state","value": 0}],"pluginName": "TooB Cab IR","midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 1,"lv2State": [true,{"http://two-play.com/plugins/toob-cab-ir#impulseFile": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#Path","value": "CabIR/80s UK 002.wav"},"http://two-play.com/plugins/toob-cab-ir#impulseFile2": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#String","value": ""},"http://two-play.com/plugins/toob-cab-ir#impulseFile3": {"flags": 3,"atomType": "http://lv2plug.in/ns/ext/atom#String","value": ""}}],"lilvPresetUri": "","pathProperties": {"http://two-play.com/plugins/toob-cab-ir#impulseFile": "{\"otype_\": \"Path\",\"value\": \"CabIR/80s UK 002.wav\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile2": "{\"otype_\": \"Path\",\"value\": \"\"}","http://two-play.com/plugins/toob-cab-ir#impulseFile3": "{\"otype_\": \"Path\",\"value\": \"\"}"},"title": "","useModUi": false,"iconColor": ""}],"midiBindings": [ ],"midiChannelBinding": null,"stateUpdateCount": 0,"lv2State": [false,{}],"lilvPresetUri": "","pathProperties": {},"title": "","useModUi": false,"iconColor": ""}],"nextInstanceId": 73,"snapshots": [ ],"selectedSnapshot": -1,"selectedPlugin": 16}}]} \ No newline at end of file diff --git a/default_presets/presets/Factory Presets.piBank b/default_presets/presets/Factory Presets.piBank new file mode 100644 index 0000000..e3b8931 Binary files /dev/null and b/default_presets/presets/Factory Presets.piBank differ diff --git a/default_presets/presets/Factory_Presets_Extra/media/CabIR/Factory IRs/README.md b/default_presets/presets/Factory_Presets_Extra/media/CabIR/Factory IRs/README.md new file mode 100644 index 0000000..e9172a1 --- /dev/null +++ b/default_presets/presets/Factory_Presets_Extra/media/CabIR/Factory IRs/README.md @@ -0,0 +1,29 @@ +
+ +
+

PiPedal Factory-Provided IRs

+
+

+ All Impulse Response Files in this folder are provided under a T3K License. Permission has been granted ONLY to use these IRs with PiPedal. Please contact the original creators for permission to use these IRs for any other purpose. +

+
+
+
+ +--- + +
+ +
+

Marshall JCM800 Lead 1960 A (4- SM57, eoc)

+ +
+ +
+ + diff --git a/default_presets/presets/Factory_Presets_Extra/media/NeuralAmpModels/Factory Models/README.md b/default_presets/presets/Factory_Presets_Extra/media/NeuralAmpModels/Factory Models/README.md new file mode 100644 index 0000000..d36cec0 --- /dev/null +++ b/default_presets/presets/Factory_Presets_Extra/media/NeuralAmpModels/Factory Models/README.md @@ -0,0 +1,98 @@ +
+ +
+

PiPedal Factory-Provided Models

+
+

+ All models in this folder are provided under a T3K License. Permission has been granted ONLY to use these models with PiPedal. Please contact the original creators for permission to use these models for any other purpose. +

+
+
+
+ +--- + +
+ +
+

1960 Fender Tweed Deluxe 5E3 - Clean

+ +
+ +
+ +--- + +
+ +
+

1960 Fender Tweed Deluxe 5E3 - Crunch

+
+
+ +
+ +--- + +
+ +
+

1960 Gibson Rhythm King - Edge of Breakup

+
+
+ +
+ +--- + +
+ +
+

Marshall - JCM800 KKS (TS9) [18dBu] - Hi Gain

+ +
+ +
+ +--- + +
+ +
+

Peavey 6505 1992 Lead - Chug

+
+

Full rig, NAM A2. Created by outmodedelectronics
+ From the Peavey 6505 1992 Original Lead - EVH 5150III 4x12 - Full Rig model pack.

+

A Peavey 6505 1992 Original head’s Lead Channel through an EVH 5150III 4x12 cabinet. Pr-4 B-6 M-4 T-7 Pro-1 R-7 P-8, SM57c. +

+
+
+ +
+ + +--- diff --git a/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/40737.jpeg b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/40737.jpeg new file mode 100644 index 0000000..8449585 Binary files /dev/null and b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/40737.jpeg differ diff --git a/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/54580.jpeg b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/54580.jpeg new file mode 100644 index 0000000..593baf1 Binary files /dev/null and b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/54580.jpeg differ diff --git a/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/59301.jpeg b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/59301.jpeg new file mode 100644 index 0000000..fc5783b Binary files /dev/null and b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/59301.jpeg differ diff --git a/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/60033.jpeg b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/60033.jpeg new file mode 100644 index 0000000..10d6a85 Binary files /dev/null and b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/60033.jpeg differ diff --git a/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/67526.jpeg b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/67526.jpeg new file mode 100644 index 0000000..4d2b808 Binary files /dev/null and b/default_presets/presets/Factory_Presets_Extra/media/tone3000_thumbnails/67526.jpeg differ diff --git a/default_presets/presets/V3 Factory Presets.piBank b/default_presets/presets/V3 Factory Presets.piBank new file mode 100644 index 0000000..eb8baad Binary files /dev/null and b/default_presets/presets/V3 Factory Presets.piBank differ diff --git a/default_presets/presets/banks.versionInfo b/default_presets/presets/banks.versionInfo index 0cfbf08..00750ed 100644 --- a/default_presets/presets/banks.versionInfo +++ b/default_presets/presets/banks.versionInfo @@ -1 +1 @@ -2 +3 diff --git a/src/Storage.cpp b/src/Storage.cpp index 8ea253a..f47c097 100644 --- a/src/Storage.cpp +++ b/src/Storage.cpp @@ -49,12 +49,12 @@ using namespace pipedal; namespace fs = std::filesystem; -const char *BANK_EXTENSION = ".bank"; -const char *BANKS_FILENAME = "index.banks"; +const char* BANK_EXTENSION = ".bank"; +const char* BANKS_FILENAME = "index.banks"; #define USER_SETTINGS_FILENAME "userSettings.json"; -static bool hasSyntheticModRoot(const UiFileProperty &fileProperty) +static bool hasSyntheticModRoot(const UiFileProperty& fileProperty) { return (fileProperty.modDirectories().size() > 1 || (fileProperty.modDirectories().size() == 1 && fileProperty.useLegacyModDirectory())); } @@ -80,7 +80,7 @@ static int fromhexStrict(char c) return -1; } -std::string Storage::SafeDecodeName(const std::string &name) +std::string Storage::SafeDecodeName(const std::string& name) { std::stringstream s; for (int i = 0; i < name.length(); /**/) @@ -127,9 +127,9 @@ std::string Storage::SafeDecodeName(const std::string &name) return s.str(); } -static const char *hex = "0123456789ABCDEF"; +static const char* hex = "0123456789ABCDEF"; -std::string Storage::SafeEncodeName(const std::string &name) +std::string Storage::SafeEncodeName(const std::string& name) { std::stringstream s; for (char c : name) @@ -153,7 +153,7 @@ std::string Storage::SafeEncodeName(const std::string &name) return s.str(); } -std::filesystem::path ResolveHomePath(const std::filesystem::path &path) +std::filesystem::path ResolveHomePath(const std::filesystem::path& path) { if (path.begin() == path.end()) return path; @@ -162,7 +162,7 @@ std::filesystem::path ResolveHomePath(const std::filesystem::path &path) auto el = (*it); if (el != "~") return path; - const char *homeDirectory = nullptr; + const char* homeDirectory = nullptr; homeDirectory = getenv("HOME"); if (homeDirectory == nullptr) @@ -187,28 +187,28 @@ std::filesystem::path ResolveHomePath(const std::filesystem::path &path) return result; } -void Storage::SetConfigRoot(const std::filesystem::path &path) +void Storage::SetConfigRoot(const std::filesystem::path& path) { this->configRoot = ResolveHomePath(path); } -void Storage::SetDataRoot(const std::filesystem::path &path) +void Storage::SetDataRoot(const std::filesystem::path& path) { this->dataRoot = ResolveHomePath(path); this->dataRoot__audio_uploads = dataRoot / "audio_uploads"; } -const std::filesystem::path &Storage::GetConfigRoot() const +const std::filesystem::path& Storage::GetConfigRoot() const { return this->configRoot; } -const std::filesystem::path &Storage::GetDataRoot() const +const std::filesystem::path& Storage::GetDataRoot() const { return this->dataRoot; } -static void CopyDirectory(const std::filesystem::path &source, const std::filesystem::path &destination) +static void CopyDirectory(const std::filesystem::path& source, const std::filesystem::path& destination) { - for (auto &directoryEntry : std::filesystem::directory_iterator(source)) + for (auto& directoryEntry : std::filesystem::directory_iterator(source)) { if (!IsValidUtf8(directoryEntry.path().string())) { @@ -239,18 +239,25 @@ void Storage::MaybeCopyDefaultPresets() } } -static void removeFileNoThrow(const std::filesystem::path &path) +static void removeFileNoThrow(const std::filesystem::path& path) { try { fs::remove(path); } - catch (const std::exception &) + catch (const std::exception&) { } } void Storage::UpgradeFactoryPresets() +{ + UpgradeV1FactoryPresets(); + UpgradeV2FactoryPresets(); +} + + +void Storage::UpgradeV2FactoryPresets() { auto presetsDirectory = this->GetPresetsDirectory(); auto presetsConfigDirectory = this->configRoot / "default_presets" / "presets"; @@ -265,8 +272,41 @@ void Storage::UpgradeFactoryPresets() fs::path defaultPresetsVersionFile = presetsDirectory / "banks.versionInfo"; presetsVersion.Load(defaultPresetsVersionFile); - // Maybe install or upgrade factory presets. - if (defaultConfigPresetsVersion.Version() > presetsVersion.Version() || defaultConfigPresetsVersion.Version() == 0) + constexpr uint32_t V2_VERSION_NUMBER = 2; + + // set the default banks.versionInfo value to 0 to force complete upgrade path + + bool testUpgrade = (defaultConfigPresetsVersion.Version() == 0); + // Maybe install or upgrade Version 1 factory presets. + if ((V2_VERSION_NUMBER > presetsVersion.Version() && presetsVersion.Version() != 0) || testUpgrade) + { + + } + +} + +void Storage::UpgradeV1FactoryPresets() +{ + auto presetsDirectory = this->GetPresetsDirectory(); + auto presetsConfigDirectory = this->configRoot / "default_presets" / "presets"; + + using namespace ::pipedal::implementation; + + BrowserFilesVersionInfo defaultConfigPresetsVersion; + fs::path defaultConfigPresetsVersionFile = presetsConfigDirectory / "banks.versionInfo"; + defaultConfigPresetsVersion.Load(defaultConfigPresetsVersionFile); + + BrowserFilesVersionInfo presetsVersion; + fs::path defaultPresetsVersionFile = presetsDirectory / "banks.versionInfo"; + presetsVersion.Load(defaultPresetsVersionFile); + + constexpr uint32_t V1_VERSION_NUMBER = 1; + + // set the default banks.versionInfo value to 0 to force complete upgrade path + + bool testUpgrade = (defaultConfigPresetsVersion.Version() == 0); + // Maybe install or upgrade Version 1 factory presets. + if ((V1_VERSION_NUMBER > presetsVersion.Version() && presetsVersion.Version() != 0) || testUpgrade) { // remove TooB ML README.md removeFileNoThrow("/usr/lib/lv2/ToobAmp.lv2/models/tones/README.md"); @@ -275,88 +315,92 @@ void Storage::UpgradeFactoryPresets() removeFileNoThrow("/var/pipedal/audio_uploads/ToobMlModels/README.md"); removeFileNoThrow("/var/pipedal/audio_uploads/ToobMlModels/model.index"); - std::string name = "Factory Presets"; - BankFile newFactoryPresets; + // Do NOT upgrade to v1 Factory Presets. +#if 0 { - fs::path defaultBankPath = presetsConfigDirectory / "Default+Bank.bank"; - try + std::string name = "Factory Presets"; + BankFile newFactoryPresets; { - std::ifstream is(defaultBankPath); - json_reader reader(is); - reader.read(&newFactoryPresets); + fs::path defaultBankPath = presetsConfigDirectory / "Default+Bank.bank"; + try + { + std::ifstream is(defaultBankPath); + json_reader reader(is); + reader.read(&newFactoryPresets); + } + catch (const std::exception& e) + { + Lv2Log::error(SS("Failed to isntall factory presets. Can't read " << defaultBankPath << ".")); + } } - catch (const std::exception &e) + newFactoryPresets.name("Factory Presets"); + + BankIndexEntry* existingEntry = bankIndex.getEntryByName(name); + if (existingEntry == nullptr) { - Lv2Log::error(SS("Failed to isntall factory presets. Can't read " << defaultBankPath << ".")); - } - } - newFactoryPresets.name("Factory Presets"); + BankFile bankFile; + bankFile.name(name); - BankIndexEntry *existingEntry = bankIndex.getEntryByName(name); - if (existingEntry == nullptr) - { - BankFile bankFile; - bankFile.name(name); + for (auto& presetEntry : newFactoryPresets.presets()) + { + bankFile.addPreset(presetEntry->preset(), -1); + } - for (auto &presetEntry : newFactoryPresets.presets()) - { - bankFile.addPreset(presetEntry->preset(), -1); - } - - int64_t instanceId = bankFile.presets()[0]->instanceId(); - bankFile.selectedPreset(instanceId); - SaveBankFile(name, bankFile); - this->bankIndex.addBank(-1, name); - this->SaveBankIndex(); - } - else - { - - // either use the current bank (if the factory bank is selected), or create a new one. - BankFile bankFile; - bankFile.name(name); - BankFile *pFactoryPresetsBank = nullptr; - bool usingCurrentBank = false; - if (bankIndex.selectedBank() == existingEntry->instanceId()) - { - usingCurrentBank = true; - pFactoryPresetsBank = &(this->currentBank); + int64_t instanceId = bankFile.presets()[0]->instanceId(); + bankFile.selectedPreset(instanceId); + SaveBankFile(name, bankFile); + this->bankIndex.addBank(-1, name); + this->SaveBankIndex(); } else { - LoadBankFile(name, &bankFile); - pFactoryPresetsBank = &bankFile; - } - // index existing presets. - std::unordered_map nameToPositionIndex; - for (size_t i = 0; i < pFactoryPresetsBank->presets().size(); ++i) - { - auto &preset = pFactoryPresetsBank->presets()[i]; - nameToPositionIndex[preset->preset().name()] = i; - } - // merge new presets into the existing ones (overwriting as neccessary) - for (auto &newPresetEntry : newFactoryPresets.presets()) - { - const std::string name = newPresetEntry->preset().name(); - - auto f = nameToPositionIndex.find(name); - if (f != nameToPositionIndex.end()) + // either use the current bank (if the factory bank is selected), or create a new one. + BankFile bankFile; + bankFile.name(name); + BankFile* pFactoryPresetsBank = nullptr; + bool usingCurrentBank = false; + if (bankIndex.selectedBank() == existingEntry->instanceId()) { - size_t postition = f->second; - // overwrite the existing entry. - pFactoryPresetsBank->presets()[postition]->preset(newPresetEntry->preset()); + usingCurrentBank = true; + pFactoryPresetsBank = &(this->currentBank); } else { - pFactoryPresetsBank->addPreset(newPresetEntry->preset()); + LoadBankFile(name, &bankFile); + pFactoryPresetsBank = &bankFile; + } + // index existing presets. + std::unordered_map nameToPositionIndex; + for (size_t i = 0; i < pFactoryPresetsBank->presets().size(); ++i) + { + auto& preset = pFactoryPresetsBank->presets()[i]; + nameToPositionIndex[preset->preset().name()] = i; } - } - SaveBankFile(name, *pFactoryPresetsBank); - presetsVersion.Version(defaultConfigPresetsVersion.Version()); - presetsVersion.Save(defaultPresetsVersionFile); + // merge new presets into the existing ones (overwriting as neccessary) + for (auto& newPresetEntry : newFactoryPresets.presets()) + { + const std::string name = newPresetEntry->preset().name(); + + auto f = nameToPositionIndex.find(name); + if (f != nameToPositionIndex.end()) + { + size_t postition = f->second; + // overwrite the existing entry. + pFactoryPresetsBank->presets()[postition]->preset(newPresetEntry->preset()); + } + else + { + pFactoryPresetsBank->addPreset(newPresetEntry->preset()); + } + } + SaveBankFile(name, *pFactoryPresetsBank); + } } +#endif + presetsVersion.Version(2); + presetsVersion.Save(defaultPresetsVersionFile); } } void Storage::Initialize() @@ -368,7 +412,7 @@ void Storage::Initialize() MaybeCopyDefaultPresets(); } - catch (const std::exception &e) + catch (const std::exception& e) { throw PiPedalStateException("Can't create presets directory. (" + (std::string)this->GetPresetsDirectory() + ") (" + e.what() + ")"); } @@ -379,7 +423,7 @@ void Storage::Initialize() { LoadJackChannelSelection(); } - catch (const std::exception &) + catch (const std::exception&) { } LoadAlsaSequencerConfiguration(); @@ -406,7 +450,7 @@ void Storage::LoadBank(int64_t instanceId) } this->LoadPreset(this->currentBank.selectedPreset()); } - catch (const std::exception &e) + catch (const std::exception& e) { throw std::logic_error(SS("Bank file corrupted. " << e.what() << "(" << GetBankFileName(indexEntry.name()) << ")")); } @@ -425,7 +469,7 @@ std::filesystem::path Storage::GetPluginPresetsDirectory() const { return this->dataRoot / "plugin_presets"; } -const std::filesystem::path &Storage::GetPluginUploadDirectory() const +const std::filesystem::path& Storage::GetPluginUploadDirectory() const { return dataRoot__audio_uploads; } @@ -447,7 +491,7 @@ std::filesystem::path Storage::GetIndexFileName() const { return this->GetPresetsDirectory() / BANKS_FILENAME; } -std::filesystem::path Storage::GetBankFileName(const std::string &name) const +std::filesystem::path Storage::GetBankFileName(const std::string& name) const { std::string fileName = SafeEncodeName(name) + BANK_EXTENSION; return this->GetPresetsDirectory() / fileName; @@ -463,7 +507,7 @@ void Storage::LoadBankIndex() json_reader reader(s); reader.read(&bankIndex); } - catch (const std::exception &) + catch (const std::exception&) { bankIndex.clear(); ReIndex(); @@ -497,7 +541,7 @@ void Storage::LoadPluginPresetIndex() reader.read(&pluginPresetIndex); } } - catch (const std::exception &) + catch (const std::exception&) { } } @@ -530,7 +574,7 @@ void Storage::SaveBankIndex() void Storage::ReIndex() { - for (const auto &dirEntry : std::filesystem::directory_iterator(GetPresetsDirectory())) + for (const auto& dirEntry : std::filesystem::directory_iterator(GetPresetsDirectory())) { if (!IsValidUtf8(dirEntry.path().string())) { @@ -555,7 +599,7 @@ void Storage::ReIndex() bankIndex.selectedBank(bankIndex.entries()[0].instanceId()); } -void Storage::CreateBank(const std::string &name) +void Storage::CreateBank(const std::string& name) { BankFile bankFile; Pedalboard defaultPreset = Pedalboard::MakeDefault(); @@ -570,7 +614,7 @@ void Storage::CreateBank(const std::string &name) this->SaveBankIndex(); } -void Storage::GetBankFile(int64_t instanceId, BankFile *pBank) const +void Storage::GetBankFile(int64_t instanceId, BankFile* pBank) const { auto indexEntry = this->bankIndex.getBankIndexEntry(instanceId); auto name = indexEntry.name(); @@ -581,7 +625,7 @@ void Storage::GetBankFile(int64_t instanceId, BankFile *pBank) const pBank->name(indexEntry.name()); } -void Storage::LoadBankFile(const std::string &name, BankFile *pBank) +void Storage::LoadBankFile(const std::string& name, BankFile* pBank) { std::filesystem::path fileName = GetBankFileName(name); std::ifstream is(fileName); @@ -589,7 +633,7 @@ void Storage::LoadBankFile(const std::string &name, BankFile *pBank) reader.read(pBank); } -void Storage::SaveBankFile(const std::string &name, const BankFile &bankFile) +void Storage::SaveBankFile(const std::string& name, const BankFile& bankFile) { std::filesystem::path fileName = GetBankFileName(name); std::filesystem::path backupFile = ((std::string)fileName) + ".$$$"; @@ -612,7 +656,7 @@ void Storage::SaveBankFile(const std::string &name, const BankFile &bankFile) std::filesystem::remove(backupFile); } } - catch (const std::exception &e) + catch (const std::exception& e) { std::filesystem::remove(fileName); if (std::filesystem::exists(backupFile)) @@ -629,9 +673,9 @@ void Storage::SaveCurrentBank() SaveBankFile(indexEntry.name(), this->currentBank); } -const Pedalboard &Storage::GetCurrentPreset() +const Pedalboard& Storage::GetCurrentPreset() { - auto &item = currentBank.getItem(currentBank.selectedPreset()); + auto& item = currentBank.getItem(currentBank.selectedPreset()); return item.preset(); } @@ -646,13 +690,13 @@ bool Storage::LoadPreset(int64_t instanceId) } return true; } -void Storage::SaveCurrentPreset(const Pedalboard &pedalboard) +void Storage::SaveCurrentPreset(const Pedalboard& pedalboard) { - auto &item = currentBank.getItem(currentBank.selectedPreset()); + auto& item = currentBank.getItem(currentBank.selectedPreset()); item.preset(pedalboard); SaveCurrentBank(); } -int64_t Storage::SaveCurrentPresetAs(const Pedalboard &pedalboard, int64_t bankInstanceId, const std::string &name, int64_t saveAfterInstanceId) +int64_t Storage::SaveCurrentPresetAs(const Pedalboard& pedalboard, int64_t bankInstanceId, const std::string& name, int64_t saveAfterInstanceId) { Pedalboard newPedalboard = pedalboard; newPedalboard.name(name); @@ -676,14 +720,14 @@ int64_t Storage::SaveCurrentPresetAs(const Pedalboard &pedalboard, int64_t bankI SaveBankFile(indexEntry.name(), bankFile); return -1; } - catch (const std::exception &e) + catch (const std::exception& e) { throw std::logic_error(SS("Bank file corrupted. " << e.what() << "(" << GetBankFileName(indexEntry.name()) << ")")); } } } -static std::string stripNumericSuffix(const std::string &name) +static std::string stripNumericSuffix(const std::string& name) { // remove (digit*) from the end of the string. // Find the last '(' character @@ -722,7 +766,7 @@ static std::string stripNumericSuffix(const std::string &name) return name.substr(0, pos); } -static std::string makeUniqueName(const std::string &name, const std::set &existingNames) +static std::string makeUniqueName(const std::string& name, const std::set& existingNames) { if (!existingNames.contains(name)) { @@ -741,25 +785,25 @@ static std::string makeUniqueName(const std::string &name, const std::set &presets) +int64_t Storage::ImportPresetsFromBank(int64_t bankInstanceId, const std::vector& presets) { if (bankIndex.selectedBank() == bankInstanceId) { throw std::runtime_error("Can't import to self."); } - std::set presetsSet{presets.begin(), presets.end()}; + std::set presetsSet{ presets.begin(), presets.end() }; auto indexEntry = this->bankIndex.getBankIndexEntry(bankInstanceId); std::set existingNames; - for (auto &preset : this->currentBank.presets()) + for (auto& preset : this->currentBank.presets()) { existingNames.insert(preset->preset().name()); } BankFile bankFile; LoadBankFile(indexEntry.name(), &bankFile); int64_t lastPresetId = -1; - for (auto &presetEntry : bankFile.presets()) + for (auto& presetEntry : bankFile.presets()) { if (presetsSet.contains(presetEntry->instanceId())) { @@ -773,7 +817,7 @@ int64_t Storage::ImportPresetsFromBank(int64_t bankInstanceId, const std::vector SaveCurrentBank(); return lastPresetId; } -int64_t Storage::CopyPresetsToBank(int64_t bankInstanceId, const std::vector &presets) +int64_t Storage::CopyPresetsToBank(int64_t bankInstanceId, const std::vector& presets) { if (bankIndex.selectedBank() == bankInstanceId) { @@ -784,15 +828,15 @@ int64_t Storage::CopyPresetsToBank(int64_t bankInstanceId, const std::vector presetsSet{presets.begin(), presets.end()}; + std::set presetsSet{ presets.begin(), presets.end() }; std::set existingNames; - for (auto &preset : bankFile.presets()) + for (auto& preset : bankFile.presets()) { existingNames.insert(preset->preset().name()); } - for (auto &presetEntry : this->currentBank.presets()) + for (auto& presetEntry : this->currentBank.presets()) { if (presetsSet.contains(presetEntry->instanceId())) { @@ -814,7 +858,7 @@ std::vector Storage::RequestBankPresets(int64_t bankInstanceId std::vector result; BankFile bankFile; LoadBankFile(indexEntry.name(), &bankFile); - for (auto &preset : bankFile.presets()) + for (auto& preset : bankFile.presets()) { result.push_back( PresetIndexEntry(preset->instanceId(), preset->preset().name())); @@ -822,19 +866,19 @@ std::vector Storage::RequestBankPresets(int64_t bankInstanceId return result; } -void Storage::SetPresetIndex(const PresetIndex &presets) +void Storage::SetPresetIndex(const PresetIndex& presets) { // painful because we must move unique_ptrs. - std::map *> entries; + std::map*> entries; for (int i = 0; i < this->currentBank.presets().size(); ++i) { - auto &preset = this->currentBank.presets()[i]; + auto& preset = this->currentBank.presets()[i]; entries[preset->instanceId()] = &(this->currentBank.presets()[i]); } - std::vector *> newPresets; + std::vector*> newPresets; for (size_t i = 0; i < presets.presets().size(); ++i) { - std::unique_ptr *p = entries[presets.presets()[i].instanceId()]; + std::unique_ptr* p = entries[presets.presets()[i].instanceId()]; if (p == nullptr) { throw PiPedalStateException("Presets do not match the currently loaded bank."); @@ -846,7 +890,7 @@ void Storage::SetPresetIndex(const PresetIndex &presets) bankFile.presets().resize(newPresets.size()); for (int i = 0; i < presets.presets().size(); ++i) { - std::unique_ptr *oldBankFilePreset = newPresets[i]; + std::unique_ptr* oldBankFilePreset = newPresets[i]; bankFile.presets()[i] = std::move((*oldBankFilePreset)); } @@ -857,11 +901,11 @@ void Storage::SetPresetIndex(const PresetIndex &presets) this->SaveCurrentBank(); } -void Storage::GetPresetIndex(PresetIndex *pResult) +void Storage::GetPresetIndex(PresetIndex* pResult) { *pResult = PresetIndex(); pResult->selectedInstanceId(this->currentBank.selectedPreset()); - for (auto &item : this->currentBank.presets()) + for (auto& item : this->currentBank.presets()) { PresetIndexEntry entry; entry.instanceId(item->instanceId()); @@ -892,7 +936,7 @@ Pedalboard Storage::GetPreset(int64_t instanceId) const throw PiPedalException("Not found."); } -int64_t Storage::DeletePresets(const std::vector &presetInstanceIds) +int64_t Storage::DeletePresets(const std::vector& presetInstanceIds) { int64_t newSelection = currentBank.selectedPreset(); for (auto presetId : presetInstanceIds) @@ -903,7 +947,7 @@ int64_t Storage::DeletePresets(const std::vector &presetInstanceIds) return newSelection; } -bool Storage::RenamePreset(int64_t presetId, const std::string &name) +bool Storage::RenamePreset(int64_t presetId, const std::string& name) { if (this->currentBank.renamePreset(presetId, name)) { @@ -913,7 +957,7 @@ bool Storage::RenamePreset(int64_t presetId, const std::string &name) return false; } -static int lastIndexOf(const char *sz, char c) +static int lastIndexOf(const char* sz, char c) { size_t len = strlen(sz); for (size_t i = len - 1; i >= 0; --i) @@ -927,13 +971,13 @@ static int lastIndexOf(const char *sz, char c) } return -1; } -std::string Storage::GetPresetCopyName(const std::string &name) +std::string Storage::GetPresetCopyName(const std::string& name) { - const char *str = name.c_str(); + const char* str = name.c_str(); std::string stem; if (name.length() != 0 && name[name.length() - 1] == ')') { - const char *str = name.c_str(); + const char* str = name.c_str(); size_t pos = lastIndexOf(str, '('); if (pos == -1) { @@ -995,7 +1039,7 @@ int64_t Storage::CreateNewPreset() int64_t Storage::CopyPreset(int64_t fromId, int64_t toId) { - auto &fromItem = this->currentBank.getItem(fromId); + auto& fromItem = this->currentBank.getItem(fromId); int64_t result; if (toId == -1) { @@ -1006,7 +1050,7 @@ int64_t Storage::CopyPreset(int64_t fromId, int64_t toId) } else { - auto &toItem = this->currentBank.getItem(toId); + auto& toItem = this->currentBank.getItem(toId); toItem.preset(fromItem.preset()); result = toId; } @@ -1014,13 +1058,13 @@ int64_t Storage::CopyPreset(int64_t fromId, int64_t toId) return result; } -void Storage::SetJackChannelSelection(const JackChannelSelection &channelSelection) +void Storage::SetJackChannelSelection(const JackChannelSelection& channelSelection) { this->jackChannelSelection = channelSelection; this->isJackChannelSelectionValid = true; SaveChannelSelection(); } -JackChannelSelection Storage::GetJackChannelSelection(const JackConfiguration &jackConfiguration) +JackChannelSelection Storage::GetJackChannelSelection(const JackConfiguration& jackConfiguration) { if (!this->isJackChannelSelectionValid) { @@ -1033,7 +1077,7 @@ JackChannelSelection Storage::GetJackChannelSelection(const JackConfiguration &j return jackChannelSelection.RemoveInvalidChannels(jackConfiguration); } -static AlsaSequencerConfiguration MigrateRawMidiToAlsaSequencer(std::vector &selectedDevices) +static AlsaSequencerConfiguration MigrateRawMidiToAlsaSequencer(std::vector& selectedDevices) { AlsaSequencerConfiguration result; try @@ -1046,7 +1090,7 @@ static AlsaSequencerConfiguration MigrateRawMidiToAlsaSequencer(std::vectorname_.starts_with("hw:")) { - for (const auto &port : sequencerPorts) + for (const auto& port : sequencerPorts) { if (i->name_ == port.rawMidiDevice) { @@ -1058,7 +1102,7 @@ static AlsaSequencerConfiguration MigrateRawMidiToAlsaSequencer(std::vectoralsaSequencerConfiguration = result; } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("I/O error reading %s: %s", fileName.c_str(), e.what()); } @@ -1113,13 +1157,13 @@ void Storage::SaveAlsaSequencerConfiguration() json_writer writer(s); writer.write(this->alsaSequencerConfiguration); } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("I/O error writing %s: %s", fileName.c_str(), e.what()); } } -void Storage::SetAlsaSequencerConfiguration(const AlsaSequencerConfiguration &alsaSequencerConfiguration) +void Storage::SetAlsaSequencerConfiguration(const AlsaSequencerConfiguration& alsaSequencerConfiguration) { this->alsaSequencerConfiguration = alsaSequencerConfiguration; SaveAlsaSequencerConfiguration(); @@ -1142,7 +1186,7 @@ void Storage::LoadJackChannelSelection() reader.read(&this->jackChannelSelection); this->isJackChannelSelectionValid = true; } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("I/O error reading %s: %s", fileName.c_str(), e.what()); } @@ -1159,28 +1203,28 @@ void Storage::SaveChannelSelection() json_writer writer(s, false); writer.write(this->jackChannelSelection); } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("I/O error writing %s: %s", fileName.c_str(), e.what()); throw PiPedalStateException("Unexpected error writing Jack settings file."); } } -void Storage::RenameBank(int64_t bankId, const std::string &newName) +void Storage::RenameBank(int64_t bankId, const std::string& newName) { auto existingBank = this->bankIndex.getEntryByName(newName); if (existingBank != nullptr) { throw PiPedalStateException("A bank by that name already exists."); } - auto &entry = this->bankIndex.getBankIndexEntry(bankId); + auto& entry = this->bankIndex.getBankIndexEntry(bankId); std::filesystem::path oldPath = this->GetBankFileName(entry.name()); std::filesystem::path newPath = this->GetBankFileName(newName); try { std::filesystem::rename(oldPath, newPath); } - catch (std::exception &e) + catch (std::exception& e) { std::stringstream s; s << "Unable to rename the bank. (" << e.what() << ")"; @@ -1190,21 +1234,21 @@ void Storage::RenameBank(int64_t bankId, const std::string &newName) SaveBankIndex(); } -int64_t Storage::SaveBankAs(int64_t bankId, const std::string &newName) +int64_t Storage::SaveBankAs(int64_t bankId, const std::string& newName) { auto existingBank = this->bankIndex.getEntryByName(newName); if (existingBank != nullptr) { throw PiPedalStateException("A bank by that name already exists."); } - auto &entry = this->bankIndex.getBankIndexEntry(bankId); + auto& entry = this->bankIndex.getBankIndexEntry(bankId); std::filesystem::path oldPath = this->GetBankFileName(entry.name()); std::filesystem::path newPath = this->GetBankFileName(newName); try { std::filesystem::copy(oldPath, newPath); } - catch (std::exception &e) + catch (std::exception& e) { std::stringstream s; s << "Unable to save the bank. (" << e.what() << ")"; @@ -1223,7 +1267,7 @@ void Storage::MoveBank(int from, int to) int64_t Storage::GetBankByMidiBankNumber(uint8_t bankNumber) { - auto &entries = this->bankIndex.entries(); + auto& entries = this->bankIndex.entries(); if (bankNumber >= entries.size()) { if (entries.size() == 0) @@ -1234,11 +1278,11 @@ int64_t Storage::GetBankByMidiBankNumber(uint8_t bankNumber) } int64_t Storage::DeleteBank(int64_t bankId) { - auto &entries = this->bankIndex.entries(); + auto& entries = this->bankIndex.entries(); for (size_t i = 0; i < entries.size(); ++i) { - auto &entry = entries[i]; + auto& entry = entries[i]; if (entry.instanceId() == bankId) { @@ -1287,7 +1331,7 @@ int64_t Storage::GetCurrentPresetId() const return this->currentBank.selectedPreset(); } -int64_t Storage::UploadPreset(const BankFile &bankFile, int64_t uploadAfter) +int64_t Storage::UploadPreset(const BankFile& bankFile, int64_t uploadAfter) { int64_t lastPreset = this->currentBank.selectedPreset(); if (uploadAfter != -1) @@ -1317,7 +1361,7 @@ int64_t Storage::UploadPreset(const BankFile &bankFile, int64_t uploadAfter) this->SaveCurrentBank(); return lastPreset; } -int64_t Storage::UploadBank(BankFile &bankFile, int64_t uploadAfter) +int64_t Storage::UploadBank(BankFile& bankFile, int64_t uploadAfter) { int64_t lastBank = this->bankIndex.selectedBank(); if (uploadAfter != -1) @@ -1353,7 +1397,7 @@ int64_t Storage::UploadBank(BankFile &bankFile, int64_t uploadAfter) return lastBank; } -void Storage::SetGovernorSettings(const std::string &governor) +void Storage::SetGovernorSettings(const std::string& governor) { userSettings.governor_ = governor; SaveUserSettings(); @@ -1386,7 +1430,7 @@ std::string Storage::GetGovernorSettings() const return this->userSettings.governor_; } -bool Storage::SetWifiConfigSettings(const WifiConfigSettings &wifiConfigSettings) +bool Storage::SetWifiConfigSettings(const WifiConfigSettings& wifiConfigSettings) { WifiConfigSettings copyToSave = wifiConfigSettings; WifiConfigSettings previousValue; @@ -1413,7 +1457,7 @@ bool Storage::SetWifiConfigSettings(const WifiConfigSettings &wifiConfigSettings return configChanged; } -void Storage::SetWifiDirectConfigSettings(const WifiDirectConfigSettings &wifiDirectConfigSettings) +void Storage::SetWifiDirectConfigSettings(const WifiDirectConfigSettings& wifiDirectConfigSettings) { WifiDirectConfigSettings copyToSave = wifiDirectConfigSettings; copyToSave.rebootRequired_ = false; @@ -1444,7 +1488,7 @@ void Storage::LoadUserSettings() reader.read(&userSettings); } } - catch (const std::exception &) + catch (const std::exception&) { } this->wifiConfigSettings.valid_ = true; @@ -1477,7 +1521,7 @@ WifiDirectConfigSettings Storage::GetWifiDirectConfigSettings() return this->wifiDirectConfigSettings; } -void Storage::SaveCurrentPreset(const CurrentPreset ¤tPreset) +void Storage::SaveCurrentPreset(const CurrentPreset& currentPreset) { try { @@ -1487,12 +1531,12 @@ void Storage::SaveCurrentPreset(const CurrentPreset ¤tPreset) json_writer writer(f, true); writer.write(currentPreset); } - catch (std::exception &) + catch (std::exception&) { // called from destructor. Must be nothrow(). } } -bool Storage::RestoreCurrentPreset(CurrentPreset *pResult) +bool Storage::RestoreCurrentPreset(CurrentPreset* pResult) { std::filesystem::path path = GetCurrentPresetPath(); if (std::filesystem::exists(path)) @@ -1504,7 +1548,7 @@ bool Storage::RestoreCurrentPreset(CurrentPreset *pResult) reader.read(pResult); std::filesystem::remove(path); // one-shot only, restore the state from the last *orderly* shutdown. } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::warning(SS("Failed to restore current preset. " << e.what())); @@ -1533,9 +1577,9 @@ void Storage::SetPluginPresetIndexVersion(uint64_t version) } } -bool Storage::HasPluginPresets(const std::string &pluginUri) const +bool Storage::HasPluginPresets(const std::string& pluginUri) const { - for (const auto &entry : this->pluginPresetIndex.entries_) + for (const auto& entry : this->pluginPresetIndex.entries_) { if (entry.pluginUri_ == pluginUri) { @@ -1545,9 +1589,9 @@ bool Storage::HasPluginPresets(const std::string &pluginUri) const return false; } -std::filesystem::path Storage::GetPluginPresetPath(const std::string &pluginUri) const +std::filesystem::path Storage::GetPluginPresetPath(const std::string& pluginUri) const { - for (const auto &entry : this->pluginPresetIndex.entries_) + for (const auto& entry : this->pluginPresetIndex.entries_) { if (entry.pluginUri_ == pluginUri) { @@ -1557,7 +1601,7 @@ std::filesystem::path Storage::GetPluginPresetPath(const std::string &pluginUri) throw PiPedalArgumentException("Plugin preset file not found."); } -void Storage::MergePluginPresets(const std::string &pluginUri, const PluginPresets &presets) +void Storage::MergePluginPresets(const std::string& pluginUri, const PluginPresets& presets) { std::string name; std::filesystem::path path; @@ -1581,12 +1625,12 @@ void Storage::MergePluginPresets(const std::string &pluginUri, const PluginPrese reader.read(&existingPresets); } } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error(SS("Storage::MergePluginPresets: Can't reading existing plugin presets." << e.what())); } } - for (const PluginPreset &preset : presets.presets_) + for (const PluginPreset& preset : presets.presets_) { existingPresets.MergePreset(preset); @@ -1619,7 +1663,7 @@ void Storage::MergePluginPresets(const std::string &pluginUri, const PluginPrese } } -void Storage::SavePluginPresets(const std::string &pluginUri, const PluginPresets &presets) +void Storage::SavePluginPresets(const std::string& pluginUri, const PluginPresets& presets) { std::string name; std::filesystem::path path; @@ -1662,7 +1706,7 @@ void Storage::SavePluginPresets(const std::string &pluginUri, const PluginPreset } } -PluginPresets Storage::GetPluginPresets(const std::string &pluginUri) const +PluginPresets Storage::GetPluginPresets(const std::string& pluginUri) const { PluginPresets result; if (!HasPluginPresets(pluginUri)) @@ -1681,36 +1725,36 @@ PluginPresets Storage::GetPluginPresets(const std::string &pluginUri) const reader.read(&result); return result; } -PluginUiPresets Storage::GetPluginUiPresets(const std::string &pluginUri) const +PluginUiPresets Storage::GetPluginUiPresets(const std::string& pluginUri) const { PluginPresets presets = GetPluginPresets(pluginUri); PluginUiPresets result; result.pluginUri_ = presets.pluginUri_; for (size_t i = 0; i < presets.presets_.size(); ++i) { - const auto &preset = presets.presets_[i]; + const auto& preset = presets.presets_[i]; result.presets_.push_back( PluginUiPreset{ preset.label_, - preset.instanceId_}); + preset.instanceId_ }); } return result; } -PluginPresetValues Storage::GetPluginPresetValues(const std::string &pluginUri, uint64_t instanceId) +PluginPresetValues Storage::GetPluginPresetValues(const std::string& pluginUri, uint64_t instanceId) { auto presets = GetPluginPresets(pluginUri); - for (const auto &preset : presets.presets_) + for (const auto& preset : presets.presets_) { if (preset.instanceId_ == instanceId) { PluginPresetValues result; - for (const auto &valuePair : preset.controlValues_) + for (const auto& valuePair : preset.controlValues_) { result.controls.push_back(ControlValue(valuePair.first.c_str(), valuePair.second)); } - for (const auto &pair : preset.pathProperties_) + for (const auto& pair : preset.pathProperties_) { result.pathProperties[pair.first] = pair.second; } @@ -1722,24 +1766,24 @@ PluginPresetValues Storage::GetPluginPresetValues(const std::string &pluginUri, throw PiPedalException("Plugin preset not found."); } -void Storage::ToAbstractPaths(PluginPreset &pluginPreset) +void Storage::ToAbstractPaths(PluginPreset& pluginPreset) { if (pluginPreset.pathProperties_.size() != 0) { std::map newPathProperties; - for (const auto &pair : pluginPreset.pathProperties_) + for (const auto& pair : pluginPreset.pathProperties_) { newPathProperties[pair.first] = this->ToAbstractPathFromJson(pair.second); } pluginPreset.pathProperties_ = newPathProperties; } } -void Storage::FromAbstractPaths(PluginPreset &pluginPreset) +void Storage::FromAbstractPaths(PluginPreset& pluginPreset) { if (pluginPreset.pathProperties_.size() != 0) { std::map newPathProperties; - for (const auto &pair : pluginPreset.pathProperties_) + for (const auto& pair : pluginPreset.pathProperties_) { newPathProperties[pair.first] = this->FromAbstractPathJson(pair.second); } @@ -1748,22 +1792,22 @@ void Storage::FromAbstractPaths(PluginPreset &pluginPreset) } uint64_t Storage::SavePluginPreset( - const std::string &name, - const PedalboardItem &pedalboardItem) + const std::string& name, + const PedalboardItem& pedalboardItem) { - const std::string &pluginUri = pedalboardItem.uri(); + const std::string& pluginUri = pedalboardItem.uri(); auto presets = GetPluginPresets(pluginUri); uint64_t result = -1; bool existing = false; for (size_t i = 0; i < presets.presets_.size(); ++i) { - auto &preset = presets.presets_[i]; + auto& preset = presets.presets_[i]; if (preset.label_ == name) { existing = true; result = preset.instanceId_; - PluginPreset pluginPreset{preset.instanceId_, preset.label_, pedalboardItem}; + PluginPreset pluginPreset{ preset.instanceId_, preset.label_, pedalboardItem }; presets.presets_[i] = PluginPreset(preset.instanceId_, preset.label_, pedalboardItem); break; @@ -1784,15 +1828,15 @@ uint64_t Storage::SavePluginPreset( } uint64_t Storage::SavePluginPreset( - const std::string &pluginUri, - PluginPreset &pluginPreset) + const std::string& pluginUri, + PluginPreset& pluginPreset) { auto presets = GetPluginPresets(pluginUri); uint64_t result = -1; bool existing = false; for (size_t i = 0; i < presets.presets_.size(); ++i) { - auto &preset = presets.presets_[i]; + auto& preset = presets.presets_[i]; if (preset.label_ == pluginPreset.label_) { existing = true; @@ -1814,7 +1858,7 @@ uint64_t Storage::SavePluginPreset( return result; } -void Storage::UpdatePluginPresets(const PluginUiPresets &pluginPresets) +void Storage::UpdatePluginPresets(const PluginUiPresets& pluginPresets) { // handles deletions, renaming, and reordering only. // If you need to add a preset, you need to call SavePluginPreset or DuplicatePluginPreset instead. @@ -1824,7 +1868,7 @@ void Storage::UpdatePluginPresets(const PluginUiPresets &pluginPresets) newPresets.pluginUri_ = pluginPresets.pluginUri_; newPresets.nextInstanceId_ = presets.nextInstanceId_; - for (const auto &preset : pluginPresets.presets_) + for (const auto& preset : pluginPresets.presets_) { PluginPreset newPreset = presets.GetPreset(preset.instanceId_); newPreset.label_ = preset.label_; @@ -1833,7 +1877,7 @@ void Storage::UpdatePluginPresets(const PluginUiPresets &pluginPresets) SavePluginPresets(newPresets.pluginUri_, newPresets); } -static std::string stripCopySuffix(const std::string &s) +static std::string stripCopySuffix(const std::string& s) { int pos = s.length() - 1; if (pos >= 0 && s[pos] == ')') @@ -1855,7 +1899,7 @@ static std::string stripCopySuffix(const std::string &s) } return s; } -uint64_t Storage::CopyPluginPreset(const std::string &pluginUri, uint64_t presetId) +uint64_t Storage::CopyPluginPreset(const std::string& pluginUri, uint64_t presetId) { PluginPresets presets = this->GetPluginPresets(pluginUri); size_t pos = presets.Find(presetId); @@ -1904,7 +1948,7 @@ std::map Storage::GetFavorites() const } return result; } -void Storage::SetFavorites(const std::map &favorites) +void Storage::SetFavorites(const std::map& favorites) { std::filesystem::path fileName = this->dataRoot / "favorites.json"; pipedal::ofstream_synced f; @@ -1940,7 +1984,7 @@ pipedal::JackServerSettings Storage::GetJackServerSettings() return result; } -void Storage::SetJackServerSettings(const pipedal::JackServerSettings &jackConfiguration) +void Storage::SetJackServerSettings(const pipedal::JackServerSettings& jackConfiguration) { std::filesystem::path fileName = this->dataRoot / "AudioConfig.json"; pipedal::ofstream_synced f; @@ -1952,7 +1996,7 @@ void Storage::SetJackServerSettings(const pipedal::JackServerSettings &jackConfi } } -void Storage::SetSystemMidiBindings(const std::vector &bindings) +void Storage::SetSystemMidiBindings(const std::vector& bindings) { std::filesystem::path fileName = this->dataRoot / "config" / "SystemMidiBindings.json"; pipedal::ofstream_synced f; @@ -1963,9 +2007,9 @@ void Storage::SetSystemMidiBindings(const std::vector &bindings) writer.write(bindings); } } -static bool hasBinding(std::vector &bindings, const std::string &name) +static bool hasBinding(std::vector& bindings, const std::string& name) { - for (auto &binding : bindings) + for (auto& binding : bindings) { if (binding.symbol() == name) { @@ -2015,7 +2059,7 @@ std::vector Storage::GetSystemMidiBindings() } return result; } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::warning(SS("Can't read file " << fileName << ". " << e.what())); } @@ -2040,7 +2084,7 @@ std::vector Storage::GetSystemMidiBindings() return result; } -static bool containsDirectorySeparator(const std::string &value) +static bool containsDirectorySeparator(const std::string& value) { if (value.find("/") != std::string::npos) return true; // linux @@ -2056,7 +2100,7 @@ static void ThrowPermissionDeniedError() throw std::logic_error("Permission denied."); } -static bool ensureNoDotDot(const std::filesystem::path &path) +static bool ensureNoDotDot(const std::filesystem::path& path) { for (auto segment_ : path) { @@ -2082,7 +2126,7 @@ static bool ensureNoDotDot(const std::filesystem::path &path) return true; } -bool isInfoFile(const fs::path &path) +bool isInfoFile(const fs::path& path) { auto extension = path.extension(); if (extension == ".pdf") @@ -2105,37 +2149,37 @@ bool isInfoFile(const fs::path &path) return false; } -static bool isInfoFile(const FileEntry &l) +static bool isInfoFile(const FileEntry& l) { return isInfoFile(l.displayName_); } static void AddFilesToResult( - FileRequestResult &result, - const ModFileTypes::ModDirectory *modDirectoryInfo, // yyx - const UiFileProperty &fileProperty, - const fs::path &rootPath) + FileRequestResult& result, + const ModFileTypes::ModDirectory* modDirectoryInfo, // yyx + const UiFileProperty& fileProperty, + const fs::path& rootPath) { if (!fs::exists(rootPath)) { return; // silently without error. } - auto &resultFiles = result.files_; + auto& resultFiles = result.files_; std::set validExtensions = fileProperty.GetPermittedFileExtensions( modDirectoryInfo ? modDirectoryInfo->modType : ""); try { - for (auto const &dir_entry : std::filesystem::directory_iterator(rootPath)) + for (auto const& dir_entry : std::filesystem::directory_iterator(rootPath)) { if (!IsValidUtf8(dir_entry.path().string())) { Lv2Log::warning("Invalid UTF-8 name in directory: " + dir_entry.path().string()); continue; // skip invalid UTF-8 names. } - const auto &path = dir_entry.path(); + const auto& path = dir_entry.path(); auto name = path.filename().string(); if (dir_entry.is_regular_file()) { @@ -2155,11 +2199,11 @@ static void AddFilesToResult( } else if (dir_entry.is_directory()) { - resultFiles.push_back(FileEntry{path, SafeFilenameToString(name), true, fs::is_symlink(path)}); + resultFiles.push_back(FileEntry{ path, SafeFilenameToString(name), true, fs::is_symlink(path) }); } } } - catch (const std::exception &error) + catch (const std::exception& error) { throw std::logic_error( SS("GetFileList failed. " << rootPath.string() << " - " << error.what())); @@ -2169,41 +2213,41 @@ static void AddFilesToResult( auto collator = Locale::GetInstance()->GetCollator(); - std::sort(resultFiles.begin(), resultFiles.end(), [&collator](const FileEntry &l, const FileEntry &r) - { - if (l.isDirectory_ != r.isDirectory_) + std::sort(resultFiles.begin(), resultFiles.end(), [&collator](const FileEntry& l, const FileEntry& r) { - return l.isDirectory_ > r.isDirectory_; - } - bool lIsInfoFile = isInfoFile(l); - bool rIsInfoFile = isInfoFile(r); - if (lIsInfoFile != rIsInfoFile) - { - return lIsInfoFile > rIsInfoFile; - } - return collator->Compare(l.displayName_,r.displayName_) < 0; }); + if (l.isDirectory_ != r.isDirectory_) + { + return l.isDirectory_ > r.isDirectory_; + } + bool lIsInfoFile = isInfoFile(l); + bool rIsInfoFile = isInfoFile(r); + if (lIsInfoFile != rIsInfoFile) + { + return lIsInfoFile > rIsInfoFile; + } + return collator->Compare(l.displayName_, r.displayName_) < 0; }); } static void AddTracksToResult( - const fs::path &audioRootDirectory, - FileRequestResult &result, - const ModFileTypes::ModDirectory *modDirectoryInfo, // yyx - const UiFileProperty &fileProperty, - const fs::path &rootPath) + const fs::path& audioRootDirectory, + FileRequestResult& result, + const ModFileTypes::ModDirectory* modDirectoryInfo, // yyx + const UiFileProperty& fileProperty, + const fs::path& rootPath) { if (!fs::exists(rootPath)) { return; // silently without error. } - auto &resultFiles = result.files_; + auto& resultFiles = result.files_; std::set validExtensions = fileProperty.GetPermittedFileExtensions( modDirectoryInfo ? modDirectoryInfo->modType : ""); if (validExtensions.size() == 0) { - const auto &audioExtensions = MimeTypes::instance().AudioExtensions(); + const auto& audioExtensions = MimeTypes::instance().AudioExtensions(); validExtensions.insert(audioExtensions.begin(), audioExtensions.end()); } validExtensions.insert(".jpg"); @@ -2213,29 +2257,29 @@ static void AddTracksToResult( // Add directories first. try { - for (auto const &dir_entry : std::filesystem::directory_iterator(rootPath)) + for (auto const& dir_entry : std::filesystem::directory_iterator(rootPath)) { if (!IsValidUtf8(dir_entry.path().string())) { Lv2Log::warning("Invalid UTF-8 name in directory: " + dir_entry.path().string()); continue; // skip invalid UTF-8 names. } - const auto &path = dir_entry.path(); + const auto& path = dir_entry.path(); auto name = path.filename().string(); try { if (dir_entry.is_directory()) { - resultFiles.push_back(FileEntry{path, name, true, dir_entry.is_symlink()}); + resultFiles.push_back(FileEntry{ path, name, true, dir_entry.is_symlink() }); } } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::warning(SS("Failed to add directory entry: " << path.string() << " - " << e.what())); } } } - catch (const std::exception &error) + catch (const std::exception& error) { throw std::logic_error( SS("AddTracksToResult failed to enumerate directories. " << rootPath.string() << " - " << error.what())); @@ -2244,7 +2288,7 @@ static void AddTracksToResult( std::sort( resultFiles.begin(), resultFiles.end(), - [collator](const FileEntry &l, const FileEntry &r) + [collator](const FileEntry& l, const FileEntry& r) { if (l.isDirectory_ != r.isDirectory_) { @@ -2261,11 +2305,11 @@ static void AddTracksToResult( }); // Add audio files. auto audioFiles = AudioDirectoryInfo::Create(rootPath, - GetShadowIndexDirectory(audioRootDirectory, rootPath)); + GetShadowIndexDirectory(audioRootDirectory, rootPath)); try { - for (const auto &audioFile : audioFiles->GetFiles()) + for (const auto& audioFile : audioFiles->GetFiles()) { fs::path audioFilePath = rootPath / audioFile.fileName(); std::string extension = UiFileProperty::GetFileExtension(audioFilePath); @@ -2280,29 +2324,29 @@ static void AddTracksToResult( } } } - catch (const std::exception &error) + catch (const std::exception& error) { throw std::logic_error( SS("AddTracksToResult failed to enumerate audio files. " << rootPath.string() << " - " << error.what())); } } - catch (const std::exception &error) + catch (const std::exception& error) { throw std::logic_error(SS("GetFileList failed. " << error.what() << "(" << rootPath.string() << ")")); } } -FileRequestResult Storage::GetModFileList2(const std::string &relativePath, const UiFileProperty &fileProperty) +FileRequestResult Storage::GetModFileList2(const std::string& relativePath, const UiFileProperty& fileProperty) { FileRequestResult result; - const fs::path &uploadsDirectory = GetPluginUploadDirectory(); + const fs::path& uploadsDirectory = GetPluginUploadDirectory(); if (relativePath.empty()) { // return the synthetic root. result.isProtected_ = true; - for (const auto &modDirectory : fileProperty.modDirectories()) + for (const auto& modDirectory : fileProperty.modDirectories()) { const auto directoryInfo = ModFileTypes::GetModDirectory(modDirectory); if (directoryInfo) @@ -2316,27 +2360,27 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons result.files_.push_back( FileEntry(uploadsDirectory / fileProperty.directory(), fs::path(fileProperty.directory()).filename().string(), true, true)); } - result.breadcrumbs_.push_back({"", "Home"}); + result.breadcrumbs_.push_back({ "", "Home" }); result.currentDirectory_ = relativePath; return result; } fs::path modDirectoryPath; - result.breadcrumbs_.push_back({"", "Home"}); - fs::path fsRelativePath{relativePath}; + result.breadcrumbs_.push_back({ "", "Home" }); + fs::path fsRelativePath{ relativePath }; - const ModFileTypes::ModDirectory *rootModDirectory = nullptr; - for (const auto &modDirectory : fileProperty.modDirectories()) + const ModFileTypes::ModDirectory* rootModDirectory = nullptr; + for (const auto& modDirectory : fileProperty.modDirectories()) { - const ModFileTypes::ModDirectory *modDirectoryInfo = ModFileTypes::GetModDirectory(modDirectory); + const ModFileTypes::ModDirectory* modDirectoryInfo = ModFileTypes::GetModDirectory(modDirectory); if (modDirectoryInfo) { if (IsSubdirectory(fsRelativePath, uploadsDirectory / modDirectoryInfo->pipedalPath)) { rootModDirectory = modDirectoryInfo; modDirectoryPath = uploadsDirectory / modDirectoryInfo->pipedalPath; - result.breadcrumbs_.push_back({modDirectoryPath.string(), - (modDirectoryInfo->displayName)}); + result.breadcrumbs_.push_back({ modDirectoryPath.string(), + (modDirectoryInfo->displayName) }); break; } } @@ -2346,8 +2390,8 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons if (IsSubdirectory(fsRelativePath, uploadsDirectory / fileProperty.directory())) { modDirectoryPath = uploadsDirectory / fileProperty.directory(); - result.breadcrumbs_.push_back({modDirectoryPath.string(), - SafeFilenameToString(fs::path(fileProperty.directory()).filename().string())}); + result.breadcrumbs_.push_back({ modDirectoryPath.string(), + SafeFilenameToString(fs::path(fileProperty.directory()).filename().string()) }); } else { @@ -2357,8 +2401,8 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons // add reaming path segments as breadcrumbs. { - fs::path modPath{modDirectoryPath}; - fs::path rp{relativePath}; + fs::path modPath{ modDirectoryPath }; + fs::path rp{ relativePath }; auto iRp = rp.begin(); // skip past one or more segments in the modDirectoryPath. for (auto iModPath = modPath.begin(); iModPath != modPath.end(); ++iModPath) @@ -2372,7 +2416,7 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons while (iRp != rp.end()) { cumulativePath /= (*iRp); - result.breadcrumbs_.push_back({cumulativePath, SafeFilenameToString(*iRp)}); + result.breadcrumbs_.push_back({ cumulativePath, SafeFilenameToString(*iRp) }); ++iRp; } } @@ -2389,7 +2433,7 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons return result; } -static bool IsChildDirectory(const fs::path &child, const fs::path &parent) +static bool IsChildDirectory(const fs::path& child, const fs::path& parent) { auto iChild = child.begin(); for (auto i = parent.begin(); i != parent.end(); ++i) @@ -2403,7 +2447,7 @@ static bool IsChildDirectory(const fs::path &child, const fs::path &parent) return true; } -FileRequestResult Storage::GetFileList2(const std::string &relativePath_, const UiFileProperty &fileProperty) +FileRequestResult Storage::GetFileList2(const std::string& relativePath_, const UiFileProperty& fileProperty) { std::string absolutePath = relativePath_; if (!ensureNoDotDot(absolutePath)) @@ -2446,8 +2490,8 @@ FileRequestResult Storage::GetFileList2(const std::string &relativePath_, const { // watch out for resource files!!! - result.breadcrumbs_.push_back({"", "Home"}); - fs::path fsAbsolutePath{absolutePath}; + result.breadcrumbs_.push_back({ "", "Home" }); + fs::path fsAbsolutePath{ absolutePath }; auto iAbsolutePath = fsAbsolutePath.begin(); for (auto i = pluginRootDirectory.begin(); i != pluginRootDirectory.end(); ++i) { @@ -2462,7 +2506,7 @@ FileRequestResult Storage::GetFileList2(const std::string &relativePath_, const while (iAbsolutePath != fsAbsolutePath.end()) { cumulativePath /= (*iAbsolutePath); - result.breadcrumbs_.push_back({cumulativePath.string(), SafeFilenameToString(iAbsolutePath->string())}); + result.breadcrumbs_.push_back({ cumulativePath.string(), SafeFilenameToString(iAbsolutePath->string()) }); ++iAbsolutePath; } } @@ -2471,7 +2515,7 @@ FileRequestResult Storage::GetFileList2(const std::string &relativePath_, const throw std::runtime_error(SS("Improper location. " << absolutePath)); } - const ModFileTypes::ModDirectory *pModDirectory = nullptr; + const ModFileTypes::ModDirectory* pModDirectory = nullptr; if (fileProperty.modDirectories().size() > 0) { pModDirectory = ModFileTypes::GetModDirectory(fileProperty.modDirectories()[0]); @@ -2488,7 +2532,7 @@ FileRequestResult Storage::GetFileList2(const std::string &relativePath_, const return result; } -bool Storage::IsValidSampleFileName(const std::filesystem::path &fileName) +bool Storage::IsValidSampleFileName(const std::filesystem::path& fileName) { if (!fileName.is_absolute()) { @@ -2523,7 +2567,7 @@ bool Storage::IsValidSampleFileName(const std::filesystem::path &fileName) } return true; } -void Storage::DeleteSampleFile(const std::filesystem::path &fileName) +void Storage::DeleteSampleFile(const std::filesystem::path& fileName) { if (!IsValidSampleFileName(fileName)) { @@ -2563,14 +2607,14 @@ void Storage::DeleteSampleFile(const std::filesystem::path &fileName) } } } - catch (const std::exception &) + catch (const std::exception&) { throw std::logic_error("Permission denied."); } } -std::filesystem::path Storage::MakeUserFilePath(const std::string &directory, const std::string &filename) +std::filesystem::path Storage::MakeUserFilePath(const std::string& directory, const std::string& filename) { - std::filesystem::path filePath{filename}; + std::filesystem::path filePath{ filename }; std::filesystem::path result = fs::path(directory) / filename; if (!result.is_absolute()) @@ -2584,12 +2628,12 @@ std::filesystem::path Storage::MakeUserFilePath(const std::string &directory, co return result; } -bool Storage::IsValidReadmeFile(const std::filesystem::path &fullPath) +bool Storage::IsValidReadmeFile(const std::filesystem::path& fullPath) { return isInfoFile(fullPath.filename().string()); } -bool Storage::IsValidArtworkFile(const std::filesystem::path &fullPath) +bool Storage::IsValidArtworkFile(const std::filesystem::path& fullPath) { if (IsInAudioTracksDirectory(fullPath) && isArtworkFileName(fullPath.filename().string())) { @@ -2598,10 +2642,10 @@ bool Storage::IsValidArtworkFile(const std::filesystem::path &fullPath) } return false; } -std::string Storage::UploadUserFile(const std::string &directory, - UiFileProperty::ptr uiFileProperty, - const std::string &filename, - std::istream &stream, size_t contentLength) +std::string Storage::UploadUserFile(const std::string& directory, + UiFileProperty::ptr uiFileProperty, + const std::string& filename, + std::istream& stream, size_t contentLength) { std::filesystem::path path; if (directory.length() != 0) @@ -2617,7 +2661,7 @@ std::string Storage::UploadUserFile(const std::string &directory, { relativePath = MakeRelativePath(path, this->GetPluginUploadDirectory()); } - catch (const std::exception &e) + catch (const std::exception& e) { throw std::logic_error("Permission denied. Path is outside the upload storage directory."); } @@ -2640,7 +2684,7 @@ std::string Storage::UploadUserFile(const std::string &directory, std::vector buffer; size_t BUFFER_SIZE = 64 * 1024; buffer.resize(BUFFER_SIZE); - char *pBuffer = (char *)&(buffer[0]); + char* pBuffer = (char*)&(buffer[0]); while (contentLength != 0) { size_t thisTime = std::min(BUFFER_SIZE, contentLength); @@ -2657,7 +2701,7 @@ std::string Storage::UploadUserFile(const std::string &directory, contentLength -= thisTime; } } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error(SS("Upload failed. " << e.what())); std::filesystem::remove(path); @@ -2667,7 +2711,7 @@ std::string Storage::UploadUserFile(const std::string &directory, return path.string(); } -std::string Storage::CreateNewSampleDirectory(const std::string &relativePath, const UiFileProperty &uiFileProperty) +std::string Storage::CreateNewSampleDirectory(const std::string& relativePath, const UiFileProperty& uiFileProperty) { if (uiFileProperty.directory().empty()) { @@ -2686,9 +2730,9 @@ std::string Storage::CreateNewSampleDirectory(const std::string &relativePath, c return path; } std::string Storage::RenameFilePropertyFile( - const std::string &oldRelativePath, - const std::string &newRelativePath, - const UiFileProperty &uiFileProperty) + const std::string& oldRelativePath, + const std::string& newRelativePath, + const UiFileProperty& uiFileProperty) { if (uiFileProperty.directory().empty()) { @@ -2730,7 +2774,7 @@ std::string Storage::RenameFilePropertyFile( return newPath; } -fs::path MakeVersionedPath(const fs::path &path) +fs::path MakeVersionedPath(const fs::path& path) { if (!fs::exists(path)) { @@ -2778,9 +2822,9 @@ fs::path MakeVersionedPath(const fs::path &path) } std::string Storage::CopyFilePropertyFile( - const std::string &oldRelativePath, - const std::string &newRelativePath, - const UiFileProperty &uiFileProperty, + const std::string& oldRelativePath, + const std::string& newRelativePath, + const UiFileProperty& uiFileProperty, bool overwrite) { if (uiFileProperty.directory().empty()) @@ -2832,7 +2876,7 @@ std::string Storage::CopyFilePropertyFile( return newPath; } -void Storage::FillSampleDirectoryTree(FilePropertyDirectoryTree *node, const std::filesystem::path &directory) const +void Storage::FillSampleDirectoryTree(FilePropertyDirectoryTree* node, const std::filesystem::path& directory) const { for (auto child : std::filesystem::directory_iterator(directory)) { @@ -2844,7 +2888,7 @@ void Storage::FillSampleDirectoryTree(FilePropertyDirectoryTree *node, const std } if (child.is_directory()) { - const auto &childPath = child.path(); + const auto& childPath = child.path(); FilePropertyDirectoryTree::ptr childTree = std::make_unique(childPath); FillSampleDirectoryTree(childTree.get(), childPath); node->children_.push_back(std::move(childTree)); @@ -2852,17 +2896,17 @@ void Storage::FillSampleDirectoryTree(FilePropertyDirectoryTree *node, const std } auto collator = Locale::GetInstance()->GetCollator(); std::sort(node->children_.begin(), node->children_.end(), - [&collator](const FilePropertyDirectoryTree::ptr &left, const FilePropertyDirectoryTree::ptr &right) - { - return collator->Compare(left->directoryName_, right->directoryName_) < 0; - }); + [&collator](const FilePropertyDirectoryTree::ptr& left, const FilePropertyDirectoryTree::ptr& right) + { + return collator->Compare(left->directoryName_, right->directoryName_) < 0; + }); } -static void GetAllExtensions(std::set &result, const std::filesystem::path &path) +static void GetAllExtensions(std::set& result, const std::filesystem::path& path) { assert(fs::is_directory(path)); - for (const auto &dirEnt : fs::directory_iterator(path)) + for (const auto& dirEnt : fs::directory_iterator(path)) { if (!IsValidUtf8(dirEnt.path().string())) { @@ -2886,7 +2930,7 @@ static void GetAllExtensions(std::set &result, const std::filesyste } } -static std::set GetAllExtensions(const std::filesystem::path &path) +static std::set GetAllExtensions(const std::filesystem::path& path) { std::set result; if (fs::is_regular_file(path)) @@ -2899,7 +2943,7 @@ static std::set GetAllExtensions(const std::filesystem::path &path) } return result; } -FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFileProperty &uiFileProperty, const std::filesystem::path &selectedPath) +FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFileProperty& uiFileProperty, const std::filesystem::path& selectedPath) { fs::path uploadDirectory = this->GetPluginUploadDirectory(); @@ -2908,7 +2952,7 @@ FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFil { relativePath = MakeRelativePath(selectedPath, uploadDirectory); } - catch (const std::exception &e) + catch (const std::exception& e) { // not an upload directory. throw std::runtime_error(SS("Permission denied: " << selectedPath)); @@ -2927,7 +2971,7 @@ FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFil result->isProtected_ = true; std::string parentModDirectory = uiFileProperty.getParentModDirectory(relativePath); - for (const auto &modDirectory : uiFileProperty.modDirectories()) + for (const auto& modDirectory : uiFileProperty.modDirectories()) { auto modDirectoryInfo = ModFileTypes::GetModDirectory(modDirectory); if (modDirectoryInfo) @@ -2935,7 +2979,7 @@ FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFil if (IsSubset(fileExtensions, modDirectoryInfo->fileExtensions) || modDirectoryInfo->fileExtensions.contains(".*") || modDirectoryInfo->fileExtensions.empty() // Private directory that accepts files of any type. - ) + ) { auto childPath = uploadDirectory / modDirectoryInfo->pipedalPath; FilePropertyDirectoryTree::ptr child = std::make_unique( @@ -2973,30 +3017,30 @@ FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFil } } -bool Storage::IsInAudioTracksDirectory(const std::filesystem::path &path) const +bool Storage::IsInAudioTracksDirectory(const std::filesystem::path& path) const { std::filesystem::path audioTracksDirectory = this->GetPluginUploadDirectory() / "shared/audio/Tracks"; return IsSubdirectory(path, audioTracksDirectory); } -bool Storage::IsInUploadsDirectory(const std::filesystem::path &path) const +bool Storage::IsInUploadsDirectory(const std::filesystem::path& path) const { return IsSubdirectory(path, this->GetPluginUploadDirectory()); } -const PluginPresetIndex &Storage::GetPluginPresetIndex() +const PluginPresetIndex& Storage::GetPluginPresetIndex() { return pluginPresetIndex; } -std::filesystem::path Storage::FromAbstractPathString(const std::string &stringPath) +std::filesystem::path Storage::FromAbstractPathString(const std::string& stringPath) { if (stringPath.empty()) { return ""; } - fs::path path{stringPath}; + fs::path path{ stringPath }; if (path.is_absolute()) { return path; @@ -3004,7 +3048,7 @@ std::filesystem::path Storage::FromAbstractPathString(const std::string &stringP return GetPluginUploadDirectory() / path; } -std::string Storage::ToAbstractPathFromJson(const std::string &pathJson) +std::string Storage::ToAbstractPathFromJson(const std::string& pathJson) { json_variant v = json_variant::parse(pathJson); @@ -3012,7 +3056,7 @@ std::string Storage::ToAbstractPathFromJson(const std::string &pathJson) return v.to_string(); } -std::string Storage::FromAbstractPathJson(const std::string &pathJson) +std::string Storage::FromAbstractPathJson(const std::string& pathJson) { json_variant v = json_variant::parse(pathJson); @@ -3061,14 +3105,14 @@ ChannelRouterSettings::ptr Storage::LoadChannelRouterSettings() this->channelSelection = ChannelSelection(*result); return result; } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("Failed to load Channel Router settings: %s", e.what()); return std::make_shared(); } } -static int64_t GetUpgradedPortIndex(const std::string &portName) +static int64_t GetUpgradedPortIndex(const std::string& portName) { auto nPos = portName.find_last_of('_'); if (nPos != std::string::npos) @@ -3079,7 +3123,7 @@ static int64_t GetUpgradedPortIndex(const std::string &portName) int64_t channelIndex = std::stoll(channelStr); return channelIndex; } - catch (const std::exception &) + catch (const std::exception&) { return -1; } @@ -3095,8 +3139,8 @@ void Storage::UpgradeChannelRouterSettings() { channelRouterSettings->configured(true); channelRouterSettings->mainInputChannels().resize(2); - const std::vector &oldInputs = jackChannelSelection.GetInputAudioPorts(); - std::vector &newInputs = channelRouterSettings->mainInputChannels(); + const std::vector& oldInputs = jackChannelSelection.GetInputAudioPorts(); + std::vector& newInputs = channelRouterSettings->mainInputChannels(); if (oldInputs.size() == 1) { @@ -3114,8 +3158,8 @@ void Storage::UpgradeChannelRouterSettings() newInputs[i] = portIndex; } } - const std::vector &oldOutputs = jackChannelSelection.GetOutputAudioPorts(); - auto &newMainOutputs = channelRouterSettings->mainOutputChannels(); + const std::vector& oldOutputs = jackChannelSelection.GetOutputAudioPorts(); + auto& newMainOutputs = channelRouterSettings->mainOutputChannels(); if (oldOutputs.size() == 1) { int64_t leftIndex = GetUpgradedPortIndex(oldOutputs[0]); @@ -3133,11 +3177,11 @@ void Storage::UpgradeChannelRouterSettings() } } - auto &newAuxInputs = channelRouterSettings->auxInputChannels(); + auto& newAuxInputs = channelRouterSettings->auxInputChannels(); newAuxInputs.resize(2); newAuxInputs[0] = -1; newAuxInputs[1] = -1; - auto &newAuxOutputs = channelRouterSettings->auxOutputChannels(); + auto& newAuxOutputs = channelRouterSettings->auxOutputChannels(); newAuxOutputs.resize(2); newAuxOutputs[0] = -1; newAuxOutputs[1] = -1; @@ -3147,7 +3191,7 @@ void Storage::UpgradeChannelRouterSettings() } } -const ChannelSelection &Storage::GetChannelSelection() const +const ChannelSelection& Storage::GetChannelSelection() const { return channelSelection; } diff --git a/src/Storage.hpp b/src/Storage.hpp index 4db1114..f8bb8d0 100644 --- a/src/Storage.hpp +++ b/src/Storage.hpp @@ -80,6 +80,8 @@ private: private: void FillSampleDirectoryTree(FilePropertyDirectoryTree*node, const std::filesystem::path&directory) const; + void UpgradeV1FactoryPresets(); + void UpgradeV2FactoryPresets(); void UpgradeFactoryPresets(); void MaybeCopyDefaultPresets(); static std::string SafeEncodeName(const std::string& name); diff --git a/src/Tone3000Downloader.hpp b/src/Tone3000Downloader.hpp index 8d05cb8..6b7c5e5 100644 --- a/src/Tone3000Downloader.hpp +++ b/src/Tone3000Downloader.hpp @@ -145,6 +145,7 @@ namespace pipedal const std::string &errorMessage) = 0; virtual std::string Tone3000ThumbnailDirectory() = 0; + virtual std::string OldTone3000ThumbnailDirectory() = 0; }; using self = Tone3000Downloader; diff --git a/src/WebServerConfig.cpp b/src/WebServerConfig.cpp index 6ba1b74..73ae2ad 100644 --- a/src/WebServerConfig.cpp +++ b/src/WebServerConfig.cpp @@ -48,7 +48,7 @@ #define BANK_EXTENSION ".piBank" #define PLUGIN_PRESETS_EXTENSION ".piPluginPresets" -static const std::filesystem::path WEB_TEMP_DIR{"/var/pipedal/web_temp"}; +static const std::filesystem::path WEB_TEMP_DIR{ "/var/pipedal/web_temp" }; static const std::string PLUGIN_PRESETS_MIME_TYPE = "application/vnd.pipedal.pluginPresets"; static const std::string PRESET_MIME_TYPE = "application/vnd.pipedal.preset"; @@ -73,10 +73,10 @@ JSON_MAP_REFERENCE(UserUploadResponse, errorMessage) JSON_MAP_REFERENCE(UserUploadResponse, path) JSON_MAP_END() -static std::string GetMimeType(const std::filesystem::path &path) +static std::string GetMimeType(const std::filesystem::path& path) { std::string extension = path.extension(); - const MimeTypes &mimeTypes = MimeTypes::instance(); + const MimeTypes& mimeTypes = MimeTypes::instance(); auto result = mimeTypes.MimeTypeFromExtension(extension); return result; } @@ -108,7 +108,7 @@ static bool IsSafeThumbnailPath(const fs::path path) } return true; } -int32_t ConvertThumbnailSize(const std::string ¶m) +int32_t ConvertThumbnailSize(const std::string& param) { if (param.empty()) { @@ -117,7 +117,7 @@ int32_t ConvertThumbnailSize(const std::string ¶m) return static_cast(std::stoi(param)); } -static bool IsZipFile(const std::filesystem::path &path) +static bool IsZipFile(const std::filesystem::path& path) { std::ifstream f(path); if (!f.is_open()) @@ -135,15 +135,15 @@ static bool IsZipFile(const std::filesystem::path &path) class ExtensionChecker { public: - ExtensionChecker(const std::string &extensionList) + ExtensionChecker(const std::string& extensionList) : extensions(split(extensionList, ',')) { } - bool IsValidExtension(const std::string &extension) + bool IsValidExtension(const std::string& extension) { if (extensions.size() == 0) return true; - for (const auto &ext : extensions) + for (const auto& ext : extensions) { if (ext == extension) return true; @@ -155,7 +155,7 @@ private: std::vector extensions; }; -static fs::path GetTone3000ThumbnailFile(const fs::path &thumbnailDirectory, const std::string &id) +static fs::path GetTone3000ThumbnailFile(const fs::path& thumbnailDirectory, const std::string& id) { std::string stem = id; // find a file in thumbnailDirectory which has a filename of {stem}.*. @@ -164,13 +164,13 @@ static fs::path GetTone3000ThumbnailFile(const fs::path &thumbnailDirectory, con return {}; } - for (const auto &entry : fs::directory_iterator(thumbnailDirectory)) + for (const auto& entry : fs::directory_iterator(thumbnailDirectory)) { if (!entry.is_regular_file()) { continue; } - const auto &path = entry.path(); + const auto& path = entry.path(); if (path.stem() == stem) { return path; @@ -179,18 +179,50 @@ static fs::path GetTone3000ThumbnailFile(const fs::path &thumbnailDirectory, con return {}; } +int64_t ImportBankFile(PiPedalModel &model, const std::filesystem::path& filePath,uint64_t uploadAfter = -1) +{ + BankFile bankFile; + + + if (filePath.empty()) + { + throw std::runtime_error("Unexpected."); + } + if (IsZipFile(filePath)) + { + auto presetReader = PresetBundleReader::LoadPresetsFile(model, filePath); + presetReader->ExtractMediaFiles(); + + std::stringstream ss(presetReader->GetPresetJson()); + json_reader reader(ss); + reader.read(&bankFile); + } + else + { + std::ifstream f {filePath}; + if (!f.is_open()) { + throw std::runtime_error(SS("Unable to open file " << filePath)); + } + // legacy json format, no zip, no media files. + json_reader reader(f); + reader.read(&bankFile); + } + uint64_t instanceId = model.UploadBank(bankFile, uploadAfter); + + return instanceId; +} class DownloadIntercept : public RequestHandler { - PiPedalModel *model; + PiPedalModel* model; public: - DownloadIntercept(PiPedalModel *model) + DownloadIntercept(PiPedalModel* model) : RequestHandler("/var"), - model(model) + model(model) { } - virtual bool wants(const std::string &method, const uri &request_uri) const + virtual bool wants(const std::string& method, const uri& request_uri) const { if (request_uri.segment_count() != 2 || request_uri.segment(0) != "var") { @@ -304,7 +336,7 @@ public: return false; } - static std::string GetContentDispositionHeader(const std::string &name, const std::string &extension) + static std::string GetContentDispositionHeader(const std::string& name, const std::string& extension) { std::string fileName = name.substr(0, 64) + extension; std::stringstream s; @@ -314,7 +346,7 @@ public: return result; } - void GetPluginPresets(const uri &request_uri, std::string *pName, std::string *pContent) + void GetPluginPresets(const uri& request_uri, std::string* pName, std::string* pContent) { std::string pluginUri = request_uri.query("id"); auto plugin = model->GetPluginHost().GetPluginInfo(pluginUri); @@ -327,7 +359,7 @@ public: writer.write(pluginPresets); *pContent = s.str(); } - void GetPreset(const uri &request_uri, std::string *pName, std::string *pContent) + void GetPreset(const uri& request_uri, std::string* pName, std::string* pContent) { std::string strInstanceId = request_uri.query("id"); int64_t instanceId = std::stol(strInstanceId); @@ -345,7 +377,7 @@ public: *pContent = s.str(); *pName = pedalboard.name(); } - void GetBank(const uri &request_uri, std::string *pName, std::string *pContent) + void GetBank(const uri& request_uri, std::string* pName, std::string* pContent) { std::string strInstanceId = request_uri.query("id"); int64_t instanceId = std::stol(strInstanceId); @@ -360,10 +392,10 @@ public: } virtual void head_response( - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { try { @@ -392,7 +424,11 @@ public: fs::path path = GetTone3000ThumbnailFile(this->model->Tone3000ThumbnailDirectory(), id); if (!fs::exists(path)) { - throw PiPedalException("File not found."); + path = GetTone3000ThumbnailFile(this->model->OldTone3000ThumbnailDirectory(), id); + if (!fs::exists(path)) + { + throw PiPedalException("File not found."); + } } auto mimeType = GetMimeType(path); if (mimeType.empty()) @@ -447,7 +483,7 @@ public: std::string content; GetPluginPresets(request_uri, &name, &content); - TemporaryFile tmpFile{WEB_TEMP_DIR}; + TemporaryFile tmpFile{ WEB_TEMP_DIR }; PresetBundleWriter::ptr presetbundleWriter = PresetBundleWriter::CreatePluginPresetsFile(*(this->model), content); presetbundleWriter->WriteToFile(tmpFile.Path()); size_t contentLength = std::filesystem::file_size(tmpFile.Path()); @@ -465,7 +501,7 @@ public: std::string content; GetPreset(request_uri, &name, &content); - TemporaryFile tmpFile{WEB_TEMP_DIR}; + TemporaryFile tmpFile{ WEB_TEMP_DIR }; PresetBundleWriter::ptr presetbundleWriter = PresetBundleWriter::CreatePresetsFile(*(this->model), content); presetbundleWriter->WriteToFile(tmpFile.Path()); size_t contentLength = std::filesystem::file_size(tmpFile.Path()); @@ -482,7 +518,7 @@ public: std::string content; GetBank(request_uri, &name, &content); - TemporaryFile tmpFile{WEB_TEMP_DIR}; + TemporaryFile tmpFile{ WEB_TEMP_DIR }; PresetBundleWriter::ptr presetbundleWriter = PresetBundleWriter::CreatePresetsFile(*(this->model), content); presetbundleWriter->WriteToFile(tmpFile.Path()); size_t contentLength = std::filesystem::file_size(tmpFile.Path()); @@ -495,7 +531,7 @@ public: } throw PiPedalException("Not found."); } - catch (const std::exception &e) + catch (const std::exception& e) { if (strcmp(e.what(), "Not found") == 0) { @@ -508,20 +544,20 @@ public: } } - static void setLastModifiedFromFile(HttpResponse &res, const std::filesystem::path &path) + static void setLastModifiedFromFile(HttpResponse& res, const std::filesystem::path& path) { auto lastModified = std::filesystem::last_write_time(path); res.set(HttpField::LastModified, HtmlHelper::timeToHttpDate(lastModified)); } - AudioDirectoryInfo::Ptr CreateDirectoryInfo(const fs::path &path) + AudioDirectoryInfo::Ptr CreateDirectoryInfo(const fs::path& path) { return AudioDirectoryInfo::Create(path, - GetShadowIndexDirectory( - this->model->GetPluginUploadDirectory(), - path)); + GetShadowIndexDirectory( + this->model->GetPluginUploadDirectory(), + path)); } - bool isInfoFile(const fs::path &path) + bool isInfoFile(const fs::path& path) { auto extension = path.extension(); if (extension == ".pdf") @@ -546,24 +582,24 @@ public: std::string T3kResponse() { return "\n" - "\n" - "\n" - "\n" - "\n" - "\n" - "\n"; + "\n" + "\n" + "\n" + "\n" + "\n" + "\n"; } - void DownloadTone3000Tone(const uri &requestUri) + void DownloadTone3000Tone(const uri& requestUri) { } virtual void get_response( - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { try { @@ -690,7 +726,7 @@ public: try { auto files = audioDirectory->GetFiles(); - for (const auto &file : files) + for (const auto& file : files) { std::string fileNameOnly = path.filename(); if (file.fileName() == fileNameOnly) @@ -703,7 +739,7 @@ public: } } } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("Error getting audio directory info: %s - (%s)", path.c_str(), e.what()); throw e; @@ -761,7 +797,7 @@ public: thumbnailTemporaryFile = audioDirectory->GetThumbnail(path.filename(), width, height); } - catch (const std::exception &e) + catch (const std::exception& e) { fs::path defaultThumbnail = model->GetWebRoot() / "img/missing_thumbnail.jpg"; thumbnailTemporaryFile.SetNonDeletedPath(defaultThumbnail, "image/jpeg"); @@ -776,7 +812,7 @@ public: res.setBodyFile(t, thumbnailTemporaryFile.DeleteFile()); thumbnailTemporaryFile.Detach(); } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error("Error getting thumbnail: %s - (%s)", request_uri.str().c_str(), e.what()); throw e; @@ -809,7 +845,7 @@ public: res.setBody(ss.str()); } - catch (const std::exception &e) + catch (const std::exception& e) { res.setBody("\"\""); } @@ -841,7 +877,7 @@ public: res.setBody(ss.str()); } - catch (const std::exception &e) + catch (const std::exception& e) { res.setBody("\"\""); } @@ -852,7 +888,7 @@ public: throw PiPedalException("Not found"); } } - catch (const std::exception &e) + catch (const std::exception& e) { if (strcmp(e.what(), "Not found") == 0) { @@ -864,9 +900,9 @@ public: } } } - static std::string GetFirstFolderOrFile(const std::vector &fileNames) + static std::string GetFirstFolderOrFile(const std::vector& fileNames) { - for (const auto &fileName : fileNames) + for (const auto& fileName : fileNames) { size_t nPos = fileName.find('/'); if (nPos != std::string::npos) @@ -883,11 +919,11 @@ public: return fileNames[0]; } } - static bool HasSingleRootDirectory(ZipFileReader &zipFile) + static bool HasSingleRootDirectory(ZipFileReader& zipFile) { bool hasDirectory = false; std::string previousDirectory; - for (auto &file : zipFile.GetFiles()) + for (auto& file : zipFile.GetFiles()) { auto pos = file.find('/'); if (pos == std::string::npos) @@ -916,15 +952,15 @@ public: } void UploadEmbeddedZipFile( - PiPedalModel *model, - pipedal::zip_file_input_stream &si, - const std::string &inputFileName, + PiPedalModel* model, + pipedal::zip_file_input_stream& si, + const std::string& inputFileName, fs::path directory, - ExtensionChecker &extensionChecker, + ExtensionChecker& extensionChecker, int64_t instanceId, - const std::string &patchProperty) + const std::string& patchProperty) { - TemporaryFile tempFile{WEB_TEMP_DIR}; + TemporaryFile tempFile{ WEB_TEMP_DIR }; // Extract the zip_file_input_stream to the temporary file. { std::ofstream out(tempFile.Path(), std::ios::binary); @@ -955,11 +991,11 @@ public: { directory = (fs::path(directory) / fs::path(inputFileName).filename().stem()).string(); } - for (const auto &inputFile : files) + for (const auto& inputFile : files) { if (!inputFile.ends_with("/")) // don't process directory entries. { - fs::path inputPath{inputFile}; + fs::path inputPath{ inputFile }; std::string extension = inputPath.extension(); if (extensionChecker.IsValidExtension(extension) || isInfoFile(inputFile)) { @@ -985,10 +1021,10 @@ public: } virtual void post_response( - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { try { @@ -1004,7 +1040,7 @@ public: { throw std::runtime_error("Invalid path"); } - if (!IsSafeMediaPath(targetPath) && !IsSafeThumbnailPath(targetPath)) + if (!IsSafeMediaPath(targetPath) && !IsSafeThumbnailPath(targetPath)) { throw std::runtime_error("Unsafe path."); } @@ -1024,24 +1060,26 @@ public: fs::rename(req.get_body_temporary_file(), targetPath); req.detach_body_temporary_file(); - } catch (const std::exception &e) { + } + catch (const std::exception& e) { // ok Copy into place instead. fs::copy(req.get_body_temporary_file(), targetPath); } // set target permissions to "pipedal_d:pipedald -rw-rw-r-- if we can. try { - fs::permissions(targetPath, fs::perms::owner_read | fs::perms::owner_write | - fs::perms::group_read | fs::perms::group_write | - fs::perms::others_read, - fs::perm_options::replace); - } catch (const std::exception&) + fs::permissions(targetPath, fs::perms::owner_read | fs::perms::owner_write | + fs::perms::group_read | fs::perms::group_write | + fs::perms::others_read, + fs::perm_options::replace); + } + catch (const std::exception&) { // ignore. } responseText = "{\"ok\": true}"; } - catch (const std::exception &e) + catch (const std::exception& e) { std::string jsonString = json_writer::encode_string(e.what()); std::ostringstream os; @@ -1131,28 +1169,7 @@ public: else if (segment == "uploadBank") { - BankFile bankFile; - fs::path filePath = req.get_body_temporary_file(); - if (filePath.empty()) - { - throw std::runtime_error("Unexpected."); - } - if (IsZipFile(filePath)) - { - auto presetReader = PresetBundleReader::LoadPresetsFile(*(this->model), filePath); - presetReader->ExtractMediaFiles(); - - std::stringstream ss(presetReader->GetPresetJson()); - json_reader reader(ss); - reader.read(&bankFile); - } - else - { - // legacy json format, no zip, no media files. - json_reader reader(req.get_body_input_stream()); - reader.read(&bankFile); - } uint64_t uploadAfter = -1; std::string strUploadAfter = request_uri.query("uploadAfter"); @@ -1161,10 +1178,13 @@ public: uploadAfter = std::stol(strUploadAfter); } - uint64_t instanceId = model->UploadBank(bankFile, uploadAfter); + auto instanceId = ImportBankFile(*(this->model), filePath, uploadAfter); + res.set(HttpField::content_type, "application/json"); res.set(HttpField::cache_control, "no-cache"); + + std::stringstream sResult; sResult << instanceId; std::string result = sResult.str(); @@ -1187,7 +1207,7 @@ public: int64_t instanceId; { - std::istringstream ss{instanceIdString}; + std::istringstream ss{ instanceIdString }; ss >> instanceId; if (!ss) { @@ -1207,7 +1227,7 @@ public: if (filename.ends_with(".zip")) { - ExtensionChecker extensionChecker{request_uri.query("ext")}; + ExtensionChecker extensionChecker{ request_uri.query("ext") }; namespace fs = std::filesystem; try @@ -1219,11 +1239,11 @@ public: { directory = (fs::path(directory) / fs::path(filename).filename().replace_extension("")).string(); } - for (const auto &inputFile : files) + for (const auto& inputFile : files) { if (!inputFile.ends_with("/")) // don't process directory entries. { - fs::path inputPath{inputFile}; + fs::path inputPath{ inputFile }; std::string extension = inputPath.extension(); if (extensionChecker.IsValidExtension(extension) || isInfoFile(inputFile)) { @@ -1251,7 +1271,7 @@ public: std::string returnPath = GetFirstFolderOrFile(files); outputFileName = fs::path(directory) / returnPath; } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error(SS("Unzip failed. " << e.what())); throw; @@ -1269,7 +1289,7 @@ public: } result.path_ = outputFileName.string(); } - catch (const std::exception &e) + catch (const std::exception& e) { result.errorMessage_ = e.what(); } @@ -1287,7 +1307,7 @@ public: throw PiPedalException("Not found"); } } - catch (const std::exception &e) + catch (const std::exception& e) { Lv2Log::error(SS("Error uploading file: " << e.what())); if (strcmp(e.what(), "Not found") == 0) @@ -1302,7 +1322,7 @@ public: } }; -static std::string StripPortNumber(const std::string &fromAddress) +static std::string StripPortNumber(const std::string& fromAddress) { std::string address = fromAddress; @@ -1335,19 +1355,19 @@ static std::string StripPortNumber(const std::string &fromAddress) class InterceptConfig : public RequestHandler { private: - PiPedalModel&model; + PiPedalModel& model; uint64_t maxUploadSize; int portNumber; public: - InterceptConfig(PiPedalModel&model,int portNumber, uint64_t maxUploadSize) + InterceptConfig(PiPedalModel& model, int portNumber, uint64_t maxUploadSize) : RequestHandler("/var/config.json"), - model(model), - maxUploadSize(maxUploadSize), - portNumber(portNumber) + model(model), + maxUploadSize(maxUploadSize), + portNumber(portNumber) { } - std::string GetConfig(const std::string &fromAddress) + std::string GetConfig(const std::string& fromAddress) { std::string webSocketAddress = GetNonLinkLocalAddress(StripPortNumber(fromAddress)); Lv2Log::info(SS("Web Socket Address: " << webSocketAddress << ":" << portNumber)); @@ -1355,32 +1375,32 @@ public: std::stringstream s; s << "{ \"socket_server_port\": " << portNumber - << ", \"socket_server_address\": \"" << webSocketAddress - << "\", \"ui_plugins\": [ ], \"max_upload_size\": " << maxUploadSize - << ", \"enable_auto_update\": " << (ENABLE_AUTO_UPDATE ? " true" : "false") - << ", \"has_wifi_device\": " << (HotspotManager::HasWifiDevice() ? " true" : "false") - << ", \"tone3000_A2_models\": " << (model.Configuration().GetTone3000A2Models() ? " true" : "false") - << " }"; + << ", \"socket_server_address\": \"" << webSocketAddress + << "\", \"ui_plugins\": [ ], \"max_upload_size\": " << maxUploadSize + << ", \"enable_auto_update\": " << (ENABLE_AUTO_UPDATE ? " true" : "false") + << ", \"has_wifi_device\": " << (HotspotManager::HasWifiDevice() ? " true" : "false") + << ", \"tone3000_A2_models\": " << (model.Configuration().GetTone3000A2Models() ? " true" : "false") + << " }"; return s.str(); } virtual ~InterceptConfig() {} virtual void head_response( - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { // intercepted. See the other overload. } virtual void head_response( - const std::string &fromAddress, - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const std::string& fromAddress, + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { std::string response = GetConfig(fromAddress); res.set(HttpField::content_type, "application/json"); @@ -1390,20 +1410,20 @@ public: } virtual void get_response( - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { // intercepted. see the other overload. } virtual void get_response( - const std::string &fromAddress, - const uri &request_uri, - HttpRequest &req, - HttpResponse &res, - std::error_code &ec) override + const std::string& fromAddress, + const uri& request_uri, + HttpRequest& req, + HttpResponse& res, + std::error_code& ec) override { std::string response = GetConfig(fromAddress); res.set(HttpField::content_type, "application/json"); @@ -1414,12 +1434,12 @@ public: }; void pipedal::ConfigureWebServer( - WebServer &server, - PiPedalModel &model, + WebServer& server, + PiPedalModel& model, int port, size_t maxUploadSize) { - std::shared_ptr interceptConfig{new InterceptConfig(model,port, maxUploadSize)}; + std::shared_ptr interceptConfig{ new InterceptConfig(model,port, maxUploadSize) }; server.AddRequestHandler(interceptConfig); std::shared_ptr downloadIntercept = std::make_shared(&model); diff --git a/todo.txt b/todo.txt index bee76a9..1ba6d0a 100644 --- a/todo.txt +++ b/todo.txt @@ -2,97 +2,33 @@ Create Factory Model.piBank. Install procedure for upgrading of Factory Preset. +Relocate image files. + +Prep readme files in Factory Presets. + + +A final solution for rate-limiting on Tone3000. + + T3k links in the readme files. Can we start a Popup Flow from the given links? -Implement NAM Model Weight selection UI - -NAM INput VU is f*ed up. - File Player Underrun is NOT CPU use related. There's an underrun somewhere. -Update Pi 4 Benchmark Results: - -The benchmark is to run TooB Neural Amp Modeler with an A1 model to generate 100s of audio. Lower times are better. - -TooB NAM has a compile-time switch that uses either the NeuralAudio NAM implementation or -the Neural Modeler Core NAM implementation. - -Results - - -aarch64 (Raspberry PI 4, ARM Cortex A72, Raspberry PI OS Bookworm) - - Neural Amp Modeler Core: 94.296s - NeuralAudio: 31.589s - - Compiler options: "-Ofast" "-mcpu=cortex-a72" "-march=armv8-a" "-mtune=cortex-a72" "-DEIGEN_DEFAULT_L1_CACHE_SIZE=32768" - -aarch64 (Raspberry PI 5, ARM Cortex A76, Rasperry PI OS Trixie) - - Neural Amp Modeler Core: 16.084s - NeuralAudio: 10.766s - - Compiler options: "-Ofast" "-mcpu=cortex-a76" "-march=armv8.2-a" "-mtune=cortex-a76" "-DEIGEN_DEFAULT_L1_CACHE_SIZE=65536"apt - - - -amd64 Native (AMD Ryzen 7 7735HS, Ubuntu 24.04 amd64) - - Neural Amp Modeler Core: 4.716s - NeuralAudio x64: 3.952s - - Compiler options /Ofast, MMX, SSE, SSE2, no AVX. - -amd64 AVX+ (AMD Ryzen 7 7735HS, Ubuntu 24.04 amd64) - - Neural Amp Modeler Core: 4.97s - NeuralAudio x64: 4.032s - - Compiler options /Ofast, "-march=sandybridge" "-mtune=sandybridge" - -amd64 SSE2 (AMD Ryzen 7 7735HS, Ubuntu 24.04 amd64) - - Neural Amp Modeler Core: 7.748s - NeuralAudio x64: 5.983s - - Compiler options /Ofast (defaults to SSE2, no AVX) - -The Model: - -Package: Fender Deluxe Reverb %2765 Reissue %7c Clean %7c SM57 %2b Royer R-121 %2b Room -Model: Fender DRRI %7c Clean %7c Room Only %7c Full Rig -Downloaded from Tone3000. - -The model file is attached. - - - - - summaries for Mono audio adapaters. Check PWA on windows, edge and chrome. Make sure Pi 4 default audio device is still hidden when selecting devices! -A final solution for rate-limiting on Tone3000. - -A way to force input to mono? - - -Tooltip on File Property Select: add to release notes. sAFEfILEnAMES: RENAME, &C. Safe bank names? NEW BANK WINDOW SIZE CALCUALTIONS ARE WRONG ON LINUX HIDEF DISPLAYS. -Carla Project icons. check reload after change of LV2 plugins. -Exactly one underrun per seek in Toob Player -json nan/inf is fatal. - pipewire aux in?