ge150-linux 0.3.0__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 (98) hide show
  1. ge150/__init__.py +6 -0
  2. ge150/__main__.py +7 -0
  3. ge150/cli.py +257 -0
  4. ge150/cli_ai.py +71 -0
  5. ge150/cli_edit.py +457 -0
  6. ge150/cli_hw.py +66 -0
  7. ge150/cli_settings.py +120 -0
  8. ge150/cli_t3k.py +104 -0
  9. ge150/data/__init__.py +0 -0
  10. ge150/data/chevron-down.svg +1 -0
  11. ge150/data/effects.json +195 -0
  12. ge150/data/ge150.svg +22 -0
  13. ge150/data/gear.json +147 -0
  14. ge150/formats/__init__.py +1 -0
  15. ge150/formats/amp_nr.py +70 -0
  16. ge150/formats/mbf.py +185 -0
  17. ge150/formats/mo_json.py +157 -0
  18. ge150/formats/wav_ir.py +160 -0
  19. ge150/mcp_server/__init__.py +1 -0
  20. ge150/mcp_server/bridge.py +187 -0
  21. ge150/mcp_server/install.py +40 -0
  22. ge150/mcp_server/server.py +245 -0
  23. ge150/mcp_server/tools.py +494 -0
  24. ge150/model/__init__.py +1 -0
  25. ge150/model/catalog.py +118 -0
  26. ge150/model/device_state.py +214 -0
  27. ge150/model/gear.py +107 -0
  28. ge150/model/preset.py +158 -0
  29. ge150/model/settings.py +145 -0
  30. ge150/protocol/__init__.py +1 -0
  31. ge150/protocol/crc.py +28 -0
  32. ge150/protocol/framing.py +154 -0
  33. ge150/protocol/messages.py +262 -0
  34. ge150/protocol/opcodes.py +121 -0
  35. ge150/protocol/session.py +323 -0
  36. ge150/services/__init__.py +1 -0
  37. ge150/services/ai_permissions.py +76 -0
  38. ge150/services/auto_backup.py +63 -0
  39. ge150/services/backup.py +111 -0
  40. ge150/services/bulk_edit.py +276 -0
  41. ge150/services/chat_history.py +147 -0
  42. ge150/services/editor.py +303 -0
  43. ge150/services/guitars.py +255 -0
  44. ge150/services/hw_check.py +329 -0
  45. ge150/services/reader.py +126 -0
  46. ge150/services/tone3000.py +474 -0
  47. ge150/services/tone_agent.py +246 -0
  48. ge150/services/tone_ai.py +467 -0
  49. ge150/sim/__init__.py +1 -0
  50. ge150/sim/fake_device.py +250 -0
  51. ge150/sim/sim_transport.py +63 -0
  52. ge150/ui/__init__.py +1 -0
  53. ge150/ui/ab_compare.py +105 -0
  54. ge150/ui/about_dialog.py +246 -0
  55. ge150/ui/ai_chat.py +682 -0
  56. ge150/ui/ai_host.py +104 -0
  57. ge150/ui/ai_options.py +136 -0
  58. ge150/ui/ai_panel.py +23 -0
  59. ge150/ui/ai_permissions_dialog.py +161 -0
  60. ge150/ui/amp_art.py +549 -0
  61. ge150/ui/app.py +76 -0
  62. ge150/ui/art_spec.py +298 -0
  63. ge150/ui/assistant_page.py +360 -0
  64. ge150/ui/bridge.py +34 -0
  65. ge150/ui/bulk_form.py +416 -0
  66. ge150/ui/bulk_review.py +352 -0
  67. ge150/ui/chain_view.py +474 -0
  68. ge150/ui/chat_history.py +222 -0
  69. ge150/ui/dialogs.py +221 -0
  70. ge150/ui/gear_art.py +515 -0
  71. ge150/ui/gear_view.py +134 -0
  72. ge150/ui/guitar_dialog.py +397 -0
  73. ge150/ui/icons.py +63 -0
  74. ge150/ui/knob.py +211 -0
  75. ge150/ui/main_window.py +537 -0
  76. ge150/ui/markdown.py +55 -0
  77. ge150/ui/mic_view.py +392 -0
  78. ge150/ui/model_gallery.py +199 -0
  79. ge150/ui/module_editor.py +303 -0
  80. ge150/ui/preset_list.py +133 -0
  81. ge150/ui/settings_dialog.py +149 -0
  82. ge150/ui/theme.py +319 -0
  83. ge150/ui/tone3000_loader.py +102 -0
  84. ge150/ui/tone3000_page.py +325 -0
  85. ge150/ui/tone_detail.py +151 -0
  86. ge150/ui/worker.py +84 -0
  87. ge150/ui/working.py +117 -0
  88. ge150/usb/__init__.py +19 -0
  89. ge150/usb/device_ids.py +28 -0
  90. ge150/usb/hidraw_transport.py +122 -0
  91. ge150/usb/transport.py +33 -0
  92. ge150/usb/usb_transport.py +83 -0
  93. ge150_linux-0.3.0.dist-info/METADATA +252 -0
  94. ge150_linux-0.3.0.dist-info/RECORD +98 -0
  95. ge150_linux-0.3.0.dist-info/WHEEL +5 -0
  96. ge150_linux-0.3.0.dist-info/entry_points.txt +4 -0
  97. ge150_linux-0.3.0.dist-info/licenses/LICENSE +21 -0
  98. ge150_linux-0.3.0.dist-info/top_level.txt +1 -0
