Skip to content

Commit

Permalink
Version 2.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nhielost committed Dec 17, 2022
1 parent d9e5816 commit 6833459
Show file tree
Hide file tree
Showing 64 changed files with 7,928 additions and 9,965 deletions.
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ AlignTrailingComments: true
#AllowAllArgumentsOnNextLine: false # requires clang-format 9
#AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
#AllowShortLambdasOnASingleLine: Inline # requires clang-format 9
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
Expand Down Expand Up @@ -58,7 +58,7 @@ ForEachMacros:
- 'json_object_foreach_safe'
- 'json_array_foreach'
IncludeBlocks: Preserve
IndentCaseLabels: false
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/check-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ find . -type d \( \
-path ./plugins/enc-amf -o \
-path ./plugins/mac-syphon/syphon-framework -o \
-path ./plugins/obs-outputs/ftl-sdk -o \
-path ./plugins/obs-websocket/deps -o \
-path ./src/macros \
-path ./plugins/obs-websocket/deps \
\) -prune -false -type f -o \
-name '*.h' -or \
-name '*.hpp' -or \
Expand Down
50 changes: 44 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16...3.21)

# Change obs-plugintemplate to your plugin's name in a machine-readable format
# (e.g.: obs-myawesomeplugin) and set
project(obs-midi-mg VERSION 2.1.1)
project(obs-midi-mg VERSION 2.2.0)
add_library(obs-midi-mg MODULE)

# Replace `Your Name Here` with the name (yours or your organization's) you want
Expand Down Expand Up @@ -31,26 +31,64 @@ target_link_libraries(obs-midi-mg PRIVATE libremidi)
# required for visibility e.g. in Xcode or Visual Studio
target_sources(
obs-midi-mg
PRIVATE ./src/mmg-action.cpp
PRIVATE ./src/actions/mmg-action.cpp
./src/actions/mmg-action-none.cpp
./src/actions/mmg-action-stream.cpp
./src/actions/mmg-action-record.cpp
./src/actions/mmg-action-virtualcam.cpp
./src/actions/mmg-action-replaybuffer.cpp
./src/actions/mmg-action-studiomode.cpp
./src/actions/mmg-action-scenes.cpp
./src/actions/mmg-action-video-sources.cpp
./src/actions/mmg-action-audio-sources.cpp
./src/actions/mmg-action-media-sources.cpp
./src/actions/mmg-action-transitions.cpp
./src/actions/mmg-action-filters.cpp
./src/actions/mmg-action-hotkeys.cpp
./src/actions/mmg-action-profiles.cpp
./src/actions/mmg-action-collections.cpp
./src/actions/mmg-action-midi.cpp
./src/actions/mmg-action-internal.cpp
./src/actions/mmg-action-timeout.cpp
./src/mmg-binding.cpp
./src/mmg-config.cpp
./src/mmg-device.cpp
./src/mmg-message.cpp
./src/mmg-utils.cpp
./src/obs-midi-mg.cpp
./src/ui/mmg-fields.cpp
./src/ui/mmg-echo-window.cpp)

target_sources(
obs-midi-mg
PRIVATE ./src/mmg-action.h
PRIVATE ./src/actions/mmg-action.h
./src/actions/mmg-action-none.h
./src/actions/mmg-action-stream.h
./src/actions/mmg-action-record.h
./src/actions/mmg-action-virtualcam.h
./src/actions/mmg-action-replaybuffer.h
./src/actions/mmg-action-studiomode.h
./src/actions/mmg-action-scenes.h
./src/actions/mmg-action-video-sources.h
./src/actions/mmg-action-audio-sources.h
./src/actions/mmg-action-media-sources.h
./src/actions/mmg-action-transitions.h
./src/actions/mmg-action-filters.h
./src/actions/mmg-action-hotkeys.h
./src/actions/mmg-action-profiles.h
./src/actions/mmg-action-collections.h
./src/actions/mmg-action-midi.h
./src/actions/mmg-action-internal.h
./src/actions/mmg-action-timeout.h
./src/mmg-action-include.h
./src/mmg-binding.h
./src/mmg-config.h
./src/mmg-device.h
./src/mmg-message.h
./src/mmg-utils.h
./src/obs-midi-mg.h
./src/ui/mmg-echo-window.h
./src/macros/mmg-window-macros.h)
./src/ui/mmg-fields.h
./src/ui/mmg-echo-window.h)

