Skip to content

Commit

Permalink
Merge branch 'release/1.4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rsjaffe committed Jul 23, 2016
2 parents 146acf6 + c1873c0 commit a0d3a99
Show file tree
Hide file tree
Showing 71 changed files with 1,370 additions and 1,246 deletions.
4 changes: 2 additions & 2 deletions Builds/MacOSX/Info-App.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.3.0.1</string>
<string>1.4.0.0</string>
<key>CFBundleVersion</key>
<string>1.3.0.1</string>
<string>1.4.0.0</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSHighResolutionCapable</key>
Expand Down
24 changes: 14 additions & 10 deletions Builds/MacOSX/MIDI2LR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
58EB708FC7BA51BF0A98F592 = {isa = PBXBuildFile; fileRef = FD6C1589BB9EF20BD7D7154B; };
BDF535168645F120058193A9 = {isa = PBXBuildFile; fileRef = F3184CED9270796B369FA288; };
F9F594A69212D79B99AC9C66 = {isa = PBXBuildFile; fileRef = 78C490E72B571C45E9BF65BE; };
AC84367CD5D5CED546873EA6 = {isa = PBXBuildFile; fileRef = 26B20138C8D26938DBF3AAA6; };
50AF5769741041F9CA022231 = {isa = PBXBuildFile; fileRef = 80AD4E80805D14FC930C2AE8; };
FD5777A03748CDE3465E71D3 = {isa = PBXBuildFile; fileRef = C58E726D80235E018C2E6235; };
65EAA878A18A9E490DC550DF = {isa = PBXBuildFile; fileRef = 0F1673C5F027441E02A71C9F; };
Expand Down Expand Up @@ -215,6 +216,7 @@
25F9708EB0BD2290A58D55C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = misc.h; path = "../../JuceLibraryCode/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/misc.h"; sourceTree = "SOURCE_ROOT"; };
2616BAA9398A55F2403A1F9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../JuceLibraryCode/modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; };
2670C5A85BC1A871CA42E4BA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_ALSA.cpp"; path = "../../JuceLibraryCode/modules/juce_audio_devices/native/juce_linux_ALSA.cpp"; sourceTree = "SOURCE_ROOT"; };
26B20138C8D26938DBF3AAA6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Utilities.cpp; path = ../../Source/Utilities/Utilities.cpp; sourceTree = "SOURCE_ROOT"; };
26D45E9B6952F802964B6CA4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jfdctfst.c; path = "../../JuceLibraryCode/modules/juce_graphics/image_formats/jpglib/jfdctfst.c"; sourceTree = "SOURCE_ROOT"; };
27256A0458D9274F9D4EF629 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RuntimePermissions.h"; path = "../../JuceLibraryCode/modules/juce_core/misc/juce_RuntimePermissions.h"; sourceTree = "SOURCE_ROOT"; };
274CABCF9258A98B15EAA69E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LAMEEncoderAudioFormat.cpp"; path = "../../JuceLibraryCode/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp"; sourceTree = "SOURCE_ROOT"; };
Expand Down Expand Up @@ -1136,6 +1138,7 @@
FFA41BC763316E256DFB4D95 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectWriteTypeface.cpp"; path = "../../JuceLibraryCode/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp"; sourceTree = "SOURCE_ROOT"; };
3A2ACD2C7AF27315DB53ADC3 = {isa = PBXGroup; children = (
58066C9BCAFFE6B9CC18F8DD,
26B20138C8D26938DBF3AAA6,
D3EB9CABC0016989295F149B, ); name = Utilities; sourceTree = "<group>"; };
55BA6062DF892191C9E9B3BE = {isa = PBXGroup; children = (
3A2ACD2C7AF27315DB53ADC3,
Expand Down Expand Up @@ -2443,16 +2446,15 @@
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
DEAD_CODE_STRIPPING = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = 3;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"_NDEBUG=1",
"NDEBUG=1",
"_DEBUG=1",
"DEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.3.0.1",
"JUCE_APP_VERSION_HEX=0x1030001", );
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
"JUCE_APP_VERSION=1.4.0.0",
"JUCE_APP_VERSION_HEX=0x1040000", );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../JuceLibraryCode/modules", "$(inherited)");
INFOPLIST_FILE = Info-App.plist;
Expand All @@ -2476,8 +2478,8 @@
"_NDEBUG=1",
"NDEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.3.0.1",
"JUCE_APP_VERSION_HEX=0x1030001", );
"JUCE_APP_VERSION=1.4.0.0",
"JUCE_APP_VERSION_HEX=0x1040000", );
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../JuceLibraryCode/modules", "$(inherited)");
Expand All @@ -2491,6 +2493,7 @@
A2D85D5403DF5412CD4FEA31 = {isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf";
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_MODEL_TUNING = G5;
Expand Down Expand Up @@ -2529,6 +2532,7 @@
BDF535168645F120058193A9,
F9F594A69212D79B99AC9C66, ); runOnlyForDeploymentPostprocessing = 0; };
5F5721809F326210B38EECA0 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
AC84367CD5D5CED546873EA6,
50AF5769741041F9CA022231,
FD5777A03748CDE3465E71D3,
65EAA878A18A9E490DC550DF,
Expand Down
5 changes: 3 additions & 2 deletions Builds/VisualStudio2015/MIDI2LR.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.3.0.1;JUCE_APP_VERSION_HEX=0x1030001;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.4.0.0;JUCE_APP_VERSION_HEX=0x1040000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
Expand Down Expand Up @@ -97,7 +97,7 @@
<ClCompile>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.3.0.1;JUCE_APP_VERSION_HEX=0x1030001;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.4.0.0;JUCE_APP_VERSION_HEX=0x1040000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
Expand Down Expand Up @@ -129,6 +129,7 @@
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\Utilities\Utilities.cpp"/>
<ClCompile Include="..\..\Source\CommandMap.cpp"/>
<ClCompile Include="..\..\Source\CommandMenu.cpp"/>
<ClCompile Include="..\..\Source\CommandTable.cpp"/>
Expand Down
3 changes: 3 additions & 0 deletions Builds/VisualStudio2015/MIDI2LR.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\Utilities\Utilities.cpp">
<Filter>MIDI2LR\Source\Utilities</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\CommandMap.cpp">
<Filter>MIDI2LR\Source</Filter>
</ClCompile>
Expand Down
6 changes: 3 additions & 3 deletions Builds/VisualStudio2015/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#include <windows.h>

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,0,1
FILEVERSION 1,4,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "MIDI2LR\0"
VALUE "FileVersion", "1.3.0.1\0"
VALUE "FileVersion", "1.4.0.0\0"
VALUE "ProductName", "MIDI2LR\0"
VALUE "ProductVersion", "1.3.0.1\0"
VALUE "ProductVersion", "1.4.0.0\0"
END
END