ge150/cli_t3k.py ADDED
@@ -0,0 +1,104 @@
1
+ """``ge150ctl t3k-*``: TONE3000 account and cabinet IR downloads (docs/plan-ia-tone3000.md §5)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import sys
7
+ from collections.abc import Callable
8
+
9
+ from ge150.formats import wav_ir
10
+ from ge150.protocol import messages as msg
11
+ from ge150.protocol.opcodes import Op
12
+ from ge150.services import reader
13
+ from ge150.services.editor import Editor
14
+ from ge150.services.tone3000 import IrSources, Tone3000Client
15
+
16
+ Handler = Callable[[argparse.Namespace], int]
17
+ ArgSetup = Callable[[argparse.ArgumentParser], object]
18
+
19
+
20
+ def cmd_key(args: argparse.Namespace) -> int:
21
+ client = Tone3000Client()
22
+ client.set_client_id(args.client_id)
23
+ print("TONE3000 publishable key saved. Next: ge150ctl t3k-login")
24
+ return 0
25
+
26
+
27
+ def cmd_login(args: argparse.Namespace) -> int:
28
+ client = Tone3000Client()
29
+ print("opening TONE3000 in the browser…")
30
+ client.login()
31
+ user = client.user()
32
+ print(f"signed in as {user.get('display_name') or user.get('username')}")
33
+ return 0
34
+
35
+
36
+ def cmd_logout(args: argparse.Namespace) -> int:
37
+ Tone3000Client().logout()
38
+ print("signed out of TONE3000")
39
+ return 0
40
+
41
+
42
+ def cmd_status(args: argparse.Namespace) -> int:
43
+ client = Tone3000Client()
44
+ creds = client.creds
45
+ print(f"publishable key: {'set' if creds.client_id else 'missing (ge150ctl t3k-key KEY)'}")
46
+ print(f"session: {'signed in' if creds.signed_in else 'signed out'}")
47
+ print(f"redirect URI: {client.redirect_uri}")
48
+ sources = IrSources().load()
49
+ for slot in sorted(sources, key=int):
50
+ s = sources[slot]
51
+ print(f" IR slot {slot}: {s['title']} / {s['model']} by {s['author']} ({s['license']})")
52
+ return 0
53
+
54
+
55
+ def cmd_load(args: argparse.Namespace) -> int:
56
+ """Pick (or name) a TONE3000 IR, download it and STORE it in a user IR slot."""
57
+ client = Tone3000Client()
58
+ tone_id = args.tone
59
+ if tone_id is None:
60
+ print("opening the TONE3000 catalogue: pick a cabinet IR…")
61
+ tone_id = client.select_tone()
62
+ download = client.download(tone_id, args.model)
63
+ tone = download.tone
64
+ print(f"{tone.title} / {download.model.name}\n by {tone.author} · licence {tone.license}"
65
+ f" · {tone.page_url}")
66
+ payload = wav_ir.load_ir_file(download.path)
67
+ name = (args.name or tone.title)[: msg.USER_NAME_LEN]
68
+ session = args.make_session()
69
+ with session:
70
+ editor = Editor(session)
71
+ names = reader.read_user_names(session)
72
+ old = names.ir[args.slot - 1]
73
+ if not args.yes:
74
+ if not sys.stdin.isatty():
75
+ print("refusing to store without --yes", file=sys.stderr)
76
+ return 1
77
+ answer = input(f"replace IR slot {args.slot} ({old}) with {name!r}? [y/N] ")
78
+ if answer.strip().lower() not in ("y", "yes", "s", "si", "sí"):
79
+ return 1
80
+ editor.upload_user_slot(Op.USER_IR, args.slot - 1, name, payload)
81
+ IrSources().record(args.slot, download, name)
82
+ print(f"IR slot {args.slot} (CAB {26 + args.slot}): {name}")
83
+ return 0
84
+
85
+
86
+ def _setup_key(p: argparse.ArgumentParser) -> None:
87
+ p.add_argument("client_id", help="publishable key from your TONE3000 API settings")
88
+
89
+
90
+ def _setup_load(p: argparse.ArgumentParser) -> None:
91
+ p.add_argument("slot", type=int, choices=range(1, 11), metavar="SLOT", help="IR slot 1..10")
92
+ p.add_argument("--tone", type=int, help="TONE3000 tone id (default: pick in the browser)")
93
+ p.add_argument("--model", type=int, help="model id inside the tone (default: the first)")
94
+ p.add_argument("--name", help="name shown on the pedal (default: the tone title)")
95
+ p.add_argument("-y", "--yes", action="store_true", help="do not ask for confirmation")
96
+
97
+
98
+ T3K_COMMANDS: dict[str, tuple[Handler, str, ArgSetup]] = {
99
+ "t3k-key": (cmd_key, "save your TONE3000 publishable key", _setup_key),
100
+ "t3k-login": (cmd_login, "sign in to TONE3000 in the browser", lambda p: None),
101
+ "t3k-logout": (cmd_logout, "forget the TONE3000 session", lambda p: None),
102
+ "t3k-status": (cmd_status, "TONE3000 session and IRs downloaded from it", lambda p: None),
103
+ "t3k-load": (cmd_load, "STORE a TONE3000 cabinet IR into a user IR slot", _setup_load),
104
+ }
ge150/data/__init__.py ADDED
File without changes
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="#8b95a3" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>