Skip to content

Commit c0738dd

Browse files
authored
Merge pull request #24 from Lunix-420/main
merge: Arch Linux and GUI stuff
2 parents f270ae4 + c6970cd commit c0738dd

8 files changed

Lines changed: 75 additions & 17 deletions

File tree

.SRCINFO

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pkgbase = dimethoxy-plasma-bin
2+
pkgdesc = Asymmetrical Distortion Effect for VST3 and LV2 compatible hosts
3+
pkgver = 1.1.0
4+
pkgrel = 1
5+
url = https://github.com/Dimethoxy/Plasma
6+
arch = x86_64
7+
license = GPL3
8+
provides = dimethoxy-plasma
9+
source = https://github.com/Dimethoxy/Plasma/releases/download/v1.1.0/plasma-v1.1.0-linux.tar.gz
10+
sha256sums = df65fa6618e48b4daaab76e55a5ced28a598ca183f8d1f716b408a7822727b2f
11+
12+
pkgname = dimethoxy-plasma-bin

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ Installer/Mac/build
33
Installer/Windows/Output
44
*.DS_Store
55

6+
# Arch Linux related folders and files
7+
pkg/
8+
src/
9+
*.pkg.tar.xz
10+
11+
612
# User-specific files
713
*.rsuser
814
*.suo

PKGBUILD

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Maintainer: Lunix (David Hess) <davidhess336@gmx.de>
2+
pkgname='dimethoxy-plasma-bin'
3+
pkgver=1.1.0
4+
pkgrel=1
5+
pkgdesc="Asymmetrical Distortion Effect for VST3 and LV2 compatible hosts"
6+
arch=('x86_64')
7+
url="https://github.com/Dimethoxy/Plasma"
8+
license=('GPL3')
9+
provides=('dimethoxy-plasma')
10+
source=("https://github.com/Dimethoxy/Plasma/releases/download/v$pkgver/plasma-v$pkgver-linux.tar.gz")
11+
sha256sums=('df65fa6618e48b4daaab76e55a5ced28a598ca183f8d1f716b408a7822727b2f')
12+
13+
package() {
14+
# Define directories
15+
install -d "$pkgdir/usr/lib/vst3" "$pkgdir/usr/lib/lv2"
16+
install -d "$pkgdir/usr/share/licenses/$pkgname"
17+
18+
# Install plugins (use cp -r for directories)
19+
cp -r "$srcdir/Plasma.vst3" "$pkgdir/usr/lib/vst3/"
20+
cp -r "$srcdir/Plasma.lv2" "$pkgdir/usr/lib/lv2/"
21+
22+
# Download and install the LICENSE from the remote URL
23+
curl -L "https://raw.githubusercontent.com/Dimethoxy/Plasma/refs/heads/main/LICENSE" -o "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
24+
}
25+

Source/BaseVisualiser.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ BaseVisualiser::setColours(Colour bk, Colour fg) noexcept
157157
void
158158
BaseVisualiser::paint(Graphics& g)
159159
{
160-
g.fillAll(backgroundColour);
160+
g.setColour(backgroundColour);
161+
g.fillRoundedRectangle(getLocalBounds().toFloat(), cornerRadius);
161162
auto r = getLocalBounds().toFloat();
162163
auto channelHeight = r.getHeight() / (float)channels.size();
163164

@@ -218,3 +219,9 @@ BaseVisualiser::paintChannel(Graphics& g,
218219
area.getRight(),
219220
area.getY()));
220221
}
222+
223+
void
224+
BaseVisualiser::setCornerRadius(int cornerRadius)
225+
{
226+
this->cornerRadius = cornerRadius;
227+
}

Source/BaseVisualiser.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class BaseVisualiser
8585
//==============================================================================
8686
/** @internal */
8787
void paint(Graphics&) override;
88+
void setCornerRadius(int cornerRadius);
8889

8990
private:
9091
struct ChannelInfo;
@@ -94,6 +95,6 @@ class BaseVisualiser
9495
Colour backgroundColour, waveformColour;
9596

9697
void timerCallback() override;
97-
98+
int cornerRadius;
9899
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(BaseVisualiser)
99100
};