Expand Down
4 changes: 2 additions & 2 deletions JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
namespace ProjectInfo
{
const char* const projectName = "MIDI2LR";
const char* const versionString = "1.3.0.1";
const int versionNumber = 0x1030001;
const char* const versionString = "1.4.0.0";
const int versionNumber = 0x1040000;
}
#endif

Expand Down
5 changes: 3 additions & 2 deletions MIDI2LR.jucer
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="jqaeel" name="MIDI2LR" projectType="guiapp" version="1.3.0.1"
<JUCERPROJECT id="jqaeel" name="MIDI2LR" projectType="guiapp" version="1.4.0.0"
bundleIdentifier="com.rsjaffe.MIDI2LR" includeBinaryInAppConfig="1"
jucerVersion="4.2.3" companyWebsite="http://rsjaffe.github.io/MIDI2LR/"
companyEmail="[email protected]">
<MAINGROUP id="XbT1lm" name="MIDI2LR">
<GROUP id="{FC911F9D-9F68-948C-ADEF-64BE6AA850ED}" name="Source">
<GROUP id="{64A53798-7D11-73F5-9678-76E2C116E917}" name="Utilities">
<FILE id="vNnHnW" name="GSL.h" compile="0" resource="0" file="Source/Utilities/GSL.h"/>
<FILE id="FNdro6" name="Utilities.cpp" compile="1" resource="0" file="Source/Utilities/Utilities.cpp"/>
<FILE id="HksVIV" name="Utilities.h" compile="0" resource="0" file="Source/Utilities/Utilities.h"/>
</GROUP>
<FILE id="p7cPnq" name="CommandMap.cpp" compile="1" resource="0" file="Source/CommandMap.cpp"/>
Expand Down Expand Up @@ -89,7 +90,7 @@
<XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="WdgQGt" bigIcon="WdgQGt">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="10.9 SDK" osxArchitecture="32BitUniversal"
isDebug="0" optimisation="3" targetName="MIDI2LR" linkTimeOptimisation="1"
isDebug="1" optimisation="1" targetName="MIDI2LR" linkTimeOptimisation="1"
binaryPath="" cppLanguageStandard="c++14"/>
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="10.9 SDK" osxArchitecture="32BitUniversal"
isDebug="0" optimisation="3" targetName="MIDI2LR" linkTimeOptimisation="1"
Expand Down
47 changes: 12 additions & 35 deletions Source/CommandMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,31 @@ MIDI2LR. If not, see <http://www.gnu.org/licenses/>.

