-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from MiguelGuthridge/migue/docs
Add documentation
- Loading branch information
Showing
30 changed files
with
686 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# Universal-Controller-Script | ||
A script aimed at adding compatibility for any MIDI controller in FL Studio | ||
A script aimed at adding compatibility for any MIDI controller and any plugin in | ||
FL Studio. | ||
|
||
# WARNING: This script is currently not functional | ||
# Setup | ||
|
||
This is a complete rewrite from the ground up of a concept script I made for the same purpose. Eventually, it should greatly surpass all of my previous work for the legacy version, but it is currently non-functional. If you wish to look at the original, please head to [MiguelGuthridge/Legacy-Universal-Controller-Script](https://github.com/MiguelGuthridge/Legacy-Universal-Controller-Script). | ||
Refer to the [documentation](docs/setup.md). | ||
|
||
If you have any ideas for the development of the script, or want to contribute, please join the Discord Server [here](https://discord.gg/6vpfJUF). I'm excited to see where this project will go in the future: I have huge plans for it! | ||
# Documentation | ||
|
||
Documentation is available [here](docs/README.md), and contains information for | ||
users, as well as contributors. | ||
|
||
If you have any ideas for the development of the script, or want to contribute, | ||
please [join the Discord Server](https://discord.gg/6vpfJUF). I'm excited | ||
to see where this project will go in the future: I have huge plans for it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
# Documentation | ||
|
||
* [Setup Instructions](setup.md) | ||
* [Information for Contributors](contributing/README.md) | ||
* [Device Information](devices/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
# Contributing | ||
|
||
## Getting Started | ||
|
||
* Get familiar with the project's [style guidelines](style.md) | ||
* This documentation is only of overarching designs and how-tos. Code in the | ||
project is documented using docstring, and will be displayed inline by most | ||
code editors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
# Control Matchers | ||
|
||
Control matchers are used to maintain a set of control surfaces, which can | ||
be matched with incoming events. | ||
|
||
## `IControlMatcher` | ||
|
||
The interface used by control matchers. If the `BasicControlMatcher` doesn't | ||
suit your needs, you can implement this interface to create your own control | ||
matcher. | ||
|
||
### Methods to Implement | ||
* `matchEvent(self, event: eventData) -> Optional[ControlMapping]`: Given an | ||
event, return a mapping to a matched control, or `None` if there were no | ||
matches. | ||
* `getGroups(self) -> set[str]`: Return the set of control groups this control | ||
matcher uses. | ||
* `getControls(self, group:str=None) -> list[ControlSurface]`: Return a list of | ||
the controls managed by this control matcher. | ||
|
||
## `BasicControlMatcher` | ||
|
||
A basic control matcher that can be used for most devices. It provides various | ||
other methods for managing controls | ||
|
||
* `addControl(self, control: ControlSurface)`: Registers a control surface to | ||
the matcher. | ||
* `addControls(self, controls: list[ControlSurface])`: Registers a list of | ||
control surfaces to the matcher. | ||
* `addSubMatcher(self, matcher: IControlMatcher)`: If a small amount of | ||
complexity is required with control matching, the basic matcher may not be | ||
sufficiently powerful. This function can be used to add another | ||
IControlMatcher to act as a component of this matcher. An example of this can | ||
be seen in the implementation of the jog wheel on the M-Audio Hammer 88 Pro, | ||
where the sub-matcher is used to make events map to a different type of jog | ||
wheel depending on whether the encoder is pressed down or not. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
# Control Surfaces | ||
|
||
Control surfaces represent a control on a device. The are instantiated during | ||
the construction of `Device` objects, and are mapped to by plugins. | ||
|
||
## List of Control Surfaces | ||
|
||
* `Note`: Represents a note event | ||
* `ModWheel`: Represents a modulation wheel | ||
* `PitchWheel`: Represents a pitch bend wheel | ||
* `AfterTouch`: Represents aftertouch events | ||
* `ChannelAfterTouch` | ||
* `NoteAfterTouch` | ||
* `Pedal`: Represents a foot pedal | ||
* `SustainPedal` | ||
* `SostenutoPedal` | ||
* `SoftPedal` | ||
* `Button`: Represents a button (used by many transport controls) | ||
* `JogWheel`: Represents an encoder used for transport and navigation | ||
* `StandardJogWheel`: Scrolling and changing selection | ||
* `MoveJogWheel`: Moving selection | ||
* `TransportButton`: Buttons used for transport | ||
* `PlayButton` | ||
* `StopButton` | ||
* `LoopButton`: Toggle FL Studio's loop mode | ||
* `RecordButton` | ||
* `FastForwardButton` | ||
* `RewindButton` | ||
* `MetronomeButton` | ||
* `NavigationButton`: Buttons used for navigating FL Studio | ||
* `DpadButtons`: Buttons used for directions | ||
* `DirectionUp` | ||
* `DirectionDown` | ||
* `DirectionLeft` | ||
* `DirectionRight` | ||
* `DirectionSelect` | ||
* `NextPrevButton`: Next and previous buttons | ||
* `DirectionNext` | ||
* `DirectionPrevious` | ||
* `Fader`: Represents a fader (linear slider) | ||
* `Knob`: Represents a knob (rotating dial) | ||
* `Encoder`: Represents an encoder (endlessly rotating dial) | ||
* `DrumPad`: Represents a drum pad | ||
|
||
## Creating New Control Surfaces | ||
|
||
As a general rule of thumb, new control surfaces types shouldn't be created | ||
except for those that don't match any existing types. This should be discussed | ||
in the Discord server before creating one. This is because having more control | ||
surface types will make it harder to assign controls easily within plugins. | ||
|
||
## Extending Existing Control Surfaces | ||
|
||
By default, the provided control surfaces don't provide any advanced | ||
functionality such as colour or annotation support. If a control on your device | ||
supports this, or requires logic that doesn't work well with the parent class | ||
(such as the M-Audio Hammer 88 Pro's pitch wheel), it should implement it in a | ||
child class to the control surface it most accurately represents, and then | ||
implement any required functions. | ||
|
||
### Methods to Implement if Required | ||
* `onColorChange(self)`: Called when the color of the control has changed | ||
* `onAnnotationChange(self)`: Called when the annotation of the control has | ||
changed. | ||
* `onValueChange(self)`: Called when the value of the control has changed. | ||
* `tick(self)`: Called when a tick happens. |
Oops, something went wrong.