Skip to content

Commit

Permalink
Merge pull request #24 from jerryuhoo/develop
Browse files Browse the repository at this point in the history
v0.9.7
  • Loading branch information
jerryuhoo authored Jun 22, 2022
2 parents ffbbe51 + cca80e5 commit ad71d78
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 112 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment ve
# `project()` command. `project()` sets up some helpful variables that describe source/binary
# directories, and the current project version. This is a standard CMake command.

project(Fire VERSION 0.9.6)
project(Fire VERSION 0.9.7)

# If you've installed JUCE somehow (via a package manager, or directly using the CMake install
# target), you'll need to tell this project that it depends on the installed copy of JUCE. If you've
Expand Down
2 changes: 1 addition & 1 deletion Fire.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<JUCERPROJECT id="NykRD7" name="Fire" projectType="audioplug" pluginManufacturer="Wings"
aaxIdentifier="com.WingsDSP.Fire" bundleIdentifier="com.WingsDSP.Fire"
version="0.9.6" displaySplashScreen="1" pluginFormats="buildAU,buildVST3"
version="0.9.7" displaySplashScreen="1" pluginFormats="buildAU,buildVST3"
jucerFormatVersion="1" pluginAUMainType="'aufx'" pluginVST3Category="Distortion"
addUsingNamespaceToJuceHeader="0" cppLanguageStandard="17">
<MAINGROUP id="X9e8F0" name="Fire">
Expand Down
6 changes: 3 additions & 3 deletions JuceLibraryCode/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
/*
==============================================================================
In accordance with the terms of the JUCE 6 End-Use License Agreement, the
In accordance with the terms of the JUCE 7 End-Use License Agreement, the
JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
ineffective unless you have a JUCE Indie or Pro license, or are using JUCE
under the GPL v3 license.
End User License Agreement: www.juce.com/juce-6-licence
End User License Agreement: www.juce.com/juce-7-licence
==============================================================================
*/
Expand All @@ -45,7 +45,7 @@

#define JUCE_USE_DARK_SPLASH_SCREEN 1

#define JUCE_PROJUCER_VERSION 0x60106
#define JUCE_PROJUCER_VERSION 0x70000

//==============================================================================
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
Expand Down
6 changes: 3 additions & 3 deletions JuceLibraryCode/BinaryData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

#include <cstring>

namespace BinaryData
{

Expand Down Expand Up @@ -350,10 +352,8 @@ const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);
const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)
{
for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)
{
if (namedResourceList[i] == resourceNameUTF8)
if (strcmp (namedResourceList[i], resourceNameUTF8) == 0)
return originalFilenames[i];
}

