Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
project.h File Reference

A project (or song), containing all the project data as opposed to zrythm_app.h which manages global things like plugin descriptors and global settings. More...

Include dependency graph for project.h:

Go to the source code of this file.

Data Structures

struct  Project
 Contains all of the info that will be serialized into a project file. More...
 
struct  ProjectSaveData
 Project save data. More...
 

Macros

#define PROJECT_SCHEMA_VERSION   5
 
#define PROJECT   ZRYTHM->project
 
#define DEFAULT_PROJECT_NAME   "Untitled Project"
 
#define PROJECT_FILE   "project.zpj"
 
#define PROJECT_BACKUPS_DIR   "backups"
 
#define PROJECT_PLUGINS_DIR   "plugins"
 
#define PROJECT_PLUGIN_STATES_DIR   "states"
 
#define PROJECT_PLUGIN_EXT_COPIES_DIR   "ext_file_copies"
 
#define PROJECT_PLUGIN_EXT_LINKS_DIR   "ext_file_links"
 
#define PROJECT_EXPORTS_DIR   "exports"
 
#define PROJECT_STEMS_DIR   "stems"
 
#define PROJECT_POOL_DIR   "pool"
 
#define PROJECT_FINISHED_FILE   "FINISHED"
 
#define PROJECT_DECOMPRESS_FILE   PROJECT_COMPRESS_FILE
 
#define PROJECT_DECOMPRESS_DATA   PROJECT_COMPRESS_DATA
 
#define project_compress(a, b, c, d, e, f, error)    _project_compress (true, a, b, c, d, e, f, error)
 
#define project_decompress(a, b, c, d, e, f, error)    _project_compress (false, a, b, c, d, e, f, error)
 

Enumerations

enum  ProjectPath {
  PROJECT_PATH_PROJECT_FILE , PROJECT_PATH_BACKUPS , PROJECT_PATH_PLUGINS , PROJECT_PATH_PLUGIN_STATES ,
  PROJECT_PATH_PLUGIN_EXT_COPIES , PROJECT_PATH_PLUGIN_EXT_LINKS , PROJECT_PATH_EXPORTS , PROJECT_PATH_EXPORTS_STEMS ,
  PROJECT_PATH_POOL , PROJECT_PATH_FINISHED_FILE
}
 
enum  SelectionType {
  SELECTION_TYPE_TRACKLIST , SELECTION_TYPE_TIMELINE , SELECTION_TYPE_INSERT , SELECTION_TYPE_MIDI_FX ,
  SELECTION_TYPE_INSTRUMENT , SELECTION_TYPE_MODULATOR , SELECTION_TYPE_EDITOR
}
 Selection type, used for controlling which part of the interface is selected, for copy-paste, displaying info in the inspector, etc. More...
 
enum  ProjectCompressionFlag { PROJECT_COMPRESS_FILE , PROJECT_COMPRESS_DATA }
 Flag to pass to project_compress() and project_decompress(). More...
 

Functions

ProjectSaveDataproject_save_data_new (void)
 
void project_save_data_free (ProjectSaveData *self)
 
void project_validate (Project *self)
 Checks that everything is okay with the project.
 
bool project_fix_audio_regions (Project *self)
 
ArrangerSelectionsproject_get_arranger_selections_for_last_selection (Project *self)
 
void project_init_common (Project *self)
 
WARN_UNUSED_RESULT bool project_save (Project *self, const char *_dir, const bool is_backup, const bool show_notification, const bool async, GError **error)
 Saves the project to a project file in the given dir.
 
int project_autosave_cb (void *data)
 Autosave callback.
 
bool project_make_project_dirs (Project *self, bool is_backup, GError **error)
 
MALLOC NONNULL char * project_get_path (Project *self, ProjectPath path, bool backup)
 Returns the requested project path as a newly allocated string.
 
COLD void project_init_selections (Project *self)
 Initializes the selections in the project.
 
bool _project_compress (bool compress, char **_dest, size_t *_dest_size, ProjectCompressionFlag dest_type, const char *_src, const size_t _src_size, ProjectCompressionFlag src_type, GError **error)
 Compresses/decompress a project from a file/data to a file/data.
 
char * project_get_existing_yaml (Project *self, bool backup, GError **error)
 Returns the YAML representation of the saved project file.
 
NONNULL Projectproject_clone (const Project *src, bool for_backup, GError **error)
 Deep-clones the given project.
 
COLD Projectproject_new (Zrythm *zrythm)
 Creates an empty project object.
 
void project_free (Project *self)
 Tears down the project.
 

Detailed Description

A project (or song), containing all the project data as opposed to zrythm_app.h which manages global things like plugin descriptors and global settings.

Definition in file project.h.