Factory Prest Assets
@@ -67,8 +67,8 @@ install (
|
||||
)
|
||||
|
||||
install (
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/default_presets
|
||||
DESTINATION /etc/pipedal/config
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/default_presets/presets
|
||||
DESTINATION /etc/pipedal/config/default_presets/presets
|
||||
)
|
||||
|
||||
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
|
Before Width: | Height: | Size: 385 KiB After Width: | Height: | Size: 385 KiB |
|
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 234 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
@@ -2,17 +2,13 @@
|
||||
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
|
||||
cd temp_folder
|
||||
cp -r ../Factory_Presets_Extra/* ./
|
||||
echo Repacking "../$DST_ZIP"
|
||||
zip -r9 "../$DST_ZIP" .
|
||||
echo Repacking "../presets/$DST_ZIP"
|
||||
zip -r9 "../presets/$DST_ZIP" .
|
||||
cd ..
|
||||
rm -rf temp_folder
|
||||
|
||||
cd ..
|
||||
@@ -1 +0,0 @@
|
||||
{"selectedBank": 1,"nextInstanceId": 1,"entries": [{"instanceId": 1,"name": "Default Bank"}]}
|
||||
@@ -317,6 +317,12 @@ namespace pipedal
|
||||
bank.name(name);
|
||||
bank.instanceId(++nextInstanceId_);
|
||||
|
||||
if (afterId == -2)
|
||||
{
|
||||
entries_.insert(entries_.begin(), bank);
|
||||
return bank.instanceId();
|
||||
|
||||
}
|
||||
for (size_t i = 0; i < this->entries_.size(); ++i)
|
||||
{
|
||||
if (entries_[i].instanceId() == afterId)
|
||||
|
||||
@@ -179,38 +179,44 @@ 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;
|
||||
namespace pipedal::implementation {
|
||||
|
||||
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));
|
||||
if (filePath.empty())
|
||||
{
|
||||
throw std::runtime_error("Unexpected.");
|
||||
}
|
||||
// legacy json format, no zip, no media files.
|
||||
json_reader reader(f);
|
||||
reader.read(&bankFile);
|
||||
}
|
||||
uint64_t instanceId = model.UploadBank(bankFile, uploadAfter);
|
||||
if (IsZipFile(filePath))
|
||||
{
|
||||
auto presetReader = PresetBundleReader::LoadPresetsFile(model, filePath);
|
||||
presetReader->ExtractMediaFiles();
|
||||
|
||||
return instanceId;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
using namespace pipedal::implementation;
|
||||
|
||||
class DownloadIntercept : public RequestHandler
|
||||
{
|
||||
PiPedalModel* model;
|
||||
|
||||
@@ -161,8 +161,11 @@ const pedalboardStyles = (theme: Theme) => createStyles({
|
||||
marginBottom: (CELL_HEIGHT - FRAME_SIZE) / 2,
|
||||
width: FRAME_SIZE,
|
||||
height: FRAME_SIZE,
|
||||
border: isDarkMode() ? "1pt #555 solid" : "1pt #666 solid",
|
||||
borderRadius: 6
|
||||
borderColor: "#777",
|
||||
borderWidth: 2,
|
||||
borderStyle: "solid",
|
||||
padding: 1,
|
||||
borderRadius: 8
|
||||
}),
|
||||
selectedIconFrame: css({
|
||||
|
||||
@@ -178,8 +181,12 @@ const pedalboardStyles = (theme: Theme) => createStyles({
|
||||
marginBottom: (CELL_HEIGHT - FRAME_SIZE) / 2,
|
||||
width: FRAME_SIZE,
|
||||
height: FRAME_SIZE,
|
||||
border: isDarkMode() ? "1pt #FFF solid" : "1pt #333 solid",
|
||||
borderRadius: 6
|
||||
borderColor: theme.palette.primary.main,
|
||||
borderWidth: "2.0px",
|
||||
borderStyle: "solid",
|
||||
overflow: "hidden",
|
||||
borderRadius: 8,
|
||||
boxShadow: "0 0 6px 0px " + theme.palette.primary.main + "C0"
|
||||
}),
|
||||
borderlessIconFrame: css({
|
||||
|
||||
@@ -194,8 +201,9 @@ const pedalboardStyles = (theme: Theme) => createStyles({
|
||||
marginBottom: (CELL_HEIGHT - FRAME_SIZE) / 2,
|
||||
width: FRAME_SIZE,
|
||||
height: FRAME_SIZE,
|
||||
border: "0pt #666 solid",
|
||||
borderRadius: 6
|
||||
border: "0px #666 solid",
|
||||
borderRadius: 8,
|
||||
overflow: "hidden",
|
||||
}),
|
||||
|
||||
pedalIcon: css({
|
||||
@@ -1042,7 +1050,7 @@ const PedalboardView =
|
||||
onDoubleClick={(e: SyntheticEvent) => { this.onItemDoubleClick(e, instanceId); }}
|
||||
onContextMenu={(e: SyntheticEvent) => { this.onItemLongClick(e, instanceId); }}
|
||||
>
|
||||
<SelectHoverBackground selected={instanceId === this.props.selectedId} showHover={true} borderRadius={6}
|
||||
<SelectHoverBackground selected={instanceId === this.props.selectedId} showHover={true}
|
||||
clipChildren={true}
|
||||
>
|
||||
<Draggable draggable={draggable && (this.props.enableStructureEditing)} getScrollContainer={() => this.getScrollContainer()}
|
||||
@@ -1050,7 +1058,7 @@ const PedalboardView =
|
||||
style={{ opacity: enabled ? 0.99 : 0.3 }}
|
||||
|
||||
>
|
||||
<div id="childIcon" style={{ position: "relative" }} >
|
||||
<div id="childIcon" style={{ position: "relative", display: "flex", justifyContent: "center", alignItems: "center" }} >
|
||||
<PluginIcon pluginType={iconType}
|
||||
size={24}
|
||||
color={getIconColor(iconColor)}
|
||||
|
||||