return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace ProjectInfo
{
const char* const projectName = "Fire";
const char* const companyName = "";
const char* const versionString = "0.9.6";
const int versionNumber = 0x906;
const char* const versionString = "0.9.7";
const int versionNumber = 0x907;
}
#endif
47 changes: 25 additions & 22 deletions JuceLibraryCode/JucePluginDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
#ifndef JucePlugin_Build_AUv3
#define JucePlugin_Build_AUv3 0
#endif
#ifndef JucePlugin_Build_RTAS
#define JucePlugin_Build_RTAS 0
#endif
#ifndef JucePlugin_Build_AAX
#define JucePlugin_Build_AAX 0
#endif
Expand All @@ -34,9 +31,15 @@
#ifndef JucePlugin_Build_Unity
#define JucePlugin_Build_Unity 0
#endif
#ifndef JucePlugin_Build_LV2
#define JucePlugin_Build_LV2 0
#endif
#ifndef JucePlugin_Enable_IAA
#define JucePlugin_Enable_IAA 0
#endif
#ifndef JucePlugin_Enable_ARA
#define JucePlugin_Enable_ARA 0
#endif
#ifndef JucePlugin_Name
#define JucePlugin_Name "Fire"
#endif
Expand All @@ -47,7 +50,7 @@
#define JucePlugin_Manufacturer "Wings"
#endif
#ifndef JucePlugin_ManufacturerWebsite
#define JucePlugin_ManufacturerWebsite ""
#define JucePlugin_ManufacturerWebsite "www.yourcompany.com"
#endif
#ifndef JucePlugin_ManufacturerEmail
#define JucePlugin_ManufacturerEmail ""
Expand All @@ -74,13 +77,13 @@
#define JucePlugin_EditorRequiresKeyboardFocus 0
#endif
#ifndef JucePlugin_Version
#define JucePlugin_Version 0.9.6
#define JucePlugin_Version 0.9.7
#endif
#ifndef JucePlugin_VersionCode
#define JucePlugin_VersionCode 0x906
#define JucePlugin_VersionCode 0x907
#endif
#ifndef JucePlugin_VersionString
#define JucePlugin_VersionString "0.9.6"
#define JucePlugin_VersionString "0.9.7"
#endif
#ifndef JucePlugin_VSTUniqueID
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
Expand Down Expand Up @@ -109,21 +112,6 @@
#ifndef JucePlugin_CFBundleIdentifier
#define JucePlugin_CFBundleIdentifier com.WingsDSP.Fire
#endif
#ifndef JucePlugin_RTASCategory
#define JucePlugin_RTASCategory 0
#endif
#ifndef JucePlugin_RTASManufacturerCode
#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_RTASProductId
#define JucePlugin_RTASProductId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_RTASDisableBypass
#define JucePlugin_RTASDisableBypass 0
#endif
#ifndef JucePlugin_RTASDisableMultiMono
#define JucePlugin_RTASDisableMultiMono 0
#endif
#ifndef JucePlugin_AAXIdentifier
#define JucePlugin_AAXIdentifier com.WingsDSP.Fire
#endif
Expand Down Expand Up @@ -157,3 +145,18 @@
#ifndef JucePlugin_VSTNumMidiOutputs
#define JucePlugin_VSTNumMidiOutputs 16
#endif
#ifndef JucePlugin_ARAContentTypes
#define JucePlugin_ARAContentTypes 0
#endif
#ifndef JucePlugin_ARATransformationFlags
#define JucePlugin_ARATransformationFlags 0
#endif
#ifndef JucePlugin_ARAFactoryID
#define JucePlugin_ARAFactoryID "com.yourcompany.Fire.factory"
#endif
#ifndef JucePlugin_ARADocumentArchiveID
#define JucePlugin_ARADocumentArchiveID "com.yourcompany.Fire.aradocumentarchive.0.9.6"
#endif
#ifndef JucePlugin_ARACompatibleArchiveIDs
#define JucePlugin_ARACompatibleArchiveIDs ""
#endif
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fire (Version 0.9.6) [![](https://travis-ci.com/jerryuhoo/Fire.svg?branch=master)](https://travis-ci.com/jerryuhoo/Fire) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/8c68fa4c8da04cb8abca88e2dfceb280)](https://www.codacy.com/gh/jerryuhoo/Fire/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jerryuhoo/Fire&amp;utm_campaign=Badge_Grade)[![CMake Build Matrix](https://github.com/jerryuhoo/Fire/actions/workflows/fire.yml/badge.svg)](https://github.com/jerryuhoo/Fire/actions/workflows/fire.yml)
# Fire (Version 0.9.7) [![](https://travis-ci.com/jerryuhoo/Fire.svg?branch=master)](https://travis-ci.com/jerryuhoo/Fire) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/8c68fa4c8da04cb8abca88e2dfceb280)](https://www.codacy.com/gh/jerryuhoo/Fire/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jerryuhoo/Fire&amp;utm_campaign=Badge_Grade)[![CMake Build Matrix](https://github.com/jerryuhoo/Fire/actions/workflows/fire.yml/badge.svg)](https://github.com/jerryuhoo/Fire/actions/workflows/fire.yml)

![Alt text](Fire1.png?raw=true "Title")

Expand Down Expand Up @@ -101,6 +101,11 @@ SoundCloud: [Wings](https://soundcloud.com/jerry-876742699)

## 6. Update Notes

### 2022-6-22 (version 0.9.7)

1. Fix HQ not working bug in v0.9.6.
2. Add fade in/out of frequency text labels.

### 2022-5-28 (version 0.9.6)

1. Fix a crash when turn on HQ mode in mono channel mode in Logic Pro.
Expand Down
14 changes: 11 additions & 3 deletions Source/Panels/SpectrogramPanel/FreqDividerGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ FreqDividerGroup::FreqDividerGroup(FireAudioProcessor &p, int index) : processor
// The parent component WON'T respond to mouse clicks,
// while child components WILL respond to mouse clicks!
setInterceptsMouseClicks(false, true);
freqTextLabel.setLookAndFeel(&otherLookAndFeel);
}

FreqDividerGroup::~FreqDividerGroup()
{
closeButton.removeListener(this);
freqTextLabel.setLookAndFeel(nullptr);
}

void FreqDividerGroup::paint (juce::Graphics& g)
Expand All @@ -62,11 +64,12 @@ void FreqDividerGroup::paint (juce::Graphics& g)

if (verticalLine.isMoving() || verticalLine.isMouseOver() || freqTextLabel.isMouseOverCustom())
{
freqTextLabel.setFade(true, true);
freqTextLabel.setVisible(true);
}
else
{
freqTextLabel.setVisible(false);
freqTextLabel.setFade(true, false);
}
}
else
Expand All @@ -83,8 +86,7 @@ void FreqDividerGroup::resized()
width = verticalLine.getWidth() / 2.0f;
verticalLine.setBounds(0, 0, getWidth() / 100.0f, getHeight());
closeButton.setBounds(width + margin, margin, size, size);
//freqTextLabel.setBounds(width + margin - width * 7, getHeight() / 5 + margin, width * 15, size);
freqTextLabel.setBounds(width + margin, getHeight() / 5 + margin, size * 4, size * 2);
freqTextLabel.setBounds(width + margin * 2, getHeight() / 5 + margin, size * 5, size * 2);
}

bool FreqDividerGroup::getDeleteState()
Expand Down Expand Up @@ -202,3 +204,9 @@ void FreqDividerGroup::mouseEnter(const juce::MouseEvent &e) {}
void FreqDividerGroup::mouseExit(const juce::MouseEvent &e) {}
void FreqDividerGroup::mouseDown(const juce::MouseEvent &e) {}
void FreqDividerGroup::mouseDrag(const juce::MouseEvent &e) {}

void FreqDividerGroup::setScale(float scale)
{
otherLookAndFeel.scale = scale;
freqTextLabel.setScale(scale);
}
2 changes: 2 additions & 0 deletions Source/Panels/SpectrogramPanel/FreqDividerGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class FreqDividerGroup : public juce::Component, juce::Slider::Listener, juce::
VerticalLine& getVerticalLine();

void setFreq(float f);
void setScale(float scale);
private:
FireAudioProcessor &processor;
VerticalLine verticalLine;
Expand All @@ -63,5 +64,6 @@ class FreqDividerGroup : public juce::Component, juce::Slider::Listener, juce::
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> multiFreqAttachment;

FreqTextLabel freqTextLabel;
OtherLookAndFeel otherLookAndFeel;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FreqDividerGroup)
};
55 changes: 47 additions & 8 deletions Source/Panels/SpectrogramPanel/FreqTextLabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FreqTextLabel::FreqTextLabel(VerticalLine &v) : verticalLine(v)
addAndMakeVisible(freqLabel);
freqLabel.setEditable(true);
setLookAndFeel(&flatButtonLnf);
startTimerHz(60);
}

FreqTextLabel::~FreqTextLabel()
Expand All @@ -29,19 +30,41 @@ FreqTextLabel::~FreqTextLabel()

void FreqTextLabel::paint (juce::Graphics& g)
{
g.setColour (COLOUR1.withAlpha(0.2f));
//g.setColour (juce::Colours::white);
g.fillAll();
if (mUpdate && mFadeIn)
{
if (currentStep < maxStep)
{
currentStep += 1;
}
else
{
mUpdate = false;
}
}
else if (mUpdate && !mFadeIn)
{
if (currentStep > 0)
{
currentStep -= 1;
}
else
{
mUpdate = false;
}
}

float alpha = juce::jmin(1.0f, currentStep / static_cast<float>(maxStep));
setAlpha(alpha);
float cornerSize = 10.0f * mScale;
juce::Rectangle<float> rect = getLocalBounds().toFloat();
g.setColour (COLOUR1.withAlpha(0.5f));
g.fillRoundedRectangle(rect, cornerSize);
g.setColour (COLOUR1);
g.drawRect (getLocalBounds(), 1); // draw an outline around the component
// g.drawText (static_cast<juce::String>(mFrequency) + " Hz", getLocalBounds(),
// juce::Justification::centred, true); // draw some placeholder text

freqLabel.setBounds(0, 0, getWidth(), getHeight());
freqLabel.setColour (juce::Label::textColourId, juce::Colours::white);
freqLabel.setColour(juce::Label::outlineColourId, COLOUR1);
freqLabel.setColour(juce::Label::outlineWhenEditingColourId, COLOUR1);
freqLabel.setColour(juce::Label::backgroundWhenEditingColourId, COLOUR7);

freqLabel.setJustificationType (juce::Justification::centred);
freqLabel.setFont (juce::Font (14.0f * mScale, juce::Font::plain));
Expand All @@ -62,7 +85,7 @@ void FreqTextLabel::paint (juce::Graphics& g)

void FreqTextLabel::resized()
{

repaint();
}

void FreqTextLabel::setFreq(int freq)
Expand All @@ -84,3 +107,19 @@ bool FreqTextLabel::isMouseOverCustom()
{
return isMouseOver() || freqLabel.isMouseOverOrDragging() || freqLabel.isBeingEdited();
}

void FreqTextLabel::timerCallback()
{
if(mUpdate)
{
repaint();
}
}

void FreqTextLabel::setFade(bool update, bool isFadeIn)
{
mUpdate = update;
mFadeIn = isFadeIn;
if (isFadeIn && getAlpha() == 0)
setAlpha(0.01f);
}
10 changes: 8 additions & 2 deletions Source/Panels/SpectrogramPanel/FreqTextLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//==============================================================================
/*
*/
class FreqTextLabel : public juce::Component
class FreqTextLabel : public juce::Component, juce::Timer
{
public:
FreqTextLabel(VerticalLine &v);
Expand All @@ -29,12 +29,18 @@ class FreqTextLabel : public juce::Component
int getFreq();
void setScale(float scale);
bool isMouseOverCustom();
void timerCallback() override;
void setFade(bool update, bool isFadeIn);

private:
VerticalLine &verticalLine;
int mFrequency;
float mScale = 1.0f;
bool changeState = false;
bool mUpdate = false;
bool mFadeIn = true;
int currentStep = 0;
const int maxStep = 5;

juce::Label freqLabel;
FlatButtonLnf flatButtonLnf;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FreqTextLabel)
Expand Down
Loading

0 comments on commit ad71d78

Please sign in to comment.