Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
Settings

Data Structures

struct  ChordPreset
 A preset of chord descriptors. More...
 
struct  ChordPresetPack
 Chord preset pack. More...
 
struct  ChordPresetPackManager
 Chord preset pack manager. More...
 
struct  PluginSetting
 A setting for a specific plugin descriptor. More...
 
struct  PluginSettings
 
struct  UserShortcut
 
struct  UserShortcuts
 User shortcuts read from yaml. More...
 

Macros

#define CHORD_PRESET_PACK_MANAGER   (gZrythm->chord_preset_pack_manager)
 
#define USER_SHORTCUTS_SCHEMA_VERSION   2
 

Functions

ChordPresetchord_preset_new (void)
 
ChordPresetchord_preset_new_from_name (const char *name)
 
NONNULL ChordPresetchord_preset_clone (const ChordPreset *src)
 
char * chord_preset_get_info_text (const ChordPreset *self)
 Gets informational text.
 
const char * chord_preset_get_name (const ChordPreset *self)
 
void chord_preset_set_name (ChordPreset *self, const char *name)
 
GMenuModel * chord_preset_generate_context_menu (const ChordPreset *self)
 
NONNULL void chord_preset_free (ChordPreset *self)
 Frees the plugin setting.
 
ChordPresetPackchord_preset_pack_new_empty (void)
 
ChordPresetPackchord_preset_pack_new (const char *name, bool is_standard)
 
bool chord_preset_pack_contains_name (const ChordPresetPack *self, const char *name)
 
bool chord_preset_pack_contains_preset (const ChordPresetPack *self, const ChordPreset *pset)
 
char * chord_preset_pack_serialize_to_json_str (const ChordPresetPack *self, GError **error)
 
ChordPresetPackchord_preset_pack_deserialize_from_json_str (const char *json, GError **error)
 
void chord_preset_pack_add_preset (ChordPresetPack *self, const ChordPreset *pset)
 
void chord_preset_pack_delete_preset (ChordPresetPack *self, ChordPreset *pset)
 
const char * chord_preset_pack_get_name (const ChordPresetPack *self)
 
void chord_preset_pack_set_name (ChordPresetPack *self, const char *name)
 
ChordPresetPackchord_preset_pack_clone (const ChordPresetPack *src)
 
GMenuModel * chord_preset_pack_generate_context_menu (const ChordPresetPack *self)
 
void chord_preset_pack_free (ChordPresetPack *self)
 
void chord_preset_pack_destroy_cb (void *self)
 
ChordPresetPackManagerchord_preset_pack_manager_new (bool scan_for_packs)
 Creates a new chord preset pack manager.
 
int chord_preset_pack_manager_get_num_packs (const ChordPresetPackManager *self)
 
ChordPresetPackchord_preset_pack_manager_get_pack_at (const ChordPresetPackManager *self, int idx)
 
NONNULL ChordPresetPackchord_preset_pack_manager_get_pack_for_preset (ChordPresetPackManager *self, const ChordPreset *pset)
 
int chord_preset_pack_manager_get_pack_index (ChordPresetPackManager *self, ChordPresetPack *pack)
 
int chord_preset_pack_manager_get_pset_index (ChordPresetPackManager *self, ChordPreset *pset)
 Returns the preset index in its pack.
 
void chord_preset_pack_manager_add_preset (ChordPresetPackManager *self, ChordPresetPack *pack, const ChordPreset *pset, bool serialize)
 Add a copy of the given preset.
 
void chord_preset_pack_manager_add_pack (ChordPresetPackManager *self, const ChordPresetPack *pack, bool serialize)
 Add a copy of the given pack.
 
void chord_preset_pack_manager_delete_pack (ChordPresetPackManager *self, ChordPresetPack *pack, bool serialize)
 
void chord_preset_pack_manager_delete_preset (ChordPresetPackManager *self, ChordPreset *pset, bool serialize)
 
WARN_UNUSED_RESULT bool chord_preset_pack_manager_serialize (ChordPresetPackManager *self, GError **error)
 Serializes the chord presets.
 
void chord_preset_pack_manager_free (const ChordPresetPackManager *self)
 
PluginSetting *NONNULL plugin_setting_new_default (const PluginDescriptor *descr)
 Creates a plugin setting with the recommended settings for the given plugin descriptor based on the current setup.
 
PluginSetting *NONNULL plugin_setting_clone (const PluginSetting *src, bool validate)
 
bool plugin_setting_is_equal (const PluginSetting *a, const PluginSetting *b)
 
