Open leovoel opened 11 months ago
I believe I've figured out how to remap this for song URLs. The first step is to identify the channel, instrument, and pitch of the note to change the pins of. There's some code to do this for song reverb:
Later, after the note data is parsed from the URL, the corrections are applied:
Below that, this could be added:
if ((fromJummBox || fromGoldBox) && songTempoIndex >= 0) {
for (let channelIndex: number = 0; channelIndex < this.channels.length; channelIndex++) {
for (let instrumentIndex: number = 0; instrumentIndex < this.channels[channelIndex].instruments.length; instrumentIndex++) {
if (songTempoChannel == channelIndex && songTempoInstrument == instrumentIndex) {
for (const pattern of this.channels[channelIndex].patterns) {
for (const note of pattern.notes) {
if (note.pitches[0] !== Config.modCount - 1 - songTempoIndex) continue;
for (const pin of note.pins) {
const oldMin: number = 30;
const newMin: number = 1;
const old: number = pin.size + oldMin;
pin.size = old - newMin; // convertRealFactor will add back newMin as necessary
}
}
}
}
}
}
}
I don't think the version/variant check is quite correct though. It should capture JummBox and GoldBox songs only, but old UltraBox songs share the same format as GoldBox, so if the tempo range was increased while those were still the same, those old songs can't be identified unambiguously.
Similar code should be added for json imports. I think that's even more ambiguous when it comes to figuring out whether something is a JummBox song, or a GoldBox song, or an UltraBox song, which is unfortunate.
Related to the tempo range being increased.