Skip to content

GuitarPrometheus::Profiles::Profile

GuitarPrometheus::Profiles::Profile

A VST keyswitch and articulation profile. More…

#include <Profile.h>

Public Functions

Name
Profile(juce::Uuid id, std::array< std::uint8_t, 8 > salt, std::string name, std::string category, std::map< Techniques::Technique, int > techniqueKeyswitches, std::map< Techniques::Articulation, int > articulationKeyswitches, std::map< Techniques::Articulation, ArticulationMod > articulationMods, std::map< MusicModels::Dynamic, int > velocityForDynamic, std::optional< std::map< std::string, int > > drumMap, std::map< Techniques::Technique, int > keyswitchVelocityForTechnique ={}, std::map< Techniques::Articulation, int > keyswitchVelocityForArticulation ={}, nlohmann::json keyswitchTree =nlohmann::json::object(), std::map< std::string, std::string > techniqueFlags ={}, std::map< std::string, std::string > variantDefaults ={}, bool showUnmapped =true, int octaveOffset =0, bool humanizerEnabled =false, Midi::HumanizerConfig humanizerSettings ={})
Construct a fully-populated profile.
const juce::Uuid &getId() const
const std::array< std::uint8_t, 8 > &getSalt() const
const std::string &getName() const
const std::string &getCategory() const
const std::map< Techniques::Technique, int > &getTechniqueKeyswitches() const
const std::map< Techniques::Articulation, int > &getArticulationKeyswitches() const
const std::map< Techniques::Articulation, ArticulationMod > &getArticulationMods() const
const std::map< MusicModels::Dynamic, int > &getVelocityForDynamic() const
const std::optional< std::map< std::string, int > > &getDrumMap() const
const std::map< Techniques::Technique, int > &getKeyswitchVelocityForTechnique() const
Optional per-technique override for the velocity used when emitting the keyswitch NoteOn for that technique.
const std::map< Techniques::Articulation, int > &getKeyswitchVelocityForArticulation() const
Optional per-articulation override for the velocity used when emitting the keyswitch NoteOn for that articulation.
const nlohmann::json &getKeyswitchTree() const
const std::map< std::string, std::string > &getTechniqueFlags() const
const std::map< std::string, std::string > &getVariantDefaults() const
boolgetShowUnmapped() const
Editor-only preference: whether the Techniques tab shows techniques that have no keyswitch mapping yet.
intgetOctaveOffset() const
Profile-level default octave shift (in octaves, range typically -3..+3).
boolgetHumanizerEnabled() const
Whether the profile’s humanizer settings should apply when a track bound to this profile is exported.
const Midi::HumanizerConfig &getHumanizerSettings() const
Profile-level default humanizer config (velocity jitter, timing jitter, seed).
boolisDrumProfile() const
Shortcut for getDrumMap().has_value().
std::vector< std::string >findUnmappedDrumNames(const std::vector< std::string > & observedDrumNames) const
Given drum names observed in a track, return those not present in this profile’s drumMap.

Detailed Description

class GuitarPrometheus::Profiles::Profile;

A VST keyswitch and articulation profile.

Immutable after construction. Identity is the UUID — name, category, and field contents can all change between versions. The salt is combined with the UUID to derive a stable on-disk filename suffix.

A Profile becomes a “drum profile” by having its drumMap populated (i.e., drumMap.has_value() == true). Drum profiles still carry the full keyswitch / articulation / dynamic- velocity machinery — they are pitched-profile-plus-drum-map.

Public Functions Documentation

function Profile

Profile(
juce::Uuid id,
std::array< std::uint8_t, 8 > salt,
std::string name,
std::string category,
std::map< Techniques::Technique, int > techniqueKeyswitches,
std::map< Techniques::Articulation, int > articulationKeyswitches,
std::map< Techniques::Articulation, ArticulationMod > articulationMods,
std::map< MusicModels::Dynamic, int > velocityForDynamic,
std::optional< std::map< std::string, int > > drumMap,
std::map< Techniques::Technique, int > keyswitchVelocityForTechnique ={},
std::map< Techniques::Articulation, int > keyswitchVelocityForArticulation ={},
nlohmann::json keyswitchTree =nlohmann::json::object(),
std::map< std::string, std::string > techniqueFlags ={},
std::map< std::string, std::string > variantDefaults ={},
bool showUnmapped =true,
int octaveOffset =0,
bool humanizerEnabled =false,
Midi::HumanizerConfig humanizerSettings ={}
)

