Files
ReactorcoremeltdownandClaude Opus 5.5 962cfd1e2b iOS 0.4.0: Sizzle's Tracker, Mix, Toolbox and Setup tabs on the C++ engine
Ported from the Android tabs by parallel agents (each screen with its own
SizzleSession category); slot editors use the card editor with a preset
library; songs load/save in the Android project format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:32:30 +01:00

50 lines
2.3 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later
#import "SizzleSession.h"
NS_ASSUME_NONNULL_BEGIN
/// For -fillArrangementFromLane:…: write each lane's own block id (lane i ⟷ block i).
static const NSInteger SizzleArrangementOwnLane = -3;
/// API the Tracker screen needs beyond SizzleSession.h. Bulk reads and writes, so
/// the grid and the roll cache the song once per revision instead of taking the
/// lock per cell.
@interface SizzleSession (Tracker)
/// Copies the pattern's cells track-major (cells[track * length + line]); returns
/// the pattern's length (0 for no such pattern). Copies nothing when [capacity] is
/// smaller than 4 × length.
- (NSInteger)copyCellsOfPattern:(NSInteger)pattern into:(SizzleCell *)cells capacity:(NSInteger)capacity;
/// Writes a block of cells (track-major, [width] tracks × [height] lines) with its
/// top-left at track/line, clipped to the pattern (Android's paste, Cell.setFrom).
- (void)writeCells:(const SizzleCell *)cells width:(NSInteger)width height:(NSInteger)height
inPattern:(NSInteger)pattern track:(NSInteger)track line:(NSInteger)line;
/// Cell.clear() on tracks t0...t1 × lines l0...l1 (inclusive, clipped): empty note,
/// full velocity, channel kept.
- (void)clearCellsInPattern:(NSInteger)pattern fromTrack:(NSInteger)t0 toTrack:(NSInteger)t1
fromLine:(NSInteger)l0 toLine:(NSInteger)l1;
/// Android's setTimeSignature: sets the signature and, when the active pattern's
/// length isn't one the new signature allows, snaps it to the shortest option.
- (void)setSignatureSnappingActivePattern:(NSInteger)signature;
/// The roll's width in beats for the current signature (Arrangement.canvasBeats).
@property (nonatomic, readonly) NSInteger arrangementCanvasBeats;
/// Copies the arrangement lane-major (slots[lane * beats + beat], 8 lanes): a
/// pattern id, -1 empty or -2 note-off.
- (void)copyArrangementSlots:(int *)slots beats:(NSInteger)beats;
/// Sets lanes lane0...lane1 × beats beat0...beat1 (inclusive) to [pattern] (-1 empty,
/// -2 note-off, SizzleArrangementOwnLane for each lane's own block) in one edit.
- (void)fillArrangementFromLane:(NSInteger)lane0 toLane:(NSInteger)lane1
fromBeat:(NSInteger)beat0 toBeat:(NSInteger)beat1 pattern:(NSInteger)pattern;
@end
NS_ASSUME_NONNULL_END