- SIZZLE-MIDIMAP 1 format: TYPE, NAME, one parameter=CC line each - core/src/io/MidiMapIo (iOS) and io/MidiMapIo.kt (Android), tested on one shared fixture (midimap_test, MidiMapIoTest) - EXPORT / IMPORT in each device's MIDI learn panel on both platforms - Params::remove; iOS clears a mapping by removing it - ios/Makefile regenerates the Xcode project when source folders change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
2.0 KiB
Objective-C
41 lines
2.0 KiB
Objective-C
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#import "SizzleSession.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/// Project bundles and whole-app backups (Android's ProjectBundleIo and BackupIo),
|
|
/// both ZIP archives in Android's layouts.
|
|
@interface SizzleSession (Files)
|
|
|
|
/// The open song as a bundle (.szgz): project.szg, every sample its Sampler,
|
|
/// SF2/XI, Grain Cloud and Wavetable slots use (samples/<n>.wav) and
|
|
/// samples/manifest.txt (`<n>\t<sample id>` per line).
|
|
- (nullable NSData *)projectBundleData;
|
|
/// Replace the open song with a bundle's: its samples are stored under their ids
|
|
/// first, so the song finds them. Leaves the song alone if it isn't a bundle.
|
|
- (BOOL)importProjectBundleData:(NSData *)data error:(NSError **)error;
|
|
/// True for a ZIP archive (bundle or backup) rather than text.
|
|
+ (BOOL)isZipData:(NSData *)data;
|
|
|
|
/// Toolbox [slot]'s MIDI mapping as .szm text (io/MidiMapIo: TYPE, NAME, one
|
|
/// `parameter=CC` line each), or nil for an empty slot.
|
|
- (nullable NSString *)midiMapTextOfSlot:(NSInteger)slot;
|
|
/// Replace [slot]'s MIDI mapping with the .szm [text] (a CC another parameter used
|
|
/// moves here). NO with [error] set when it isn't a mapping or is for another device.
|
|
- (BOOL)importMidiMapText:(NSString *)text intoSlot:(NSInteger)slot error:(NSError **)error;
|
|
/// Remove setting [key] from [slot] (a cleared MIDI mapping).
|
|
- (void)removeValueOfSlot:(NSInteger)slot key:(NSString *)key;
|
|
|
|
/// Everything Sizzle keeps: Documents/songs, themes, presets and samples, the
|
|
/// autosaved song, and [settings] as settings.txt. The open song is autosaved first.
|
|
- (nullable NSData *)backupDataWithSettings:(NSString *)settings;
|
|
/// Restore a backup: it is unpacked aside first and only swapped in once it looks
|
|
/// like one, so a wrong file can't destroy anything. The restored autosave becomes
|
|
/// the open song. Returns the backup's settings text ("" if it has none), or nil.
|
|
- (nullable NSString *)restoreBackupData:(NSData *)data error:(NSError **)error;
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|