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.
Files changed (218) hide show
  1. apps/__init__.py +5 -0
  2. apps/about/__init__.py +257 -0
  3. apps/about/app.json +1 -0
  4. apps/about/credits.py +12 -0
  5. apps/about/facts.py +398 -0
  6. apps/about/fonts/OFL.txt +93 -0
  7. apps/about/fonts/latin1_14.bin +0 -0
  8. apps/about/fonts/latin1_16.bin +0 -0
  9. apps/about/fonts/latin1_24.bin +0 -0
  10. apps/about/fonts/latin1_32.bin +0 -0
  11. apps/about/fonts/latin1_40.bin +0 -0
  12. apps/backline/__init__.py +58 -0
  13. apps/backline/app.json +1 -0
  14. apps/backline/app.py +475 -0
  15. apps/backline/art.py +717 -0
  16. apps/backline/ask.py +781 -0
  17. apps/backline/box.py +502 -0
  18. apps/backline/cast.py +137 -0
  19. apps/backline/desk/__init__.py +329 -0
  20. apps/backline/desk/editor.py +331 -0
  21. apps/backline/desk/grid.py +154 -0
  22. apps/backline/desk/look.py +169 -0
  23. apps/backline/desk/pedals.py +102 -0
  24. apps/backline/desk/perform.py +157 -0
  25. apps/backline/desk/prompt.py +210 -0
  26. apps/backline/desk/strip.py +159 -0
  27. apps/backline/desk_main.py +226 -0
  28. apps/backline/engine.py +622 -0
  29. apps/backline/floor.py +509 -0
  30. apps/backline/footswitch.py +119 -0
  31. apps/backline/glyphs.py +82 -0
  32. apps/backline/kits.py +428 -0
  33. apps/backline/midipedal.py +362 -0
  34. apps/backline/page_data.py +413 -0
  35. apps/backline/parts.py +145 -0
  36. apps/backline/pedal.py +107 -0
  37. apps/backline/remote.py +134 -0
  38. apps/backline/songs/ballad_68.json +1 -0
  39. apps/backline/songs/bossa.json +1 -0
  40. apps/backline/songs/country_train.json +1 -0
  41. apps/backline/songs/funk.json +1 -0
  42. apps/backline/songs/metal.json +1 -0
  43. apps/backline/songs/pop.json +1 -0
  44. apps/backline/songs/rock.json +1 -0
  45. apps/backline/songs/shuffle.json +1 -0
  46. apps/battery/__init__.py +101 -0
  47. apps/battery/app.json +1 -0
  48. apps/bit_world/act_deck.py +683 -0
  49. apps/bit_world/act_game.py +762 -0
  50. apps/bit_world/act_pet.py +1032 -0
  51. apps/bit_world/app.json +1 -0
  52. apps/bit_world/bit_output.py +45 -0
  53. apps/bit_world/bit_palette.py +503 -0
  54. apps/bit_world/bit_sound.py +431 -0
  55. apps/bit_world/bit_sprites.py +632 -0
  56. apps/bit_world/bit_world.py +534 -0
  57. apps/btreceiver/__init__.py +690 -0
  58. apps/btreceiver/app.json +1 -0
  59. apps/btreceiver/chime.py +155 -0
  60. apps/btreceiver/demo.py +529 -0
  61. apps/btreceiver/screen.py +633 -0
  62. apps/camera/__init__.py +316 -0
  63. apps/camera/app.json +1 -0
  64. apps/card/__init__.py +113 -0
  65. apps/card/app.json +1 -0
  66. apps/cast/__init__.py +631 -0
  67. apps/cast/app.json +1 -0
  68. apps/cast/receivers.py +193 -0
  69. apps/chess/__init__.py +18 -0
  70. apps/chess/app.json +1 -0
  71. apps/chess/app.py +922 -0
  72. apps/chess/art.py +323 -0
  73. apps/chess/ble.py +411 -0
  74. apps/chess/engine.py +925 -0
  75. apps/chess/game.py +327 -0
  76. apps/chess/net.py +261 -0
  77. apps/clock/__init__.py +38 -0
  78. apps/clock/app.json +1 -0
  79. apps/detect/__init__.py +214 -0
  80. apps/detect/app.json +1 -0
  81. apps/fmsynth/__init__.py +41 -0
  82. apps/fmsynth/algorithms.py +61 -0
  83. apps/fmsynth/app.json +1 -0
  84. apps/fmsynth/app.py +355 -0
  85. apps/fmsynth/editor.py +206 -0
  86. apps/fmsynth/engine.py +257 -0
  87. apps/fmsynth/meters.py +262 -0
  88. apps/fmsynth/midi.py +375 -0
  89. apps/fmsynth/panel_view.py +1071 -0
  90. apps/fmsynth/patches/fmsynth-01.syx +0 -0
  91. apps/fmsynth/settings.py +138 -0
  92. apps/fmsynth/voice.py +398 -0
  93. apps/gamepad/__init__.py +685 -0
  94. apps/gamepad/app.json +1 -0
  95. apps/gamepad/pad.py +94 -0
  96. apps/gamepad/watch.py +352 -0
  97. apps/hidden/__init__.py +72 -0
  98. apps/hidden/app.json +1 -0
  99. apps/home/__init__.py +483 -0
  100. apps/home/app.json +1 -0
  101. apps/home/main.py +36 -0
  102. apps/homeassistant/__init__.py +213 -0
  103. apps/homeassistant/api.py +104 -0
  104. apps/homeassistant/app.json +1 -0
  105. apps/huey/__init__.py +287 -0
  106. apps/huey/acting.py +184 -0
  107. apps/huey/actor.py +194 -0
  108. apps/huey/app.json +1 -0
  109. apps/huey/client.py +125 -0
  110. apps/huey/servers.py +121 -0
  111. apps/huey/settings.example.json +8 -0
  112. apps/huey/settings.py +97 -0
  113. apps/huey/turn.py +504 -0
  114. apps/huey/voice.py +217 -0
  115. apps/info/__init__.py +810 -0
  116. apps/info/app.json +1 -0
  117. apps/lora/__init__.py +62 -0
  118. apps/lora/app.json +1 -0
  119. apps/manifest.py +71 -0
  120. apps/medialink_baby_monitor/__init__.py +222 -0
  121. apps/medialink_baby_monitor/app.json +1 -0
  122. apps/medialink_doorbell/__init__.py +251 -0
  123. apps/medialink_doorbell/app.json +1 -0
  124. apps/medialink_hands_free/__init__.py +217 -0
  125. apps/medialink_hands_free/app.json +1 -0
  126. apps/medialink_surveillance_camera/__init__.py +258 -0
  127. apps/medialink_surveillance_camera/app.json +1 -0
  128. apps/medialink_video_doorbell/__init__.py +289 -0
  129. apps/medialink_video_doorbell/app.json +1 -0
  130. apps/medialink_videophone/__init__.py +273 -0
  131. apps/medialink_videophone/app.json +1 -0
  132. apps/medialink_walkie_talkie/__init__.py +228 -0
  133. apps/medialink_walkie_talkie/app.json +1 -0
  134. apps/midicontroller/__init__.py +774 -0
  135. apps/midicontroller/app.json +1 -0
  136. apps/midicontroller/links.py +421 -0
  137. apps/midicontroller/surface.py +343 -0
  138. apps/midiengine/__init__.py +977 -0
  139. apps/midiengine/app.json +1 -0
  140. apps/midiengine/banks.py +85 -0
  141. apps/midiengine/midiin.py +165 -0
  142. apps/midiengine/player.py +392 -0
  143. apps/midiengine/umidiparser.py +1413 -0
  144. apps/mp3/__init__.py +240 -0
  145. apps/mp3/app.json +1 -0
  146. apps/perch/__init__.py +119 -0
  147. apps/perch/app.json +1 -0
  148. apps/perch/huey.py +481 -0
  149. apps/perch/huey_props.py +386 -0
  150. apps/perch/huey_shift.py +42 -0
  151. apps/perch/huey_views.py +296 -0
  152. apps/perch/scene_bench.py +680 -0
  153. apps/perch/scene_coast.py +479 -0
  154. apps/perch/scene_desk.py +492 -0
  155. apps/perch/stage.py +1274 -0
  156. apps/perch/vec.py +366 -0
  157. apps/repl/__init__.py +325 -0
  158. apps/repl/app.json +1 -0
  159. apps/roku/__init__.py +156 -0
  160. apps/roku/app.json +1 -0
  161. apps/rokucam/__init__.py +362 -0
  162. apps/rokucam/app.json +1 -0
  163. apps/security/__init__.py +261 -0
  164. apps/security/app.json +1 -0
  165. apps/settings/__init__.py +221 -0
  166. apps/settings/app.json +1 -0
  167. apps/shell/__init__.py +33 -0
  168. apps/shell/app.json +1 -0
  169. apps/spotify/__init__.py +669 -0
  170. apps/spotify/app.json +1 -0
  171. apps/spotify/screen.py +82 -0
  172. apps/steps/__init__.py +58 -0
  173. apps/steps/app.json +1 -0
  174. apps/stompbox/__init__.py +31 -0
  175. apps/stompbox/app.json +1 -0
  176. apps/stompbox/app.py +668 -0
  177. apps/stompbox/boards.json +20 -0
  178. apps/stompbox/effects.py +241 -0
  179. apps/stompbox/engine.py +340 -0
  180. apps/stompbox/footswitch.py +331 -0
  181. apps/stompbox/inputs.py +449 -0
  182. apps/stompbox/meter.py +72 -0
  183. apps/stompbox/outputs.py +135 -0
  184. apps/stompbox/pedals.txt +45 -0
  185. apps/stompbox/presets.py +106 -0
  186. apps/stompbox/styles.py +135 -0
  187. apps/stompbox/ui.py +817 -0
  188. apps/stompbox/wavfile.py +73 -0
  189. apps/synthstation/__init__.py +20 -0
  190. apps/synthstation/app.json +1 -0
  191. apps/synthstation/audio.py +397 -0
  192. apps/synthstation/catalog.py +50 -0
  193. apps/synthstation/meters.py +136 -0
  194. apps/synthstation/midi.py +380 -0
  195. apps/synthstation/pads.py +177 -0
  196. apps/synthstation/parts.py +128 -0
  197. apps/synthstation/station.py +1069 -0
  198. apps/system/__init__.py +11 -0
  199. apps/system/app.json +1 -0
  200. apps/touchcal/__init__.py +324 -0
  201. apps/touchcal/app.json +1 -0
  202. apps/touchcal/fit.py +262 -0
  203. apps/wake/__init__.py +268 -0
  204. apps/wake/app.json +1 -0
  205. apps/wake/feed.py +155 -0
  206. apps/watch/__init__.py +355 -0
  207. apps/watch/app.json +1 -0
  208. apps/watch/faces.py +35 -0
  209. apps/watch/wheel.py +157 -0
  210. apps/weather/__init__.py +278 -0
  211. apps/weather/app.json +1 -0
  212. apps/weather/icons.py +172 -0
  213. apps/weather/sizing.py +71 -0
  214. apps/weather/zippad.py +172 -0
  215. omnipython_apps-0.1.4.dev8.dist-info/METADATA +33 -0
  216. omnipython_apps-0.1.4.dev8.dist-info/RECORD +218 -0
  217. omnipython_apps-0.1.4.dev8.dist-info/WHEEL +5 -0
  218. 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"}