# Import libobs as main plugin dependency
find_package(libobs REQUIRED)
Expand Down Expand Up @@ -103,7 +141,7 @@ elseif(OS_MACOS)

set(MACOSX_PLUGIN_GUI_IDENTIFIER "${MACOS_BUNDLEID}")
set(MACOSX_PLUGIN_BUNDLE_VERSION "${CMAKE_PROJECT_VERSION}")
set(MACOSX_PLUGIN_SHORT_VERSION_STRING "2.1.1")
set(MACOSX_PLUGIN_SHORT_VERSION_STRING "2.2.0")

target_compile_options(obs-midi-mg PRIVATE -Wall)
# --- End of section ---
Expand Down
20 changes: 12 additions & 8 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The device that is selected in the *Active Device* field is the device that is c

Bindings associated with the current active device are listed in the top left corner. To edit them, select the binding name in the list. The message and the action will appear on the right. To change the binding's name, double click it in the list and change the name.

Bindings can now be duplicated. To do this, click a binding, then click *Copy Binding*. A new binding should appear in the list with the same values as the one selected.
To duplicate bindings, click a binding, then click *Copy Binding*. A new binding should appear in the list with the same values as the one selected.

### Preferences

Expand All @@ -74,11 +74,15 @@ If the type is set to *Note On / Note Off*, the message will toggle to the other

Actions are composed of a category, subcategory and other fields. These fields are changed dynamically when the categories and subcategories are changed.

In addition, some of the fields can use the message value field as their value. The list fields use this by an option called *Use Message Value*, while the number fields can be changed to *0-127*. In *0-127* mode, the action will use the message value according to the action specification (see below for specifics).
In addition, some of the fields can use the message value field as their value. The list fields use this by an option called *Use Message Value*, while the number fields can be changed to *0-127*. In *0-127* mode, the plugin will use the message value according to the action specification (see below).

When a number field is in *Fixed* mode, the plugin will use the value that is displayed in the number field for that action.

For some actions, a new *Ignore* mode is present in number fields. In this mode, the plugin will ignore the value in that field while setting other values in other fields. This is the most useful when having to set two values (e.g. Move Source or Source Scale), but only one needs to change.
For some actions, an *Ignore* mode and a *127-0* mode are present in number fields.

In *Ignore* mode, the plugin will ignore the value in that field while setting other values in other fields. This is the most useful when having to set two values (e.g. Move Source or Source Scale), but only one needs to change.

In *127-0* mode, plugin will use the message value according to the action specification, but in reverse. This is most useful with actions like Rotate Source where rotating the opposite direction is desired.

----------------------------------------------------

