Skip to content
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

Corrections of unhandled exceptions/illegal file contents and sizes related to some ''.scl'' and ''.kbm'' files #417

Merged
merged 15 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/surge-synthesizer/tuning-library.git
[submodule "libs/surgesynthteam_tuningui"]
path = libs/surgesynthteam_tuningui
url = https://github.com/surge-synthesizer/surgesynthteam_tuningui.git
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @FulopNandor , can you switch back the repo to surge-synthesizer ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @asb2m10 and @baconpaul , I have switched back that,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great and I merged your change to that repo so you should update it to head in the submodules from surge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very-very much! I am going to do that. Have a nice weekend!:-)

url = https://github.com/FulopNandor/surgesynthteam_tuningui.git
[submodule "libs/MTS-ESP"]
path = libs/MTS-ESP
url = https://github.com/ODDSound/MTS-ESP.git
Expand Down
1 change: 1 addition & 0 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ juce_add_plugin("${BaseTargetName}"
FORMATS ${DEXED_JUCE_FORMATS}
PRODUCT_NAME "Dexed"
DESCRIPTION "Dexed FM Synth"
BUNDLE_ID "com.digitalsuburban.Dexed" # To avoid CMake Warning at libs/JUCE/extras/Build/CMake/JUCEUtils.cmake
)

