Skip to content

Commit 7d271ed

Browse files
author
falkTX
committed
Update PdPulp
1 parent cd6bd3d commit 7d271ed

17 files changed

+400
-1599
lines changed

ports/PdPulp/JuceLibraryCode/JuceHeader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
namespace ProjectInfo
2626
{
2727
const char* const projectName = "Pd Pulp";
28-
const char* const versionString = "1.0.0";
29-
const int versionNumber = 0x10000;
28+
const char* const versionString = "0.2.1";
29+
const int versionNumber = 0x201;
3030
}
3131
#endif
3232

ports/PdPulp/JuceLibraryCode/JucePluginCharacteristics.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#endif
4141

4242
#ifndef JucePlugin_Desc
43-
#define JucePlugin_Desc "a pure data audio plugin runtime environment"
43+
#define JucePlugin_Desc "an audio plugin runtime environment for pure data"
4444
#endif
4545
#ifndef JucePlugin_Manufacturer
4646
#define JucePlugin_Manufacturer "Audiosalt"
@@ -64,13 +64,13 @@
6464
#define JucePlugin_EditorRequiresKeyboardFocus 1
6565
#endif
6666
#ifndef JucePlugin_Version
67-
#define JucePlugin_Version 1.0.0
67+
#define JucePlugin_Version 0.2.1
6868
#endif
6969
#ifndef JucePlugin_VersionCode
70-
#define JucePlugin_VersionCode 0x10000
70+
#define JucePlugin_VersionCode 0x201
7171
#endif
7272
#ifndef JucePlugin_VersionString
73-
#define JucePlugin_VersionString "1.0.0"
73+
#define JucePlugin_VersionString "0.2.1"
7474
#endif
7575
#ifndef JucePlugin_VSTUniqueID
7676
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode

ports/PdPulp/Source/FloatParameter.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define FLOATPARAMETER_H_INCLUDED
1313

1414
#include "../JuceLibraryCode/JuceHeader.h"
15+
#include "SliderConfig.h"
1516

1617
class FloatParameter : public AudioProcessorParameter
1718
{
@@ -59,9 +60,15 @@ class FloatParameter : public AudioProcessorParameter
5960
return text.getFloatValue();
6061
}
6162

63+
SliderConfig* getSliderConfig ()
64+
{
65+
return &sliderConfig;
66+
}
67+
6268
private:
6369
float defaultValue, value;
6470
String name;
71+
SliderConfig sliderConfig;
6572
};
6673

6774

ports/PdPulp/Source/MainComponent.cpp

Lines changed: 88 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
88
and re-saved.
99
10-
Created with Introjucer version: 3.1.1
10+
Created with Introjucer version: 3.2.0
1111
1212
------------------------------------------------------------------------------
1313
1414
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
15-
Copyright 2004-13 by Raw Material Software Ltd.
15+
Copyright (c) 2015 - ROLI Ltd.
1616
1717
==============================================================================
1818
*/
@@ -28,7 +28,7 @@
2828