Expand Down Expand Up @@ -207,9 +211,9 @@ All Media Sources actions contain these list fields in addition to the fields li
| Subcategory | Description | List Fields | Number Fields |
|---|---|---|---|
| Change Current Transition | Sets the current transition. | **TRANSITION**: The name of the transition to use. | **DURATION <sub>[7](#using-the-message-value)</sub>**: The duration of the transition selected. If a value of 0 is used, the plugin will use the current transition duration. |
| Set Transition Bar (Studio Mode) | Sets the transition bar position.<br>Fails if not in Studio Mode.<br>*COMING SOON!* | *N/A* | **POSITION <sub>[5](#using-the-message-value)</sub>**: The percent transitioned by the transition bar. |
| Set Source Show Transition | Sets the transition that will be used when a source becomes shown. | **SCENE**: The name of the scene containing the video source.<br>**SOURCE**: The name of the source to set the transition to.<br>**TRANSITION**: The name of the transition to use. | **DURATION <sub>[6](#using-the-message-value)</sub>**: The duration of the transition selected. |
| Set Source Hide Transition | Sets the transition that will be used when a source becomes hidden. | **SCENE**: The name of the scene containing the video source.<br>**SOURCE**: The name of the source to set the transition to.<br>**TRANSITION**: The name of the transition to use. | **DURATION <sub>[6](#using-the-message-value)</sub>**: The duration of the transition selected. |
| Set Transition Bar (Studio Mode) | Sets the transition bar position.<br>Fails if not in Studio Mode. | *N/A* | **POSITION <sub>[5](#using-the-message-value)</sub>**: The percent transitioned by the transition bar. |

### Filters

Expand All @@ -226,13 +230,13 @@ All Filters actions contain these list fields in addition to the fields listed i
| Hide Filter | Hides a filter on a specified source. | *N/A* | *N/A* |
| Toggle Filter Display | Shows a filter on a specified source if it is hidden, hides it otherwise. | *N/A* | *N/A* |
| Reorder Filter Appearance | Moves filter up and down the list on a specified source. | *N/A* | **POSITION <sub>[1,7](#using-the-message-value)</sub>**: The new position of the filter in the list. |
| Change Custom Properties | Changes custom properties of a filter.<br>*COMING SOON!* | **PROPERTIES**: The properties to change in the filter. | *N/A* |
| Custom Filter Settings | Changes custom properties of a filter. | *N/A* | *N/A* |

### Hotkeys

| Subcategory | Description | List Fields | Number Fields |
|---|---|---|---|
| Activate Hotkey | Activates a custom hotkey. | **HOTKEY**: The name of the hotkey to activate. | *N/A* |
| Activate Predefined Hotkey | Activates a hotkey. | **GROUP**: The category of hotkeys as found in the Hotkeys settings menu.<br>**HOTKEY**: The name of the hotkey to activate. | *N/A* |

### Profiles

Expand All @@ -250,7 +254,7 @@ All Filters actions contain these list fields in addition to the fields listed i

| Subcategory | Description | List Fields | Number Fields |
|---|---|---|---|
| Send a MIDI Message | Sends the specified MIDI message to the specified MIDI device. | **DEVICE**: The name of the device to send the message to.<br>**TYPE**: The message type. | **CHANNEL**: The message channel.<br>**DATA 1 <sub>[8](#using-the-message-value)</sub>**: The message note / control / program / pitch.<br>**DATA 2 <sub>[7](#using-the-message-value)</sub>**: The message value / velocity. |
| Send a MIDI Message | Sends the specified MIDI message to the specified MIDI device. <sub>[8](#using-the-message-value)</sub> | **DEVICE**: The name of the device to send the message to.<br>**TYPE**: The message type. | **CHANNEL**: The message channel.<br>**DATA 1**: The message note / control / program / pitch.<br>**DATA 2**: The message value / velocity. |

### Internal

Expand Down Expand Up @@ -295,7 +299,7 @@ If any fields are marked with a subscript listed below, they are eligible to be

<sub>**[7](#using-the-message-value)**</sub> When using this field in *0-127* mode, an incoming message value/velocity will correspond exactly to the value provided. A value of 0 corresponds to 0, and a value of 127 corresponds to 127.

<sub>**[8](#using-the-message-value)**</sub> When using this field in *0-127* mode, an incoming message note/control/program/pitch bend will correspond exactly to the value provided. A value of 0 corresponds to 0, and a value of 127 corresponds to 127.
<sub>**[8](#using-the-message-value)**</sub> When using the MIDI action, all Use Message Value options will correspond directly to the sent MIDI message values, including the message type.

----------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion buildspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
}
},
"name": "obs-midi-mg",
"version": "2.1.1"
"version": "2.2.0"
}
Loading

0 comments on commit 6833459

Please sign in to comment.