2
0
Fork 0

Commit unfinished work in progress from June.

This commit is contained in:
bsutherland 2017-11-28 22:10:16 +09:00
parent 014408480c
commit aa3e14ea70
10 changed files with 322 additions and 193 deletions

View file

@ -7,12 +7,17 @@
pluginIsSynth="1" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0"
pluginAUExportPrefix="JuceOPLVSTiAU" pluginRTASCategory="" aaxIdentifier="com.plainweave.JuceOPLVSTi"
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="4.3.1"
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.0.2"
buildVST3="0" buildRTAS="0" buildAAX="0" includeBinaryInAppConfig="1"
pluginIsMidiEffectPlugin="0" companyWebsite="https://bsutherland.github.io/JuceOPLVSTi/"
buildAUv3="0">
buildAUv3="0" displaySplashScreen="1" reportAppUsage="1" splashScreenColour="Dark"
buildStandalone="0" enableIAA="0">
<MAINGROUP id="TOefyq" name="JuceOPLVSTi">
<GROUP id="{DCA755EB-7953-0641-E719-95C7850E5B2B}" name="Source">
<FILE id="AqQcu5" name="ChannelButtonLookAndFeel.cpp" compile="1" resource="0"
file="Source/ChannelButtonLookAndFeel.cpp"/>
<FILE id="yqL2ZN" name="ChannelButtonLookAndFeel.h" compile="0" resource="0"
file="Source/ChannelButtonLookAndFeel.h"/>
<FILE id="mSWBsr" name="OPLLookAndFeel.cpp" compile="1" resource="0"
file="Source/OPLLookAndFeel.cpp"/>
<FILE id="igacSV" name="OPLLookAndFeel.h" compile="0" resource="0"
@ -63,7 +68,7 @@
</GROUP>
</MAINGROUP>
<MODULES>
<MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="1"/>
@ -93,24 +98,25 @@
warningsAreErrors="1" headerPath=""/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_opengl" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_gui_extra" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_gui_basics" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_graphics" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_events" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_data_structures" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_cryptography" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_core" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_audio_processors" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_audio_formats" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_audio_devices" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_audio_basics" path="..\Juce-grapefruit\JUCE\JUCE\modules"/>
<MODULEPATH id="juce_video" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_opengl" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_gui_extra" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_gui_basics" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_graphics" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_events" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_data_structures" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_cryptography" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_core" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_audio_processors" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_audio_formats" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_audio_devices" path="..\Juce-grapefruit5\JUCE\modules"/>
<MODULEPATH id="juce_audio_basics" path="..\Juce-grapefruit5\JUCE\modules"/>
</MODULEPATHS>
</VS2015>
</EXPORTFORMATS>
<LIVE_SETTINGS>
<WINDOWS/>
<WINDOWS systemHeaderPath="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
liveWindowsTargetPlatformVersion="10.0.10586.0" defines=""/>
</LIVE_SETTINGS>
</JUCERPROJECT>

View file

