resonance 1.0.1
Loading...
Searching...
No Matches
museutil.h File Reference

Go to the source code of this file.

Functions

MultiMuse * CloneAndTranspose (const MultiMuse &muse, int nTrans)
 Copy a sequence with every note moved by a number of semitones.

Function Documentation

◆ CloneAndTranspose()

MultiMuse * CloneAndTranspose ( const MultiMuse & muse,
int nTrans )

Copy a sequence with every note moved by a number of semitones.

The routine is in GsMuseUtil.cpp, the unit the RTTI of its file-local helper class _GLOBAL_$N$GsMuseUtil.cpp::Shifter identifies, apart from MultiMuse's own unit. It reads the sequence only through the public MultiMuse::mEntries.

A stack Shifter visits every entry. A NoteMsg, and a StdMidiMsg with a note-on or note-off status, is copied with its note number raised by nTrans (wrapping at 256). Any other message whose identity lies in the MuseMsg range is copied unchanged. Each copy is added at the entry's position.

Parameters
museThe sequence to copy.
nTransThe semitones to add to every note.
Returns
A new sequence with one reference, which the caller releases.
Ghidra address:
NTSC-U/C: 0x001ab6d8
Ghidra address:
PAL: 0x001b1440