clap_juce_extensions_plugin(TARGET ${BaseTargetName}
Expand Down
1 change: 1 addition & 0 deletions Source/CartManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ void CartManager::programRightClicked(ProgramListBox *source, int pos) {
if ( mainWindow->processor->sysexComm.isOutputActive() ) {
uint8_t msg[163];
exportSysexPgm(msg, unpackPgm);
msg[2] |= mainWindow->processor->sysexComm.getChl();
mainWindow->processor->sysexComm.send(MidiMessage(msg, 163));
}
break;
Expand Down
42 changes: 25 additions & 17 deletions Source/GlobalEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,34 @@ class MidiMonitor : public Component {
class AboutBox : public DialogWindow {
public:
Image logo_png;
HyperlinkButton dexed;
HyperlinkButton surge;
std::unique_ptr<juce::HyperlinkButton> dexed; // changed to std::unique_ptr from juce::ScopedPointer
std::unique_ptr<juce::HyperlinkButton> surge; // changed to std__unique_ptr from juce::ScopedPointer

AboutBox(Component *parent) : DialogWindow("About", Colour(0xFF000000), true),
dexed("https://asb2m10.github.io/dexed/", URL("https://asb2m10.github.io/dexed/")),
surge("https://surge-synthesizer.github.io/", URL("https://surge-synthesizer.github.io/")) {
dexed(std::make_unique<juce::HyperlinkButton>("https://asb2m10.github.io/dexed/", URL("https://asb2m10.github.io/dexed/"))),
surge(std::make_unique<juce::HyperlinkButton>("https://surge-synthesizer.github.io/", URL("https://surge-synthesizer.github.io/")))
{
setUsingNativeTitleBar(false);
setAlwaysOnTop(true);
logo_png = ImageCache::getFromMemory(BinaryData::dexedlogo_png, BinaryData::dexedlogo_pngSize);
setSize(logo_png.getWidth()+ 8, 500);
setSize(logo_png.getWidth() + 8, 500);
centreAroundComponent(parent, getWidth(), getHeight());

dexed.setColour(HyperlinkButton::ColourIds::textColourId, Colour(0xFF4ea097));
dexed.setJustificationType(Justification::left);
dexed.setBounds(18, 433, getWidth() - 36, 30);
addAndMakeVisible(&dexed);
surge.setColour(HyperlinkButton::ColourIds::textColourId, Colour(0xFF4ea097));
surge.setJustificationType(Justification::left);
surge.setBounds(18, 458, getWidth() - 36, 30);
addAndMakeVisible(&surge);
dexed->setColour(HyperlinkButton::ColourIds::textColourId, Colour(0xFF4ea097));
dexed->setJustificationType(Justification::left);
dexed->setBounds(18, 433, getWidth() - 36, 30);

surge->setColour(HyperlinkButton::ColourIds::textColourId, Colour(0xFF4ea097));
surge->setJustificationType(Justification::left);
surge->setBounds(18, 458, getWidth() - 36, 30);

// create a new Component to hold ''dexed'' and ''surge'' as subcomponents
// and set this holder Component as the content component of the DialogWindow
Component* holder = new Component();
holder->setSize(getWidth(), getHeight());
holder->addAndMakeVisible((juce::Component*)dexed.get());
holder->addAndMakeVisible((juce::Component*)surge.get());
setContentOwned(holder, true); // TODO: ''setContentComponent(holder, true, true);'' also worked; which is the better?
}

void closeButtonPressed() {
Expand Down Expand Up @@ -324,28 +332,28 @@ GlobalEditor::GlobalEditor ()

initButton.reset (new juce::TextButton ("initButton"));
addAndMakeVisible (initButton.get());
initButton->setButtonText (TRANS("INIT"));
initButton->setButtonText (translate("INIT"));
initButton->addListener (this);

initButton->setBounds (100, 111, 50, 30);

parmButton.reset (new juce::TextButton ("parmButton"));
addAndMakeVisible (parmButton.get());
parmButton->setButtonText (TRANS("PARM"));
parmButton->setButtonText (translate("PARM"));
parmButton->addListener (this);

parmButton->setBounds (52, 111, 50, 30);

cartButton.reset (new juce::TextButton ("cartButton"));
addAndMakeVisible (cartButton.get());
cartButton->setButtonText (TRANS("CART"));
cartButton->setButtonText (translate("CART"));
cartButton->addListener (this);

cartButton->setBounds (3, 111, 50, 30);

storeButton.reset (new juce::TextButton ("storeButton"));
addAndMakeVisible (storeButton.get());
storeButton->setButtonText (TRANS("STORE"));
storeButton->setButtonText (translate("STORE"));
storeButton->addListener (this);

storeButton->setBounds (270, 109, 50, 30);
Expand Down
10 changes: 5 additions & 5 deletions Source/OperatorEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ OperatorEditor::OperatorEditor ()
opCoarse->setBounds (43, 24, 34, 34);

khzDisplay.reset (new juce::Label ("khz",
TRANS("1,000 kHz")));
translate("1,000 kHz")));
addAndMakeVisible (khzDisplay.get());
khzDisplay->setFont (juce::Font (12.60f, juce::Font::plain).withTypefaceStyle ("Regular"));
khzDisplay->setJustificationType (juce::Justification::centred);
Expand Down Expand Up @@ -180,7 +180,7 @@ OperatorEditor::OperatorEditor ()

sclLeftLevel.reset (new juce::Slider ("sclLeftLevel"));
addAndMakeVisible (sclLeftLevel.get());
sclLeftLevel->setTooltip (TRANS("Keyboard Scale Level Left Depth "));
sclLeftLevel->setTooltip (translate("Keyboard Scale Level Left Depth "));
sclLeftLevel->setRange (0, 99, 1);
sclLeftLevel->setSliderStyle (juce::Slider::RotaryVerticalDrag);
sclLeftLevel->setTextBoxStyle (juce::Slider::NoTextBox, false, 80, 20);
Expand All @@ -190,7 +190,7 @@ OperatorEditor::OperatorEditor ()

sclRightLevel.reset (new juce::Slider ("sclRightLevel"));
addAndMakeVisible (sclRightLevel.get());
sclRightLevel->setTooltip (TRANS("Keyboard Scale Level Right Depth "));
sclRightLevel->setTooltip (translate("Keyboard Scale Level Right Depth "));
sclRightLevel->setRange (0, 99, 1);
sclRightLevel->setSliderStyle (juce::Slider::RotaryVerticalDrag);
sclRightLevel->setTextBoxStyle (juce::Slider::NoTextBox, false, 80, 20);
Expand All @@ -200,7 +200,7 @@ OperatorEditor::OperatorEditor ()

sclLvlBrkPt.reset (new juce::Slider ("sclLvlBrkPt"));
addAndMakeVisible (sclLvlBrkPt.get());
sclLvlBrkPt->setTooltip (TRANS("Scale Level Breakpoint"));
sclLvlBrkPt->setTooltip (translate("Scale Level Breakpoint"));
sclLvlBrkPt->setRange (0, 99, 1);
sclLvlBrkPt->setSliderStyle (juce::Slider::LinearHorizontal);
sclLvlBrkPt->setTextBoxStyle (juce::Slider::NoTextBox, false, 80, 20);
Expand All @@ -210,7 +210,7 @@ OperatorEditor::OperatorEditor ()

sclRateScaling.reset (new juce::Slider ("sclRateScaling"));
addAndMakeVisible (sclRateScaling.get());
sclRateScaling->setTooltip (TRANS("Keyboard Rate Scaling"));
sclRateScaling->setTooltip (translate("Keyboard Rate Scaling"));
sclRateScaling->setRange (0, 7, 1);
sclRateScaling->setSliderStyle (juce::Slider::RotaryVerticalDrag);
sclRateScaling->setTextBoxStyle (juce::Slider::NoTextBox, false, 80, 20);
Expand Down