Skip to content

Instantly share code, notes, and snippets.

@voxels
voxels / PlaceSearchSession
Created March 19, 2023 15:35
CloudKit fetching of API Keys
//
// PlacesSearchSession.swift
// No Maps
//
// Created by Michael A Edgcumbe on 3/19/23.
//
import Foundation
import CloudKit
@voxels
voxels / VideoConverter.swift
Last active February 22, 2024 10:58
Video Converter to Spatial
//
// VideoConverter.swift
// SpatialVideoConverter
//
// Created by Michael A Edgcumbe on 2/21/24.
//
import Foundation
import AVFoundation
import VideoToolbox
@voxels
voxels / CDJ3000_MIDI.swift
Last active November 14, 2025 14:01
CDJ 3000 midi manager actor
import Foundation
import CoreMIDI
import Combine
// MARK: - MIDI Command Mapping
/// A namespace for mapping CDJ-3000 MIDI commands from the official PDF.
/// We focus on MIDI 1.0 Channel Voice messages (Note On/Off, Control Change).
/// "n" (e.g., 9n, Bn) corresponds to the MIDI channel (0-15).
private enum CDJ3000Commands {
import Foundation
import CoreMIDI
// Note: This file assumes the `MIDIAdapter.h` and `MIDIAdapter.mm` files
// from your project are available and included in the build target.
// It also assumes Core MIDI definitions like MIDIMessage_32 are available.
// --- UPDATE: We are removing the MIDIAdapter dependency for this class ---
// Define a simple Deck ID for clarity
public enum DeckID: Sendable {
import Foundation
/// A `Sendable` struct for defining a single MIDI Note message.
public struct MidiNoteMapping: Sendable, Equatable {
public var channel: UInt8
public var note: UInt8
}
/// A `Sendable` struct for defining a single MIDI Control Change (CC) message.
public struct MidiControlChangeMapping: Sendable, Equatable {
import Foundation
import Combine
import SwiftUI
/// An `ObservableObject` ViewModel that subscribes to a `CDJ3000Manager`
/// and publishes its state for a SwiftUI View.
///
/// This class is marked with `@MainActor`, which ensures that all UI-related
/// state updates are automatically published on the main thread.
@MainActor
@voxels
voxels / gist:db56aa8088defd5ddad081582a0f1371
Created May 22, 2026 14:26
Install OpenTrainer for NVidia 3080 Ti
Good — this is the right moment to reset. Your current env is in “dependency whack-a-mole mode,” so a clean stack will actually save time.
Below is a **known-stable Windows 11 + RTX 3080 Ti + OneTrainer SDXL LoRA setup** that avoids all the version traps you just hit (torch/torchvision/xformers/numpy/diffusers mismatches).
---
# 🧨 CLEAN INSTALL SCRIPT (Windows 11 / SDXL / OneTrainer)
## ⚠️ What this does
- conda activate qwen
- python -m mlx_lm server \
- --model unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit \
- --port 8000 \
- --max-tokens 8192 \
- --prompt-concurrency 4 \
- --decode-concurrency 1 \
- --prompt-cache-bytes 32G \
- --trust-remote-code
conda create -n qwen python=3.11 -y
conda activate qwen
pip install mlx-lm
python -m mlx_lm server --model unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit --port 8000 --max-tokens 16384 --prompt-concurrency 2048 --decode-concurrency 1 --prompt-cache-bytes 45G --trust-remote-code
# Local AI Video Production Pipeline — Student Edition (May 2026)
---
## Overview
This guide describes a fully offline, modular AI filmmaking pipeline split across two machines:
| Machine | Role |
|---|---|