Construct a fully-populated profile.

All collections are passed by value and moved into place (constructor-sink pattern).

function getId

const juce::Uuid & getId() const

function getSalt

const std::array< std::uint8_t, 8 > & getSalt() const

function getName

const std::string & getName() const

function getCategory

const std::string & getCategory() const

function getTechniqueKeyswitches

const std::map< Techniques::Technique, int > & getTechniqueKeyswitches() const

function getArticulationKeyswitches

const std::map< Techniques::Articulation, int > & getArticulationKeyswitches() const

function getArticulationMods

const std::map< Techniques::Articulation, ArticulationMod > & getArticulationMods() const

function getVelocityForDynamic

const std::map< MusicModels::Dynamic, int > & getVelocityForDynamic() const

function getDrumMap

const std::optional< std::map< std::string, int > > & getDrumMap() const

function getKeyswitchVelocityForTechnique

const std::map< Techniques::Technique, int > & getKeyswitchVelocityForTechnique() const

Optional per-technique override for the velocity used when emitting the keyswitch NoteOn for that technique.

Empty map means “use the injector’s default of 100 across the board”. Populating an entry for Technique::Muting with value 30, for example, makes the injector fire palm-mute keyswitches at velocity 30 — which Odin III interprets as the palm-mute articulation rather than dead-mute (vel 0-14) or closed-palm-mute (vel 15-24).

function getKeyswitchVelocityForArticulation

const std::map< Techniques::Articulation, int > & getKeyswitchVelocityForArticulation() const

Optional per-articulation override for the velocity used when emitting the keyswitch NoteOn for that articulation.

Parallel to getKeyswitchVelocityForTechnique: empty map means “use the injector’s default of 100”. An entry for Articulation::Staccato with value 50, for example, fires the staccato keyswitch at velocity 50, useful for VSTs that velocity-key articulations on a shared keyswitch note.

function getKeyswitchTree

const nlohmann::json & getKeyswitchTree() const

function getTechniqueFlags

const std::map< std::string, std::string > & getTechniqueFlags() const

function getVariantDefaults

const std::map< std::string, std::string > & getVariantDefaults() const

function getShowUnmapped

bool getShowUnmapped() const

Editor-only preference: whether the Techniques tab shows techniques that have no keyswitch mapping yet.

Round-tripped per profile so each VST’s editor view is independent.

function getOctaveOffset

int getOctaveOffset() const

Profile-level default octave shift (in octaves, range typically -3..+3).

Applied at MIDI export time to every part bound to this profile, unless the project has a per-part octave override in ExportConfig::octaveOffsetByPart for the same scorePartId. A bass-shaped profile would carry -1 here so binding it to a track automatically transposes sounding pitch down an octave; the user can still override per part in the Override editor.

function getHumanizerEnabled

bool getHumanizerEnabled() const

Whether the profile’s humanizer settings should apply when a track bound to this profile is exported.

When false, the profile contributes no humanization regardless of the values in [getHumanizerSettings()](/api-reference/classes/classguitarprometheus_1_1profiles_1_1profile/#function-gethumanizersettings) — the user toggled the feature off but kept their ranges so they round-trip if the toggle comes back on.

Per-part overrides in ExportConfig::humanizerByPart always win over both this flag and the profile’s settings.

function getHumanizerSettings

const Midi::HumanizerConfig & getHumanizerSettings() const

Profile-level default humanizer config (velocity jitter, timing jitter, seed).

Consulted by Humanizer::apply only when [getHumanizerEnabled()](/api-reference/classes/classguitarprometheus_1_1profiles_1_1profile/#function-gethumanizerenabled) is true AND the project’s ExportConfig::humanizerByPart has no per-part override for the track. Default-constructed is a no-op (zero ranges).

function isDrumProfile

bool isDrumProfile() const

Shortcut for getDrumMap().has_value().

function findUnmappedDrumNames

std::vector< std::string > findUnmappedDrumNames(
const std::vector< std::string > & observedDrumNames
) const

Given drum names observed in a track, return those not present in this profile’s drumMap.

  • If not a drum profile (drumMap nullopt): returns an empty vector regardless of input.
  • If drumMap is present but empty: every observed name is unmapped; all are returned.
  • If drumMap is present and populated: returns input names whose exact string is not a key in drumMap.

Result preserves first-occurrence order from the input and de-dupes.


Updated on 2026-05-29 at 07:39:52 +0000