omnipython-apps 0.1.4.dev8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- apps/__init__.py +5 -0
- apps/about/__init__.py +257 -0
- apps/about/app.json +1 -0
- apps/about/credits.py +12 -0
- apps/about/facts.py +398 -0
- apps/about/fonts/OFL.txt +93 -0
- apps/about/fonts/latin1_14.bin +0 -0
- apps/about/fonts/latin1_16.bin +0 -0
- apps/about/fonts/latin1_24.bin +0 -0
- apps/about/fonts/latin1_32.bin +0 -0
- apps/about/fonts/latin1_40.bin +0 -0
- apps/backline/__init__.py +58 -0
- apps/backline/app.json +1 -0
- apps/backline/app.py +475 -0
- apps/backline/art.py +717 -0
- apps/backline/ask.py +781 -0
- apps/backline/box.py +502 -0
- apps/backline/cast.py +137 -0
- apps/backline/desk/__init__.py +329 -0
- apps/backline/desk/editor.py +331 -0
- apps/backline/desk/grid.py +154 -0
- apps/backline/desk/look.py +169 -0
- apps/backline/desk/pedals.py +102 -0
- apps/backline/desk/perform.py +157 -0
- apps/backline/desk/prompt.py +210 -0
- apps/backline/desk/strip.py +159 -0
- apps/backline/desk_main.py +226 -0
- apps/backline/engine.py +622 -0
- apps/backline/floor.py +509 -0
- apps/backline/footswitch.py +119 -0
- apps/backline/glyphs.py +82 -0
- apps/backline/kits.py +428 -0
- apps/backline/midipedal.py +362 -0
- apps/backline/page_data.py +413 -0
- apps/backline/parts.py +145 -0
- apps/backline/pedal.py +107 -0
- apps/backline/remote.py +134 -0
- apps/backline/songs/ballad_68.json +1 -0
- apps/backline/songs/bossa.json +1 -0
- apps/backline/songs/country_train.json +1 -0
- apps/backline/songs/funk.json +1 -0
- apps/backline/songs/metal.json +1 -0
- apps/backline/songs/pop.json +1 -0
- apps/backline/songs/rock.json +1 -0
- apps/backline/songs/shuffle.json +1 -0
- apps/battery/__init__.py +101 -0
- apps/battery/app.json +1 -0
- apps/bit_world/act_deck.py +683 -0
- apps/bit_world/act_game.py +762 -0
- apps/bit_world/act_pet.py +1032 -0
- apps/bit_world/app.json +1 -0
- apps/bit_world/bit_output.py +45 -0
- apps/bit_world/bit_palette.py +503 -0
- apps/bit_world/bit_sound.py +431 -0
- apps/bit_world/bit_sprites.py +632 -0
- apps/bit_world/bit_world.py +534 -0
- apps/btreceiver/__init__.py +690 -0
- apps/btreceiver/app.json +1 -0
- apps/btreceiver/chime.py +155 -0
- apps/btreceiver/demo.py +529 -0
- apps/btreceiver/screen.py +633 -0
- apps/camera/__init__.py +316 -0
- apps/camera/app.json +1 -0
- apps/card/__init__.py +113 -0
- apps/card/app.json +1 -0
- apps/cast/__init__.py +631 -0
- apps/cast/app.json +1 -0
- apps/cast/receivers.py +193 -0
- apps/chess/__init__.py +18 -0
- apps/chess/app.json +1 -0
- apps/chess/app.py +922 -0
- apps/chess/art.py +323 -0
- apps/chess/ble.py +411 -0
- apps/chess/engine.py +925 -0
- apps/chess/game.py +327 -0
- apps/chess/net.py +261 -0
- apps/clock/__init__.py +38 -0
- apps/clock/app.json +1 -0
- apps/detect/__init__.py +214 -0
- apps/detect/app.json +1 -0
- apps/fmsynth/__init__.py +41 -0
- apps/fmsynth/algorithms.py +61 -0
- apps/fmsynth/app.json +1 -0
- apps/fmsynth/app.py +355 -0
- apps/fmsynth/editor.py +206 -0
- apps/fmsynth/engine.py +257 -0
- apps/fmsynth/meters.py +262 -0
- apps/fmsynth/midi.py +375 -0
- apps/fmsynth/panel_view.py +1071 -0
- apps/fmsynth/patches/fmsynth-01.syx +0 -0
- apps/fmsynth/settings.py +138 -0
- apps/fmsynth/voice.py +398 -0
- apps/gamepad/__init__.py +685 -0
- apps/gamepad/app.json +1 -0
- apps/gamepad/pad.py +94 -0
- apps/gamepad/watch.py +352 -0
- apps/hidden/__init__.py +72 -0
- apps/hidden/app.json +1 -0
- apps/home/__init__.py +483 -0
- apps/home/app.json +1 -0
- apps/home/main.py +36 -0
- apps/homeassistant/__init__.py +213 -0
- apps/homeassistant/api.py +104 -0
- apps/homeassistant/app.json +1 -0
- apps/huey/__init__.py +287 -0
- apps/huey/acting.py +184 -0
- apps/huey/actor.py +194 -0
- apps/huey/app.json +1 -0
- apps/huey/client.py +125 -0
- apps/huey/servers.py +121 -0
- apps/huey/settings.example.json +8 -0
- apps/huey/settings.py +97 -0
- apps/huey/turn.py +504 -0
- apps/huey/voice.py +217 -0
- apps/info/__init__.py +810 -0
- apps/info/app.json +1 -0
- apps/lora/__init__.py +62 -0
- apps/lora/app.json +1 -0
- apps/manifest.py +71 -0
- apps/medialink_baby_monitor/__init__.py +222 -0
- apps/medialink_baby_monitor/app.json +1 -0
- apps/medialink_doorbell/__init__.py +251 -0
- apps/medialink_doorbell/app.json +1 -0
- apps/medialink_hands_free/__init__.py +217 -0
- apps/medialink_hands_free/app.json +1 -0
- apps/medialink_surveillance_camera/__init__.py +258 -0
- apps/medialink_surveillance_camera/app.json +1 -0
- apps/medialink_video_doorbell/__init__.py +289 -0
- apps/medialink_video_doorbell/app.json +1 -0
- apps/medialink_videophone/__init__.py +273 -0
- apps/medialink_videophone/app.json +1 -0
- apps/medialink_walkie_talkie/__init__.py +228 -0
- apps/medialink_walkie_talkie/app.json +1 -0
- apps/midicontroller/__init__.py +774 -0
- apps/midicontroller/app.json +1 -0
- apps/midicontroller/links.py +421 -0
- apps/midicontroller/surface.py +343 -0
- apps/midiengine/__init__.py +977 -0
- apps/midiengine/app.json +1 -0
- apps/midiengine/banks.py +85 -0
- apps/midiengine/midiin.py +165 -0
- apps/midiengine/player.py +392 -0
- apps/midiengine/umidiparser.py +1413 -0
- apps/mp3/__init__.py +240 -0
- apps/mp3/app.json +1 -0
- apps/perch/__init__.py +119 -0
- apps/perch/app.json +1 -0
- apps/perch/huey.py +481 -0
- apps/perch/huey_props.py +386 -0
- apps/perch/huey_shift.py +42 -0
- apps/perch/huey_views.py +296 -0
- apps/perch/scene_bench.py +680 -0
- apps/perch/scene_coast.py +479 -0
- apps/perch/scene_desk.py +492 -0
- apps/perch/stage.py +1274 -0
- apps/perch/vec.py +366 -0
- apps/repl/__init__.py +325 -0
- apps/repl/app.json +1 -0
- apps/roku/__init__.py +156 -0
- apps/roku/app.json +1 -0
- apps/rokucam/__init__.py +362 -0
- apps/rokucam/app.json +1 -0
- apps/security/__init__.py +261 -0
- apps/security/app.json +1 -0
- apps/settings/__init__.py +221 -0
- apps/settings/app.json +1 -0
- apps/shell/__init__.py +33 -0
- apps/shell/app.json +1 -0
- apps/spotify/__init__.py +669 -0
- apps/spotify/app.json +1 -0
- apps/spotify/screen.py +82 -0
- apps/steps/__init__.py +58 -0
- apps/steps/app.json +1 -0
- apps/stompbox/__init__.py +31 -0
- apps/stompbox/app.json +1 -0
- apps/stompbox/app.py +668 -0
- apps/stompbox/boards.json +20 -0
- apps/stompbox/effects.py +241 -0
- apps/stompbox/engine.py +340 -0
- apps/stompbox/footswitch.py +331 -0
- apps/stompbox/inputs.py +449 -0
- apps/stompbox/meter.py +72 -0
- apps/stompbox/outputs.py +135 -0
- apps/stompbox/pedals.txt +45 -0
- apps/stompbox/presets.py +106 -0
- apps/stompbox/styles.py +135 -0
- apps/stompbox/ui.py +817 -0
- apps/stompbox/wavfile.py +73 -0
- apps/synthstation/__init__.py +20 -0
- apps/synthstation/app.json +1 -0
- apps/synthstation/audio.py +397 -0
- apps/synthstation/catalog.py +50 -0
- apps/synthstation/meters.py +136 -0
- apps/synthstation/midi.py +380 -0
- apps/synthstation/pads.py +177 -0
- apps/synthstation/parts.py +128 -0
- apps/synthstation/station.py +1069 -0
- apps/system/__init__.py +11 -0
- apps/system/app.json +1 -0
- apps/touchcal/__init__.py +324 -0
- apps/touchcal/app.json +1 -0
- apps/touchcal/fit.py +262 -0
- apps/wake/__init__.py +268 -0
- apps/wake/app.json +1 -0
- apps/wake/feed.py +155 -0
- apps/watch/__init__.py +355 -0
- apps/watch/app.json +1 -0
- apps/watch/faces.py +35 -0
- apps/watch/wheel.py +157 -0
- apps/weather/__init__.py +278 -0
- apps/weather/app.json +1 -0
- apps/weather/icons.py +172 -0
- apps/weather/sizing.py +71 -0
- apps/weather/zippad.py +172 -0
- omnipython_apps-0.1.4.dev8.dist-info/METADATA +33 -0
- omnipython_apps-0.1.4.dev8.dist-info/RECORD +218 -0
- omnipython_apps-0.1.4.dev8.dist-info/WHEEL +5 -0
- omnipython_apps-0.1.4.dev8.dist-info/top_level.txt +1 -0
apps/spotify/screen.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Brad Barnett
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
"""Spotify's screen: controlkit's now-playing screen, with the speaker's spectrum.
|
|
5
|
+
|
|
6
|
+
The cover is on the left (in the middle on a square or round screen), and
|
|
7
|
+
beside it the device Spotify plays on, the track, the progress line, round
|
|
8
|
+
transport buttons and the volume. While the board is the speaker, a
|
|
9
|
+
spectrum of twelve tall bars sits under the cover and takes its room from
|
|
10
|
+
it; while Spotify plays somewhere else there's no audio here, and the cover
|
|
11
|
+
grows back into that space. "Play here" at the end of the device's line
|
|
12
|
+
moves playback to the board, on a firmware that has the speaker.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import lvgl as lv
|
|
16
|
+
from controlkit import nowplaying
|
|
17
|
+
from controlkit.nowplaying import F_SMALL, LINE, SUB, TEAL, show
|
|
18
|
+
|
|
19
|
+
BANDS = 12
|
|
20
|
+
HERE_W = 96 # "Play here"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Screen(nowplaying.NowPlaying):
|
|
24
|
+
"""The Spotify screen in *root*, *size* pixels, laid out by controlkit's
|
|
25
|
+
`Layout`. `set_bars` puts the spectrum under the cover while the board
|
|
26
|
+
is the speaker.
|
|
27
|
+
|
|
28
|
+
*on* maps ``"play"``, ``"next"``, ``"previous"`` and ``"volume"`` (0 to
|
|
29
|
+
100) to what the transport and the slider do, and ``"here"`` to "Play
|
|
30
|
+
here", which shows only with *speaker*. *round_* keeps everything inside
|
|
31
|
+
a round screen's circle.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, root, size, on, speaker=False, round_=False):
|
|
35
|
+
lay = nowplaying.Layout(size[0], size[1], round_=round_)
|
|
36
|
+
nowplaying.NowPlaying.__init__(self, root, lay, on, mark="volume", bands=BANDS, volume_max=100)
|
|
37
|
+
self.here = None
|
|
38
|
+
if speaker and lay.source is not None:
|
|
39
|
+
cx, sy, cw = lay.source
|
|
40
|
+
b = self.here = nowplaying.box(root, cx + cw - HERE_W, sy - 5, HERE_W, 28)
|
|
41
|
+
b.set_style_radius(14, 0)
|
|
42
|
+
b.set_style_border_width(1, 0)
|
|
43
|
+
b.set_style_border_color(lv.color_hex(LINE), 0)
|
|
44
|
+
b.add_flag(lv.obj.FLAG.CLICKABLE)
|
|
45
|
+
b.set_ext_click_area(8)
|
|
46
|
+
b.add_event_cb(lambda e: on["here"](), lv.EVENT.CLICKED, None)
|
|
47
|
+
t = nowplaying.label(b, F_SMALL, SUB)
|
|
48
|
+
t.set_text("Play here")
|
|
49
|
+
t.center()
|
|
50
|
+
show(b, False)
|
|
51
|
+
if cw >= nowplaying.COLUMN:
|
|
52
|
+
self.src_name.set_size(cw - HERE_W - 30, F_SMALL.get_line_height())
|
|
53
|
+
self.src_name.set_long_mode(lv.label.LONG_MODE.DOTS)
|
|
54
|
+
self.set_accent(TEAL)
|
|
55
|
+
|
|
56
|
+
def show_track(self, title, artist, album, meta, playing):
|
|
57
|
+
"""A track, and whether it plays: each line only when it has something."""
|
|
58
|
+
self._set_title(title or "Untitled")
|
|
59
|
+
self._lines(artist, album, meta, "")
|
|
60
|
+
self._playback(True)
|
|
61
|
+
self.show_eyebrow("NOW PLAYING" if playing else "PAUSED")
|
|
62
|
+
self.show_playing(playing)
|
|
63
|
+
|
|
64
|
+
def show_nothing(self, hint):
|
|
65
|
+
"""Nothing playing: *hint* under the title, and the transport to start it."""
|
|
66
|
+
self._set_title("Nothing playing")
|
|
67
|
+
self._lines("", "", "", hint)
|
|
68
|
+
self._playback(False, transport=True)
|
|
69
|
+
self.show_eyebrow("")
|
|
70
|
+
self.show_playing(False)
|
|
71
|
+
|
|
72
|
+
def show_device(self, name, here_button):
|
|
73
|
+
"""The device Spotify plays on, by *name*, and "Play here" when
|
|
74
|
+
*here_button* is True."""
|
|
75
|
+
self.src_name.set_text(name or "")
|
|
76
|
+
show(self.src_mark, bool(name))
|
|
77
|
+
if self.here is not None:
|
|
78
|
+
show(self.here, here_button)
|
|
79
|
+
|
|
80
|
+
def show_note(self, text):
|
|
81
|
+
"""A short note between the two times, such as where the sound is."""
|
|
82
|
+
self.codec.set_text(text or "")
|
apps/steps/__init__.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Brad Barnett
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
"""Steps: today's steps, what you're doing, and the accelerometer live.
|
|
5
|
+
|
|
6
|
+
It needs a board whose ``accelerometer`` counts steps (a BMA423 with its
|
|
7
|
+
feature firmware, as the T-Watch S3's config sets it up). Reset steps
|
|
8
|
+
starts the count again. On a board whose accelerometer doesn't count, it
|
|
9
|
+
still shows the live reading.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import sys
|
|
13
|
+
|
|
14
|
+
import lvgl as lv
|
|
15
|
+
|
|
16
|
+
from touchkit import ui
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _column(root):
|
|
20
|
+
root.set_flex_flow(lv.FLEX_FLOW.COLUMN)
|
|
21
|
+
root.set_flex_align(lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.CENTER)
|
|
22
|
+
root.set_style_pad_row(8, 0)
|
|
23
|
+
root.remove_flag(lv.obj.FLAG.SCROLLABLE)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def main(scope):
|
|
27
|
+
board = sys.modules.get("board_config")
|
|
28
|
+
accel = None
|
|
29
|
+
if board is not None and "accelerometer" in getattr(board, "PERIPHERALS", ()):
|
|
30
|
+
try:
|
|
31
|
+
accel = board.accelerometer
|
|
32
|
+
except Exception as e:
|
|
33
|
+
ui.missing(scope, "No accelerometer", "The accelerometer didn't answer: %r" % (e,))
|
|
34
|
+
return
|
|
35
|
+
if accel is None:
|
|
36
|
+
ui.missing(scope, "No accelerometer", "This board has no accelerometer.")
|
|
37
|
+
return
|
|
38
|
+
counts = hasattr(accel, "steps") and getattr(accel, "features_running", True)
|
|
39
|
+
root = scope.root
|
|
40
|
+
_column(root)
|
|
41
|
+
steps = ui.label(root, "-", ui.huge, ui.WHITE)
|
|
42
|
+
doing = ui.label(root, "" if counts else "This accelerometer doesn't count steps", ui.small, ui.MUTED)
|
|
43
|
+
live = ui.label(root, "", ui.small, ui.MUTED)
|
|
44
|
+
if counts:
|
|
45
|
+
ui.button(root, "Reset steps", accel.reset_steps, color=ui.PANEL)
|
|
46
|
+
|
|
47
|
+
def tick(_t=None):
|
|
48
|
+
try:
|
|
49
|
+
if counts:
|
|
50
|
+
steps.set_text("%d" % accel.steps)
|
|
51
|
+
doing.set_text(str(accel.activity))
|
|
52
|
+
x, y, z = accel.acceleration
|
|
53
|
+
live.set_text("x %+.2f y %+.2f z %+.2f g" % (x, y, z))
|
|
54
|
+
except OSError as e:
|
|
55
|
+
live.set_text("read failed: %r" % (e,))
|
|
56
|
+
|
|
57
|
+
scope.every(250, tick)
|
|
58
|
+
tick()
|
apps/steps/app.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "steps", "title": "Steps", "category": "Desk", "icon": "footprint", "color": "#3B7A57"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Brad Barnett
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
"""Stompbox: play a guitar or a WAV clip through a board of up to four pedals.
|
|
6
|
+
|
|
7
|
+
Each pedal is an audioeffects effect, drawn in a style of its own, with its
|
|
8
|
+
knobs and patches on screen. Live takes the board's input, a capture device
|
|
9
|
+
on Windows, or the browser's. On a computer the clips are in
|
|
10
|
+
``$STOMPBOX_CLIPS``, else ``~/music/guitar-clips``; on a board, in
|
|
11
|
+
``/sd/guitar-clips``, ``/guitar-clips`` and ``/data/guitar-clips``. It needs
|
|
12
|
+
audioeffects, and a firmware or interpreter with audiodsp.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
SAMPLE_RATE = 48000
|
|
16
|
+
CHANNELS = 2
|
|
17
|
+
BLOCK_FRAMES = 256
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main(scope):
|
|
21
|
+
from touchkit import ui
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
import audioeffects # noqa: F401
|
|
25
|
+
except ImportError as e:
|
|
26
|
+
ui.missing(scope, "missing: audioeffects",
|
|
27
|
+
"Stompbox needs audioeffects and audiodsp: %s" % e)
|
|
28
|
+
return
|
|
29
|
+
from . import app
|
|
30
|
+
|
|
31
|
+
app.start(scope)
|
apps/stompbox/app.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "stompbox", "title": "Stompbox", "category": "Audio", "icon": "tune", "color": "#B5651D"}
|