V3 FactoryPresets

This commit is contained in:
Robin E.R. Davies
2026-05-30 22:38:59 -04:00
parent 9bc348bc9e
commit c7f003ec92
17 changed files with 674 additions and 527 deletions
+18
View File
@@ -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 ..
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,29 @@
<div id='tone3000_float' >
<img id='tone3000_thumbnail' src='img/PiPedal20Thumb.jpg' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>PiPedal Factory-Provided IRs</h3>
<div>
<p id='tone3000_subtitle'>
All Impulse Response Files in this folder are provided under a <a href='licenses/t3k_license.html' target='_blank' rel='noopener noreferrer' >T3K License</a>. 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.
</p>
</div>
</div>
</div>
---
<div id='tone3000_float_right'>
<img id='tone3000_small_thumbnail' src='/var/tone3000_thumbnail?id=67526' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>Marshall JCM800 Lead 1960 A (4- SM57, eoc)</h3>
<div id='tone3000_subtitle'>
<p>IR Created by <a target='_blank' href="tonelink?user=kenazmusic">kenazmusic</a><br/>
From the <a target="_blank" href="https://www.tone3000.com/tones/marshall-jcm800-lead-1960-a-celestion-t75-multi-mics-67526">Marshall JCM800 Lead 1960 A (Celestion T75, multi mics)</a> IR pack.<a></p>
<p>Marshall JCM800 Lead 1960 A, Celestion G12T-75 (16 Ohm) Speakers from 1987. Mics: Shure SM57. Mic position: top right (slanted), eoc.
</p>
</div>
</div>
</div>
@@ -0,0 +1,98 @@
<div id='tone3000_float' >
<img id='tone3000_thumbnail' src='img/PiPedal20Thumb.jpg' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>PiPedal Factory-Provided Models </h3>
<div>
<p id='tone3000_subtitle'>
All models in this folder are provided under a <a href='licenses/t3k_license.html' target='_blank' rel='noopener noreferrer' >T3K License</a>. 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.
</p>
</div>
</div>
</div>
---
<div id='tone3000_float_right'>
<img id='tone3000_small_thumbnail' src='/var/tone3000_thumbnail?id=54580' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>1960 Fender Tweed Deluxe 5E3 - Clean</h3>
<div id='tone3000_subtitle'>
<p>Full rig, NAM A2. Created by <a target='_blank' href="https://tone3000.com/tone3000">tone3000</a><br/>
From the <a target="_blank" href="https://tone3000.com/tones/1960-fender-tweed-deluxe-5e3-54580">1960 Fender Tweed Deluxe 5E3</a> model pack.<a></p>
<p>A model of a 1960 Fender Tweed Deluxe 5E3, with clean settings (T 5, I 3, M 9). SM57, cap edge.
</p>
</div>
</div>
</div>
---
<div id='tone3000_float_right'>
<img id='tone3000_small_thumbnail' src='/var/tone3000_thumbnail?id=54580' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>1960 Fender Tweed Deluxe 5E3 - Crunch</h3>
<div id='tone3000_subtitle'>
<p>Full rig, NAM A2. Created by <a target='_blank' href="https://tone3000.com/tone3000">tone3000</a><br/>
From the <a target="_blank" href="https://tone3000.com/tones/1960-fender-tweed-deluxe-5e3-54580">1960 Fender Tweed Deluxe 5E3</a> model pack.<a></p>
<p>A model of a 1960 Fender Tweed Deluxe 5E3, with crunch settings (T 5, I 11, M 12). SM57, cap edge.
</p>
</div>
</div>
</div>
---
<div id='tone3000_float_right'>
<img id='tone3000_small_thumbnail' src='/var/tone3000_thumbnail?id=60033' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>1960 Gibson Rhythm King - Edge of Breakup</h3>
<div id='tone3000_subtitle'>
<p>Full rig, NAM A2. Created by <a target='_blank' href="https://tone3000.com/amalgamaudio">amalgamaudio</a><br/>
From the <a target='_blank' href="https://www.tone3000.com/tones/gibson-ga-200-rhythm-king-1960-60033">Gibson GA-200 Rhythm King 1960</a> model pack.<a></p>
<p>One of the larger amps Gibson built in the Tweed era. The rival to the Tweed Bassman and Tweed Twin - wonderful big, bold cleans and edge of breakup, worthy of the title "King".
</p>
<p>Get the full <a target='_blank' href="https://www.amalgamcaptures.com/product-page/gbsn-g200-namdi">capture pack for this amp here</a>.
</p>
<p><a target='_blank' href="https://www.amalgamcaptures.com/nam">https://www.amalgamcaptures.com/nam</a></p>
</div>
</div>
</div>
---
<div id='tone3000_float_right'>
<img id='tone3000_small_thumbnail' src='/var/tone3000_thumbnail?id=59301' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>Marshall - JCM800 KKS (TS9) [18dBu] - Hi Gain</h3>
<div id='tone3000_subtitle'>
<p>Amp head only, NAM A2. Created by <a target='_blank' href="https://tone3000.com/kenazmusic&architecture=2">kenazmusic</a><br/>
From the <a target='_blank' href="https://www.tone3000.com/tones/marshall-jcm800-kerry-king-signature-18dbu-59301">Marshall - JCM800 (Kerry King Signature) [18dBu]</a> model pack.<a></p>
<p>A model of a high-gain Marshall JCM800 Kerry King Signature Amp, with an Ibanez TS9. The model is not calibrated, but expects the input signal to be gain-staged to -18dBU.
</p>
<p>This is a model of an amp head only. You must add a Cabinet IR after this model in order to get a good sound.
</div>
</div>
</div>
---
<div id='tone3000_float_right'>
<img id='tone3000_small_thumbnail' src='/var/tone3000_thumbnail?id=40737' alt='' />
<div id='tone3000_float_content' >
<h3 id='tone3000_title'>Peavey 6505 1992 Lead - Chug</h3>
<div id='tone3000_subtitle'>
<p>Full rig, NAM A2. Created by <a href="https://tone3000.com/outmodedelectronics" target='_blank' >outmodedelectronics</a><br/>
From the <a target="_blank" href="https://www.tone3000.com/tones/peavey-6505-1992-original-lead-evh-5150iii-4x12-full-rig-40737">Peavey 6505 1992 Original Lead - EVH 5150III 4x12 - Full Rig</a> model pack.</p>
<p>A Peavey 6505 1992 Original heads Lead Channel through an EVH 5150III 4x12 cabinet. Pr-4 B-6 M-4 T-7 Pro-1 R-7 P-8, SM57c.
</p>
</div>
</div>
</div>
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
2 3
+49 -5
View File
@@ -251,6 +251,13 @@ static void removeFileNoThrow(const std::filesystem::path &path)
} }
void Storage::UpgradeFactoryPresets() void Storage::UpgradeFactoryPresets()
{
UpgradeV1FactoryPresets();
UpgradeV2FactoryPresets();
}
void Storage::UpgradeV2FactoryPresets()
{ {
auto presetsDirectory = this->GetPresetsDirectory(); auto presetsDirectory = this->GetPresetsDirectory();
auto presetsConfigDirectory = this->configRoot / "default_presets" / "presets"; auto presetsConfigDirectory = this->configRoot / "default_presets" / "presets";
@@ -265,8 +272,41 @@ void Storage::UpgradeFactoryPresets()
fs::path defaultPresetsVersionFile = presetsDirectory / "banks.versionInfo"; fs::path defaultPresetsVersionFile = presetsDirectory / "banks.versionInfo";
presetsVersion.Load(defaultPresetsVersionFile); presetsVersion.Load(defaultPresetsVersionFile);
// Maybe install or upgrade factory presets. constexpr uint32_t V2_VERSION_NUMBER = 2;
if (defaultConfigPresetsVersion.Version() > presetsVersion.Version() || defaultConfigPresetsVersion.Version() == 0)
// 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 // remove TooB ML README.md
removeFileNoThrow("/usr/lib/lv2/ToobAmp.lv2/models/tones/README.md"); removeFileNoThrow("/usr/lib/lv2/ToobAmp.lv2/models/tones/README.md");
@@ -275,6 +315,9 @@ void Storage::UpgradeFactoryPresets()
removeFileNoThrow("/var/pipedal/audio_uploads/ToobMlModels/README.md"); removeFileNoThrow("/var/pipedal/audio_uploads/ToobMlModels/README.md");
removeFileNoThrow("/var/pipedal/audio_uploads/ToobMlModels/model.index"); removeFileNoThrow("/var/pipedal/audio_uploads/ToobMlModels/model.index");
// Do NOT upgrade to v1 Factory Presets.
#if 0
{
std::string name = "Factory Presets"; std::string name = "Factory Presets";
BankFile newFactoryPresets; BankFile newFactoryPresets;
{ {
@@ -353,11 +396,12 @@ void Storage::UpgradeFactoryPresets()
} }
} }
SaveBankFile(name, *pFactoryPresetsBank); SaveBankFile(name, *pFactoryPresetsBank);
presetsVersion.Version(defaultConfigPresetsVersion.Version());
presetsVersion.Save(defaultPresetsVersionFile);
} }
} }
#endif
presetsVersion.Version(2);
presetsVersion.Save(defaultPresetsVersionFile);
}
} }
void Storage::Initialize() void Storage::Initialize()
{ {
+2
View File
@@ -80,6 +80,8 @@ private:
private: private:
void FillSampleDirectoryTree(FilePropertyDirectoryTree*node, const std::filesystem::path&directory) const; void FillSampleDirectoryTree(FilePropertyDirectoryTree*node, const std::filesystem::path&directory) const;
void UpgradeV1FactoryPresets();
void UpgradeV2FactoryPresets();
void UpgradeFactoryPresets(); void UpgradeFactoryPresets();
void MaybeCopyDefaultPresets(); void MaybeCopyDefaultPresets();
static std::string SafeEncodeName(const std::string& name); static std::string SafeEncodeName(const std::string& name);
+1
View File
@@ -145,6 +145,7 @@ namespace pipedal
const std::string &errorMessage) = 0; const std::string &errorMessage) = 0;
virtual std::string Tone3000ThumbnailDirectory() = 0; virtual std::string Tone3000ThumbnailDirectory() = 0;
virtual std::string OldTone3000ThumbnailDirectory() = 0;
}; };
using self = Tone3000Downloader; using self = Tone3000Downloader;
+44 -24
View File
@@ -179,6 +179,38 @@ static fs::path GetTone3000ThumbnailFile(const fs::path &thumbnailDirectory, con
return {}; 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 class DownloadIntercept : public RequestHandler
{ {
PiPedalModel* model; PiPedalModel* model;
@@ -391,9 +423,13 @@ public:
} }
fs::path path = GetTone3000ThumbnailFile(this->model->Tone3000ThumbnailDirectory(), id); fs::path path = GetTone3000ThumbnailFile(this->model->Tone3000ThumbnailDirectory(), id);
if (!fs::exists(path)) if (!fs::exists(path))
{
path = GetTone3000ThumbnailFile(this->model->OldTone3000ThumbnailDirectory(), id);
if (!fs::exists(path))
{ {
throw PiPedalException("File not found."); throw PiPedalException("File not found.");
} }
}
auto mimeType = GetMimeType(path); auto mimeType = GetMimeType(path);
if (mimeType.empty()) if (mimeType.empty())
{ {
@@ -1024,7 +1060,8 @@ public:
fs::rename(req.get_body_temporary_file(), targetPath); fs::rename(req.get_body_temporary_file(), targetPath);
req.detach_body_temporary_file(); req.detach_body_temporary_file();
} catch (const std::exception &e) { }
catch (const std::exception& e) {
// ok Copy into place instead. // ok Copy into place instead.
fs::copy(req.get_body_temporary_file(), targetPath); fs::copy(req.get_body_temporary_file(), targetPath);
} }
@@ -1034,7 +1071,8 @@ public:
fs::perms::group_read | fs::perms::group_write | fs::perms::group_read | fs::perms::group_write |
fs::perms::others_read, fs::perms::others_read,
fs::perm_options::replace); fs::perm_options::replace);
} catch (const std::exception&) }
catch (const std::exception&)
{ {
// ignore. // ignore.
} }
@@ -1131,28 +1169,7 @@ public:
else if (segment == "uploadBank") else if (segment == "uploadBank")
{ {
BankFile bankFile;
fs::path filePath = req.get_body_temporary_file(); 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; uint64_t uploadAfter = -1;
std::string strUploadAfter = request_uri.query("uploadAfter"); std::string strUploadAfter = request_uri.query("uploadAfter");
@@ -1161,10 +1178,13 @@ public:
uploadAfter = std::stol(strUploadAfter); 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::content_type, "application/json");
res.set(HttpField::cache_control, "no-cache"); res.set(HttpField::cache_control, "no-cache");
std::stringstream sResult; std::stringstream sResult;
sResult << instanceId; sResult << instanceId;
std::string result = sResult.str(); std::string result = sResult.str();
+8 -72
View File
@@ -2,97 +2,33 @@ Create Factory Model.piBank.
Install procedure for upgrading of Factory Preset. 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? 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. 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. summaries for Mono audio adapaters.
Check PWA on windows, edge and chrome. Check PWA on windows, edge and chrome.
Make sure Pi 4 default audio device is still hidden when selecting devices! 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? sAFEfILEnAMES: RENAME, &C. Safe bank names?
NEW BANK NEW BANK
WINDOW SIZE CALCUALTIONS ARE WRONG ON LINUX HIDEF DISPLAYS. WINDOW SIZE CALCUALTIONS ARE WRONG ON LINUX HIDEF DISPLAYS.
Carla Project icons.
check reload after change of LV2 plugins. check reload after change of LV2 plugins.
Exactly one underrun per seek in Toob Player
json nan/inf is fatal.
- pipewire aux in? - pipewire aux in?