2
0
Fork 0

Clear code and theme dialog update

This commit is contained in:
George Reales 2020-08-06 18:09:15 +02:00
parent 6ea51b6553
commit 739c9eb64e
5 changed files with 20 additions and 16 deletions

View file

@ -1,4 +1,4 @@
OB-Xd 2.0 default MIDI CC controller table.
OB-Xd default MIDI CC controller table.
Modify by clicking LEARN button, moving a GUI element and then sending MIDI CC data.
All values can be reset using CLEAN button.
@ -45,13 +45,13 @@ CC# CONTROL
104 MULTIMODE
102 NOISEMIX
17 OCTAVE
100 OSC1MIX
120 OSC1MIX
54 OSC1P
58 OSC1Pul
57 OSC1Saw
43 OSC2_DET
52 OSC2HS
101 OSC2MIX
121 OSC2MIX
55 OSC2P
60 OSC2Pul
59 OSC2Saw

View file

@ -159,10 +159,10 @@ public:
midicc = 63;
controllers[midicc] = controllers_default[midicc] = ENVPITCH;
midicc = 100;
midicc = 120;
controllers[midicc] = controllers_default[midicc] = OSC1MIX;
midicc = 101;
midicc = 121;
controllers[midicc] = controllers_default[midicc] = OSC2MIX;
midicc = 102;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -275,16 +275,18 @@ TooglableButton* ObxdAudioProcessorEditor::addButton (int x, int y, int w, int h
#else
TooglableButton* button = new TooglableButton (ImageCache::getFromFile(skinFolder.getChildFile("button@2x.png")));
#endif
toggleAttachments.add (new TooglableButton::ToggleAttachment (filter.getPluginState(),
filter.getEngineParameterId (parameter),
*button));
if (parameter != UNLEARN){
toggleAttachments.add (new TooglableButton::ToggleAttachment (filter.getPluginState(),
filter.getEngineParameterId (parameter),
*button));
} else {
button->addListener(this);
}
button->setBounds (x, y, w, h);
button->setButtonText (name);
button->setValue (filter.getPluginState().getParameter (filter.getEngineParameterId (parameter))->getValue(),
dontSendNotification);
button->addListener(this);
addAndMakeVisible (button);
return button;
@ -442,7 +444,7 @@ void ObxdAudioProcessorEditor::buttonClicked (Button* b)
auto toggleButton = dynamic_cast<TooglableButton*> (b);
if (toggleButton == midiUnlearnButton){
if (midiUnlearnButton->toogled){
if (midiUnlearnButton->getToggleState()){
processor.getMidiMap().reset();
processor.getMidiMap().set_default();
processor.sendChangeMessage();
@ -471,7 +473,9 @@ void ObxdAudioProcessorEditor::changeListenerCallback (ChangeBroadcaster* source
}
// Set to unlearn to false
midiUnlearnButton->setValue(0.0, false);
if ( midiUnlearnButton->getToggleState()) {
midiUnlearnButton->setToggleState(false, NotificationType:: sendNotification);
}
repaint();
}

View file

@ -69,10 +69,10 @@ ObxdAudioProcessor::ObxdAudioProcessor()
options.storageFormat = PropertiesFile::storeAsXML;
options.millisecondsBeforeSaving = 2500;
options.processLock = &configLock;
config = std::unique_ptr<PropertiesFile> (new PropertiesFile (getDocumentFolder().getChildFile ("Settings.xml"), options));
config = std::unique_ptr<PropertiesFile> (new PropertiesFile (getDocumentFolder().getChildFile ("Skin.xml"), options));
currentSkin = config->containsKey("skin") ? config->getValue("skin") : "discoDSP Blue";
currentBank = "Init";
currentSkin = config->containsKey("skin") ? config->getValue("skin") : "Ilkka Rosma Dark";
currentBank = "000 - FMR OB-Xa Patch Book";
scanAndUpdateBanks();
scanAndUpdateSkins();