Compare commits

...
2 Commits
Author SHA1 Message Date
ReactorcoremeltdownandClaude Opus 5 1815566b6c Keep the tapped cell under the finger on a scrolled pattern grid (v0.22.1)
On a pattern long enough to overflow the viewport, tapping a cell moved the
grid: the follow logic re-centred the viewport on the cursor the moment it
changed, so the row that was just tapped slid up to the middle of the screen,
well away from the fingertip. The hit test itself was correct — the view moved
out from under it.

While not playing the view now holds still and scrolls only far enough to keep
the cursor row on screen, so a tap never moves it and an off-screen cursor
(arrow keys, punch-in advancing a row) still comes back into view. Centring on
the playhead during playback is unchanged, as is the flick-to-detach.

Also clip the Canvas. Compose does not clip a Canvas to its bounds, and the
grid deliberately draws one row past each edge to fill the partially scrolled
rows, so a scrolled grid painted over the toolbar above it.

Verified on an emulator (Pixel, API 34): before the fix a tap near the bottom
of a 64-line pattern jumped the row to the middle; after it the row stays under
the tap, scroll-then-tap lands on the right cell, an off-screen cursor is
pulled back to the nearest edge, and the playhead still centres during
playback.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 17:09:39 +01:00
ReactorcoremeltdownandClaude Opus 5 fdee7853e5 Adopt the cc.tiredsysadmin namespace and a Makefile entrypoint (v0.22.0)
Brings the project in line with CLAUDE.md:

- Application id / namespace is now cc.tiredsysadmin.android.sizzle
  (cc.tiredsysadmin.<os>.<application>), including the two JNI symbols in
  native_audio.cpp — JNI resolves by mangled package path, so renaming the
  package alone would fail at runtime, not at build time.
- Versions move to versions.properties at the repo root, read by both Gradle
  and the Makefile, with slots for the other platforms. The release APK name
  now derives from applicationId instead of being spelled out.
- Makefile becomes the build/publish entrypoint: atomic targets with real
  dependencies (deps, check, staging, release, install, dist, bump-*), and a
  manual-only publish split into publish-apk / publish-metadata, which also
  regenerates the F-Droid metadata from versions.properties.