2929
//==============================================================================
3030
MainComponent::MainComponent (PureDataAudioProcessor& processor)
31-
: PureDataAudioProcessorEditor(processor)
31+
: PureDataAudioProcessorEditor(processor), p(&processor)
3232
{
3333
//[Constructor_pre] You can add your own custom stuff here..
3434
//[/Constructor_pre]
@@ -83,23 +83,43 @@ MainComponent::MainComponent (PureDataAudioProcessor& processor)
8383
statusField->setColour (TextEditor::textColourId, Colours::black);
8484
statusField->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
8585

86-
addAndMakeVisible (label = new Label ("new label",
87-
TRANS("PD Pulp")));
88-
label->setFont (Font ("DIN Alternate", 29.20f, Font::bold));
89-
label->setJustificationType (Justification::topLeft);
90-
label->setEditable (false, false, false);
91-
label->setColour (Label::textColourId, Colours::white);
92-
label->setColour (TextEditor::textColourId, Colours::black);
93-
label->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
86+
addAndMakeVisible (title = new Label ("new label",
87+
TRANS("Pd Pulp")));
88+
title->setFont (Font ("DIN Alternate", 29.20f, Font::bold));
89+
title->setJustificationType (Justification::topLeft);
90+
title->setEditable (false, false, false);
91+
title->setColour (Label::textColourId, Colours::white);
92+
title->setColour (TextEditor::textColourId, Colours::black);
93+
title->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
9494

95-
addAndMakeVisible (label2 = new Label ("new label",
95+
addAndMakeVisible (slogan = new Label ("new label",
9696
TRANS("a pure data audio plugin runtime environment")));
97-
label2->setFont (Font (14.00f, Font::italic));
98-
label2->setJustificationType (Justification::bottomRight);
99-
label2->setEditable (false, false, false);
100-
label2->setColour (Label::textColourId, Colour (0x94ffffff));
101-
label2->setColour (TextEditor::textColourId, Colours::black);
102-
label2->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
97+
slogan->setFont (Font (14.00f, Font::italic));
98+
slogan->setJustificationType (Justification::bottomRight);
99+
slogan->setEditable (false, false, false);
100+
slogan->setColour (Label::textColourId, Colour (0x94ffffff));
101+
slogan->setColour (TextEditor::textColourId, Colours::black);
102+
slogan->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
103+
104+
addAndMakeVisible (version = new Label ("new label",
105+
TRANS("v0.0.0")));
106+
version->setFont (Font (10.00f, Font::italic));
107+
version->setJustificationType (Justification::bottomRight);
108+
version->setEditable (false, false, false);
109+
version->setColour (Label::textColourId, Colour (0x46ffffff));
110+
version->setColour (TextEditor::textColourId, Colours::black);
111+
version->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
112+
113+
addAndMakeVisible (libraryLink = new HyperlinkButton (TRANS("Patch Library"),
114+
URL ("http://patchstorage.com/platform/pd-pulp/")));
115+
libraryLink->setTooltip (TRANS("http://patchstorage.com/platform/pd-pulp/"));
116+
libraryLink->setColour (HyperlinkButton::textColourId, Colour (0x53ffffff));
117+
118+
addAndMakeVisible (libraryLink2 = new HyperlinkButton (TRANS("Wiki"),
119+
URL ("https://github.com/logsol/Pd-Pulp/wiki")));
120+
libraryLink2->setTooltip (TRANS("https://github.com/logsol/Pd-Pulp/wiki"));
121+
libraryLink2->setButtonText (TRANS("Wiki"));
122+
libraryLink2->setColour (HyperlinkButton::textColourId, Colour (0x53ffffff));
103123

104124

105125
//[UserPreSize]
@@ -109,11 +129,16 @@ MainComponent::MainComponent (PureDataAudioProcessor& processor)
109129

110130

111131
//[Constructor] You can add your own custom stuff here..
112-
PureDataAudioProcessor& p = (PureDataAudioProcessor&) processor;
113-
pathField->setText(p.getPatchFile().getFileName(), dontSendNotification);
114132

115-
startTimer(25);
133+
String versionStr;
134+
versionStr << "v" << JucePlugin_VersionString;
135+
version->setText(versionStr, dontSendNotification);
136+
137+
pathField->setText(p->getPatchFile().getFileName(), dontSendNotification);
138+
title->setText(p->getName(), dontSendNotification);
139+
slogan->setText(JucePlugin_Desc, dontSendNotification);
116140

141+
startTimer(25);
117142
//[/Constructor]
118143
}
119144

@@ -137,8 +162,11 @@ MainComponent::~MainComponent()
137162
reloadButton = nullptr;
138163
editButton = nullptr;
139164
statusField = nullptr;
140-
label = nullptr;
141-
label2 = nullptr;
165+
title = nullptr;
166+
slogan = nullptr;
167+
version = nullptr;
168+
libraryLink = nullptr;
169+
libraryLink2 = nullptr;
142170

143171

144172
//[Destructor]. You can add your own custom destruction code here..
@@ -172,13 +200,16 @@ void MainComponent::resized()
172200
sendSlider8->setBounds (197, 246, 98, 120);
173201
sendSlider9->setBounds (293, 246, 98, 120);
174202
sendSlider10->setBounds (389, 246, 98, 120);
175-
findButton->setBounds (368, 56, 104, 24);
176-
pathField->setBounds (24, 56, 328, 24);
177-
reloadButton->setBounds (352, 90, 64, 20);
178-
editButton->setBounds (424, 90, 48, 20);
179-
statusField->setBounds (25, 91, 311, 17);
180-
label->setBounds (22, 16, 170, 32);
181-
label2->setBounds (168, 24, 304, 16);
203+
findButton->setBounds (358, 60, 120, 24);
204+
pathField->setBounds (24, 60, 312, 24);
205+
reloadButton->setBounds (358, 90, 64, 20);
206+
editButton->setBounds (430, 90, 48, 20);
207+
statusField->setBounds (25, 95, 311, 17);
208+
title->setBounds (22, 16, 170, 32);
209+
slogan->setBounds (168, 19, 304, 16);
210+
version->setBounds (425, 33, 46, 16);
211+
libraryLink->setBounds (369, 34, 64, 16);
212+
libraryLink2->setBounds (336, 34, 27, 16);
182213
//[UserResized] Add your own custom resize handling here..
183214

184215
//[/UserResized]
@@ -202,14 +233,15 @@ void MainComponent::buttonClicked (Button* buttonThatWasClicked)
202233
{
203234
pathField->setText(fc.getResult().getFileName(), dontSendNotification);
204235
p.setPatchFile(fc.getResult());
205-
p.reloadPatch(NULL);
236+
p.reloadPatch(0.0);
237+
p.setParameterDefaults();
206238
}
207239
//[/UserButtonCode_findButton]
208240
}
209241
else if (buttonThatWasClicked == reloadButton)
210242
{
211243
//[UserButtonCode_reloadButton] -- add your button handler code here..
212-
p.reloadPatch(NULL);
244+
p.reloadPatch(0.0);
213245
//[/UserButtonCode_reloadButton]
214246
}
215247
else if (buttonThatWasClicked == editButton)
@@ -228,8 +260,7 @@ void MainComponent::buttonClicked (Button* buttonThatWasClicked)
228260
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
229261
void MainComponent::timerCallback()
230262
{
231-
PureDataAudioProcessor& p = (PureDataAudioProcessor&) processor;
232-
statusField->setText(p.status, dontSendNotification);
263+
statusField->setText(p->status, dontSendNotification);
233264
}
234265
//[/MiscUserCode]
235266

@@ -245,7 +276,7 @@ BEGIN_JUCER_METADATA
245276

246277
<JUCER_COMPONENT documentType="Component" className="MainComponent" componentName=""
247278
parentClasses="public PureDataAudioProcessorEditor, public Timer"
248-
constructorParams="PureDataAudioProcessor&amp; processor" variableInitialisers="PureDataAudioProcessorEditor(processor)"
279+
constructorParams="PureDataAudioProcessor&amp; processor" variableInitialisers="PureDataAudioProcessorEditor(processor), p(&amp;processor)"
249280
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
250281
fixedSize="1" initialWidth="500" initialHeight="385">
251282
<BACKGROUND backgroundColour="ff303030"/>
@@ -280,37 +311,50 @@ BEGIN_JUCER_METADATA
280311
explicitFocusOrder="0" pos="389 246 98 120" sourceFile="SendSlider.cpp"
281312
constructorParams="10, processor"/>
282313
<TEXTBUTTON name="new button" id="1e5168d1e5fff12c" memberName="findButton"
283-
virtualName="" explicitFocusOrder="0" pos="368 56 104 24" bgColOff="ffadadad"
314+
virtualName="" explicitFocusOrder="0" pos="358 60 120 24" bgColOff="ffadadad"
284315
bgColOn="ff727272" buttonText="Find patch..." connectedEdges="0"
285316
needsCallback="1" radioGroupId="0"/>
286317
<LABEL name="new label" id="90c1e98cfe7db5e9" memberName="pathField"
287-
virtualName="" explicitFocusOrder="0" pos="24 56 328 24" bkgCol="21000000"
318+
virtualName="" explicitFocusOrder="0" pos="24 60 312 24" bkgCol="21000000"
288319
textCol="ffbcbcbc" edTextCol="ff000000" edBkgCol="0" labelText=""
289320
editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
290321
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
291322
<TEXTBUTTON name="new button" id="46837e8b39cdf5ab" memberName="reloadButton"
292-
virtualName="" explicitFocusOrder="0" pos="352 90 64 20" tooltip="Reload the pd patch file."
323+
virtualName="" explicitFocusOrder="0" pos="358 90 64 20" tooltip="Reload the pd patch file."
293324
bgColOff="ffadadad" bgColOn="ff727272" buttonText="Reload" connectedEdges="0"
294325
needsCallback="1" radioGroupId="0"/>
295326
<TEXTBUTTON name="new button" id="fe82abb32a3951b0" memberName="editButton"
296-
virtualName="" explicitFocusOrder="0" pos="424 90 48 20" tooltip="Opens PD editor if existent."
327+
virtualName="" explicitFocusOrder="0" pos="430 90 48 20" tooltip="Opens PD editor if existent."
297328
bgColOff="ffadadad" bgColOn="ff727272" buttonText="Edit" connectedEdges="0"
298329
needsCallback="1" radioGroupId="0"/>
299330
<LABEL name="new label" id="90ee85fe76c3c3e8" memberName="statusField"
300-
virtualName="" explicitFocusOrder="0" pos="25 91 311 17" bkgCol="0"
331+
virtualName="" explicitFocusOrder="0" pos="25 95 311 17" bkgCol="0"
301332
textCol="bcbcbcbc" edTextCol="ff000000" edBkgCol="0" labelText=""
302333
editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
303334
fontname="Default font" fontsize="11" bold="0" italic="0" justification="36"/>
304-
<LABEL name="new label" id="4f92306c17723f92" memberName="label" virtualName=""
335+
<LABEL name="new label" id="4f92306c17723f92" memberName="title" virtualName=""
305336
explicitFocusOrder="0" pos="22 16 170 32" textCol="ffffffff"
306-
edTextCol="ff000000" edBkgCol="0" labelText="PD Pulp" editableSingleClick="0"
337+
edTextCol="ff000000" edBkgCol="0" labelText="Pd Pulp" editableSingleClick="0"
307338
editableDoubleClick="0" focusDiscardsChanges="0" fontname="DIN Alternate"
308339
fontsize="29.199999999999999289" bold="1" italic="0" justification="9"/>
309-
<LABEL name="new label" id="eb75ff4acec7a7ab" memberName="label2" virtualName=""
310-
explicitFocusOrder="0" pos="168 24 304 16" textCol="94ffffff"
340+
<LABEL name="new label" id="eb75ff4acec7a7ab" memberName="slogan" virtualName=""
341+
explicitFocusOrder="0" pos="168 19 304 16" textCol="94ffffff"
311342
edTextCol="ff000000" edBkgCol="0" labelText="a pure data audio plugin runtime environment"
312343
editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
313344
fontname="Default font" fontsize="14" bold="0" italic="1" justification="18"/>
345+
<LABEL name="new label" id="4479dbe59f1893ef" memberName="version" virtualName=""
346+
explicitFocusOrder="0" pos="425 33 46 16" textCol="46ffffff"
347+
edTextCol="ff000000" edBkgCol="0" labelText="v0.0.0" editableSingleClick="0"
348+
editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
349+
fontsize="10" bold="0" italic="1" justification="18"/>
350+
<HYPERLINKBUTTON name="Patch Library" id="7cd34084675dc20f" memberName="libraryLink"
351+
virtualName="" explicitFocusOrder="0" pos="369 34 64 16" tooltip="http://patchstorage.com/platform/pd-pulp/"
352+
textCol="53ffffff" buttonText="Patch Library" connectedEdges="0"
353+
needsCallback="0" radioGroupId="0" url="http://patchstorage.com/platform/pd-pulp/"/>
354+
<HYPERLINKBUTTON name="Patch Library" id="6742fabf4e69a8c8" memberName="libraryLink2"
355+
virtualName="" explicitFocusOrder="0" pos="336 34 27 16" tooltip="https://github.com/logsol/Pd-Pulp/wiki"
356+
textCol="53ffffff" buttonText="Wiki" connectedEdges="0" needsCallback="0"
357+
radioGroupId="0" url="https://github.com/logsol/Pd-Pulp/wiki"/>
314358
</JUCER_COMPONENT>
315359

316360
END_JUCER_METADATA

ports/PdPulp/Source/MainComponent.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
88
and re-saved.
99
10-
Created with Introjucer version: 3.1.1
10+
Created with Introjucer version: 3.2.0
1111
1212
------------------------------------------------------------------------------
1313
1414
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
15-
Copyright 2004-13 by Raw Material Software Ltd.
15+
Copyright (c) 2015 - ROLI Ltd.
1616
1717
==============================================================================
1818
*/
@@ -59,6 +59,7 @@ class MainComponent : public PureDataAudioProcessorEditor,
5959
private:
6060
//[UserVariables] -- You can add your own custom variables in this section.
6161
void timerCallback();
62+
PureDataAudioProcessor* p;
6263
//[/UserVariables]
6364

6465
//==============================================================================
@@ -77,8 +78,11 @@ class MainComponent : public PureDataAudioProcessorEditor,
7778
ScopedPointer<TextButton> reloadButton;
7879
ScopedPointer<TextButton> editButton;
7980
ScopedPointer<Label> statusField;
80-
ScopedPointer<Label> label;
81-
ScopedPointer<Label> label2;
81+
ScopedPointer<Label> title;
82+
ScopedPointer<Label> slogan;
83+
ScopedPointer<Label> version;
84+
ScopedPointer<HyperlinkButton> libraryLink;
85+
ScopedPointer<HyperlinkButton> libraryLink2;
8286

8387

8488
//==============================================================================

0 commit comments

Comments
 (0)