Source/CustomLookAndFeel.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ CustomLookAndFeel::drawButtonBackground(Graphics& g,
6161
}
6262
if (text == "O") {
6363
g.setFont(getCustomFont().withHeight(fontSize));
64-
g.drawText("Options", area, Justification::centred, false);
64+
g.drawText("Config", area, Justification::centred, false);
6565
}
6666
if (text == "U") {
6767
g.setFont(getCustomFont().withHeight(fontSize));
@@ -153,6 +153,8 @@ CustomLookAndFeel::drawRotarySlider(juce::Graphics& g,
153153
isInverted = true;
154154
} else if (slider.getName() == "Peak Resonance") {
155155
isCentered = true;
156+
} else if (slider.getName() == "Dual Peak Resonance") {
157+
isCentered = true;
156158
} else if (slider.getName() == "Girth") {
157159
String str;
158160
isCentered = true;

Source/PluginEditor.cpp

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
66
// Constructor
77
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8-
8+
constexpr float innerCorner = 0.8f;
99
PlasmaAudioProcessorEditor::PlasmaAudioProcessorEditor(PlasmaAudioProcessor& p)
1010
: AudioProcessorEditor(&p)
1111
, audioProcessor(p)
@@ -414,7 +414,7 @@ PlasmaAudioProcessorEditor::PlasmaAudioProcessorEditor(PlasmaAudioProcessor& p)
414414
highPassResonanceQualitySlider.setVisible(false);
415415
highPassResonanceQualityLabel.setVisible(false);
416416
}
417-
417+
waveformComponent->setCornerRadius(sc(cornerRadius * innerCorner));
418418
// Window
419419
setResizable(false, false);
420420
setSize(sc(810), sc(940));
@@ -437,6 +437,7 @@ PlasmaAudioProcessorEditor::paint(juce::Graphics& g)
437437
// Front
438438
g.setColour(getForegroundColor());
439439
g.fillRect(headerArea());
440+
waveformComponent->setCornerRadius(sc(cornerRadius * innerCorner));
440441
g.fillRoundedRectangle(monitorArea().toFloat(), sc(cornerRadius));
441442
g.fillRoundedRectangle(inArea().toFloat(), sc(cornerRadius));
442443
g.fillRoundedRectangle(outArea().toFloat(), sc(cornerRadius));
@@ -450,7 +451,7 @@ PlasmaAudioProcessorEditor::paint(juce::Graphics& g)
450451
// Monitor Background
451452
g.setColour(getBackgroundColor());
452453
g.fillRoundedRectangle(monitorArea().reduced(sc(padding)).toFloat(),
453-
sc(cornerRadius * 0.8));
454+
sc(cornerRadius * innerCorner));
454455

455456
float lineSize = sc(2.0f);
456457
Line<float> inLine(Point<float>(inArea().getCentreX() - sc(33),
@@ -806,29 +807,32 @@ PlasmaAudioProcessorEditor::setAnalyserType(AnalyserType analyser)
806807
// Waveform
807808
if (analyser == AnalyserType::Waveform) {
808809
waveformComponent->setVisible(true);
809-
} else {
810-
waveformComponent->setVisible(false);
810+
responseCurveComponent.setVisible(false);
811+
earlyShapercurveComponent.setVisible(false);
812+
lateShapercurveComponent.setVisible(false);
811813
}
812-
813814
// Repsonse
814815
if (analyser == AnalyserType::Response) {
815816
responseCurveComponent.setVisible(true);
816-
} else {
817-
responseCurveComponent.setVisible(false);
817+
earlyShapercurveComponent.setVisible(false);
818+
lateShapercurveComponent.setVisible(false);
819+
waveformComponent->setVisible(false);
818820
}
819-
820821
// Distortion
821822
if (analyser == AnalyserType::Shapercurve) {
822823
earlyShapercurveComponent.setVisible(true);
823824
lateShapercurveComponent.setVisible(true);
824-
} else {
825-
earlyShapercurveComponent.setVisible(false);
826-
lateShapercurveComponent.setVisible(false);
825+
waveformComponent->setVisible(false);
826+
responseCurveComponent.setVisible(false);
827827
}
828828

829829
// Options
830830
if (analyser == AnalyserType::Options) {
831831
configWindow(true);
832+
waveformComponent->setVisible(false);
833+
responseCurveComponent.setVisible(false);
834+
earlyShapercurveComponent.setVisible(false);
835+
lateShapercurveComponent.setVisible(false);
832836
} else {
833837
configWindow(false);
834838
}
@@ -945,7 +949,7 @@ PlasmaAudioProcessorEditor::fs_titelLabel()
945949
void
946950
PlasmaAudioProcessorEditor::resized()
947951
{
948-
952+
waveformComponent->setCornerRadius(sc(cornerRadius * innerCorner));
949953
int knobSize = 123;
950954
///////////////////////////////////////////////////////////////////////////////////////////
951955
// Monitor
@@ -1802,6 +1806,7 @@ void
18021806
PlasmaAudioProcessorEditor::setCornerRadius(int cornerRadius)
18031807
{
18041808
this->cornerRadius = cornerRadius;
1809+
waveformComponent->setCornerRadius(sc(cornerRadius * innerCorner));
18051810
updateTextboxes();
18061811
}
18071812

Source/WaveformComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ WaveformComponent::setColor(Colour c)
3737
void
3838
WaveformComponent::setBackgroundColor(Colour c)
3939
{
40-
// setColours(c, c);
40+
setColours(c, c);
4141
}

0 commit comments

Comments
 (0)