CommandMap::CommandMap() noexcept {}

void CommandMap::addCommandforMessage(unsigned int command, const MIDI_Message &message) {
void CommandMap::addCommandforMessage(unsigned int command, const MIDI_Message_ID& message) {
// adds a message to the message:command map, and its associated command to the
// command:message map
if (command < LRCommandList::LRStringList.size()) {
message_map_[message] = LRCommandList::LRStringList[command];
command_string_map_[LRCommandList::LRStringList[command]] = message;
command_string_map_.insert({LRCommandList::LRStringList[command], message});
}
else
message_map_[message] = LRCommandList::NextPrevProfile[command - LRCommandList::LRStringList.size()];
}

void CommandMap::addCommandforMessage(const String& command, const MIDI_Message &message) {
message_map_[message] = command;
command_string_map_[command] = message;
std::vector<const MIDI_Message_ID*> CommandMap::getMessagesForCommand(const std::string& command) const {
std::vector<const MIDI_Message_ID*> mm;
const auto range = command_string_map_.equal_range(command);
for (auto it = range.first; it != range.second; ++it)
mm.push_back(&it->second);
return mm;
}

const String& CommandMap::getCommandforMessage(const MIDI_Message &message) const {
return message_map_.at(message);
}

void CommandMap::removeMessage(const MIDI_Message &message) {
// removes message from the message:command map, and its associated command from
// the command:message map
command_string_map_.erase(message_map_[message]);
message_map_.erase(message);
}

void CommandMap::clearMap() noexcept {
command_string_map_.clear();
message_map_.clear();
}

bool CommandMap::messageExistsInMap(const MIDI_Message &message) const {
return message_map_.count(message) > 0 ? true : false;
}

const MIDI_Message& CommandMap::getMessageForCommand(const String &command) const {
return command_string_map_.at(command);
}
bool CommandMap::commandHasAssociatedMessage(const String &command) const {
return command_string_map_.count(command) > 0 ? true : false;
}
void CommandMap::toXMLDocument(File& file) const {
void CommandMap::toXMLDocument(juce::File& file) const {
if (message_map_.size()) {//don't bother if map is empty
// save the contents of the command map to an xml file
XmlElement root{"settings"};
juce::XmlElement root{"settings"};
for (const auto& map_entry : message_map_) {
auto* setting = new XmlElement{"setting"};
auto* setting = new juce::XmlElement{"setting"};
setting->setAttribute("channel", map_entry.first.channel);
if (map_entry.first.isCC)
setting->setAttribute("controller", map_entry.first.controller);
Expand All @@ -82,7 +59,7 @@ void CommandMap::toXMLDocument(File& file) const {
}
if (!root.writeToFile(file, ""))
// Give feedback if file-save doesn't work
AlertWindow::showMessageBox(AlertWindow::WarningIcon, "File Save Error",
juce::AlertWindow::showMessageBox(juce::AlertWindow::WarningIcon, "File Save Error",
"Unable to save file as specified. Please try again, and consider saving to a different location.");
}
}
Loading

0 comments on commit a0d3a99

Please sign in to comment.