Missing Juce items

pull/1/head
asb2m10 11 years ago
parent 30e3f833da
commit 1692e9a267
  1. 3992
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  2. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  3. 18
      Builds/VisualStudio2012/Dexed.vcxproj
  4. 18
      Builds/VisualStudio2013/Dexed.vcxproj
  5. 3
      Dexed.jucer
  6. 9
      JuceLibraryCode/AppConfig.h
  7. 2
      JuceLibraryCode/BinaryData.cpp
  8. 7
      JuceLibraryCode/BinaryData.h
  9. 2
      JuceLibraryCode/modules/juce_audio_basics/sources/juce_AudioSource.h
  10. 189
      JuceLibraryCode/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
  11. 31
      JuceLibraryCode/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h
  12. 10
      JuceLibraryCode/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp
  13. 49
      JuceLibraryCode/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp
  14. 2
      JuceLibraryCode/modules/juce_audio_processors/processors/juce_PluginDescription.h
  15. 4
      JuceLibraryCode/modules/juce_core/containers/juce_NamedValueSet.h
  16. 2
      JuceLibraryCode/modules/juce_core/juce_core.h
  17. 80
      JuceLibraryCode/modules/juce_core/native/juce_android_JNIHelpers.h
  18. 2
      JuceLibraryCode/modules/juce_core/streams/juce_OutputStream.h
  19. 5
      JuceLibraryCode/modules/juce_graphics/native/juce_mac_Fonts.mm
  20. 4
      JuceLibraryCode/modules/juce_gui_basics/components/juce_Component.h
  21. 20
      README.md
  22. 90
      Source/GlobalEditor.cpp
  23. 36
      Source/OperatorEditor.cpp
  24. 17
      Source/PluginParam.cpp
  25. 5
      Source/PluginProcessor.cpp
  26. 6
      Source/PluginProcessor.h

File diff suppressed because it is too large Load Diff

@ -19,13 +19,11 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110</PlatformToolset>
</PropertyGroup> </PropertyGroup>
@ -60,8 +58,8 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat> <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2012_78A501F=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader/>
<AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation> <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>
@ -84,11 +82,15 @@
<TargetMachine>MachineX86</TargetMachine> <TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<LargeAddressAware>true</LargeAddressAware> <LargeAddressAware>true</LargeAddressAware>
<AdditionalOptions>/FORCE:multiple %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<Bscmake> <Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\Dexed.bsc</OutputFile> <OutputFile>$(IntDir)\Dexed.bsc</OutputFile>
</Bscmake> </Bscmake>
<PostBuildEvent>
<Command>copy /Y &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(OutDir)\$(TargetName).vst3&quot;</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl> <Midl>
@ -101,8 +103,8 @@
<ClCompile> <ClCompile>
<Optimization>MinSpace</Optimization> <Optimization>MinSpace</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2012_78A501F=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader/>
<AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation> <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>
@ -126,11 +128,15 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<LargeAddressAware>true</LargeAddressAware> <LargeAddressAware>true</LargeAddressAware>
<AdditionalOptions>/FORCE:multiple %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<Bscmake> <Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\Dexed.bsc</OutputFile> <OutputFile>$(IntDir)\Dexed.bsc</OutputFile>
</Bscmake> </Bscmake>
<PostBuildEvent>
<Command>copy /Y &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(OutDir)\$(TargetName).vst3&quot;</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\Source\PluginProcessor.cpp"/> <ClCompile Include="..\..\Source\PluginProcessor.cpp"/>

@ -19,14 +19,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
@ -62,8 +60,8 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader/>
<AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation> <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>
@ -84,11 +82,15 @@
<ProgramDatabaseFile>$(IntDir)\Dexed.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>$(IntDir)\Dexed.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<LargeAddressAware>true</LargeAddressAware> <LargeAddressAware>true</LargeAddressAware>
<AdditionalOptions>/FORCE:multiple %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<Bscmake> <Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\Dexed.bsc</OutputFile> <OutputFile>$(IntDir)\Dexed.bsc</OutputFile>
</Bscmake> </Bscmake>
<PostBuildEvent>
<Command>copy /Y &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(OutDir)\$(TargetName).vst3&quot;</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl> <Midl>
@ -101,8 +103,8 @@
<ClCompile> <ClCompile>
<Optimization>MinSpace</Optimization> <Optimization>MinSpace</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader/>
<AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation> <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>
@ -125,11 +127,15 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<LargeAddressAware>true</LargeAddressAware> <LargeAddressAware>true</LargeAddressAware>
<AdditionalOptions>/FORCE:multiple %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<Bscmake> <Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\Dexed.bsc</OutputFile> <OutputFile>$(IntDir)\Dexed.bsc</OutputFile>
</Bscmake> </Bscmake>
<PostBuildEvent>
<Command>copy /Y &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(OutDir)\$(TargetName).vst3&quot;</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\Source\PluginProcessor.cpp"/> <ClCompile Include="..\..\Source\PluginProcessor.cpp"/>

@ -8,7 +8,8 @@
pluginWantsMidiIn="1" pluginProducesMidiOut="1" pluginSilenceInIsSilenceOut="0" pluginWantsMidiIn="1" pluginProducesMidiOut="1" pluginSilenceInIsSilenceOut="0"
pluginEditorRequiresKeys="0" pluginAUExportPrefix="DexedAU" pluginRTASCategory="" pluginEditorRequiresKeys="0" pluginAUExportPrefix="DexedAU" pluginRTASCategory=""
aaxIdentifier="com.yourcompany.Dexed" pluginAAXCategory="AAX_ePlugInCategory_Dynamics" aaxIdentifier="com.yourcompany.Dexed" pluginAAXCategory="AAX_ePlugInCategory_Dynamics"
jucerVersion="3.1.0" companyName="Digital Suburban"> jucerVersion="3.1.0" companyName="Digital Suburban" buildVST3="0"
buildRTAS="0" buildAAX="0" pluginManufacturerEmail="support@yourcompany.com">
<MAINGROUP id="kHXTgw" name="Dexed"> <MAINGROUP id="kHXTgw" name="Dexed">
<GROUP id="{F12593AE-639A-6F59-5819-ACE25AF86F95}" name="Resources"> <GROUP id="{F12593AE-639A-6F59-5819-ACE25AF86F95}" name="Resources">
<FILE id="gfRTZ1" name="builtin_pgm.zip" compile="0" resource="1" file="Resources/builtin_pgm.zip"/> <FILE id="gfRTZ1" name="builtin_pgm.zip" compile="0" resource="1" file="Resources/builtin_pgm.zip"/>

@ -200,6 +200,12 @@
#ifndef JucePlugin_Manufacturer #ifndef JucePlugin_Manufacturer
#define JucePlugin_Manufacturer "Digital Suburban" #define JucePlugin_Manufacturer "Digital Suburban"
#endif #endif
#ifndef JucePlugin_ManufacturerWebsite
#define JucePlugin_ManufacturerWebsite ""
#endif
#ifndef JucePlugin_ManufacturerEmail
#define JucePlugin_ManufacturerEmail "support@yourcompany.com"
#endif
#ifndef JucePlugin_ManufacturerCode #ifndef JucePlugin_ManufacturerCode
#define JucePlugin_ManufacturerCode 'Manu' #define JucePlugin_ManufacturerCode 'Manu'
#endif #endif
@ -287,9 +293,6 @@
#ifndef JucePlugin_AAXProductId #ifndef JucePlugin_AAXProductId
#define JucePlugin_AAXProductId JucePlugin_PluginCode #define JucePlugin_AAXProductId JucePlugin_PluginCode
#endif #endif
#ifndef JucePlugin_AAXPluginId
#define JucePlugin_AAXPluginId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_AAXCategory #ifndef JucePlugin_AAXCategory
#define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics #define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics
#endif #endif