NONNULL void plugin_setting_validate (PluginSetting *self, bool print_result)
 Makes sure the setting is valid in the current run and changes any fields to make it conform.
 
NONNULL void plugin_setting_print (const PluginSetting *self)
 
NONNULL void plugin_setting_activate (const PluginSetting *self)
 Creates necessary tracks at the end of the tracklist.
 
NONNULL void plugin_setting_increment_num_instantiations (PluginSetting *self)
 Increments the number of times this plugin has been instantiated.
 
NONNULL void plugin_setting_free (PluginSetting *self)
 Frees the plugin setting.
 
void plugin_setting_free_closure (void *self, GClosure *closure)
 
PluginSettingsplugin_settings_read_or_new (void)
 Reads the file and fills up the object.
 
NONNULL void plugin_settings_serialize_to_file (PluginSettings *self)
 Serializes the current settings.
 
NONNULL PluginSettingplugin_settings_find (PluginSettings *self, const PluginDescriptor *descr)
 Finds a setting for the given plugin descriptor.
 
NONNULL void plugin_settings_set (PluginSettings *self, PluginSetting *setting, bool _serialize)
 Replaces a setting or appends a setting to the cache.
 
NONNULL void plugin_settings_free (PluginSettings *self)
 
void user_shortcut_free (UserShortcut *shortcut)
 
UserShortcutsuser_shortcuts_new (void)
 Reads the file and fills up the object.
 
const char * user_shortcuts_get (UserShortcuts *self, bool primary, const char *action, const char *default_shortcut)
 Returns a shortcut for the given action, or default_shortcut if not found.
 
void user_shortcuts_free (UserShortcuts *self)
 

Detailed Description

Macro Definition Documentation

◆ CHORD_PRESET_PACK_MANAGER

#define CHORD_PRESET_PACK_MANAGER   (gZrythm->chord_preset_pack_manager)

Definition at line 23 of file chord_preset_pack_manager.h.

◆ USER_SHORTCUTS_SCHEMA_VERSION

#define USER_SHORTCUTS_SCHEMA_VERSION   2

Definition at line 24 of file user_shortcuts.h.

Function Documentation

◆ chord_preset_get_info_text()

char * chord_preset_get_info_text ( const ChordPreset * self)

Gets informational text.

Must be free'd by caller.

◆ chord_preset_pack_add_preset()

void chord_preset_pack_add_preset ( ChordPresetPack * self,
const ChordPreset * pset )
Note
The given preset is cloned so the caller is still responsible for pset.

◆ chord_preset_pack_manager_new()

ChordPresetPackManager * chord_preset_pack_manager_new ( bool scan_for_packs)

Creates a new chord preset pack manager.

Parameters
scan_for_packsWhether to scan for preset packs.

◆ chord_preset_pack_manager_serialize()

WARN_UNUSED_RESULT bool chord_preset_pack_manager_serialize ( ChordPresetPackManager * self,
GError ** error )

Serializes the chord presets.

Returns
Whether successful.

◆ plugin_setting_activate()

NONNULL void plugin_setting_activate ( const PluginSetting * self)

Creates necessary tracks at the end of the tracklist.

This may happen asynchronously so the caller should not expect the setting to be activated on return.

◆ plugin_setting_increment_num_instantiations()

NONNULL void plugin_setting_increment_num_instantiations ( PluginSetting * self)

Increments the number of times this plugin has been instantiated.

Note
This also serializes all plugin settings.

◆ plugin_setting_validate()

NONNULL void plugin_setting_validate ( PluginSetting * self,
bool print_result )

Makes sure the setting is valid in the current run and changes any fields to make it conform.

For example, if the setting is set to not open with carla but the descriptor is for a VST plugin, this will set PluginSetting::open_with_carla to true.

◆ plugin_settings_find()

NONNULL PluginSetting * plugin_settings_find ( PluginSettings * self,
const PluginDescriptor * descr )

Finds a setting for the given plugin descriptor.

Returns
The found setting or NULL.

◆ plugin_settings_set()

NONNULL void plugin_settings_set ( PluginSettings * self,
PluginSetting * setting,
bool _serialize )

Replaces a setting or appends a setting to the cache.

This clones the setting before adding it.

Parameters
serializeWhether to serialize the updated cache now.

◆ user_shortcuts_get()

const char * user_shortcuts_get ( UserShortcuts * self,
bool primary,
const char * action,
const char * default_shortcut )

Returns a shortcut for the given action, or default_shortcut if not found.

Parameters
primaryWhether to get the primary shortcut, otherwise the secondary.