Skip to content

Commit

Permalink
Fix incorrect use of modules
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge committed Apr 8, 2024
1 parent ec5274a commit ebd1d05
Show file tree
Hide file tree
Showing 8 changed files with 1,802 additions and 1,576 deletions.
650 changes: 650 additions & 0 deletions src/fl_classes/__fl_midi_msg.py

Large diffs are not rendered by default.

633 changes: 2 additions & 631 deletions src/fl_classes/__init__.py

Large diffs are not rendered by default.

240 changes: 29 additions & 211 deletions src/launchMapPages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,214 +12,32 @@
* More detailed explanations would be good, since it's not very well
explained by the manual.
"""
from fl_classes import FlMidiMsg


def init(deviceName: str, width: int, height: int) -> None:
"""
Initialise launchmap pages.
## Args
* `deviceName` (`str`): ???
* `width` (`int`): ???
* `height` (`int`): ???
Included since API version 1.
"""


def createOverlayMap(
offColor: int,
onColor: int,
width: int,
height: int,
) -> None:
"""
Creates an overlay map.
## Args
* `offColor` (`int`): ?
* `onColor` (`int`): ?
* `width` (`int`): ?
* `height` (`int`): ?
Included since API version 1.
"""


def length() -> int:
"""
Returns launchmap pages length.
## Returns
* `int`: length.
Included since API version 1.
"""
return 0


def updateMap(index: int) -> None:
"""
Updates launchmap page at `index`.
## Args
* `index` (`int`): index of page to update.
Included since API version 1.
"""


def getMapItemColor(index: int, itemIndex: int) -> int:
"""
Returns item color of `itemIndex` in map `index`.
## Args
* `index` (`int`): map index.
* `itemIndex` (`int`): item index.
## Returns
* `int`: color.
Included since API version 1.
"""
return 0


def getMapCount(index: int) -> int:
"""
Returns the number of items in page at `index`.
## Args
* `index` (`int`): page index.
## Returns
* `int`: number of items.
Included since API version 1.
"""
return 0


def getMapItemChannel(index: int, itemIndex: int) -> int:
"""
Returns the channel for item at `itemIndex` on page at `index`.
## Args
* `index` (`int`): page index.
* `itemIndex` (`int`): item index.
## Returns
* `int`: channel number.
Included since API version 1.
"""
return 0


def getMapItemAftertouch(index: int, itemIndex: int) -> int:
"""
Returns the aftertouch for item at `itemIndex` on page at `index`.
## Args
* `index` (`int`): page index.
* `itemIndex` (`int`): item index.
## Returns
* `int`: aftertouch value.
Included since API version 1.
"""
return 0


def processMapItem(
eventData: FlMidiMsg,
index: int,
itemIndex: int,
velocity: int,
) -> None:
"""
Process map item at `itemIndex` of page at `index`
## Args
* eventData (`eventData`): event data.
* index (`int`): page index.
* itemIndex (`int`): item index.
* velocity (`int`): velocity.
Included since API version 1.
"""


def releaseMapItem(eventData: FlMidiMsg, index: int) -> None:
"""
Release map item at `itemIndex` of page at `index`.
## HELP WANTED
This doesn't seem quite right, there is no `itemIndex` argument.
## Args
* `eventData` (`eventData`): event data.
* `index` (`int`): page index.
Included since API version 1.
"""


def checkMapForHiddenItem() -> None:
"""
Checks for launchpad hidden item???
## HELP WANTED
What does this do?
Included since API version 1.
"""


def setMapItemTarget(index: int, itemIndex: int, target: int) -> int:
"""
Set target for item at `itemIndex` of page at `index`.
## Args
* `index` (`int`): page index.
* `itemIndex` (`int`): item index.
* `target` (`int`): ????
## Returns
* `int`: ????
Included since API version 1.
"""
return 0
__all__ = [
'init',
'createOverlayMap',
'length',
'updateMap',
'getMapItemColor',
'getMapCount',
'getMapItemChannel',
'getMapItemAftertouch',
'processMapItem',
'releaseMapItem',
'checkMapForHiddenItem',
'setMapItemTarget',
]

from .__launchMapPages import (
init,
createOverlayMap,
length,
updateMap,
getMapItemColor,
getMapCount,
getMapItemChannel,
getMapItemAftertouch,
processMapItem,
releaseMapItem,
checkMapForHiddenItem,
setMapItemTarget,
)
Loading

0 comments on commit ebd1d05

Please sign in to comment.