@ -1276,8 +1276,6 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw
return 0; return 0;
} }
const int namedResourceListSize = 1;
const char* namedResourceList[] = const char* namedResourceList[] =
{ {
"builtin_pgm_zip" "builtin_pgm_zip"

@ -4,6 +4,9 @@
*/ */
#ifndef BINARYDATA_H_22182922_INCLUDED
#define BINARYDATA_H_22182922_INCLUDED
namespace BinaryData namespace BinaryData
{ {
extern const char* builtin_pgm_zip; extern const char* builtin_pgm_zip;
@ -13,9 +16,11 @@ namespace BinaryData
extern const char* namedResourceList[]; extern const char* namedResourceList[];
// Number of elements in the namedResourceList array. // Number of elements in the namedResourceList array.
extern const int namedResourceListSize; const int namedResourceListSize = 1;
// If you provide the name of one of the binary resource variables above, this function will // If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found). // return the corresponding data and its size (or a null pointer if the name isn't found).
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw(); const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw();
} }
#endif

@ -65,7 +65,7 @@ struct JUCE_API AudioSourceChannelInfo
Only the samples specified by the startSample and numSamples members of this structure Only the samples specified by the startSample and numSamples members of this structure
should be affected by the call. should be affected by the call.
The contents of the buffer when it is passed to the the AudioSource::getNextAudioBlock() The contents of the buffer when it is passed to the AudioSource::getNextAudioBlock()
method can be treated as the input if the source is performing some kind of filter operation, method can be treated as the input if the source is performing some kind of filter operation,
but should be cleared if this is not the case - the clearActiveBufferRegion() is but should be cleared if this is not the case - the clearActiveBufferRegion() is
a handy way of doing this. a handy way of doing this.

@ -114,7 +114,7 @@ void AudioDeviceManager::createDeviceTypesIfNeeded()
{ {
if (availableDeviceTypes.size() == 0) if (availableDeviceTypes.size() == 0)
{ {
OwnedArray <AudioIODeviceType> types; OwnedArray<AudioIODeviceType> types;
createAudioDeviceTypes (types); createAudioDeviceTypes (types);
for (int i = 0; i < types.size(); ++i) for (int i = 0; i < types.size(); ++i)
@ -127,7 +127,7 @@ void AudioDeviceManager::createDeviceTypesIfNeeded()
} }
} }
const OwnedArray <AudioIODeviceType>& AudioDeviceManager::getAvailableDeviceTypes() const OwnedArray<AudioIODeviceType>& AudioDeviceManager::getAvailableDeviceTypes()
{ {
scanDevicesIfNeeded(); scanDevicesIfNeeded();
return availableDeviceTypes; return availableDeviceTypes;
@ -147,13 +147,13 @@ void AudioDeviceManager::audioDeviceListChanged()
} }
//============================================================================== //==============================================================================
static void addIfNotNull (OwnedArray <AudioIODeviceType>& list, AudioIODeviceType* const device) static void addIfNotNull (OwnedArray<AudioIODeviceType>& list, AudioIODeviceType* const device)
{ {
if (device != nullptr) if (device != nullptr)
list.add (device); list.add (device);
} }
void AudioDeviceManager::createAudioDeviceTypes (OwnedArray <AudioIODeviceType>& list) void AudioDeviceManager::createAudioDeviceTypes (OwnedArray<AudioIODeviceType>& list)
{ {
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_WASAPI()); addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_WASAPI());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_DirectSound()); addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_DirectSound());
@ -181,7 +181,7 @@ void AudioDeviceManager::addAudioDeviceType (AudioIODeviceType* newDeviceType)
//============================================================================== //==============================================================================
String AudioDeviceManager::initialise (const int numInputChannelsNeeded, String AudioDeviceManager::initialise (const int numInputChannelsNeeded,
const int numOutputChannelsNeeded, const int numOutputChannelsNeeded,
const XmlElement* const e, const XmlElement* const xml,
const bool selectDefaultDeviceOnFailure, const bool selectDefaultDeviceOnFailure,
const String& preferredDefaultDeviceName, const String& preferredDefaultDeviceName,
const AudioDeviceSetup* preferredSetupOptions) const AudioDeviceSetup* preferredSetupOptions)
@ -191,106 +191,127 @@ String AudioDeviceManager::initialise (const int numInputChannelsNeeded,
numInputChansNeeded = numInputChannelsNeeded; numInputChansNeeded = numInputChannelsNeeded;
numOutputChansNeeded = numOutputChannelsNeeded; numOutputChansNeeded = numOutputChannelsNeeded;
if (e != nullptr && e->hasTagName ("DEVICESETUP")) if (xml != nullptr && xml->hasTagName ("DEVICESETUP"))
{ return initialiseFromXML (*xml, selectDefaultDeviceOnFailure,
lastExplicitSettings = new XmlElement (*e); preferredDefaultDeviceName, preferredSetupOptions);
String error; return initialiseDefault (preferredDefaultDeviceName, preferredSetupOptions);
AudioDeviceSetup setup; }
if (preferredSetupOptions != nullptr) String AudioDeviceManager::initialiseDefault (const String& preferredDefaultDeviceName,
setup = *preferredSetupOptions; const AudioDeviceSetup* preferredSetupOptions)
{
AudioDeviceSetup setup;
if (e->getStringAttribute ("audioDeviceName").isNotEmpty()) if (preferredSetupOptions != nullptr)
{ {
setup.inputDeviceName = setup.outputDeviceName setup = *preferredSetupOptions;
= e->getStringAttribute ("audioDeviceName"); }
} else if (preferredDefaultDeviceName.isNotEmpty())
else {
for (int j = availableDeviceTypes.size(); --j >= 0;)
{ {
setup.inputDeviceName = e->getStringAttribute ("audioInputDeviceName"); AudioIODeviceType* const type = availableDeviceTypes.getUnchecked(j);
setup.outputDeviceName = e->getStringAttribute ("audioOutputDeviceName");
}
currentDeviceType = e->getStringAttribute ("deviceType"); const StringArray outs (type->getDeviceNames (false));
if (findType (currentDeviceType) == nullptr) for (int i = 0; i < outs.size(); ++i)
{ {
if (AudioIODeviceType* const type = findType (setup.inputDeviceName, setup.outputDeviceName)) if (outs[i].matchesWildcard (preferredDefaultDeviceName, true))
currentDeviceType = type->getTypeName(); {
else if (availableDeviceTypes.size() > 0) setup.outputDeviceName = outs[i];
currentDeviceType = availableDeviceTypes.getUnchecked(0)->getTypeName(); break;
}
}
const StringArray ins (type->getDeviceNames (true));
for (int i = 0; i < ins.size(); ++i)
{
if (ins[i].matchesWildcard (preferredDefaultDeviceName, true))
{
setup.inputDeviceName = ins[i];
break;
}
}
} }
}
setup.bufferSize = e->getIntAttribute ("audioDeviceBufferSize"); insertDefaultDeviceNames (setup);
setup.sampleRate = e->getDoubleAttribute ("audioDeviceRate"); return setAudioDeviceSetup (setup, false);
}
setup.inputChannels .parseString (e->getStringAttribute ("audioDeviceInChans", "11"), 2); String AudioDeviceManager::initialiseFromXML (const XmlElement& xml,
setup.outputChannels.parseString (e->getStringAttribute ("audioDeviceOutChans", "11"), 2); const bool selectDefaultDeviceOnFailure,
const String& preferredDefaultDeviceName,
const AudioDeviceSetup* preferredSetupOptions)
{
lastExplicitSettings = new XmlElement (xml);
setup.useDefaultInputChannels = ! e->hasAttribute ("audioDeviceInChans"); String error;
setup.useDefaultOutputChannels = ! e->hasAttribute ("audioDeviceOutChans"); AudioDeviceSetup setup;
error = setAudioDeviceSetup (setup, true); if (preferredSetupOptions != nullptr)
setup = *preferredSetupOptions;
midiInsFromXml.clear(); if (xml.getStringAttribute ("audioDeviceName").isNotEmpty())
forEachXmlChildElementWithTagName (*e, c, "MIDIINPUT") {
midiInsFromXml.add (c->getStringAttribute ("name")); setup.inputDeviceName = setup.outputDeviceName
= xml.getStringAttribute ("audioDeviceName");
}
else
{
setup.inputDeviceName = xml.getStringAttribute ("audioInputDeviceName");
setup.outputDeviceName = xml.getStringAttribute ("audioOutputDeviceName");
}
const StringArray allMidiIns (MidiInput::getDevices()); currentDeviceType = xml.getStringAttribute ("deviceType");
for (int i = allMidiIns.size(); --i >= 0;) if (findType (currentDeviceType) == nullptr)
setMidiInputEnabled (allMidiIns[i], midiInsFromXml.contains (allMidiIns[i])); {
if (AudioIODeviceType* const type = findType (setup.inputDeviceName, setup.outputDeviceName))
currentDeviceType = type->getTypeName();
else if (availableDeviceTypes.size() > 0)
currentDeviceType = availableDeviceTypes.getUnchecked(0)->getTypeName();
}
if (error.isNotEmpty() && selectDefaultDeviceOnFailure) setup.bufferSize = xml.getIntAttribute ("audioDeviceBufferSize");
error = initialise (numInputChannelsNeeded, numOutputChannelsNeeded, 0, setup.sampleRate = xml.getDoubleAttribute ("audioDeviceRate");
false, preferredDefaultDeviceName);
setDefaultMidiOutput (e->getStringAttribute ("defaultMidiOutput")); setup.inputChannels .parseString (xml.getStringAttribute ("audioDeviceInChans", "11"), 2);
setup.outputChannels.parseString (xml.getStringAttribute ("audioDeviceOutChans", "11"), 2);
return error; setup.useDefaultInputChannels = ! xml.hasAttribute ("audioDeviceInChans");
} setup.useDefaultOutputChannels = ! xml.hasAttribute ("audioDeviceOutChans");
else
{
AudioDeviceSetup setup;
if (preferredSetupOptions != nullptr) error = setAudioDeviceSetup (setup, true);
{
setup = *preferredSetupOptions;
}
else if (preferredDefaultDeviceName.isNotEmpty())
{
for (int j = availableDeviceTypes.size(); --j >= 0;)
{
AudioIODeviceType* const type = availableDeviceTypes.getUnchecked(j);
const StringArray outs (type->getDeviceNames (false)); midiInsFromXml.clear();
for (int i = 0; i < outs.size(); ++i) forEachXmlChildElementWithTagName (xml, c, "MIDIINPUT")
{ midiInsFromXml.add (c->getStringAttribute ("name"));
if (outs[i].matchesWildcard (preferredDefaultDeviceName, true))
{
setup.outputDeviceName = outs[i];
break;
}
}
const StringArray ins (type->getDeviceNames (true)); const StringArray allMidiIns (MidiInput::getDevices());
for (int i = 0; i < ins.size(); ++i) for (int i = allMidiIns.size(); --i >= 0;)
{ setMidiInputEnabled (allMidiIns[i], midiInsFromXml.contains (allMidiIns[i]));
if (ins[i].matchesWildcard (preferredDefaultDeviceName, true))
{
setup.inputDeviceName = ins[i];
break;
}
}
}
}
insertDefaultDeviceNames (setup); if (error.isNotEmpty() && selectDefaultDeviceOnFailure)
return setAudioDeviceSetup (setup, false); error = initialise (numInputChansNeeded, numOutputChansNeeded,
} nullptr, false, preferredDefaultDeviceName);
setDefaultMidiOutput (xml.getStringAttribute ("defaultMidiOutput"));
return error;
}
String AudioDeviceManager::initialiseWithDefaultDevices (int numInputChannelsNeeded,
int numOutputChannelsNeeded)
{
lastExplicitSettings = nullptr;
return initialise (numInputChannelsNeeded, numOutputChannelsNeeded,
nullptr, false, String(), nullptr);
} }
void AudioDeviceManager::insertDefaultDeviceNames (AudioDeviceSetup& setup) const void AudioDeviceManager::insertDefaultDeviceNames (AudioDeviceSetup& setup) const
@ -880,7 +901,7 @@ void AudioDeviceManager::setDefaultMidiOutput (const String& deviceName)
{ {
if (defaultMidiOutputName != deviceName) if (defaultMidiOutputName != deviceName)
{ {
Array <AudioIODeviceCallback*> oldCallbacks; Array<AudioIODeviceCallback*> oldCallbacks;
{ {
const ScopedLock sl (audioCallbackLock); const ScopedLock sl (audioCallbackLock);
@ -915,7 +936,7 @@ void AudioDeviceManager::setDefaultMidiOutput (const String& deviceName)
void AudioDeviceManager::playTestSound() void AudioDeviceManager::playTestSound()
{ {
{ // cunningly nested to swap, unlock and delete in that order. { // cunningly nested to swap, unlock and delete in that order.
ScopedPointer <AudioSampleBuffer> oldSound; ScopedPointer<AudioSampleBuffer> oldSound;
{ {
const ScopedLock sl (audioCallbackLock); const ScopedLock sl (audioCallbackLock);

@ -191,7 +191,11 @@ public:
const XmlElement* savedState, const XmlElement* savedState,
bool selectDefaultDeviceOnFailure, bool selectDefaultDeviceOnFailure,
const String& preferredDefaultDeviceName = String(), const String& preferredDefaultDeviceName = String(),
const AudioDeviceSetup* preferredSetupOptions = 0); const AudioDeviceSetup* preferredSetupOptions = nullptr);
/** Resets everything to a default device setup, clearing any stored settings. */
String initialiseWithDefaultDevices (int numInputChannelsNeeded,
int numOutputChannelsNeeded);
/** Returns some XML representing the current state of the manager. /** Returns some XML representing the current state of the manager.
@ -383,7 +387,7 @@ public:
/** Returns a list of the types of device supported. /** Returns a list of the types of device supported.
*/ */
const OwnedArray <AudioIODeviceType>& getAvailableDeviceTypes(); const OwnedArray<AudioIODeviceType>& getAvailableDeviceTypes();
//============================================================================== //==============================================================================
/** Creates a list of available types. /** Creates a list of available types.
@ -394,7 +398,7 @@ public:
You can override this if your app needs to do something specific, like avoid You can override this if your app needs to do something specific, like avoid
using DirectSound devices, etc. using DirectSound devices, etc.
*/ */
virtual void createAudioDeviceTypes (OwnedArray <AudioIODeviceType>& types); virtual void createAudioDeviceTypes (OwnedArray<AudioIODeviceType>& types);
/** Adds a new device type to the list of types. /** Adds a new device type to the list of types.
The manager will take ownership of the object that is passed-in. The manager will take ownership of the object that is passed-in.
@ -446,30 +450,30 @@ public:
private: private:
//============================================================================== //==============================================================================
OwnedArray <AudioIODeviceType> availableDeviceTypes; OwnedArray<AudioIODeviceType> availableDeviceTypes;
OwnedArray <AudioDeviceSetup> lastDeviceTypeConfigs; OwnedArray<AudioDeviceSetup> lastDeviceTypeConfigs;
AudioDeviceSetup currentSetup; AudioDeviceSetup currentSetup;
ScopedPointer <AudioIODevice> currentAudioDevice; ScopedPointer<AudioIODevice> currentAudioDevice;
Array <AudioIODeviceCallback*> callbacks; Array<AudioIODeviceCallback*> callbacks;
int numInputChansNeeded, numOutputChansNeeded; int numInputChansNeeded, numOutputChansNeeded;
String currentDeviceType; String currentDeviceType;
BigInteger inputChannels, outputChannels; BigInteger inputChannels, outputChannels;
ScopedPointer <XmlElement> lastExplicitSettings; ScopedPointer<XmlElement> lastExplicitSettings;
mutable bool listNeedsScanning; mutable bool listNeedsScanning;
bool useInputNames; bool useInputNames;
Atomic<int> inputLevelMeasurementEnabledCount; Atomic<int> inputLevelMeasurementEnabledCount;
double inputLevel; double inputLevel;
ScopedPointer <AudioSampleBuffer> testSound; ScopedPointer<AudioSampleBuffer> testSound;
int testSoundPosition; int testSoundPosition;
AudioSampleBuffer tempBuffer; AudioSampleBuffer tempBuffer;
StringArray midiInsFromXml; StringArray midiInsFromXml;
OwnedArray <MidiInput> enabledMidiInputs; OwnedArray<MidiInput> enabledMidiInputs;
Array <MidiInputCallback*> midiCallbacks; Array<MidiInputCallback*> midiCallbacks;
StringArray midiCallbackDevices; StringArray midiCallbackDevices;
String defaultMidiOutputName; String defaultMidiOutputName;
ScopedPointer <MidiOutput> defaultMidiOutput; ScopedPointer<MidiOutput> defaultMidiOutput;
CriticalSection audioCallbackLock, midiCallbackLock; CriticalSection audioCallbackLock, midiCallbackLock;
double cpuUsageMs, timeToCpuScale; double cpuUsageMs, timeToCpuScale;
@ -500,6 +504,9 @@ private:
double chooseBestSampleRate (double preferred) const; double chooseBestSampleRate (double preferred) const;
int chooseBestBufferSize (int preferred) const; int chooseBestBufferSize (int preferred) const;
void insertDefaultDeviceNames (AudioDeviceSetup&) const; void insertDefaultDeviceNames (AudioDeviceSetup&) const;
String initialiseDefault (const String& preferredDefaultDeviceName, const AudioDeviceSetup*);
String initialiseFromXML (const XmlElement&, bool selectDefaultDeviceOnFailure,
const String& preferredDefaultDeviceName, const AudioDeviceSetup*);
AudioIODeviceType* findType (const String& inputName, const String& outputName); AudioIODeviceType* findType (const String& inputName, const String& outputName);
AudioIODeviceType* findType (const String& typeName); AudioIODeviceType* findType (const String& typeName);

@ -502,13 +502,9 @@ public:
outputNames.clear(); outputNames.clear();
outputIds.clear(); outputIds.clear();
if (juce_libjackHandle == nullptr) if (juce_libjackHandle == nullptr) juce_libjackHandle = dlopen ("libjack.so.0", RTLD_LAZY);
{ if (juce_libjackHandle == nullptr) juce_libjackHandle = dlopen ("libjack.so", RTLD_LAZY);
juce_libjackHandle = dlopen ("libjack.so", RTLD_LAZY); if (juce_libjackHandle == nullptr) return;
if (juce_libjackHandle == nullptr)
return;
}
jack_status_t status; jack_status_t status;

@ -98,7 +98,7 @@ static void fillDescriptionWith (PluginDescription& description, ObjectType& obj
description.version = toString (object.version).trim(); description.version = toString (object.version).trim();
description.category = toString (object.subCategories).trim(); description.category = toString (object.subCategories).trim();
if (description.manufacturerName.isEmpty()) if (description.manufacturerName.trim().isEmpty())
description.manufacturerName = toString (object.vendor).trim(); description.manufacturerName = toString (object.vendor).trim();
} }
@ -459,13 +459,13 @@ public:
{ {
*obj = nullptr; *obj = nullptr;
if (! doIdsMatch (cid, iid)) if (! doUIDsMatch (cid, iid))
{ {
jassertfalse; jassertfalse;
return kInvalidArgument; return kInvalidArgument;
} }
if (doIdsMatch (cid, Vst::IMessage::iid) && doIdsMatch (iid, Vst::IMessage::iid)) if (doUIDsMatch (cid, Vst::IMessage::iid) && doUIDsMatch (iid, Vst::IMessage::iid))
{ {
ComSmartPtr<Message> m (new Message (*this, attributeList)); ComSmartPtr<Message> m (new Message (*this, attributeList));
messageQueue.add (m); messageQueue.add (m);
@ -473,7 +473,7 @@ public:
*obj = m; *obj = m;
return kResultOk; return kResultOk;
} }
else if (doIdsMatch (cid, Vst::IAttributeList::iid) && doIdsMatch (iid, Vst::IAttributeList::iid)) else if (doUIDsMatch (cid, Vst::IAttributeList::iid) && doUIDsMatch (iid, Vst::IAttributeList::iid))
{ {
ComSmartPtr<AttributeList> l (new AttributeList (this)); ComSmartPtr<AttributeList> l (new AttributeList (this));
l->addRef(); l->addRef();
@ -526,7 +526,7 @@ public:
//============================================================================== //==============================================================================
tresult PLUGIN_API queryInterface (const TUID iid, void** obj) override tresult PLUGIN_API queryInterface (const TUID iid, void** obj) override
{ {
if (doIdsMatch (iid, Vst::IAttributeList::iid)) if (doUIDsMatch (iid, Vst::IAttributeList::iid))
{ {
*obj = attributeList.get(); *obj = attributeList.get();
return kResultOk; return kResultOk;
@ -539,6 +539,7 @@ public:
TEST_FOR_AND_RETURN_IF_VALID (Vst::IHostApplication) TEST_FOR_AND_RETURN_IF_VALID (Vst::IHostApplication)
TEST_FOR_AND_RETURN_IF_VALID (Vst::IParamValueQueue) TEST_FOR_AND_RETURN_IF_VALID (Vst::IParamValueQueue)
TEST_FOR_AND_RETURN_IF_VALID (Vst::IUnitHandler) TEST_FOR_AND_RETURN_IF_VALID (Vst::IUnitHandler)
TEST_FOR_COMMON_BASE_AND_RETURN_IF_VALID (FUnknown, Vst::IComponentHandler)
*obj = nullptr; *obj = nullptr;
return kNotImplemented; return kNotImplemented;
@ -550,12 +551,6 @@ private:
String appName; String appName;
VST3PluginInstance* owner; VST3PluginInstance* owner;
//==============================================================================
static bool doIdsMatch (const TUID a, const TUID b) noexcept
{
return std::memcmp (a, b, sizeof (TUID)) == 0;
}
//============================================================================== //==============================================================================
class Message : public Vst::IMessage class Message : public Vst::IMessage
{ {
@ -1206,7 +1201,7 @@ public:
setOpaque (true); setOpaque (true);
setVisible (true); setVisible (true);
view->setFrame (this); warnOnFailure (view->setFrame (this));
ViewRect rect; ViewRect rect;
warnOnFailure (view->getSize (&rect)); warnOnFailure (view->getSize (&rect));
@ -1215,7 +1210,7 @@ public:
~VST3PluginWindow() ~VST3PluginWindow()
{ {
view->removed(); warnOnFailure (view->removed());
getAudioProcessor()->editorBeingDeleted (this); getAudioProcessor()->editorBeingDeleted (this);
#if JUCE_MAC #if JUCE_MAC
@ -1273,7 +1268,7 @@ public:
} }
else else
{ {
view->getSize (&rect); warnOnFailure (view->getSize (&rect));
} }
#if JUCE_WINDOWS #if JUCE_WINDOWS
@ -1485,12 +1480,6 @@ public:
{ {
using namespace Vst; using namespace Vst;
const int numInputs = getNumInputChannels();
const int numOutputs = getNumOutputChannels();
// Needed for having the same sample rate in processBlock(); some plugins need this!
setPlayConfigDetails (numInputs, numOutputs, sampleRate, estimatedSamplesPerBlock);
ProcessSetup setup; ProcessSetup setup;
setup.symbolicSampleSize = kSample32; setup.symbolicSampleSize = kSample32;
setup.maxSamplesPerBlock = estimatedSamplesPerBlock; setup.maxSamplesPerBlock = estimatedSamplesPerBlock;
@ -1504,16 +1493,28 @@ public:
editController->setComponentHandler (host); editController->setComponentHandler (host);
setStateForAllBusses (true);
Array<SpeakerArrangement> inArrangements, outArrangements; Array<SpeakerArrangement> inArrangements, outArrangements;
fillWithCorrespondingSpeakerArrangements (inArrangements, numInputs); for (int i = 0; i < numInputAudioBusses; ++i)
fillWithCorrespondingSpeakerArrangements (outArrangements, numOutputs); inArrangements.add (getArrangementForNumChannels (jmax (0, (int) getBusInfo (true, true, i).channelCount)));
for (int i = 0; i < numOutputAudioBusses; ++i)
outArrangements.add (getArrangementForNumChannels (jmax (0, (int) getBusInfo (false, true, i).channelCount)));
warnOnFailure (processor->setBusArrangements (inArrangements.getRawDataPointer(), numInputAudioBusses, warnOnFailure (processor->setBusArrangements (inArrangements.getRawDataPointer(), numInputAudioBusses,
outArrangements.getRawDataPointer(), numOutputAudioBusses)); outArrangements.getRawDataPointer(), numOutputAudioBusses));
// Update the num. busses in case the configuration has been modified by the plugin. (May affect number of channels!):
numInputAudioBusses = getNumSingleDirectionBussesFor (component, true, true);
numOutputAudioBusses = getNumSingleDirectionBussesFor (component, false, true);
// Needed for having the same sample rate in processBlock(); some plugins need this!
setPlayConfigDetails (getNumSingleDirectionChannelsFor (component, true, true),
getNumSingleDirectionChannelsFor (component, false, true),
sampleRate, estimatedSamplesPerBlock);
setStateForAllBusses (true);
warnOnFailure (component->setActive (true)); warnOnFailure (component->setActive (true));
warnOnFailure (processor->setProcessing (true)); warnOnFailure (processor->setProcessing (true));
} }

@ -102,7 +102,7 @@ public:
/** True if the plug-in is part of a multi-type container, e.g. a VST Shell. */ /** True if the plug-in is part of a multi-type container, e.g. a VST Shell. */
bool hasSharedContainer; bool hasSharedContainer;
/** Returns true if the two descriptions refer the the same plug-in. /** Returns true if the two descriptions refer to the same plug-in.
This isn't quite as simple as them just having the same file (because of This isn't quite as simple as them just having the same file (because of
shell plug-ins). shell plug-ins).

@ -76,14 +76,14 @@ public:
/** Changes or adds a named value. /** Changes or adds a named value.
@returns true if a value was changed or added; false if the @returns true if a value was changed or added; false if the
value was already set the the value passed-in. value was already set the value passed-in.
*/ */
bool set (Identifier name, const var& newValue); bool set (Identifier name, const var& newValue);
#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
/** Changes or adds a named value. /** Changes or adds a named value.
@returns true if a value was changed or added; false if the @returns true if a value was changed or added; false if the
value was already set the the value passed-in. value was already set the value passed-in.
*/ */
bool set (Identifier name, var&& newValue); bool set (Identifier name, var&& newValue);
#endif #endif

@ -64,7 +64,7 @@
//============================================================================= //=============================================================================
/** Config: JUCE_LOG_ASSERTIONS /** Config: JUCE_LOG_ASSERTIONS
If this flag is enabled, the the jassert and jassertfalse macros will always use Logger::writeToLog() If this flag is enabled, the jassert and jassertfalse macros will always use Logger::writeToLog()
to write a message when an assertion happens. to write a message when an assertion happens.
Enabling it will also leave this turned on in release builds. When it's disabled, Enabling it will also leave this turned on in release builds. When it's disabled,

@ -251,7 +251,7 @@ extern AndroidSystem android;
class ThreadLocalJNIEnvHolder class ThreadLocalJNIEnvHolder
{ {
public: public:
ThreadLocalJNIEnvHolder() ThreadLocalJNIEnvHolder() noexcept
: jvm (nullptr) : jvm (nullptr)
{ {
zeromem (threads, sizeof (threads)); zeromem (threads, sizeof (threads));
@ -269,18 +269,19 @@ public:
addEnv (env); addEnv (env);
} }
JNIEnv* attach() JNIEnv* attach() noexcept
{ {
JNIEnv* env = nullptr; if (JNIEnv* env = attachToCurrentThread())
jvm->AttachCurrentThread (&env, nullptr); {
SpinLock::ScopedLockType sl (addRemoveLock);
if (env != nullptr) return addEnv (env);
addEnv (env); }
return env; jassertfalse;
return nullptr;
} }
void detach() void detach() noexcept
{ {
jvm->DetachCurrentThread(); jvm->DetachCurrentThread();
@ -294,54 +295,61 @@ public:
JNIEnv* getOrAttach() noexcept JNIEnv* getOrAttach() noexcept
{ {
JNIEnv* env = get(); if (JNIEnv* env = get())
return env;
if (env == nullptr) SpinLock::ScopedLockType sl (addRemoveLock);
env = attach();
jassert (env != nullptr); if (JNIEnv* env = get())
return env; return env;
}
JNIEnv* get() const noexcept if (JNIEnv* env = attachToCurrentThread())
{ return addEnv (env);
const pthread_t thisThread = pthread_self();
for (int i = 0; i < maxThreads; ++i)
if (threads[i] == thisThread)
return envs[i];
return nullptr; return nullptr;
} }
enum { maxThreads = 32 };
private: private:
JavaVM* jvm; JavaVM* jvm;
enum { maxThreads = 32 };
pthread_t threads [maxThreads]; pthread_t threads [maxThreads];
JNIEnv* envs [maxThreads]; JNIEnv* envs [maxThreads];
SpinLock addRemoveLock; SpinLock addRemoveLock;
void addEnv (JNIEnv* env) JNIEnv* addEnv (JNIEnv* env) noexcept
{ {
SpinLock::ScopedLockType sl (addRemoveLock); const pthread_t thisThread = pthread_self();
if (get() == nullptr) for (int i = 0; i < maxThreads; ++i)
{ {
const pthread_t thisThread = pthread_self(); if (threads[i] == 0)
for (int i = 0; i < maxThreads; ++i)
{ {
if (threads[i] == 0) envs[i] = env;
{ threads[i] = thisThread;
envs[i] = env; return env;
threads[i] = thisThread;
return;
}
} }
} }
jassertfalse; // too many threads! jassertfalse; // too many threads!
return nullptr;
}
JNIEnv* get() const noexcept
{
const pthread_t thisThread = pthread_self();
for (int i = 0; i < maxThreads; ++i)
if (threads[i] == thisThread)
return envs[i];
return nullptr;
}
JNIEnv* attachToCurrentThread()
{
JNIEnv* env = nullptr;
jvm->AttachCurrentThread (&env, nullptr);
return env;
} }
}; };

@ -226,7 +226,7 @@ public:
//============================================================================== //==============================================================================
/** Sets the string that will be written to the stream when the writeNewLine() /** Sets the string that will be written to the stream when the writeNewLine()
method is called. method is called.
By default this will be set the the value of NewLine::getDefault(). By default this will be set the value of NewLine::getDefault().
*/ */
void setNewLineString (const String& newLineString); void setNewLineString (const String& newLineString);

@ -1230,7 +1230,12 @@ Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font)
Typeface::Ptr Typeface::createSystemTypefaceFor (const void* data, size_t dataSize) Typeface::Ptr Typeface::createSystemTypefaceFor (const void* data, size_t dataSize)
{ {
#if JUCE_CORETEXT_AVAILABLE
return new OSXTypeface (data, dataSize); return new OSXTypeface (data, dataSize);
#else
jassertfalse; // You need CoreText enabled to use this feature!
return nullptr;
#endif
} }
void Typeface::scanFolderForFonts (const File&) void Typeface::scanFolderForFonts (const File&)

@ -326,12 +326,12 @@ public:
void getVisibleArea (RectangleList<int>& result, bool includeSiblings) const; void getVisibleArea (RectangleList<int>& result, bool includeSiblings) const;
//============================================================================== //==============================================================================
/** Returns this component's x coordinate relative the the screen's top-left origin. /** Returns this component's x coordinate relative the screen's top-left origin.
@see getX, localPointToGlobal @see getX, localPointToGlobal
*/ */
int getScreenX() const; int getScreenX() const;
/** Returns this component's y coordinate relative the the screen's top-left origin. /** Returns this component's y coordinate relative the screen's top-left origin.
@see getY, localPointToGlobal @see getY, localPointToGlobal
*/ */
int getScreenY() const; int getScreenY() const;

@ -1,14 +1,14 @@
Dexed FM Synth Software Emulator Dexed - FM Synth Plugin
================================ =======================
Dexed is a multi platform, multi format plugin synth that is closely modeled on the Yamaha DX7. Dexed is a multi platform, multi format plugin synth that is closely modeled on the Yamaha DX7.
Under the hood it uses [music-synthesizer-for-android](https://code.google.com/p/music-synthesizer-for-android) Under the hood it uses [music-synthesizer-for-android](https://code.google.com/p/music-synthesizer-for-android)
for the synth engine and [JUCE](http://wwww.juce.com) as a plugin wrapper. for the synth engine and [JUCE](http://wwww.juce.com) as a plugin wrapper.
The goal of this project is to be a great tool/companion for the original DX7. Yes, the sound engine The goal of this project is to be a great tool/companion for the original DX7. Sound engine
with 'float' value parameters; different waveform (à la TX81z) would be great but anything that with 'float' value parameters, different waveform à la TX81z would be great but anything that
goes beyond the DX7 should will be a fork of this project. This is to keep the compatiblity with goes beyond the DX7 should and will be a fork of this project. This is to keep the compatiblity with
the original synth. the original DX7.
Dexed is licensed on the GPL v2. The msfa component (acronym for music synthesizer for android, see msfa Dexed is licensed on the GPL v2. The msfa component (acronym for music synthesizer for android, see msfa
in the source folder) stays on the Apache 2.0 license to able to collaborate between projects. in the source folder) stays on the Apache 2.0 license to able to collaborate between projects.
@ -31,10 +31,10 @@ in normal operation it shouldn't crash and the VST state saving works.
Using as a DX7 editor Using as a DX7 editor
--------------------- ---------------------
This plugin can process original DX7 messages. If you change a parameter, it will send the This plugin can process original DX7 sysex messages. If you change a parameter,
corresponding DX7 sysex to midi out. Not all DAW supports sysex; for example it will send the corresponding DX7 sysex to midi out. Not all DAW supports
Ableton Live simply discard any sysex data. Reaper does process midi out, but doesn't pass any sysex; for example Ableton Live simply discard any sysex data. Reaper does
midi in sysex input data to the plugin. process midi out, but doesn't pass any midi in sysex input data to the plugin.
Randomized programs Randomized programs
------------------- -------------------

@ -29,17 +29,17 @@
//============================================================================== //==============================================================================
GlobalEditor::GlobalEditor () GlobalEditor::GlobalEditor ()
{ {
addAndMakeVisible (lfoType = new ComboBox ("new combo box")); addAndMakeVisible (lfoType = new ComboBox ("lfoType"));
lfoType->setEditableText (false); lfoType->setEditableText (false);
lfoType->setJustificationType (Justification::centredLeft); lfoType->setJustificationType (Justification::centredLeft);
lfoType->setTextWhenNothingSelected (String::empty); lfoType->setTextWhenNothingSelected (String::empty);
lfoType->setTextWhenNoChoicesAvailable ("(no choices)"); lfoType->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
lfoType->addItem ("TRIANGLE", 1); lfoType->addItem (TRANS("TRIANGLE"), 1);
lfoType->addItem ("SAW DOWN", 2); lfoType->addItem (TRANS("SAW DOWN"), 2);
lfoType->addItem ("SAW UP", 3); lfoType->addItem (TRANS("SAW UP"), 3);
lfoType->addItem ("SQUARE", 4); lfoType->addItem (TRANS("SQUARE"), 4);
lfoType->addItem ("SINE", 5); lfoType->addItem (TRANS("SINE"), 5);
lfoType->addItem ("S&HOLD", 6); lfoType->addItem (TRANS("S&HOLD"), 6);
lfoType->addListener (this); lfoType->addListener (this);
addAndMakeVisible (lfoSpeed = new Slider ("lfoSpeed")); addAndMakeVisible (lfoSpeed = new Slider ("lfoSpeed"));
@ -48,13 +48,13 @@ GlobalEditor::GlobalEditor ()
lfoSpeed->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoSpeed->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
lfoSpeed->addListener (this); lfoSpeed->addListener (this);
addAndMakeVisible (lfoAmDepth = new Slider ("new slider")); addAndMakeVisible (lfoAmDepth = new Slider ("lfoAmDepth"));
lfoAmDepth->setRange (0, 99, 1); lfoAmDepth->setRange (0, 99, 1);
lfoAmDepth->setSliderStyle (Slider::Rotary); lfoAmDepth->setSliderStyle (Slider::Rotary);
lfoAmDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoAmDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
lfoAmDepth->addListener (this); lfoAmDepth->addListener (this);
addAndMakeVisible (lfoPitchDepth = new Slider ("new slider")); addAndMakeVisible (lfoPitchDepth = new Slider ("lfoPitchDepth"));
lfoPitchDepth->setRange (0, 99, 1); lfoPitchDepth->setRange (0, 99, 1);
lfoPitchDepth->setSliderStyle (Slider::Rotary); lfoPitchDepth->setSliderStyle (Slider::Rotary);
lfoPitchDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoPitchDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
@ -127,7 +127,7 @@ GlobalEditor::GlobalEditor ()
pitchLevel1->addListener (this); pitchLevel1->addListener (this);
addAndMakeVisible (transpose = new Slider ("transpose")); addAndMakeVisible (transpose = new Slider ("transpose"));
transpose->setRange (0, 49, 0); transpose->setRange (0, 48, 0);
transpose->setSliderStyle (Slider::LinearVertical); transpose->setSliderStyle (Slider::LinearVertical);
transpose->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); transpose->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
transpose->addListener (this); transpose->addListener (this);
@ -234,24 +234,24 @@ void GlobalEditor::resized()
{ {
lfoType->setBounds (624, 40, 96, 16); lfoType->setBounds (624, 40, 96, 16);
lfoSpeed->setBounds (624, 16, 96, 16); lfoSpeed->setBounds (624, 16, 96, 16);
lfoAmDepth->setBounds (696, 64, 24, 24); lfoAmDepth->setBounds (672, 64, 24, 24);
lfoPitchDepth->setBounds (648, 64, 24, 24); lfoPitchDepth->setBounds (648, 64, 24, 24);
lfoDelay->setBounds (672, 64, 24, 24); lfoDelay->setBounds (624, 64, 24, 24);
cutoff->setBounds (8, 40, 48, 48); cutoff->setBounds (8, 40, 48, 48);
reso->setBounds (64, 40, 48, 48); reso->setBounds (64, 40, 48, 48);
pitchRate2->setBounds (776, 64, 32, 24); pitchRate2->setBounds (752, 64, 32, 24);
pitchRate3->setBounds (800, 64, 32, 24); pitchRate3->setBounds (776, 64, 32, 24);
pitchRate4->setBounds (824, 64, 32, 24); pitchRate4->setBounds (800, 64, 32, 24);
pitchRate1->setBounds (752, 64, 32, 24); pitchRate1->setBounds (728, 64, 32, 24);
pitchLevel2->setBounds (776, 40, 32, 24); pitchLevel2->setBounds (752, 40, 32, 24);
pitchLevel3->setBounds (800, 40, 32, 24); pitchLevel3->setBounds (776, 40, 32, 24);
pitchLevel4->setBounds (824, 40, 32, 24); pitchLevel4->setBounds (800, 40, 32, 24);
pitchLevel1->setBounds (752, 40, 32, 24); pitchLevel1->setBounds (728, 40, 32, 24);
transpose->setBounds (728, 0, 24, 56); transpose->setBounds (832, 0, 24, 88);
oscSync->setBounds (600, 64, 24, 24); oscSync->setBounds (600, 64, 24, 24);
pitchModSens->setBounds (728, 64, 24, 24); pitchModSens->setBounds (696, 64, 24, 24);
lfoSync->setBounds (624, 64, 24, 24); lfoSync->setBounds (600, 40, 24, 24);
pitchEnvDisplay->setBounds (752, 8, 96, 32); pitchEnvDisplay->setBounds (728, 8, 96, 32);
algoDisplay->setBounds (442, 8, 152, 74); algoDisplay->setBounds (442, 8, 152, 74);
feedback->setBounds (568, 32, 24, 24); feedback->setBounds (568, 32, 24, 24);
algo->setBounds (568, 8, 24, 24); algo->setBounds (568, 8, 24, 24);
@ -451,24 +451,24 @@ BEGIN_JUCER_METADATA
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330" snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="1" initialWidth="855" initialHeight="90"> fixedSize="1" initialWidth="855" initialHeight="90">
<BACKGROUND backgroundColour="ffffff"/> <BACKGROUND backgroundColour="ffffff"/>
<COMBOBOX name="new combo box" id="31018596af3b34e9" memberName="lfoType" <COMBOBOX name="lfoType" id="31018596af3b34e9" memberName="lfoType" virtualName=""
virtualName="" explicitFocusOrder="0" pos="624 40 96 16" editable="0" explicitFocusOrder="0" pos="624 40 96 16" editable="0" layout="33"
layout="33" items="TRIANGLE&#10;SAW DOWN&#10;SAW UP&#10;SQUARE&#10;SINE&#10;S&amp;HOLD" items="TRIANGLE&#10;SAW DOWN&#10;SAW UP&#10;SQUARE&#10;SINE&#10;S&amp;HOLD"
textWhenNonSelected="" textWhenNoItems="(no choices)"/> textWhenNonSelected="" textWhenNoItems="(no choices)"/>
<SLIDER name="lfoSpeed" id="b10eaf327ab3bff5" memberName="lfoSpeed" virtualName="" <SLIDER name="lfoSpeed" id="b10eaf327ab3bff5" memberName="lfoSpeed" virtualName=""
explicitFocusOrder="0" pos="624 16 96 16" min="0" max="99" int="1" explicitFocusOrder="0" pos="624 16 96 16" min="0" max="99" int="1"
style="LinearHorizontal" textBoxPos="NoTextBox" textBoxEditable="1" style="LinearHorizontal" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="new slider" id="3e95a6206fa4a891" memberName="lfoAmDepth" <SLIDER name="lfoAmDepth" id="3e95a6206fa4a891" memberName="lfoAmDepth"
virtualName="" explicitFocusOrder="0" pos="696 64 24 24" min="0" virtualName="" explicitFocusOrder="0" pos="672 64 24 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="new slider" id="6ead769ca786c813" memberName="lfoPitchDepth" <SLIDER name="lfoPitchDepth" id="6ead769ca786c813" memberName="lfoPitchDepth"
virtualName="" explicitFocusOrder="0" pos="648 64 24 24" min="0" virtualName="" explicitFocusOrder="0" pos="648 64 24 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="lfoDelay" id="1fce68dc81619ef5" memberName="lfoDelay" virtualName="" <SLIDER name="lfoDelay" id="1fce68dc81619ef5" memberName="lfoDelay" virtualName=""
explicitFocusOrder="0" pos="672 64 24 24" min="0" max="99" int="1" explicitFocusOrder="0" pos="624 64 24 24" min="0" max="99" int="1"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="cutoff" id="40531f16bb0bd225" memberName="cutoff" virtualName="" <SLIDER name="cutoff" id="40531f16bb0bd225" memberName="cutoff" virtualName=""
@ -480,53 +480,53 @@ BEGIN_JUCER_METADATA
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchRate2" id="73f386b3c91d3de4" memberName="pitchRate2" <SLIDER name="pitchRate2" id="73f386b3c91d3de4" memberName="pitchRate2"
virtualName="" explicitFocusOrder="0" pos="776 64 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="752 64 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchRate3" id="187c25b24413fccf" memberName="pitchRate3" <SLIDER name="pitchRate3" id="187c25b24413fccf" memberName="pitchRate3"
virtualName="" explicitFocusOrder="0" pos="800 64 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="776 64 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchRate4" id="1aeb2a8fbbcbeaab" memberName="pitchRate4" <SLIDER name="pitchRate4" id="1aeb2a8fbbcbeaab" memberName="pitchRate4"
virtualName="" explicitFocusOrder="0" pos="824 64 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="800 64 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchRate1" id="419d613b3fb9604e" memberName="pitchRate1" <SLIDER name="pitchRate1" id="419d613b3fb9604e" memberName="pitchRate1"
virtualName="" explicitFocusOrder="0" pos="752 64 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="728 64 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchLevel2" id="3a355ad2221887d9" memberName="pitchLevel2" <SLIDER name="pitchLevel2" id="3a355ad2221887d9" memberName="pitchLevel2"
virtualName="" explicitFocusOrder="0" pos="776 40 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="752 40 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchLevel3" id="5c5d782e8a7f3ad7" memberName="pitchLevel3" <SLIDER name="pitchLevel3" id="5c5d782e8a7f3ad7" memberName="pitchLevel3"
virtualName="" explicitFocusOrder="0" pos="800 40 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="776 40 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchLevel4" id="eb900b141fbad8ff" memberName="pitchLevel4" <SLIDER name="pitchLevel4" id="eb900b141fbad8ff" memberName="pitchLevel4"
virtualName="" explicitFocusOrder="0" pos="824 40 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="800 40 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchLevel1" id="344cbe26ec9fa128" memberName="pitchLevel1" <SLIDER name="pitchLevel1" id="344cbe26ec9fa128" memberName="pitchLevel1"
virtualName="" explicitFocusOrder="0" pos="752 40 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="728 40 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="transpose" id="7d1266b1c1534947" memberName="transpose" <SLIDER name="transpose" id="7d1266b1c1534947" memberName="transpose"
virtualName="" explicitFocusOrder="0" pos="728 0 24 56" min="0" virtualName="" explicitFocusOrder="0" pos="832 0 24 88" min="0"
max="49" int="0" style="LinearVertical" textBoxPos="NoTextBox" max="48" int="0" style="LinearVertical" textBoxPos="NoTextBox"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="oscSync" id="8f3fe641537cd00" memberName="oscSync" virtualName="" <TOGGLEBUTTON name="oscSync" id="8f3fe641537cd00" memberName="oscSync" virtualName=""
explicitFocusOrder="0" pos="600 64 24 24" buttonText="" connectedEdges="0" explicitFocusOrder="0" pos="600 64 24 24" buttonText="" connectedEdges="0"
needsCallback="0" radioGroupId="0" state="0"/> needsCallback="0" radioGroupId="0" state="0"/>
<SLIDER name="pitchModSens" id="904f73df85a9f886" memberName="pitchModSens" <SLIDER name="pitchModSens" id="904f73df85a9f886" memberName="pitchModSens"
virtualName="" explicitFocusOrder="0" pos="728 64 24 24" min="0" virtualName="" explicitFocusOrder="0" pos="696 64 24 24" min="0"
max="7" int="0" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="7" int="0" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="lfoSync" id="ff92bb0a5a4f7187" memberName="lfoSync" virtualName="" <TOGGLEBUTTON name="lfoSync" id="ff92bb0a5a4f7187" memberName="lfoSync" virtualName=""
explicitFocusOrder="0" pos="624 64 24 24" buttonText="" connectedEdges="0" explicitFocusOrder="0" pos="600 40 24 24" buttonText="" connectedEdges="0"
needsCallback="0" radioGroupId="0" state="0"/> needsCallback="0" radioGroupId="0" state="0"/>
<GENERICCOMPONENT name="pitchEnvDisplay" id="9ddaae8ef924a038" memberName="pitchEnvDisplay" <GENERICCOMPONENT name="pitchEnvDisplay" id="9ddaae8ef924a038" memberName="pitchEnvDisplay"
virtualName="" explicitFocusOrder="0" pos="752 8 96 32" class="PitchEnvDisplay" virtualName="" explicitFocusOrder="0" pos="728 8 96 32" class="PitchEnvDisplay"
params=""/> params=""/>
<GENERICCOMPONENT name="algoDisplay" id="b26fb9e3b5f0bc37" memberName="algoDisplay" <GENERICCOMPONENT name="algoDisplay" id="b26fb9e3b5f0bc37" memberName="algoDisplay"
virtualName="" explicitFocusOrder="0" pos="442 8 152 74" class="AlgoDisplay" virtualName="" explicitFocusOrder="0" pos="442 8 152 74" class="AlgoDisplay"

@ -81,9 +81,9 @@ OperatorEditor::OperatorEditor ()
opMode->setEditableText (false); opMode->setEditableText (false);
opMode->setJustificationType (Justification::centredLeft); opMode->setJustificationType (Justification::centredLeft);
opMode->setTextWhenNothingSelected (String::empty); opMode->setTextWhenNothingSelected (String::empty);
opMode->setTextWhenNoChoicesAvailable ("(no choices)"); opMode->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
opMode->addItem ("RATIO", 1); opMode->addItem (TRANS("RATIO"), 1);
opMode->addItem ("FIXED", 2); opMode->addItem (TRANS("FIXED"), 2);
opMode->addListener (this); opMode->addListener (this);
addAndMakeVisible (opLevel = new Slider ("opLevel")); addAndMakeVisible (opLevel = new Slider ("opLevel"));
@ -105,7 +105,7 @@ OperatorEditor::OperatorEditor ()
opCoarse->addListener (this); opCoarse->addListener (this);
addAndMakeVisible (khzDisplay = new Label ("khz", addAndMakeVisible (khzDisplay = new Label ("khz",
"1,000 kHz")); TRANS("1,000 kHz")));
khzDisplay->setFont (Font (11.00f, Font::plain)); khzDisplay->setFont (Font (11.00f, Font::plain));
khzDisplay->setJustificationType (Justification::centred); khzDisplay->setJustificationType (Justification::centred);
khzDisplay->setEditable (false, false, false); khzDisplay->setEditable (false, false, false);
@ -125,14 +125,14 @@ OperatorEditor::OperatorEditor ()
envDisplay->setName ("envDisplay"); envDisplay->setName ("envDisplay");
addAndMakeVisible (sclLeftLevel = new Slider ("sclLeftLevel")); addAndMakeVisible (sclLeftLevel = new Slider ("sclLeftLevel"));
sclLeftLevel->setTooltip ("Keyboard Scale Level Left Depth "); sclLeftLevel->setTooltip (TRANS("Keyboard Scale Level Left Depth "));
sclLeftLevel->setRange (0, 99, 1); sclLeftLevel->setRange (0, 99, 1);
sclLeftLevel->setSliderStyle (Slider::Rotary); sclLeftLevel->setSliderStyle (Slider::Rotary);
sclLeftLevel->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); sclLeftLevel->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
sclLeftLevel->addListener (this); sclLeftLevel->addListener (this);
addAndMakeVisible (sclRightLevel = new Slider ("sclRightLevel")); addAndMakeVisible (sclRightLevel = new Slider ("sclRightLevel"));
sclRightLevel->setTooltip ("Keyboard Scale Level Right Depth "); sclRightLevel->setTooltip (TRANS("Keyboard Scale Level Right Depth "));
sclRightLevel->setRange (0, 99, 1); sclRightLevel->setRange (0, 99, 1);
sclRightLevel->setSliderStyle (Slider::Rotary); sclRightLevel->setSliderStyle (Slider::Rotary);
sclRightLevel->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); sclRightLevel->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
@ -142,33 +142,33 @@ OperatorEditor::OperatorEditor ()
kbdLeftCurve->setEditableText (false); kbdLeftCurve->setEditableText (false);
kbdLeftCurve->setJustificationType (Justification::centredLeft); kbdLeftCurve->setJustificationType (Justification::centredLeft);
kbdLeftCurve->setTextWhenNothingSelected (String::empty); kbdLeftCurve->setTextWhenNothingSelected (String::empty);
kbdLeftCurve->setTextWhenNoChoicesAvailable ("(no choices)"); kbdLeftCurve->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
kbdLeftCurve->addItem ("-LN", 1); kbdLeftCurve->addItem (TRANS("-LN"), 1);
kbdLeftCurve->addItem ("-EX", 2); kbdLeftCurve->addItem (TRANS("-EX"), 2);
kbdLeftCurve->addItem ("+EX", 3); kbdLeftCurve->addItem (TRANS("+EX"), 3);
kbdLeftCurve->addItem ("+LN", 4); kbdLeftCurve->addItem (TRANS("+LN"), 4);
kbdLeftCurve->addListener (this); kbdLeftCurve->addListener (this);
addAndMakeVisible (kbdRightCurve = new ComboBox ("kbdRightCurve")); addAndMakeVisible (kbdRightCurve = new ComboBox ("kbdRightCurve"));
kbdRightCurve->setEditableText (false); kbdRightCurve->setEditableText (false);
kbdRightCurve->setJustificationType (Justification::centredLeft); kbdRightCurve->setJustificationType (Justification::centredLeft);
kbdRightCurve->setTextWhenNothingSelected (String::empty); kbdRightCurve->setTextWhenNothingSelected (String::empty);
kbdRightCurve->setTextWhenNoChoicesAvailable ("(no choices)"); kbdRightCurve->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
kbdRightCurve->addItem ("-LN", 1); kbdRightCurve->addItem (TRANS("-LN"), 1);
kbdRightCurve->addItem ("-EX", 2); kbdRightCurve->addItem (TRANS("-EX"), 2);
kbdRightCurve->addItem ("+EX", 3); kbdRightCurve->addItem (TRANS("+EX"), 3);
kbdRightCurve->addItem ("+LN", 4); kbdRightCurve->addItem (TRANS("+LN"), 4);
kbdRightCurve->addListener (this); kbdRightCurve->addListener (this);
addAndMakeVisible (sclLvlBrkPt = new Slider ("sclLvlBrkPt")); addAndMakeVisible (sclLvlBrkPt = new Slider ("sclLvlBrkPt"));
sclLvlBrkPt->setTooltip ("Scale Level Breakpoint"); sclLvlBrkPt->setTooltip (TRANS("Scale Level Breakpoint"));
sclLvlBrkPt->setRange (0, 99, 1); sclLvlBrkPt->setRange (0, 99, 1);
sclLvlBrkPt->setSliderStyle (Slider::Rotary); sclLvlBrkPt->setSliderStyle (Slider::Rotary);
sclLvlBrkPt->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); sclLvlBrkPt->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
sclLvlBrkPt->addListener (this); sclLvlBrkPt->addListener (this);
addAndMakeVisible (sclRateScaling = new Slider ("sclRateScaling")); addAndMakeVisible (sclRateScaling = new Slider ("sclRateScaling"));
sclRateScaling->setTooltip ("Keyboard Rate Scaling"); sclRateScaling->setTooltip (TRANS("Keyboard Rate Scaling"));
sclRateScaling->setRange (0, 7, 1); sclRateScaling->setRange (0, 7, 1);
sclRateScaling->setSliderStyle (Slider::Rotary); sclRateScaling->setSliderStyle (Slider::Rotary);
sclRateScaling->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); sclRateScaling->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);

@ -432,5 +432,22 @@ const String DexedAudioProcessor::getParameterText(int index) {
return ctrl[index]->getValueDisplay(); return ctrl[index]->getValueDisplay();
} }
void DexedAudioProcessor::loadPreference() {
PropertiesFile prop(prefOptions);
if ( ! prop.isValidFile() ) {
return;
}
if ( prop.containsKey( String("normalizeDxVelocity") ) ) {
normalizeDxVelocity = prop.getIntValue( String("normalizeDxVelocity") );
}
}
void DexedAudioProcessor::savePreference() {
PropertiesFile prop(prefOptions);
prop.setValue(String("normalizeDxVelocity"), normalizeDxVelocity);
prop.save();
}

@ -53,6 +53,11 @@ DexedAudioProcessor::DexedAudioProcessor() {
normalizeDxVelocity = false; normalizeDxVelocity = false;
memset(&voiceStatus, 0, sizeof(VoiceStatus)); memset(&voiceStatus, 0, sizeof(VoiceStatus));
prefOptions.applicationName = String("Dexed");
prefOptions.filenameSuffix = String("xml");
prefOptions.folderName = String("DigitalSuburban");
prefOptions.osxLibrarySubFolder = String("Application Support");
} }
DexedAudioProcessor::~DexedAudioProcessor() { DexedAudioProcessor::~DexedAudioProcessor() {

@ -94,9 +94,10 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater
* to update the UI / hostdata * to update the UI / hostdata
*/ */
void handleAsyncUpdate(); void handleAsyncUpdate();
void initCtrl(); void initCtrl();
PropertiesFile::Options prefOptions;
public : public :
StringArray programNames; StringArray programNames;
char sysex[4096]; char sysex[4096];
@ -184,6 +185,9 @@ public :
MidiKeyboardState keyboardState; MidiKeyboardState keyboardState;
void unbindUI(); void unbindUI();
void loadPreference();
void savePreference();
private: private:
//============================================================================== //==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DexedAudioProcessor) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DexedAudioProcessor)

Loading…
Cancel
Save