@ -0,0 +1,66 @@
/*
==============================================================================
ChannelButtonLookAndFeel.cpp
Created: 10 Oct 2016 9:38:20pm
Author: bruce
==============================================================================
*/
#include "ChannelButtonLookAndFeel.h"
#include "PluginGui.h"
ChannelButtonLookAndFeel::ChannelButtonLookAndFeel()
{
}
static void drawButtonShape(Graphics& g, const Path& outline, Colour baseColour, float height)
{
const float mainBrightness = baseColour.getBrightness();
const float mainAlpha = baseColour.getFloatAlpha();
g.setFillType(FillType(baseColour));
g.fillPath(outline);
//g.setColour(Colours::white.withAlpha(0.4f * mainAlpha * mainBrightness * mainBrightness));
//g.strokePath(outline, PathStrokeType(1.0f), AffineTransform::translation(0.0f, 1.0f)
// .scaled(1.0f, (height - 1.6f) / height));
//g.setColour(Colours::black.withAlpha(0.4f * mainAlpha));
//g.strokePath(outline, PathStrokeType(1.0f));
}
void ChannelButtonLookAndFeel::drawButtonBackground(Graphics& g, Button& button, const Colour& backgroundColour,
bool isMouseOverButton, bool isButtonDown)
{
Colour baseColour(backgroundColour.withMultipliedSaturation(button.hasKeyboardFocus(true) ? 1.3f : 0.9f)
.withMultipliedAlpha(button.isEnabled() ? 0.9f : 0.5f));
if (isButtonDown || isMouseOverButton)
baseColour = baseColour.contrasting(isButtonDown ? 0.2f : 0.1f);
const bool flatOnLeft = button.isConnectedOnLeft();
const bool flatOnRight = button.isConnectedOnRight();
const bool flatOnTop = button.isConnectedOnTop();
const bool flatOnBottom = button.isConnectedOnBottom();
const float width = button.getWidth() - 1.0f;
const float height = button.getHeight() - 1.0f;
if (width > 0 && height > 0)
{
const float cornerSize = 4.0f;
Path outline;
outline.addRoundedRectangle(0.5f, 0.5f, width, height, cornerSize, cornerSize,
!(flatOnLeft || flatOnTop),
!(flatOnRight || flatOnTop),
!(flatOnLeft || flatOnBottom),
!(flatOnRight || flatOnBottom));
drawButtonShape(g, outline, baseColour, height);
}
}

View file

@ -0,0 +1,29 @@
/*
==============================================================================
ChannelButtonLookAndFeel.h
Created: 10 Oct 2016 9:38:20pm
Author: bruce
==============================================================================
*/
#ifndef ChannelButtonLookAndFeel_H_INCLUDED
#define ChannelButtonLookAndFeel_H_INCLUDED
#include "JuceHeader.h"
class ChannelButtonLookAndFeel : public LookAndFeel_V3
{
public:
ChannelButtonLookAndFeel();
void drawButtonBackground(Graphics& g, Button& button, const Colour& backgroundColour,
bool isMouseOverButton, bool isButtonDown);
};
#endif // ChannelButtonLookAndFeel_H_INCLUDED

View file

@ -12,6 +12,7 @@
#include "PluginGui.h"
const Colour OPLLookAndFeel::DOS_GREEN = Colour(0xff007f00);
const Colour OPLLookAndFeel::DOS_GREEN_DARK = Colour(0xff003f00);
OPLLookAndFeel::OPLLookAndFeel()
{

View file

@ -22,6 +22,7 @@ private:
public:
static const Colour DOS_GREEN;
static const Colour DOS_GREEN_DARK;
OPLLookAndFeel();

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Projucer version: 4.3.1
Created with Projucer version: 5.0.2
------------------------------------------------------------------------------
@ -17,8 +17,7 @@
==============================================================================
*/
#ifndef __JUCE_HEADER_450C07F5C14097B8__
#define __JUCE_HEADER_450C07F5C14097B8__
#pragma once
//[Headers] -- You can add your own extra header files here --
#include <array>
@ -291,7 +290,6 @@ private:
ScopedPointer<ImageButton> hiHatButton;
ScopedPointer<Label> dbLabel7;
ScopedPointer<Label> dbLabel8;
ScopedPointer<ImageButton> imageButton;
//==============================================================================
@ -300,5 +298,3 @@ private:
//[EndFile] You can add extra defines here...
//[/EndFile]
#endif // __JUCE_HEADER_450C07F5C14097B8__

View file

@ -936,6 +936,11 @@ void AdlibBlasterAudioProcessor::toggleChannel(const int idx)
isChannelEnabled(idx) ? disableChannel(idx) : enableChannel(idx);
}
size_t AdlibBlasterAudioProcessor::nChannelsEnabled()
{
return available_channels.size();
}
const char* CHANNEL_DISABLED_STRING = "x";
// @param idx 1-based channel index

View file

@ -59,6 +59,7 @@ public:
void enableChannel(const int idx);
void toggleChannel(const int idx);
bool isChannelEnabled(const int idx) const;
size_t nChannelsEnabled();
const char* getChannelEnvelopeStage(int idx) const;
void updateGuiIfPresent();

BIN
img/yamaha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB