8000 Add new factory patches by danngreen · Pull Request #505 · 4ms/metamodule · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add new factory patches #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firmware/metamodule-plugin-sdk
7 changes: 5 additions & 2 deletions firmware/src/core_intercom/intercore_message.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ struct IntercoreStorageMessage {
WriteFileFail,
WriteFileOK,

RequestFactoryResetPatches,
FactoryResetPatchesDone,
RequestFactoryReset,
FactoryResetDone,

RequestReloadDefaultPatches,
ReloadDefaultPatchesDone,

RequestPluginFileList,
PluginFileListOK,
Expand Down
6 changes: 3 additions & 3 deletions firmware/src/gui/pages/plugin_tab.hh
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private:
pr_info("Pre-load Disabled: %s\n", plugin_name.data());
page->settings.slug.erase(autoload_slot);
} else {
pr_err("Error: can't disable autoload for %s: not found in settings autoload list\n",
pr_err("Error: can't disable pre-load for %s: not found in settings pre-load list\n",
plugin_name.data());
}
}
Expand Down Expand Up @@ -457,7 +457,7 @@ private:
page->gui_state.do_write_settings = true;
}
},
"Are you sure you want to autoload no plugins?",
"Are you sure you want to disable pre-loading plugins?",
"OK");
}

Expand All @@ -479,7 +479,7 @@ private:
page->gui_state.do_write_settings = true;
}
},
"This will autoload the current set of loaded plugins the next time you power on",
"This will pre-load the current set of loaded plugins the next time you power on",
"OK");
}

Expand Down
2 changes: 1 addition & 1 deletion firmware/src/gui/pages/system_tab.hh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private:
page->storage.request_reset_factory_patches();
while (true) {
auto msg = page->storage.get_message();
if (msg.message_type == FileStorageProxy::FactoryResetPatchesDone)
if (msg.message_type == FileStorageProxy::FactoryResetDone)
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/patch_file/file_storage_proxy.hh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public:
}

bool request_reset_factory_patches() {
IntercoreStorageMessage message{.message_type = RequestFactoryResetPatches};
IntercoreStorageMessage message{.message_type = RequestFactoryReset};
return comm_.send_message(message);
}

Expand Down
15 changes: 13 additions & 2 deletions firmware/src/patch_file/patch_storage.hh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public:
}

void reload_default_patches() {
PatchFileIO::create_default_patches(norflash_);
}

void reformat_norflash() {
norflash_.reformat();
PatchFileIO::create_default_patches(norflash_);
}
Expand Down Expand Up @@ -179,8 +183,15 @@ public:
return result;
}

if (message.message_type == RequestFactoryResetPatches) {
IntercoreStorageMessage result{.message_type = FactoryResetPatchesDone};
if (message.message_type == RequestFactoryReset) {
IntercoreStorageMessage result{.message_type = FactoryResetDone};
reformat_norflash();

return result;
}

if (message.message_type == RequestReloadDefaultPatches) {
IntercoreStorageMessage result{.message_type = ReloadDefaultPatchesDone};
reload_default_patches();

return result;
Expand Down
83 changes: 55 additions & 28 deletions firmware/src/patch_file/patches_default.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,79 @@

///

#include "../patches/default/Ensemble Wash.hh"
#include "../patches/default/Karpeggiator.hh"
#include "../patches/default/MorphingDrone.hh"
#include "../patches/default/Oscillator Wash.hh"
#include "../patches/default/Thunderbanshee.hh"
#include "../patches/default/West Coast FM Madness.hh"
#include "../patches/default/Wonky Bass.hh"
#include "../patches/default/Wooden Groove.hh"

#include "../patches/default/Djembe4verb.hh"
#include "../patches/default/DualEnvEnosc.hh"
#include "../patches/default/EnOscPoly4.hh"
#include "../patches/default/EnOsc_step_seq.hh"
#include "../patches/default/KarplusStereo.hh"
#include "../patches/default/MIDI_Poly4.hh"
#include "../patches/default/Orcas_Heart_Octo_Djembe.hh"
#include "../patches/default/PlaygroundBefaco.hh"
#include "../patches/default/QuadDrum.hh"
// #include "../patches/default/PlaygroundBefaco.hh"
// #include "../patches/default/QuadDrum.hh"
#include "../patches/default/SlothDrone.hh"
#include "../patches/default/SpringsintoCaves.hh"
#include "../patches/default/UntwistedBraid.hh"
// #include "../patches/default/SpringsintoCaves.hh"
// #include "../patches/default/UntwistedBraid.hh"
#include "../patches/default/WanderVoices.hh"

struct DefaultPatches {

static inline std::array patch_raw_data = std::to_array<std::span<const char>>({
Sloth_Drone_patch, //
WanderVoices_patch, //
DualEnvEnOsc_patch, //
SpringsIntoCaves_patch, //
Orcas_Heart_Octo_Djembe_patch,
EnOscPoly4_patch, //
QuadDrum_patch, //
PlaygroundBefaco_patch,
Djembe4verb_patch, //
KarplusStereo_patch, //
patch_Ensemble_Wash,
patch_Karpeggiator,
patch_MorphingDrone,
patch_Oscillator_Wash,
patch_Thunderbanshee,
patch_West_Coast_FM_Madness,
patch_Wonky_Bass,
patch_Wooden_Groove,

Djembe4verb_patch, //
DualEnvEnOsc_patch,
EnOscPoly4_patch,
EnOscStepSeq_patch,
UntwistedBraid_patch,
MIDI_Poly4_patch, //
KarplusStereo_patch,
MIDI_Poly4_patch,
Orcas_Heart_Octo_Djembe_patch,
// PlaygroundBefaco_patch,
// QuadDrum_patch,
Sloth_Drone_patch,
// SpringsIntoCaves_patch,
// UntwistedBraid_patch,
WanderVoices_patch,
});

static inline std::array patch_filenames = std::to_array<StaticString<63>>({
"SlothDrone.yml", //
"WanderVoices.yml", //
"DualEnvEnOsc.yml", //
"SpringsintoCaves.yml", //
"Orcas_Heart_Octo_Djembe.yml",
"EnOscPoly4.yml", //
"QuadDrum.yml", //
"PlaygroundBefaco.yml",
"Djembe4verb.yml", //
"KarplusStereo.yml", //
"Ensemble_Wash.yml",
"Karpeggiator.yml",
"MorphingDrone.yml",
"Oscillator_Wash.yml",
"Thunderbanshee.yml",
"West_Coast_FM_Madness.yml",
"Wonky_Bass.yml",
"Wooden_Groove.yml",

"Djembe4verb.yml", //
"DualEnvEnOsc.yml", //
"EnOscPoly4.yml", //
"EnOscStepSeq.yml",
"UntwistedBraid_patch.yml",
"MIDI_Poly4.yml", //
"KarplusStereo.yml", //
"MIDI_Poly4.yml", //
"Orcas_Heart_Octo_Djembe.yml",
// "PlaygroundBefaco.yml",
// "QuadDrum.yml", //
"SlothDrone.yml", //
// "SpringsintoCaves.yml", //
// "UntwistedBraid_patch.yml",
"WanderVoices.yml", //
});

static constexpr uint32_t num_patches() {
Expand Down
8 changes: 4 additions & 4 deletions firmware/system/linker/memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ _TTB = 0xC0100000;
_TTB_SZ = 1M;
_TTB_END = 0xC0200000;

_A7_SYMS = 0xC1F80000;
_A7_SYMS = 0xC1F70000;
_A7_SYMS_SZ = 256K; /*0x0004'0000*/
_A7_SYMS_END = 0xC1FC0000;
_A7_SYMS_END = 0xC1FB0000;

_M4_RODATA = 0xC1FC0000;
_M4_RODATA_SZ = 256K; /*0x0004'0000*/
_M4_RODATA = 0xC1FB0000;
_M4_RODATA_SZ = 320K; /*0x0005'0000*/
_M4_RODATA_END = 0xC2000000;

_A7_CODE = 0xC2000040;
Expand Down
Binary file modified patches/default/Djembe4verb.vcv
Binary file not shown.
Loading
0