0.39.0 (73): export and import MIDI mappings as .szm text (Android and iOS)
- 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>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4d9e2328cb
commit
6688718bed
@@ -4,6 +4,7 @@
|
||||
#include "sizzle/Params.hpp"
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
namespace sizzle {
|
||||
|
||||
@@ -38,6 +39,17 @@ void Params::set(const char *key, const char *value) {
|
||||
std::snprintf(vals_[i], kValLen, "%s", value);
|
||||
}
|
||||
|
||||
void Params::remove(const char *key) {
|
||||
const int i = find(key);
|
||||
if (i < 0) return;
|
||||
for (int k = i; k + 1 < n_; ++k) { // keep the insertion order of the rest
|
||||
std::memcpy(keys_[k], keys_[k + 1], kKeyLen);
|
||||
std::memcpy(vals_[k], vals_[k + 1], kValLen);
|
||||
}
|
||||
--n_;
|
||||
keys_[n_][0] = vals_[n_][0] = '\0';
|
||||
}
|
||||
|
||||
void Params::set(const char *key, float value) {
|
||||
// Shortest text that reads back as the same float (Kotlin stores toString()).
|
||||
char buf[kValLen];
|
||||
|
||||
Reference in New Issue
Block a user