- Annotate the two lint errors in MainActivity that this surfaced
  (ComponentActivity.dispatchKeyEvent's LIBRARY_GROUP_PREFIX restriction,
  media3's UnstableApi) so `make check` is green rather than advisory.
- Document identity, versioning, build types and publishing in the handover
  doc; point the README at make.

NOTE: the id change makes this a different app to Android and to F-Droid.
Installs of space.rcmd.android.sizzle will not be upgraded by it and will sit
side by side with the new one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 16:54:48 +01:00
85 changed files with 767 additions and 400 deletions
+2
View File
@@ -4,6 +4,8 @@ build/
/app/build/
local.properties
captures/
# `make dist` stages the release APK + F-Droid metadata here before publishing
dist/
.externalNativeBuild/
.cxx/
+27
View File
@@ -0,0 +1,27 @@
# General rules
Be absolutely frugal about spending remaining resources. Default to short, direct answers. Drop the opening pleasantries and the wrap-up summary. Lead with the answer, add detail only if it's needed, and stop when you're done.
# Naming and versioning
Applications shall use `cc.tiredsysadmin.<operating_system>.<application>` namespace for their unique identifiers. Versioning is done automatically each change according to semantic versioning policy. Track application versions of each platform accordingly (Android, macOS, Linux, BSD, Windows).
# Tools and building
Use Makefile as an entrypoint for building and publishing applications. Each target is atomic, construct dependencies.
For macOS versions always produce a DMG with a symlink to `/Applications` folder.
For Linux versions always produce a boilerplate for building .deb packages, also track changelog.
# Documentation
Write developer handover documentation explaining architecture and decisions.
# Publishing
Android applications shall be published to a private F-Droid repository at rcmd@garage.rcmd.space:/var/lib/fdroid/unsigned, and the application metadata must be published at rcmd@garage.rcmd.space:/var/lib/fdroid/metadata. Publishing is always a manual action, never automatic.
Android artifact naming scheme for publishing to unsigned directory is always `<application_id>_<version_code>.apk`
MacOS, Linux, and Windows versions keep builds locally.
+183
View File
@@ -0,0 +1,183 @@
# Sizzletracker (Android) — build and publish entrypoint.
#
# Every target is atomic and declares its own dependencies, so `make publish`
# alone is enough to go from a clean tree to an APK sitting in the private
# F-Droid repo — and nothing in here runs as a side effect of something else.
#
# make help what each target does
# make check unit tests + lint (what CI would run)
# make staging non-debuggable build for on-device testing
# make release unsigned release APK, named for F-Droid
# make install adb install the staging APK (keeps app data)
# make dist copy the release APK + metadata into dist/
# make publish upload dist/ to the F-Droid repo [MANUAL ONLY]
# make bump-minor new feature -> x.(y+1).0, versionCode +1
#
# Versions come from versions.properties, which Gradle reads too; never edit
# the numbers in app/build.gradle.kts.
SHELL := /bin/sh
GRADLE := ./gradlew
ADB := adb
VERSIONS := versions.properties
APP_ID := $(shell sed -n 's/^[[:space:]]*namespace[[:space:]]*=[[:space:]]*"\(.*\)".*/\1/p' app/build.gradle.kts)
VERSION_NAME := $(shell sed -n 's/^android.versionName[[:space:]]*=[[:space:]]*//p' $(VERSIONS) | tr -d ' ')
VERSION_CODE := $(shell sed -n 's/^android.versionCode[[:space:]]*=[[:space:]]*//p' $(VERSIONS) | tr -d ' ')
# Publishing to the private F-Droid repo (CLAUDE.md). Both halves of a release
# — the artifact and its metadata — live under the same host.
FDROID_HOST := rcmd@garage.rcmd.space
FDROID_UNSIGNED := /var/lib/fdroid/unsigned
FDROID_METADATA := /var/lib/fdroid/metadata
# `<application_id>_<version_code>.apk` is the naming scheme the unsigned
# directory expects; app/build.gradle.kts stamps the same name onto the output.
APK_NAME := $(APP_ID)_$(VERSION_CODE).apk
RELEASE_APK := app/build/outputs/apk/release/$(APK_NAME)
STAGING_APK := app/build/outputs/apk/staging/app-staging.apk
METADATA_YML := dist/$(APP_ID).yml
.DEFAULT_GOAL := help
# ------------------------------------------------------------------ info
help:
@sed -n 's/^# //p' Makefile
@echo ""
@echo "current: $(APP_ID) $(VERSION_NAME) (versionCode $(VERSION_CODE))"
version:
@echo "$(VERSION_NAME) $(VERSION_CODE)"
# ------------------------------------------------------------------ deps
# The Android SDK is the one thing we cannot install for the user; fail loudly
# and early rather than letting Gradle produce a confusing error. Gradle itself
# only looks at ANDROID_HOME / ANDROID_SDK_ROOT / local.properties, so when the
# SDK is merely sitting in its default install location we export it here —
# that is the usual case on a fresh macOS checkout.
SDK_DEFAULT := $(HOME)/Library/Android/sdk
ifeq ($(ANDROID_HOME)$(ANDROID_SDK_ROOT),)
ifneq ($(wildcard $(SDK_DEFAULT)/platform-tools),)
export ANDROID_HOME := $(SDK_DEFAULT)
endif
endif
deps:
@command -v java >/dev/null || { echo "ERROR: JDK 17 required (java not on PATH)"; exit 1; }
@test -n "$$ANDROID_HOME" -o -n "$$ANDROID_SDK_ROOT" -o -f local.properties || \
{ echo "ERROR: Android SDK not found — set ANDROID_HOME or write sdk.dir into local.properties"; exit 1; }
@test -x $(GRADLE) || { echo "ERROR: $(GRADLE) is not executable"; exit 1; }
@echo "deps ok"
# ------------------------------------------------------------------ verify
test: deps
$(GRADLE) testDebugUnitTest
lint: deps
$(GRADLE) lintDebug
check: test lint
# ------------------------------------------------------------------ build
debug: deps
$(GRADLE) assembleDebug
# Staging is `debug` with debuggability off: ART optimises it, so on-device
# feel matches a real release, but it signs with the debug key and installs
# without a keystore. This is the only build that should ever reach a phone
# during development.
staging: $(STAGING_APK)
$(STAGING_APK): deps
$(GRADLE) assembleStaging
# Release is deliberately UNSIGNED. The signing key lives only in the private
# F-Droid repo; `fdroid publish` signs what lands in the unsigned directory.
release: $(RELEASE_APK)
$(RELEASE_APK): deps $(VERSIONS)
$(GRADLE) assembleRelease
@test -f $@ || { echo "ERROR: expected $@ — versions.properties and the built APK disagree"; exit 1; }
# ------------------------------------------------------------------ device
# -r keeps the app's data (projects, presets, themes, bindings) across installs.
install: $(STAGING_APK)
$(ADB) install -r $(STAGING_APK)
launch:
$(ADB) shell monkey -p $(APP_ID) -c android.intent.category.LAUNCHER 1
# ------------------------------------------------------------------ dist
# Everything a publish needs, staged locally first so it can be inspected
# before anything leaves the machine.
dist: dist/$(APK_NAME) $(METADATA_YML)
dist/$(APK_NAME): $(RELEASE_APK)
@mkdir -p dist
cp $(RELEASE_APK) $@
# F-Droid metadata. Regenerated from versions.properties on every dist so the
# CurrentVersion lines can never lag the APK next to them.
$(METADATA_YML): $(VERSIONS) Makefile
@mkdir -p dist
@printf '%s\n' \
'Categories:' \
' - Multimedia' \
'License: GPL-3.0-or-later' \
'SourceCode: https://git.rcmd.space/tiredsysadmin/sizzletracker-android' \
'IssueTracker: https://git.rcmd.space/tiredsysadmin/sizzletracker-android/issues' \
'Donate: https://rcmd.space/pages/support/' \
'' \
'AutoName: Sizzletracker' \
'Summary: Retro grid-based music tracker' \
'' \
'Description: |-' \
' A retro, grid-based music tracker: monospace UI, pattern editing, a' \
' 4-track mixer with instruments and effects, and master recording.' \
' Playable with touch, keyboard, gamepad and MIDI (USB or Bluetooth).' \
'' \
'CurrentVersion: $(VERSION_NAME)' \
'CurrentVersionCode: $(VERSION_CODE)' > $@
@echo "wrote $@"
# ------------------------------------------------------------------ publish
#
# MANUAL ONLY (CLAUDE.md): publishing is never a side effect of a build, never
# wired into a test or release target, and never run unattended. Each half is
# its own target so a metadata fix does not re-upload an APK, and vice versa.
publish-apk: dist/$(APK_NAME)
scp dist/$(APK_NAME) $(FDROID_HOST):$(FDROID_UNSIGNED)/$(APK_NAME)
publish-metadata: $(METADATA_YML)
scp $(METADATA_YML) $(FDROID_HOST):$(FDROID_METADATA)/$(APP_ID).yml
publish: publish-apk publish-metadata
@echo "published $(APP_ID) $(VERSION_NAME) ($(VERSION_CODE)); sign it on the repo host"
# ------------------------------------------------------------------ versioning
# versionCode always moves by exactly 1: F-Droid and the package manager order
# installs by it alone, and a skipped or reused code is not recoverable.
bump-major: ; @$(MAKE) --no-print-directory bump FIELD=1
bump-minor: ; @$(MAKE) --no-print-directory bump FIELD=2
bump-patch: ; @$(MAKE) --no-print-directory bump FIELD=3
bump:
@awk -v field=$(FIELD) ' \
/^android.versionName/ { \
split($$3, v, "."); \
v[field]++; \
for (i = field + 1; i <= 3; i++) v[i] = 0; \
printf "android.versionName = %d.%d.%d\n", v[1], v[2], v[3]; next } \
/^android.versionCode/ { printf "android.versionCode = %d\n", $$3 + 1; next } \
{ print }' $(VERSIONS) > $(VERSIONS).tmp
@mv $(VERSIONS).tmp $(VERSIONS)
@sed -n 's/^android\./ android./p' $(VERSIONS)
# ------------------------------------------------------------------ clean
clean:
$(GRADLE) clean
rm -rf dist
.PHONY: help version deps test lint check debug staging release install launch \
dist publish publish-apk publish-metadata bump bump-major bump-minor \
bump-patch clean
+10 -2
View File
@@ -41,11 +41,19 @@ download an importable `.zip`).
Open the project in **Android Studio** (2024.1+) and Run on an **API 26+**
device or emulator.
From the CLI (the Gradle wrapper is committed, so a fresh clone needs no setup):
From the CLI, `make` is the entrypoint (the Gradle wrapper is committed, so a
fresh clone needs no setup):
```
./gradlew assembleDebug
make help # every target, plus the current version
make check # unit tests + lint
make staging # release-like build for on-device testing
make install # adb install -r the staging APK
```
Versions live in `versions.properties` (`make bump-minor` / `bump-patch`), and
`make release` produces the unsigned, F-Droid-named APK. Publishing to the
private F-Droid repo is a separate, manual `make publish`.
## Where to start reading
See **[docs/DEVELOPER_HANDOVER.md](docs/DEVELOPER_HANDOVER.md)** — a from-scratch
+16 -6
View File
@@ -1,14 +1,24 @@
// Build configuration for the single application module. This is where we turn
// on Compose, set the min/target Android versions, and list dependencies.
import java.util.Properties
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
// Versions live in //versions.properties so the Makefile and Gradle can never
// disagree about what is being built or what the published APK is called.
val appVersions = Properties().apply {
rootProject.file("versions.properties").inputStream().use { load(it) }
}
val appVersionName: String = appVersions.getProperty("android.versionName").trim()
val appVersionCode: Int = appVersions.getProperty("android.versionCode").trim().toInt()
android {
namespace = "space.rcmd.android.sizzle"
namespace = "cc.tiredsysadmin.android.sizzle"
compileSdk = 34
// Native (Oboe) low-latency output backend; see src/main/cpp.
@@ -17,13 +27,13 @@ android {
ndkVersion = "27.2.12479018"
defaultConfig {
applicationId = "space.rcmd.android.sizzle"
applicationId = "cc.tiredsysadmin.android.sizzle"
// minSdk 26 (Android 8.0) is the floor for the native MIDI API
// (android.media.midi) and AAudio low-latency audio we rely on.
minSdk = 26
targetSdk = 34
versionCode = 48
versionName = "0.21.1"
versionCode = appVersionCode
versionName = appVersionName
// We provide our own instrumentation runner if/when tests are added.
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -87,7 +97,7 @@ android {
}
// Give the release APK a predictable, versionCode-stamped name so it drops straight
// into the private F-Droid repo: space.rcmd.android.sizzle_<versionCode>.apk. Uses
// into the private F-Droid repo: cc.tiredsysadmin.android.sizzle_<versionCode>.apk. Uses
// the legacy variant API (the Kotlin-DSL `android {}` receiver doesn't expose it).
(extensions.getByName("android") as com.android.build.gradle.AbstractAppExtension)
.applicationVariants.all {
@@ -95,7 +105,7 @@ android {
val vc = versionCode
outputs.all {
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl)
.outputFileName = "space.rcmd.android.sizzle_$vc.apk"
.outputFileName = "${applicationId}_$vc.apk"
}
}
}
+2 -2
View File
@@ -214,7 +214,7 @@ extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void * /*reserved*/) {
}
extern "C" JNIEXPORT jboolean JNICALL
Java_space_rcmd_android_sizzle_audio_NativeAudioBridge_nativeStart(
Java_cc_tiredsysadmin_android_sizzle_audio_NativeAudioBridge_nativeStart(
JNIEnv *env, jobject /*thiz*/, jobject callback, jint sampleRate, jint framesPerCallback) {
g_callback = env->NewGlobalRef(callback);
jclass cls = env->GetObjectClass(callback);
@@ -241,7 +241,7 @@ Java_space_rcmd_android_sizzle_audio_NativeAudioBridge_nativeStart(
}
extern "C" JNIEXPORT void JNICALL
Java_space_rcmd_android_sizzle_audio_NativeAudioBridge_nativeStop(
Java_cc_tiredsysadmin_android_sizzle_audio_NativeAudioBridge_nativeStop(
JNIEnv *env, jobject /*thiz*/) {
g_wantRunning = false; // stop the disconnect-recovery from reopening
if (g_stream) {
@@ -1,9 +1,10 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle
package cc.tiredsysadmin.android.sizzle
import android.Manifest
import android.annotation.SuppressLint
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
@@ -15,14 +16,16 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.content.ContextCompat
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.viewmodel.initializer
import androidx.annotation.OptIn
import androidx.lifecycle.viewmodel.viewModelFactory
import space.rcmd.android.sizzle.input.GamepadInput
import space.rcmd.android.sizzle.input.KeyboardInput
import space.rcmd.android.sizzle.input.MidiInput
import space.rcmd.android.sizzle.playback.PlaybackService
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.SizzleApp as SizzleAppUi
import space.rcmd.android.sizzle.ui.theme.SizzleTheme
import androidx.media3.common.util.UnstableApi
import cc.tiredsysadmin.android.sizzle.input.GamepadInput
import cc.tiredsysadmin.android.sizzle.input.KeyboardInput
import cc.tiredsysadmin.android.sizzle.input.MidiInput
import cc.tiredsysadmin.android.sizzle.playback.PlaybackService
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.SizzleApp as SizzleAppUi
import cc.tiredsysadmin.android.sizzle.ui.theme.SizzleTheme
/**
* The single Activity. Its jobs are narrow and clear:
@@ -86,6 +89,9 @@ class MainActivity : ComponentActivity() {
app.midiClock.start()
}
// media3's MediaSessionService surface is still marked unstable; we pin the
// library version in gradle/libs.versions.toml, so opting in is safe here.
@OptIn(markerClass = [UnstableApi::class])
override fun onResume() {
super.onResume()
// Start the playback service only once we're definitively in the
@@ -116,6 +122,11 @@ class MainActivity : ComponentActivity() {
// system can consume D-pad / button keys — so USB *and* Bluetooth pads work
// reliably. The gamepad handler ignores non-gamepad events, so anything else
// (keyboard keys, text-field typing, UI) flows through the normal path below.
// super.dispatchKeyEvent is @RestrictTo(LIBRARY_GROUP_PREFIX) on
// ComponentActivity, but overriding it and delegating up is exactly the
// documented way to intercept dispatch; the restriction targets callers
// reaching in from outside, not subclasses.
@SuppressLint("RestrictedApi")
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
val handledByPad = when (event.action) {
KeyEvent.ACTION_DOWN -> gamepad.onKeyDown(event.keyCode, event)
@@ -1,21 +1,21 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle
package cc.tiredsysadmin.android.sizzle
import android.app.Application
import space.rcmd.android.sizzle.audio.AudioEngine
import space.rcmd.android.sizzle.input.BindingStore
import space.rcmd.android.sizzle.input.GamepadInput
import space.rcmd.android.sizzle.input.InputRouter
import space.rcmd.android.sizzle.input.KeyboardInput
import space.rcmd.android.sizzle.input.MidiInput
import space.rcmd.android.sizzle.io.PresetLibrary
import space.rcmd.android.sizzle.io.ProjectStore
import space.rcmd.android.sizzle.io.SettingsStore
import space.rcmd.android.sizzle.io.SongLibrary
import space.rcmd.android.sizzle.io.ThemeLibrary
import space.rcmd.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.audio.AudioEngine
import cc.tiredsysadmin.android.sizzle.input.BindingStore
import cc.tiredsysadmin.android.sizzle.input.GamepadInput
import cc.tiredsysadmin.android.sizzle.input.InputRouter
import cc.tiredsysadmin.android.sizzle.input.KeyboardInput
import cc.tiredsysadmin.android.sizzle.input.MidiInput
import cc.tiredsysadmin.android.sizzle.io.PresetLibrary
import cc.tiredsysadmin.android.sizzle.io.ProjectStore
import cc.tiredsysadmin.android.sizzle.io.SettingsStore
import cc.tiredsysadmin.android.sizzle.io.SongLibrary
import cc.tiredsysadmin.android.sizzle.io.ThemeLibrary
import cc.tiredsysadmin.android.sizzle.model.Project
import java.io.File
import kotlinx.coroutines.runBlocking
@@ -46,8 +46,8 @@ class SizzleApp : Application() {
val midiInput: MidiInput by lazy { MidiInput(this, inputRouter) }
/** MIDI clock sync (send/receive) over USB + Bluetooth MIDI. */
val midiClock: space.rcmd.android.sizzle.input.MidiClock by lazy {
space.rcmd.android.sizzle.input.MidiClock(this)
val midiClock: cc.tiredsysadmin.android.sizzle.input.MidiClock by lazy {
cc.tiredsysadmin.android.sizzle.input.MidiClock(this)
}
/** Persists the input binding maps across restarts (DataStore-backed). */
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import space.rcmd.android.sizzle.model.AmbiencePresets
import space.rcmd.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.AmbiencePresets
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import kotlin.math.abs
import kotlin.math.exp
import kotlin.math.floor
@@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import android.media.AudioAttributes
import android.media.AudioFormat
import android.media.AudioTrack
import space.rcmd.android.sizzle.model.Arrangement
import space.rcmd.android.sizzle.model.Pattern
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.SamplerPads
import space.rcmd.android.sizzle.model.TimeDivision
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.model.Arrangement
import cc.tiredsysadmin.android.sizzle.model.Pattern
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.SamplerPads
import cc.tiredsysadmin.android.sizzle.model.TimeDivision
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlin.concurrent.thread
@@ -906,7 +906,7 @@ class AudioEngine(
* of its own and simply releases whatever this track last started — on the same
* bus(es) that track's previous note routed to ([trackLastChannel]).
*/
private fun triggerCell(proj: Project, lane: Int, track: Int, cell: space.rcmd.android.sizzle.model.Cell) {
private fun triggerCell(proj: Project, lane: Int, track: Int, cell: cc.tiredsysadmin.android.sizzle.model.Cell) {
val trackKey = lane * Pattern.TRACK_COUNT + track
if (cell.isNoteOff) {
// Release this track's outgoing MIDI note first (external gear).
@@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import space.rcmd.android.sizzle.model.DelayDivisions
import space.rcmd.android.sizzle.model.TimeDivision
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.model.DelayDivisions
import cc.tiredsysadmin.android.sizzle.model.TimeDivision
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
import kotlin.math.PI
import kotlin.math.abs
import kotlin.math.cos
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import java.io.File
import java.io.RandomAccessFile
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
/**
* Bridges the native Oboe (AAudio) output backend to the Kotlin [AudioEngine].
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import android.annotation.SuppressLint
import android.media.AudioFormat
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import java.nio.ByteBuffer
import java.nio.ByteOrder
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import kotlin.math.exp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import java.nio.ByteBuffer
import java.nio.ByteOrder
@@ -1,11 +1,11 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import space.rcmd.android.sizzle.model.SynthDefs
import space.rcmd.android.sizzle.model.TimeDivision
import space.rcmd.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.SynthDefs
import cc.tiredsysadmin.android.sizzle.model.TimeDivision
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
/**
* An immutable snapshot of every parameter of the subtractive (Minimoog-style)
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import kotlin.math.abs
import kotlin.math.sin
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
/**
* A small, immutable snapshot of "where playback is" that the audio thread
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import android.content.Context
import androidx.datastore.core.DataStore
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import android.view.InputDevice
import android.view.KeyEvent
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
/**
* The heart of the "four equal input methods" requirement. Touch, physical
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
/**
* The single source of truth mapping a stable action-id string to the neutral
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import android.view.KeyEvent
import space.rcmd.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.model.Pitch
/**
* Translates physical (USB / Bluetooth) keyboard events into [InputAction]s.
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import android.content.Context
import android.media.midi.MidiDeviceInfo
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import android.content.Context
import android.media.midi.MidiDeviceInfo
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import java.io.BufferedInputStream
import java.io.BufferedOutputStream
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
/**
* Reads and writes a single instrument/effect preset as plain, human-readable
@@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.audio.SampleStore
import space.rcmd.android.sizzle.model.AmbiencePresets
import space.rcmd.android.sizzle.model.MixTightenerPresets
import space.rcmd.android.sizzle.model.NesSynthPresets
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.SamplerPads
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.audio.SampleStore
import cc.tiredsysadmin.android.sizzle.model.AmbiencePresets
import cc.tiredsysadmin.android.sizzle.model.MixTightenerPresets
import cc.tiredsysadmin.android.sizzle.model.NesSynthPresets
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.SamplerPads
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
import java.io.File
import java.io.InputStream
import java.util.zip.ZipEntry
@@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.audio.SampleStore
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.SamplerPads
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.audio.SampleStore
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.SamplerPads
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
import java.io.BufferedInputStream
import java.io.BufferedOutputStream
import java.io.File
@@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.model.Cell
import space.rcmd.android.sizzle.model.Mixer
import space.rcmd.android.sizzle.model.Pattern
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.Scale
import space.rcmd.android.sizzle.model.TimeSignature
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.model.Cell
import cc.tiredsysadmin.android.sizzle.model.Mixer
import cc.tiredsysadmin.android.sizzle.model.Pattern
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.Scale
import cc.tiredsysadmin.android.sizzle.model.TimeSignature
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
/**
* Saves and loads a whole [Project] to/from the `.sng` text format.
@@ -87,7 +87,7 @@ object ProjectIo {
// Reset everything to a clean slate first.
project.patterns.clear()
for (lane in project.arrangement.slots.indices)
project.arrangement.slots[lane].fill(space.rcmd.android.sizzle.model.Arrangement.EMPTY)
project.arrangement.slots[lane].fill(cc.tiredsysadmin.android.sizzle.model.Arrangement.EMPTY)
project.arrangement.laneMuted.fill(false)
project.toolbox.forEach { it.clearSlot() }
project.mixer.channels.forEach { ch ->
@@ -119,7 +119,7 @@ object ProjectIo {
// are restored from the explicit lane,beat,pid lines regardless).
project.arrangement.lengthBars =
attrs["bars"]?.toIntOrNull()
?: space.rcmd.android.sizzle.model.Arrangement.MAX_BARS
?: cc.tiredsysadmin.android.sizzle.model.Arrangement.MAX_BARS
project.arrangement.loopEnabled = attrs["loop"] == "1"
attrs["mutes"]?.let { m ->
val lanes = project.arrangement.laneMuted
@@ -142,7 +142,7 @@ object ProjectIo {
}
// Guarantee one block per lane (lane i is tied to block i), padding any
// that the file did not define so the arrangement/editor always resolve.
for (id in 0 until space.rcmd.android.sizzle.model.Arrangement.LANE_COUNT) {
for (id in 0 until cc.tiredsysadmin.android.sizzle.model.Arrangement.LANE_COUNT) {
if (project.patterns.none { it.id == id }) project.patterns.add(Pattern(id, name = "BLK${id + 1}"))
}
project.patterns.sortBy { it.id }
@@ -193,7 +193,7 @@ object ProjectIo {
p.arrangement.set(lane, beat, pid)
}
private fun applyRegion(region: space.rcmd.android.sizzle.model.LoopRegion, a: Map<String, String>) {
private fun applyRegion(region: cc.tiredsysadmin.android.sizzle.model.LoopRegion, a: Map<String, String>) {
region.enabled = a["en"] == "1"
region.start = a["s"]?.toIntOrNull() ?: 0
region.end = a["e"]?.toIntOrNull() ?: 0
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.Project
import java.io.File
/**
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import android.content.Context
import androidx.datastore.core.DataStore
@@ -39,7 +39,7 @@ data class AppSettings(
* Persists app-level UI/audio settings (the colour theme and the low-latency
* engine toggle). Song/mixer/toolbox parameters live in the project and are
* handled by [ProjectStore]; input bindings by
* [space.rcmd.android.sizzle.input.BindingStore].
* [cc.tiredsysadmin.android.sizzle.input.BindingStore].
*
* Audio output/input *device* selection is intentionally not persisted: Android
* device ids are session-scoped and don't identify the same hardware next launch.
@@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.model.Arrangement
import space.rcmd.android.sizzle.model.Cell
import space.rcmd.android.sizzle.model.Pattern
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.TimeSignature
import cc.tiredsysadmin.android.sizzle.model.Arrangement
import cc.tiredsysadmin.android.sizzle.model.Cell
import cc.tiredsysadmin.android.sizzle.model.Pattern
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.TimeSignature
/**
* Reads and writes the reference desktop **sizzletracker `.sng`** format
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import java.io.File
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import androidx.compose.ui.graphics.Color
import space.rcmd.android.sizzle.ui.theme.RetroPalette
import cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette
/**
* Reads and writes a colour [RetroPalette] as plain, human-editable text — the same
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.ui.theme.RetroPalette
import cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette
import java.io.File
/**
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* Factory data for the [ToolboxType.AMBIENCE] reverb, ported from OTODESK's
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* The lower-half piano-roll arrangement. It has [LANE_COUNT] lanes stacked
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* Factory presets for the [ToolboxType.MIX_TIGHTENER] effect — genre- and
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* The mixer has exactly [CHANNEL_COUNT] channels, one per tracker track. Each
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* Musical primitives shared across the whole app: pitches, scales and time
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* Factory presets for the subtractive synth ([ToolboxType.NES_SYNTH]). Two families:
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* One cell in the tracker grid: a single note event on a single line of a single
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* The whole song in memory. This single object is what gets saved to / loaded
@@ -9,7 +9,7 @@ package space.rcmd.android.sizzle.model
* Keeping one root object makes serialization and undo/redo straightforward.
*
* Persistence is done by our own text serializer (see
* [space.rcmd.android.sizzle.io.ProjectIo]), not kotlinx, so the
* [cc.tiredsysadmin.android.sizzle.io.ProjectIo]), not kotlinx, so the
* model classes carry no serialization annotations.
*/
class Project {
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* Canonical option lists and shape constants for the subtractive (Minimoog-style)
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.model
package cc.tiredsysadmin.android.sizzle.model
/**
* The third tab is a toolbox of 16 slots. Every slot can hold one instrument OR
@@ -344,7 +344,7 @@ enum class TimeDivision(val label: String, val beatFraction: Double) {
* sample file path live in the same map under keys the engine knows about
* (e.g. "samplePath", "target").
*
* (Serialized via [space.rcmd.android.sizzle.io.PresetIo], not
* (Serialized via [cc.tiredsysadmin.android.sizzle.io.PresetIo], not
* kotlinx, so no @Serializable annotation is needed here.)
*/
class ToolboxSlot(
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.playback
package cc.tiredsysadmin.android.sizzle.playback
import android.os.Looper
import androidx.media3.common.MediaItem
@@ -11,7 +11,7 @@ import androidx.media3.common.SimpleBasePlayer
import androidx.media3.common.util.UnstableApi
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
import space.rcmd.android.sizzle.audio.AudioEngine
import cc.tiredsysadmin.android.sizzle.audio.AudioEngine
/**
* Adapts our custom [AudioEngine] to the media3 [Player] interface via
@@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.playback
package cc.tiredsysadmin.android.sizzle.playback
import android.content.Context
import android.content.Intent
import androidx.media3.common.util.UnstableApi
import androidx.media3.session.MediaSession
import androidx.media3.session.MediaSessionService
import space.rcmd.android.sizzle.SizzleApp
import cc.tiredsysadmin.android.sizzle.SizzleApp
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui
package cc.tiredsysadmin.android.sizzle.ui
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.background
@@ -29,11 +29,11 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import space.rcmd.android.sizzle.ui.mixer.MixerScreen
import space.rcmd.android.sizzle.ui.settings.SettingsScreen
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import space.rcmd.android.sizzle.ui.toolbox.ToolboxScreen
import space.rcmd.android.sizzle.ui.tracker.TrackerScreen
import cc.tiredsysadmin.android.sizzle.ui.mixer.MixerScreen
import cc.tiredsysadmin.android.sizzle.ui.settings.SettingsScreen
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.ui.toolbox.ToolboxScreen
import cc.tiredsysadmin.android.sizzle.ui.tracker.TrackerScreen
/**
* The top-level layout: the active tab's screen fills the space above a standard
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui
package cc.tiredsysadmin.android.sizzle.ui
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
@@ -10,17 +10,17 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import space.rcmd.android.sizzle.audio.AudioEngine
import space.rcmd.android.sizzle.input.InputAction
import space.rcmd.android.sizzle.input.InputRouter
import space.rcmd.android.sizzle.model.Cell
import space.rcmd.android.sizzle.model.CellColumn
import space.rcmd.android.sizzle.model.ParamSpec
import space.rcmd.android.sizzle.model.Pattern
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.TimeSignature
import space.rcmd.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.audio.AudioEngine
import cc.tiredsysadmin.android.sizzle.input.InputAction
import cc.tiredsysadmin.android.sizzle.input.InputRouter
import cc.tiredsysadmin.android.sizzle.model.Cell
import cc.tiredsysadmin.android.sizzle.model.CellColumn
import cc.tiredsysadmin.android.sizzle.model.ParamSpec
import cc.tiredsysadmin.android.sizzle.model.Pattern
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.TimeSignature
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import kotlin.math.roundToInt
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.SharingStarted
@@ -53,15 +53,15 @@ class AppViewModel(
val project: Project,
private val engine: AudioEngine,
private val router: InputRouter,
private val gamepadInput: space.rcmd.android.sizzle.input.GamepadInput,
private val midiInput: space.rcmd.android.sizzle.input.MidiInput,
private val keyboardInput: space.rcmd.android.sizzle.input.KeyboardInput,
private val bindingStore: space.rcmd.android.sizzle.input.BindingStore,
private val presetLibrary: space.rcmd.android.sizzle.io.PresetLibrary,
private val songLibrary: space.rcmd.android.sizzle.io.SongLibrary,
private val settingsStore: space.rcmd.android.sizzle.io.SettingsStore,
private val themeLibrary: space.rcmd.android.sizzle.io.ThemeLibrary,
private val midiClock: space.rcmd.android.sizzle.input.MidiClock,
private val gamepadInput: cc.tiredsysadmin.android.sizzle.input.GamepadInput,
private val midiInput: cc.tiredsysadmin.android.sizzle.input.MidiInput,
private val keyboardInput: cc.tiredsysadmin.android.sizzle.input.KeyboardInput,
private val bindingStore: cc.tiredsysadmin.android.sizzle.input.BindingStore,
private val presetLibrary: cc.tiredsysadmin.android.sizzle.io.PresetLibrary,
private val songLibrary: cc.tiredsysadmin.android.sizzle.io.SongLibrary,
private val settingsStore: cc.tiredsysadmin.android.sizzle.io.SettingsStore,
private val themeLibrary: cc.tiredsysadmin.android.sizzle.io.ThemeLibrary,
private val midiClock: cc.tiredsysadmin.android.sizzle.input.MidiClock,
private val appContext: android.content.Context,
) : ViewModel() {
@@ -70,7 +70,7 @@ class AppViewModel(
var revision by mutableIntStateOf(0); private set // bump to force grid redraw
/** Active colour theme; read by [MainActivity] to drive SizzleTheme. Set via
* [selectPalette] so the choice is persisted. */
var palette by mutableStateOf(space.rcmd.android.sizzle.ui.theme.RetroPalette.AMBER)
var palette by mutableStateOf(cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette.AMBER)
private set
// Tracker cursor position.
@@ -166,7 +166,7 @@ class AppViewModel(
// ----- Binding-learn state (Settings tab) -----
/** The action id currently waiting to be bound, or null. */
var learnTarget by mutableStateOf<String?>(null); private set
private var learnSource: space.rcmd.android.sizzle.input.InputSource? = null
private var learnSource: cc.tiredsysadmin.android.sizzle.input.InputSource? = null
// ----- Toolbox parameter MIDI-learn state (device editors) -----
/** The toolbox slot + parameter key currently waiting to capture a MIDI control,
@@ -269,7 +269,7 @@ class AppViewModel(
for (ch in project.mixer.channels) {
if (ch.midiChannel != kbdChannel) continue
val slot = project.toolbox.getOrNull(ch.instrumentSlot) ?: continue
if (slot.type == space.rcmd.android.sizzle.model.ToolboxType.SAMPLER) return true
if (slot.type == cc.tiredsysadmin.android.sizzle.model.ToolboxType.SAMPLER) return true
}
return false
}
@@ -576,7 +576,7 @@ class AppViewModel(
// ------------------------------------------------------- binding learn
/** Arm MIDI-learn / gamepad-rebind: the next matching control is bound to
* [actionId]. [source] restricts which device kind will be captured. */
fun beginLearn(actionId: String, source: space.rcmd.android.sizzle.input.InputSource) {
fun beginLearn(actionId: String, source: cc.tiredsysadmin.android.sizzle.input.InputSource) {
learnTarget = actionId
learnSource = source
router.learnSource = source
@@ -602,7 +602,7 @@ class AppViewModel(
cancelLearn() // don't clash with a Settings nav/transport learn
paramLearnSlot = slotIndex
paramLearnKey = paramKey
router.learnSource = space.rcmd.android.sizzle.input.InputSource.MIDI
router.learnSource = cc.tiredsysadmin.android.sizzle.input.InputSource.MIDI
router.learnMode = true
touched()
}
@@ -665,7 +665,7 @@ class AppViewModel(
// binds to the armed parameter.
val plKey = paramLearnKey
if (plKey != null) {
if (action.source == space.rcmd.android.sizzle.input.InputSource.MIDI) {
if (action.source == cc.tiredsysadmin.android.sizzle.input.InputSource.MIDI) {
bindParamCc(paramLearnSlot, plKey, action.code)
cancelParamLearn()
}
@@ -674,22 +674,22 @@ class AppViewModel(
val target = learnTarget
if (target == null) {
// Not learning: a MIDI CC bound to a toolbox parameter drives it live.
if (action.source == space.rcmd.android.sizzle.input.InputSource.MIDI) {
if (action.source == cc.tiredsysadmin.android.sizzle.input.InputSource.MIDI) {
applyParamCc(action.code, action.value)
}
return
}
if (action.source != learnSource) return
when (action.source) {
space.rcmd.android.sizzle.input.InputSource.MIDI ->
cc.tiredsysadmin.android.sizzle.input.InputSource.MIDI ->
midiInput.ccBindings[action.code] = target
space.rcmd.android.sizzle.input.InputSource.GAMEPAD -> {
cc.tiredsysadmin.android.sizzle.input.InputSource.GAMEPAD -> {
gamepadInput.bindings.entries.removeAll { it.value == target }
gamepadInput.bindings[
space.rcmd.android.sizzle.input.GamepadChord(action.modifier, action.code),
cc.tiredsysadmin.android.sizzle.input.GamepadChord(action.modifier, action.code),
] = target
}
space.rcmd.android.sizzle.input.InputSource.KEYBOARD -> {
cc.tiredsysadmin.android.sizzle.input.InputSource.KEYBOARD -> {
keyboardInput.bindings.entries.removeAll { it.value == target }
keyboardInput.bindings[action.code] = target
}
@@ -706,20 +706,20 @@ class AppViewModel(
/** Current gamepad chord (modifier + button, or plain button) bound to
* [actionId], or null. */
fun gamepadBindingFor(actionId: String): space.rcmd.android.sizzle.input.GamepadChord? =
fun gamepadBindingFor(actionId: String): cc.tiredsysadmin.android.sizzle.input.GamepadChord? =
gamepadInput.bindings.entries.firstOrNull { it.value == actionId }?.key
/** Current keyboard key code bound to [actionId], or null. */
fun keyboardBindingFor(actionId: String): Int? =
keyboardInput.bindings.entries.firstOrNull { it.value == actionId }?.key
fun clearBinding(actionId: String, source: space.rcmd.android.sizzle.input.InputSource) {
fun clearBinding(actionId: String, source: cc.tiredsysadmin.android.sizzle.input.InputSource) {
when (source) {
space.rcmd.android.sizzle.input.InputSource.MIDI ->
cc.tiredsysadmin.android.sizzle.input.InputSource.MIDI ->
midiInput.ccBindings.entries.removeAll { it.value == actionId }
space.rcmd.android.sizzle.input.InputSource.GAMEPAD ->
cc.tiredsysadmin.android.sizzle.input.InputSource.GAMEPAD ->
gamepadInput.bindings.entries.removeAll { it.value == actionId }
space.rcmd.android.sizzle.input.InputSource.KEYBOARD ->
cc.tiredsysadmin.android.sizzle.input.InputSource.KEYBOARD ->
keyboardInput.bindings.entries.removeAll { it.value == actionId }
else -> {}
}
@@ -754,26 +754,26 @@ class AppViewModel(
/** Nudge an A/B loop region's repeat count and apply it to live playback
* immediately (without restarting the transport). */
fun changeRegionRepeats(region: space.rcmd.android.sizzle.model.LoopRegion, delta: Int) {
fun changeRegionRepeats(region: cc.tiredsysadmin.android.sizzle.model.LoopRegion, delta: Int) {
region.repeats = (region.repeats + delta).coerceAtLeast(1)
engine.refreshLoopPlaylist()
touched()
}
// -------------------------------------------------------------- sampler
private val recorder = space.rcmd.android.sizzle.audio.SampleRecorder()
private val recorder = cc.tiredsysadmin.android.sizzle.audio.SampleRecorder()
var isRecording by mutableStateOf(false); private set
/** Decode a WAV and assign it to Sampler [slot]'s [pad] (from a file import). */
fun loadSampleInto(
slot: space.rcmd.android.sizzle.model.ToolboxSlot,
slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot,
pad: Int,
id: String,
bytes: ByteArray,
): Boolean {
val sample = space.rcmd.android.sizzle.audio.SampleStore.decodeWav(bytes) ?: return false
space.rcmd.android.sizzle.audio.SampleStore.put(id, sample)
val pads = space.rcmd.android.sizzle.model.SamplerPads
val sample = cc.tiredsysadmin.android.sizzle.audio.SampleStore.decodeWav(bytes) ?: return false
cc.tiredsysadmin.android.sizzle.audio.SampleStore.put(id, sample)
val pads = cc.tiredsysadmin.android.sizzle.model.SamplerPads
slot.set(pads.key(pad), id)
slot.set(pads.sliceStartKey(pad), 0f); slot.set(pads.sliceEndKey(pad), 1f)
touched()
@@ -783,19 +783,19 @@ class AppViewModel(
/** Load an SF2 / XI (or WAV) file into a SoundFont [slot]: parse it, cache the
* extracted sample, and store its id + root note on the slot. */
fun loadSoundFont(
slot: space.rcmd.android.sizzle.model.ToolboxSlot,
slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot,
id: String,
bytes: ByteArray,
): Boolean {
val loaded = space.rcmd.android.sizzle.audio.SoundFontLoader.load(bytes) ?: return false
val loaded = cc.tiredsysadmin.android.sizzle.audio.SoundFontLoader.load(bytes) ?: return false
val previous = slot.string("sfSample")
space.rcmd.android.sizzle.audio.SampleStore.put(id, loaded.sample)
cc.tiredsysadmin.android.sizzle.audio.SampleStore.put(id, loaded.sample)
slot.set("sfSample", id)
slot.set("sfRoot", loaded.rootNote.toFloat())
// Free the sample this slot previously held (unless another slot still uses
// the same file) so repeatedly re-loading instruments doesn't leak PCM.
if (previous.isNotBlank() && previous != id && !isSampleReferenced(previous, except = slot)) {
space.rcmd.android.sizzle.audio.SampleStore.remove(previous)
cc.tiredsysadmin.android.sizzle.audio.SampleStore.remove(previous)
}
touched()
return true
@@ -803,10 +803,10 @@ class AppViewModel(
/** True if any toolbox slot other than [except] references the sample id [id]
* (as a SoundFont's `sfSample` or a Sampler pad). Used before evicting a sample
* from the [space.rcmd.android.sizzle.audio.SampleStore] so shared samples stay. */
* from the [cc.tiredsysadmin.android.sizzle.audio.SampleStore] so shared samples stay. */
private fun isSampleReferenced(
id: String,
except: space.rcmd.android.sizzle.model.ToolboxSlot,
except: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot,
): Boolean = project.toolbox.any { s -> s !== except && s.values.values.any { it == id } }
/**
@@ -815,9 +815,9 @@ class AppViewModel(
* and the markers reset to the full (new) sample. There is no undo — re-import
* or re-record to start over. Returns false if there's nothing to trim.
*/
fun trimSamplerPad(slot: space.rcmd.android.sizzle.model.ToolboxSlot, pad: Int): Boolean {
val pads = space.rcmd.android.sizzle.model.SamplerPads
val store = space.rcmd.android.sizzle.audio.SampleStore
fun trimSamplerPad(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, pad: Int): Boolean {
val pads = cc.tiredsysadmin.android.sizzle.model.SamplerPads
val store = cc.tiredsysadmin.android.sizzle.audio.SampleStore
val sample = store.get(slot.string(pads.key(pad))) ?: return false
val len = sample.data.size
if (len <= 1) return false
@@ -828,7 +828,7 @@ class AppViewModel(
if (start == 0 && end == len) return false // slice already spans the whole sample
// A fresh id so other pads sharing the original sample are left untouched.
val id = "trim:" + System.nanoTime()
store.put(id, space.rcmd.android.sizzle.audio.SampleStore.Sample(
store.put(id, cc.tiredsysadmin.android.sizzle.audio.SampleStore.Sample(
sample.data.copyOfRange(start, end), sample.sampleRate))
slot.set(pads.key(pad), id)
slot.set(pads.sliceStartKey(pad), 0f)
@@ -843,9 +843,9 @@ class AppViewModel(
* the same). No undo. Returns false if the pad is empty, silent, or already
* normalized.
*/
fun normalizeSamplerPad(slot: space.rcmd.android.sizzle.model.ToolboxSlot, pad: Int): Boolean {
val pads = space.rcmd.android.sizzle.model.SamplerPads
val store = space.rcmd.android.sizzle.audio.SampleStore
fun normalizeSamplerPad(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, pad: Int): Boolean {
val pads = cc.tiredsysadmin.android.sizzle.model.SamplerPads
val store = cc.tiredsysadmin.android.sizzle.audio.SampleStore
val sample = store.get(slot.string(pads.key(pad))) ?: return false
val data = sample.data
if (data.isEmpty()) return false
@@ -856,15 +856,15 @@ class AppViewModel(
if (gain in 0.999f..1.001f) return false // already at full scale
val out = FloatArray(data.size) { (data[it] * gain).coerceIn(-1f, 1f) }
val id = "norm:" + System.nanoTime() // fresh id so shared samples are untouched
store.put(id, space.rcmd.android.sizzle.audio.SampleStore.Sample(out, sample.sampleRate))
store.put(id, cc.tiredsysadmin.android.sizzle.audio.SampleStore.Sample(out, sample.sampleRate))
slot.set(pads.key(pad), id)
touched()
return true
}
/** Clear the sample assigned to a Sampler [slot]'s [pad]. */
fun clearSamplerPad(slot: space.rcmd.android.sizzle.model.ToolboxSlot, pad: Int) {
val pads = space.rcmd.android.sizzle.model.SamplerPads
fun clearSamplerPad(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, pad: Int) {
val pads = cc.tiredsysadmin.android.sizzle.model.SamplerPads
slot.values.remove(pads.key(pad))
slot.values.remove(pads.sliceStartKey(pad))
slot.values.remove(pads.sliceEndKey(pad))
@@ -894,19 +894,19 @@ class AppViewModel(
fun dismissNativeAudioError() { nativeAudioError = null }
/** Choose the colour theme and persist the choice. */
fun selectPalette(p: space.rcmd.android.sizzle.ui.theme.RetroPalette) {
fun selectPalette(p: cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette) {
palette = p
persistSettings()
}
// ------------------------------------------------------------ colour themes
private val stockThemes get() = space.rcmd.android.sizzle.ui.theme.RetroPalette.ALL
private val stockThemes get() = cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette.ALL
/** The two built-in themes are read-only and can never be deleted. */
fun isStockTheme(name: String): Boolean = stockThemes.any { it.name == name }
/** Every selectable theme: the two stock themes followed by user themes. */
fun allThemes(): List<space.rcmd.android.sizzle.ui.theme.RetroPalette> =
fun allThemes(): List<cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette> =
stockThemes + themeLibrary.loadAll()
/** All theme names for the selector dropdown (stock first, then user). */
@@ -935,7 +935,7 @@ class AppViewModel(
if (isStockTheme(name)) return false
val ok = themeLibrary.delete(name)
if (ok) {
if (palette.name == name) selectPalette(space.rcmd.android.sizzle.ui.theme.RetroPalette.AMBER)
if (palette.name == name) selectPalette(cc.tiredsysadmin.android.sizzle.ui.theme.RetroPalette.AMBER)
touched()
}
return ok
@@ -1008,13 +1008,13 @@ class AppViewModel(
}
/** Stop recording and assign the captured audio to Sampler [slot]'s [pad]. */
fun stopRecordingInto(slot: space.rcmd.android.sizzle.model.ToolboxSlot, pad: Int) {
fun stopRecordingInto(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, pad: Int) {
val sample = recorder.stop()
isRecording = false
if (sample != null) {
val id = "rec-" + System.currentTimeMillis()
space.rcmd.android.sizzle.audio.SampleStore.put(id, sample)
val pads = space.rcmd.android.sizzle.model.SamplerPads
cc.tiredsysadmin.android.sizzle.audio.SampleStore.put(id, sample)
val pads = cc.tiredsysadmin.android.sizzle.model.SamplerPads
slot.set(pads.key(pad), id)
slot.set(pads.sliceStartKey(pad), 0f); slot.set(pads.sliceEndKey(pad), 1f)
touched()
@@ -1024,7 +1024,7 @@ class AppViewModel(
/** Point an LFO slot at another device's parameter, capturing that param's
* current value as the modulation centre. Pass targetSlotIndex < 0 to clear. */
fun setLfoTarget(
lfoSlot: space.rcmd.android.sizzle.model.ToolboxSlot,
lfoSlot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot,
targetSlotIndex: Int,
key: String,
) {
@@ -1040,7 +1040,7 @@ class AppViewModel(
}
/** Preview a note of the Sampler slot's loaded sample (one-shot, editor use). */
fun auditionSample(slot: space.rcmd.android.sizzle.model.ToolboxSlot, midi: Int) {
fun auditionSample(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, midi: Int) {
engine.auditionSlotOn(slot.index, midi)
}
@@ -1052,11 +1052,11 @@ class AppViewModel(
// ------------------------------------------------------------ project I/O
/** Serialize the current song to `.sng` text. */
fun saveProjectText(): String =
space.rcmd.android.sizzle.io.ProjectIo.save(project)
cc.tiredsysadmin.android.sizzle.io.ProjectIo.save(project)
/** Replace the current song's contents from our full internal text (in place). */
fun loadProjectText(text: String) {
space.rcmd.android.sizzle.io.ProjectIo.loadInto(project, text)
cc.tiredsysadmin.android.sizzle.io.ProjectIo.loadInto(project, text)
cursorLine = 0; cursorTrack = 0
clearArrangementSelection() // the old arrangement's selection is no longer meaningful
touched()
@@ -1064,7 +1064,7 @@ class AppViewModel(
/** Export to the reference desktop sizzletracker `.sng` format (musical data). */
fun exportSng(): String =
space.rcmd.android.sizzle.io.SngFormat.export(project)
cc.tiredsysadmin.android.sizzle.io.SngFormat.export(project)
/** Import a reference `.sng` file (in place). Returns false if the text doesn't
* look like a `.sng` (so the caller can surface a popup) rather than silently
@@ -1073,7 +1073,7 @@ class AppViewModel(
val looksLikeSng = Regex("(?m)^\\s*(version|bpm|sig|block)\\b").containsMatchIn(text)
if (!looksLikeSng) return false
runCatching {
space.rcmd.android.sizzle.io.SngFormat.importInto(project, text)
cc.tiredsysadmin.android.sizzle.io.SngFormat.importInto(project, text)
}.getOrElse { return false }
cursorLine = 0; cursorTrack = 0
touched()
@@ -1104,7 +1104,7 @@ class AppViewModel(
*/
fun newProject() {
engine.stop()
loadProjectText(space.rcmd.android.sizzle.io.ProjectIo.save(Project()))
loadProjectText(cc.tiredsysadmin.android.sizzle.io.ProjectIo.save(Project()))
project.name = "untitled"
engine.rebuildFxChains() // all FX routing was cleared
}
@@ -1135,7 +1135,7 @@ class AppViewModel(
* between Sizzletracker instances. */
fun writeProjectBundle(): java.io.File {
val f = songLibrary.bundleExportFile(project.name.ifBlank { "project" })
f.outputStream().use { space.rcmd.android.sizzle.io.ProjectBundleIo.write(project, it) }
f.outputStream().use { cc.tiredsysadmin.android.sizzle.io.ProjectBundleIo.write(project, it) }
return f
}
@@ -1146,7 +1146,7 @@ class AppViewModel(
engine.stop()
val samplesDir = java.io.File(appContext.filesDir, "projectsamples")
val ok = runCatching {
space.rcmd.android.sizzle.io.ProjectBundleIo.read(
cc.tiredsysadmin.android.sizzle.io.ProjectBundleIo.read(
project, java.io.ByteArrayInputStream(bytes), samplesDir,
)
}.getOrDefault(false)
@@ -1170,7 +1170,7 @@ class AppViewModel(
viewModelScope.launch(Dispatchers.IO) {
val ok = runCatching {
appContext.contentResolver.openOutputStream(uri)?.use {
space.rcmd.android.sizzle.io.BackupIo.write(appContext.filesDir, it)
cc.tiredsysadmin.android.sizzle.io.BackupIo.write(appContext.filesDir, it)
} != null
}.getOrDefault(false)
backupMessage = if (ok) "Backup saved." else "Couldn't write the backup."
@@ -1183,7 +1183,7 @@ class AppViewModel(
viewModelScope.launch(Dispatchers.IO) {
val ok = runCatching {
appContext.contentResolver.openInputStream(uri)?.use {
space.rcmd.android.sizzle.io.BackupIo.read(appContext.filesDir, it)
cc.tiredsysadmin.android.sizzle.io.BackupIo.read(appContext.filesDir, it)
} ?: false
}.getOrDefault(false)
backupMessage = if (ok) {
@@ -1196,11 +1196,11 @@ class AppViewModel(
// ------------------------------------------------------ instrument/effect presets
/** Preset names available for a device type (for the editor's browser dropdown). */
fun presetNames(type: space.rcmd.android.sizzle.model.ToolboxType): List<String> =
fun presetNames(type: cc.tiredsysadmin.android.sizzle.model.ToolboxType): List<String> =
presetLibrary.list(type)
/** Save [slot] as a named preset in the library. Returns the preset file. */
fun savePreset(slot: space.rcmd.android.sizzle.model.ToolboxSlot, name: String): java.io.File {
fun savePreset(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, name: String): java.io.File {
val file = presetLibrary.save(slot, name)
touched()
return file
@@ -1208,7 +1208,7 @@ class AppViewModel(
/** Load a named preset for [slot]'s current type into it. The slot is renamed to
* the preset so the toolbox tile and mixer inserts read as the loaded sound. */
fun loadPreset(slot: space.rcmd.android.sizzle.model.ToolboxSlot, name: String): Boolean {
fun loadPreset(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, name: String): Boolean {
val type = slot.type ?: return false
val ok = presetLibrary.load(slot, type, name)
if (ok) { slot.name = name; engine.rebuildFxChains(); touched() }
@@ -1216,7 +1216,7 @@ class AppViewModel(
}
/** Import a preset from picked bytes: a `.zip` bundle (Sampler) or plain text. */
fun importPreset(slot: space.rcmd.android.sizzle.model.ToolboxSlot, bytes: ByteArray): Boolean {
fun importPreset(slot: cc.tiredsysadmin.android.sizzle.model.ToolboxSlot, bytes: ByteArray): Boolean {
val isZip = bytes.size >= 2 && bytes[0] == 'P'.code.toByte() && bytes[1] == 'K'.code.toByte()
val ok = if (isZip) presetLibrary.importZip(slot, java.io.ByteArrayInputStream(bytes))
else presetLibrary.importText(slot, String(bytes, Charsets.UTF_8))
@@ -1225,11 +1225,11 @@ class AppViewModel(
}
/** A shareable file for a stored preset (a zip bundle for the Sampler). */
fun presetShareFile(type: space.rcmd.android.sizzle.model.ToolboxType, name: String): java.io.File? =
fun presetShareFile(type: cc.tiredsysadmin.android.sizzle.model.ToolboxType, name: String): java.io.File? =
presetLibrary.bundleForShare(type, name)
/** Delete a stored preset (and, for the Sampler, its bundled sample). */
fun deletePreset(type: space.rcmd.android.sizzle.model.ToolboxType, name: String): Boolean {
fun deletePreset(type: cc.tiredsysadmin.android.sizzle.model.ToolboxType, name: String): Boolean {
val ok = presetLibrary.delete(type, name)
if (ok) touched()
return ok
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui
package cc.tiredsysadmin.android.sizzle.ui
import android.content.res.Configuration
import androidx.compose.runtime.Composable
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui
package cc.tiredsysadmin.android.sizzle.ui
import androidx.compose.foundation.background
import androidx.compose.foundation.horizontalScroll
@@ -20,11 +20,11 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.ui.components.PianoOctave
import space.rcmd.android.sizzle.ui.components.RepeatButton
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.ui.components.PianoOctave
import cc.tiredsysadmin.android.sizzle.ui.components.RepeatButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
private const val VEL_STEP = 8
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.components
package cc.tiredsysadmin.android.sizzle.ui.components
import androidx.compose.ui.text.TextLayoutResult
import androidx.compose.ui.text.TextMeasurer
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.components
package cc.tiredsysadmin.android.sizzle.ui.components
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.gestures.detectDragGestures
@@ -24,7 +24,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlin.math.cos
import kotlin.math.sin
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.components
package cc.tiredsysadmin.android.sizzle.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
@@ -30,7 +30,7 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* One octave laid out as a real piano keyboard: seven white keys across the bottom
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.components
package cc.tiredsysadmin.android.sizzle.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
@@ -34,7 +34,7 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.coroutines.withTimeoutOrNull
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* A tiny library of "pixel" UI building blocks. They are intentionally plain —
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.mixer
package cc.tiredsysadmin.android.sizzle.ui.mixer
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
@@ -43,17 +43,17 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.Mixer
import space.rcmd.android.sizzle.model.MixerChannel
import space.rcmd.android.sizzle.model.Pattern
import space.rcmd.android.sizzle.model.ToolboxKind
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.isLandscape
import space.rcmd.android.sizzle.ui.components.RepeatButton
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.components.RetroDropdown
import space.rcmd.android.sizzle.ui.components.SectionLabel
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.Mixer
import cc.tiredsysadmin.android.sizzle.model.MixerChannel
import cc.tiredsysadmin.android.sizzle.model.Pattern
import cc.tiredsysadmin.android.sizzle.model.ToolboxKind
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.isLandscape
import cc.tiredsysadmin.android.sizzle.ui.components.RepeatButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroDropdown
import cc.tiredsysadmin.android.sizzle.ui.components.SectionLabel
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* The second tab: a four-channel mixer, one strip per tracker track. Each strip
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.settings
package cc.tiredsysadmin.android.sizzle.ui.settings
import android.content.Context
import android.content.Intent
@@ -62,10 +62,10 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import androidx.core.content.FileProvider
import space.rcmd.android.sizzle.input.GamepadChord
import space.rcmd.android.sizzle.input.GamepadInput
import space.rcmd.android.sizzle.input.InputSource
import space.rcmd.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.input.GamepadChord
import cc.tiredsysadmin.android.sizzle.input.GamepadInput
import cc.tiredsysadmin.android.sizzle.input.InputSource
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
/**
* The fourth tab, built from STANDARD Material 3 components (Cards, Buttons,
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.theme
package cc.tiredsysadmin.android.sizzle.ui.theme
import android.app.Activity
import androidx.compose.foundation.isSystemInDarkTheme
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
@@ -25,11 +25,11 @@ import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.DelayDivisions
import space.rcmd.android.sizzle.model.ParamSpec
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.DelayDivisions
import cc.tiredsysadmin.android.sizzle.model.ParamSpec
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* The Tape Delay's custom editor: four tape heads side by side, each a vertical
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
@@ -34,13 +34,13 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlin.math.roundToInt
/**
* Editor for the [space.rcmd.android.sizzle.model.ToolboxType.GRANULAR] effect: a
* Editor for the [cc.tiredsysadmin.android.sizzle.model.ToolboxType.GRANULAR] effect: a
* dotted oscilloscope of the sound passing through with the granular read head drawn
* as a jumping playhead, and one horizontal Intensity slider below. The scope only
* shows data while the effect is placed on a mixer channel that is receiving signal.
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import java.io.ByteArrayOutputStream
import java.io.InputStream
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
@@ -13,10 +13,10 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.RetroDropdown
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.RetroDropdown
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* A modulation target: a numeric parameter on another device the LFO can drive.
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.background
import androidx.compose.foundation.border
@@ -26,13 +26,13 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlin.math.roundToInt
/**
* Editor for the [space.rcmd.android.sizzle.model.ToolboxType.MIX_TIGHTENER]
* Editor for the [cc.tiredsysadmin.android.sizzle.model.ToolboxType.MIX_TIGHTENER]
* effect. The preset bar above (rendered by [ToolboxScreen]) chooses a genre/
* instrument voicing; this screen exposes four faders:
* - **Strength** — the master amount for the whole EQ → compressor → limiter chain.
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
@@ -27,18 +27,18 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.SynthDefs
import space.rcmd.android.sizzle.model.TimeDivision
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.Knob
import space.rcmd.android.sizzle.ui.components.RetroDropdown
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.SynthDefs
import cc.tiredsysadmin.android.sizzle.model.TimeDivision
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.Knob
import cc.tiredsysadmin.android.sizzle.ui.components.RetroDropdown
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlinx.coroutines.launch
import kotlin.math.roundToInt
/**
* The bespoke editor for the subtractive synth ([space.rcmd.android.sizzle.model.ToolboxType.NES_SYNTH]).
* The bespoke editor for the subtractive synth ([cc.tiredsysadmin.android.sizzle.model.ToolboxType.NES_SYNTH]).
* Controls are split across swipeable cards by function — Oscillators, Filter,
* Amp/LFO, and the Mod Matrix — with tappable dot pagination. Continuous params use
* rotary [Knob]s; enumerated ones use [RetroDropdown]. The audition keyboard is
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
@@ -13,11 +13,11 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.ParamSpec
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.RetroDropdown
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.ParamSpec
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.RetroDropdown
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlin.math.roundToInt
/**
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
@@ -46,13 +46,13 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.audio.SampleStore
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.model.SamplerPads
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.audio.SampleStore
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.model.SamplerPads
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlinx.coroutines.launch
import kotlin.math.abs
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
@@ -35,14 +35,14 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.audio.SampleStore
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.PianoOctave
import space.rcmd.android.sizzle.ui.components.RepeatButton
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.audio.SampleStore
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.PianoOctave
import cc.tiredsysadmin.android.sizzle.ui.components.RepeatButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/** Upper bound (ms) for the SoundFont loop crossfade stepper. */
private const val MAX_XFADE_MS = 500
@@ -51,7 +51,7 @@ private const val MAX_XFADE_MS = 500
* The SoundFont device editor: load an `.sf2` / `.xi` (or `.wav`) file from local
* storage, preview its waveform, set output volume, and audition it pitched across
* a two-octave keyboard. The extracted sample plays across the whole keyboard from
* the file's root note (see [space.rcmd.android.sizzle.audio.SoundFontLoader]).
* the file's root note (see [cc.tiredsysadmin.android.sizzle.audio.SoundFontLoader]).
*/
@Composable
fun SoundFontEditor(vm: AppViewModel, slot: ToolboxSlot) {
@@ -206,7 +206,7 @@ private fun formatSliderValue(v: Float): String =
if (v == v.toInt().toFloat()) v.toInt().toString() else String.format("%.2f", v)
/** A slot-auditioning keyboard, laid out and sized like the shared audition /
* punch-in keyboard ([space.rcmd.android.sizzle.ui.StackedKeyboard]): a small octave
* punch-in keyboard ([cc.tiredsysadmin.android.sizzle.ui.StackedKeyboard]): a small octave
* selector above two weighted octaves. It is pinned at the bottom of the editor (by
* ToolboxScreen's ParamEditor) rather than scrolling with the controls. Holding a key
* sounds THIS slot's instrument — used by the SoundFont and synth editors. */
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
@@ -35,11 +35,11 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.TimeDivision
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.Knob
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.TimeDivision
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.Knob
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlin.math.cos
import kotlin.math.hypot
import kotlin.math.min
@@ -47,7 +47,7 @@ import kotlin.math.roundToInt
import kotlin.math.sin
/**
* Editor for the [space.rcmd.android.sizzle.model.ToolboxType.TAPE_ENGINE] effect,
* Editor for the [cc.tiredsysadmin.android.sizzle.model.ToolboxType.TAPE_ENGINE] effect,
* drawn as a reel-to-reel tape transport: two NAB reels (metal flange with three
* rounded-triangular bobbin holes) feeding tape down to a playhead block between them
* under tension. **Press and hold a reel to brake it** — the tape (and its pitch)
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.toolbox
package cc.tiredsysadmin.android.sizzle.ui.toolbox
import android.content.Intent
import androidx.activity.compose.BackHandler
@@ -56,14 +56,14 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.content.FileProvider
import space.rcmd.android.sizzle.model.ParamSpec
import space.rcmd.android.sizzle.model.ToolboxSlot
import space.rcmd.android.sizzle.model.ToolboxType
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.isLandscape
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.components.RetroDropdown
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.ParamSpec
import cc.tiredsysadmin.android.sizzle.model.ToolboxSlot
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.isLandscape
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroDropdown
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
import kotlinx.coroutines.launch
/**
@@ -110,7 +110,7 @@ fun ToolboxScreen(vm: AppViewModel) {
ToolboxTileGrid(vm, onTapTile, onLongPressTile,
Modifier.weight(1f).fillMaxHeight())
Box(Modifier.width(2.dp).fillMaxHeight().background(c.accent))
space.rcmd.android.sizzle.ui.StackedKeyboard(vm, punchIn = false, Modifier.weight(1.3f))
cc.tiredsysadmin.android.sizzle.ui.StackedKeyboard(vm, punchIn = false, Modifier.weight(1.3f))
}
} else {
// Portrait: a scrolling grid of square tiles above the keyboard (1.7 : 1).
@@ -131,7 +131,7 @@ fun ToolboxScreen(vm: AppViewModel) {
}
}
Box(Modifier.fillMaxWidth().height(2.dp).background(c.accent)) // fixed divider
space.rcmd.android.sizzle.ui.StackedKeyboard(vm, punchIn = false, Modifier.weight(1f))
cc.tiredsysadmin.android.sizzle.ui.StackedKeyboard(vm, punchIn = false, Modifier.weight(1f))
}
}
@@ -522,7 +522,7 @@ private val AMBIENCE_SECTIONS = listOf(
* the presets saved for this device type, plus Save (to the app's on-disk preset
* library), Import (from a picked text preset or — for the Sampler — a `.zip`
* bundle), and Share (via the system share sheet). Presets are the plain-text
* [space.rcmd.android.sizzle.io.PresetIo] format, stored one folder
* [cc.tiredsysadmin.android.sizzle.io.PresetIo] format, stored one folder
* per instrument/effect.
*/
@Composable
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.tracker
package cc.tiredsysadmin.android.sizzle.ui.tracker
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
@@ -42,13 +42,13 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.Arrangement as ArrModel
import space.rcmd.android.sizzle.model.LoopRegion
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.GlyphCache
import space.rcmd.android.sizzle.ui.components.RepeatButton
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.Arrangement as ArrModel
import cc.tiredsysadmin.android.sizzle.model.LoopRegion
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.GlyphCache
import cc.tiredsysadmin.android.sizzle.ui.components.RepeatButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* The lower-half arrangement. Layout (spreadsheet-style, like the sizzletracker
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.tracker
package cc.tiredsysadmin.android.sizzle.ui.tracker
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
@@ -16,6 +16,7 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clipToBounds
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
@@ -27,13 +28,13 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.Cell
import space.rcmd.android.sizzle.model.CellColumn
import space.rcmd.android.sizzle.model.Pattern
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.components.GlyphCache
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.Cell
import cc.tiredsysadmin.android.sizzle.model.CellColumn
import cc.tiredsysadmin.android.sizzle.model.Pattern
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.components.GlyphCache
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* The demoscene pattern grid, drawn as ONE [Canvas] instead of a tree of ~180
@@ -86,29 +87,41 @@ fun PatternGrid(vm: AppViewModel, modifier: Modifier = Modifier) {
val visibleRows = (heightPx / rowPx).toInt().coerceAtLeast(1)
val maxScrollPx = (pattern.length * rowPx - heightPx).coerceAtLeast(0f)
// Vertical scroll model. By default the view FOLLOWS — it auto-centres on the
// playhead while playing, else on the cursor. A finger flick detaches it into
// free inertial scrolling; switching to another block re-attaches. Both states
// are keyed on `pattern`, so selecting a different block re-inits them (== the
// "resume following on block switch" behaviour).
// Vertical scroll model. While PLAYING the view auto-centres on the playhead;
// a finger flick detaches it into free inertial scrolling, and switching to
// another block re-attaches (both states are keyed on `pattern`).
//
// While NOT playing the view holds still and only ever scrolls far enough to
// keep the cursor row on screen. It deliberately does NOT re-centre on the
// cursor: the cursor moves because the user just tapped a cell, and centring
// would yank that cell out from under their finger — on a pattern long enough
// to overflow, the tapped row visibly jumps to the middle of the viewport.
val following = remember(pattern) { mutableStateOf(true) }
val scrollPx = remember(pattern) { mutableStateOf(0f) }
// Pixel scroll offset the view auto-follows (top of viewport, 0 == line 0).
fun autoScrollPx(): Float {
// Pixel offset that centres the playhead (top of viewport, 0 == line 0).
fun playheadScrollPx(line: Int): Float =
(line * rowPx + rowPx / 2f - heightPx / 2f).coerceIn(0f, maxScrollPx)
// The offset actually shown. Pure: it only reads state, never writes it, so
// it is safe to call from the draw phase and from the gesture handlers.
fun effScrollPx(): Float {
val t = transportState.value
val focusLine = if (t.isPlaying) t.currentLine else vm.cursorLine
return (focusLine * rowPx + rowPx / 2f - heightPx / 2f).coerceIn(0f, maxScrollPx)
if (t.isPlaying && following.value) return playheadScrollPx(t.currentLine)
// Minimal scroll-into-view around the cursor row: `lo` is the offset that
// puts the cursor on the last visible line, `hi` the one that puts it on
// the first. Anything between leaves the view exactly where it is.
val top = vm.cursorLine * rowPx
val lo = (top + rowPx - heightPx).coerceIn(0f, maxScrollPx)
val hi = top.coerceIn(lo, maxScrollPx)
return scrollPx.value.coerceIn(lo, hi)
}
// The offset actually shown: the followed one, or the free one once detached.
fun effScrollPx(): Float =
if (following.value) autoScrollPx() else scrollPx.value.coerceIn(0f, maxScrollPx)
// Fling/drag scrolling. The first delta seeds the free position from wherever
// the followed view currently sits, then detaches following.
// the view currently sits, then detaches the playhead follow.
val scrollState = remember(pattern, rowPx, heightPx, maxScrollPx) {
ScrollableState { delta ->
val old = if (following.value) autoScrollPx() else scrollPx.value
val old = effScrollPx()
following.value = false
val next = (old - delta).coerceIn(0f, maxScrollPx)
scrollPx.value = next
@@ -133,7 +146,12 @@ fun PatternGrid(vm: AppViewModel, modifier: Modifier = Modifier) {
Canvas(
Modifier
.fillMaxSize()
// Inertial vertical scrolling (fling), detaching the auto-follow.
// Rows at the top and bottom of a scrolled viewport are drawn
// partially outside it; Compose does not clip a Canvas by default, so
// without this they paint over the toolbar above and the arrangement
// divider below.
.clipToBounds()
// Inertial vertical scrolling (fling), detaching the playhead follow.
.scrollable(orientation = Orientation.Vertical, state = scrollState)
.pointerInput(pattern, widthPx, heightPx) {
// Tap moves the cursor to the cell/column. Note entry is done with
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.ui.tracker
package cc.tiredsysadmin.android.sizzle.ui.tracker
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectTapGestures
@@ -28,13 +28,13 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import space.rcmd.android.sizzle.model.TimeSignature
import space.rcmd.android.sizzle.ui.AppViewModel
import space.rcmd.android.sizzle.ui.isLandscape
import space.rcmd.android.sizzle.ui.components.RepeatButton
import space.rcmd.android.sizzle.ui.components.RetroButton
import space.rcmd.android.sizzle.ui.components.RetroDropdown
import space.rcmd.android.sizzle.ui.theme.LocalRetro
import cc.tiredsysadmin.android.sizzle.model.TimeSignature
import cc.tiredsysadmin.android.sizzle.ui.AppViewModel
import cc.tiredsysadmin.android.sizzle.ui.isLandscape
import cc.tiredsysadmin.android.sizzle.ui.components.RepeatButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroButton
import cc.tiredsysadmin.android.sizzle.ui.components.RetroDropdown
import cc.tiredsysadmin.android.sizzle.ui.theme.LocalRetro
/**
* The first tab. Two stacked halves:
@@ -55,7 +55,7 @@ fun TrackerScreen(vm: AppViewModel) {
private fun TrackerLower(vm: AppViewModel, modifier: Modifier) {
Box(modifier) {
if (vm.punchInMode) {
space.rcmd.android.sizzle.ui.StackedKeyboard(vm, punchIn = true, Modifier.fillMaxSize())
cc.tiredsysadmin.android.sizzle.ui.StackedKeyboard(vm, punchIn = true, Modifier.fillMaxSize())
} else {
ArrangementRoll(vm)
}
@@ -208,7 +208,7 @@ private fun PatternButtons(vm: AppViewModel) {
)
RetroDropdown(
label = "SCALE",
options = space.rcmd.android.sizzle.model.Scale.entries,
options = cc.tiredsysadmin.android.sizzle.model.Scale.entries,
selected = project.scale,
optionLabel = { it.label },
onSelect = { project.scale = it; vm.bumpForToolbar() },
@@ -217,7 +217,7 @@ private fun PatternButtons(vm: AppViewModel) {
label = "ROOT",
options = (0..11).toList(),
selected = project.rootNote,
optionLabel = { space.rcmd.android.sizzle.model.Pitch.name(60 + it).dropLast(1) },
optionLabel = { cc.tiredsysadmin.android.sizzle.model.Pitch.name(60 + it).dropLast(1) },
onSelect = { project.rootNote = it; vm.bumpForToolbar() },
)
}
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.audio
package cc.tiredsysadmin.android.sizzle.audio
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.input
package cc.tiredsysadmin.android.sizzle.input
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.launch
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
@@ -1,17 +1,17 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test
import space.rcmd.android.sizzle.audio.SampleStore
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.SamplerPads
import space.rcmd.android.sizzle.model.ToolboxType
import cc.tiredsysadmin.android.sizzle.audio.SampleStore
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.SamplerPads
import cc.tiredsysadmin.android.sizzle.model.ToolboxType
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.File
@@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
package space.rcmd.android.sizzle.io
package cc.tiredsysadmin.android.sizzle.io
import space.rcmd.android.sizzle.model.Arrangement
import space.rcmd.android.sizzle.model.Pitch
import space.rcmd.android.sizzle.model.Project
import space.rcmd.android.sizzle.model.TimeSignature
import cc.tiredsysadmin.android.sizzle.model.Arrangement
import cc.tiredsysadmin.android.sizzle.model.Pitch
import cc.tiredsysadmin.android.sizzle.model.Project
import cc.tiredsysadmin.android.sizzle.model.TimeSignature
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Assert.assertTrue
+102 -14
View File
@@ -24,23 +24,111 @@ The UI has four tabs:
---
## 2. How to build & run
## 2. How to build, version & publish
Requirements: **Android Studio** (Koala / 2024.1 or newer) which bundles a
JDK 17 and the Android SDK.
### 2.1 The Makefile is the entrypoint
1. Open the project root in Android Studio. It will detect the Gradle build.
2. Let it download the SDK for `compileSdk 34`.
3. Pick a device/emulator running **Android 8.0 (API 26)** or newer and press
**Run**.
`make` — not `./gradlew`, not the Android Studio Run button — is how this
project is built and shipped. Every target is atomic and declares its own
dependencies, so any one of them can be invoked on a clean tree and will pull
in exactly what it needs and nothing else:
> The Gradle wrapper (`gradle/wrapper/gradle-wrapper.jar`) **is committed**
> (Gradle's recommended practice), so `./gradlew assembleDebug` works on a fresh
> clone with no extra setup. A `staging` build type (`./gradlew assembleStaging`)
> gives release-like performance while still using the debug signing key.
| Target | What it does |
|--------|--------------|
| `make help` | lists every target and prints the current version |
| `make deps` | fails loudly if the JDK or the Android SDK is missing |
| `make check` | unit tests + lint — the gate before a commit |
| `make staging` | non-debuggable build, release-like performance, debug key |
| `make install` | `adb install -r` of the staging APK (keeps projects/presets) |
| `make release` | **unsigned** release APK, named for F-Droid |
| `make dist` | stages the release APK + F-Droid metadata under `dist/` |
| `make publish` | uploads `dist/` to the private F-Droid repo — **manual only** |
| `make bump-minor` | feature bump: `x.(y+1).0`, versionCode +1 |
Key versions live in **one file**: `gradle/libs.versions.toml` (the "version
catalog"). Change a number there and the whole project follows.
Android Studio still works for day-to-day editing and debugging; it is just not
the source of truth for what a build *is*.
`make deps` exports `ANDROID_HOME` from the default macOS SDK location when the
environment does not already set it, because Gradle only consults
`ANDROID_HOME` / `ANDROID_SDK_ROOT` / `local.properties` and a fresh checkout
usually has none of them.
Library versions live in **one file**: `gradle/libs.versions.toml` (the "version
catalog"). Change a number there and the whole project follows. The Gradle
wrapper jar **is committed** (Gradle's recommended practice), so a fresh clone
builds with no extra setup.
### 2.2 Identity and versioning
The application id and namespace are **`cc.tiredsysadmin.android.sizzle`** —
`cc.tiredsysadmin.<operating_system>.<application>`, so a future desktop port
sits beside this one instead of colliding with it. The same string appears in
the JNI symbol names in `app/src/main/cpp/native_audio.cpp`
(`Java_cc_tiredsysadmin_android_sizzle_audio_NativeAudioBridge_*`); JNI resolves
symbols by mangled package path, so renaming the package without renaming those
two functions produces an `UnsatisfiedLinkError` at runtime, not a build error.
App versions live in **`versions.properties`** at the repo root, not in
`app/build.gradle.kts` — Gradle reads them from there, and so does the Makefile
when it names the published APK. One source means the artifact name and the
manifest can never disagree.
```properties
android.versionName = 0.22.0
android.versionCode = 49
```
The file also carries `macos` / `linux` / `bsd` / `windows` slots, set to `-`
until such a port exists, so a port starts from a tracked version instead of
inventing one.
Semantic versioning, applied on every change: **minor** for a feature, **patch**
for a fix or polish. `android.versionCode` always moves by exactly `+1` — both
F-Droid and the Android package manager order installs by that integer alone,
and a skipped or reused code cannot be taken back once published. `make
bump-minor` / `bump-patch` / `bump-major` does both halves correctly; editing
the numbers by hand is how they drift apart.
### 2.3 Build types
| Type | Debuggable | Signing | Use |
|------|-----------|---------|-----|
| `debug` | yes | debug key | breakpoints, instant-run edits |
| `staging` | **no** | debug key | anything on a real device |
| `release` | no | **unsigned** | publishing only |
`staging` exists because `debug` is misleading: a debuggable build makes ART run
the app un-optimised and Compose several times slower, so UI "snappiness"
measured on it means nothing. `staging` flips debuggability off — the single
biggest performance lever — while reusing the debug signing key so it still
installs without a release keystore. **Use `staging` for every on-device test.**
`release` is deliberately left **unsigned**. The signing key lives only inside
the private F-Droid repo; `fdroid publish` signs what lands in the unsigned
directory. No keystore should ever exist in this checkout.
### 2.4 Publishing
Publishing is **always a manual action, never automatic** — it is not a side
effect of a build, not wired into `check` or `release`, and never run
unattended. `make publish` is the only thing that reaches the network, and the
APK/metadata halves are separate targets so a metadata fix does not re-upload a
20 MB APK:
```
dist/<application_id>_<version_code>.apk -> rcmd@garage.rcmd.space:/var/lib/fdroid/unsigned
dist/<application_id>.yml -> rcmd@garage.rcmd.space:/var/lib/fdroid/metadata
```
`<application_id>_<version_code>.apk` is the naming scheme the unsigned
directory expects; `app/build.gradle.kts` stamps that same name onto the release
output via the legacy variant API (the Kotlin-DSL `android {}` receiver does not
expose output naming), deriving it from `applicationId` so the two cannot drift.
The metadata YAML is regenerated from `versions.properties` on every `make dist`,
so `CurrentVersion` can never lag the APK sitting next to it.
Run `make dist` first and look at what landed in `dist/` before running
`make publish`. Then sign the upload on the repo host.
---
@@ -84,7 +172,7 @@ Three ideas hold it together:
## 4. Package/file map
```
space.rcmd.android.sizzle
cc.tiredsysadmin.android.sizzle
├── SizzleApp.kt Application = tiny DI container (Project, InputRouter, AudioEngine)
├── MainActivity.kt Hosts Compose UI; forwards HW key/motion events; starts MIDI + service
│
+1 -1
View File
@@ -45,7 +45,7 @@ by **touch, a physical keyboard, a gamepad, or MIDI**.
- Audio uses **Oboe** (low‑latency) with an automatic fallback to the standard
path if Oboe can't start on your device.
- Installed as an APK (e.g. from a personal F‑Droid repository). Package id:
`space.rcmd.android.sizzle`.
`cc.tiredsysadmin.android.sizzle`.
---
+20
View File
@@ -0,0 +1,20 @@
# Per-platform version tracking (see CLAUDE.md -> Naming and versioning).
#
# Single source of truth: app/build.gradle.kts reads android.* from here, and
# the Makefile reads it for artifact naming and for the `bump-*` targets. Edit
# this file (or run `make bump-minor`), never the numbers in build.gradle.kts.
#
# Semantic versioning: MAJOR.MINOR.PATCH — minor for a feature, patch for a fix
# or polish. android.versionCode is monotonic and bumps by 1 on every release,
# because F-Droid and the Android package manager order installs by it alone.
android.versionName = 0.22.1
android.versionCode = 50
# No desktop builds exist yet. These lines are the agreed slots so a port starts
# with a version instead of inventing one; `-` means "not built on this
# platform". Namespace for every platform: cc.tiredsysadmin.<os>.sizzle.
macos.versionName = -
linux.versionName = -
bsd.versionName = -
windows.versionName = -