hydrogen 1.1.1
Preferences Class Reference

Manager for User Preferences File (singleton) More...

#include <Preferences.h>

Inheritance diagram for Preferences:
Object

Public Types

enum  {
  USE_JACK_TRANSPORT = 0 , USE_JACK_TIME_MASTER = 0 , SET_PLAY_ON = 0 , BC_ON = 0 ,
  NO_JACK_TRANSPORT = 1 , NO_JACK_TIME_MASTER = 1 , SET_PLAY_OFF = 1 , BC_OFF = 1
}
 
enum  UI_LAYOUT_TYPES { UI_LAYOUT_SINGLE_PANE , UI_LAYOUT_TABBED }
 
enum  UI_SCALING_POLICY { UI_SCALING_SMALLER , UI_SCALING_SYSTEM , UI_SCALING_LARGER }
 
enum class  JackTrackOutputMode { postFader = 0 , preFader = 1 }
 Specifies which audio settings will be applied to the sample supplied in the JACK per track output ports. More...
 
enum class  JackBBTSyncMethod { constMeasure = 0 , identicalBars = 1 }
 Specifies the variable, which has to remain constant in order to guarantee a working synchronization and relocation with Hydrogen as JACK timebase client. More...
 

Public Member Functions

 ~Preferences ()
 
void loadPreferences (bool bGlobal)
 Load the preferences file. More...
 
void savePreferences ()
 Save the preferences file. More...
 
const QString & getDataDirectory ()
 
const QString & getDefaultEditor ()
 
void setDefaultEditor (QString editor)
 
int getDefaultUILayout ()
 
void setDefaultUILayout (int layout)
 
int getUIScalingPolicy ()
 
void setUIScalingPolicy (int nPolicy)
 
const QString & getPreferredLanguage ()
 
void setPreferredLanguage (const QString &sLanguage)
 
void setRestoreLastSongEnabled (bool restore)
 
void setRestoreLastPlaylistEnabled (bool restore)
 
void setUseRelativeFilenamesForPlaylists (bool value)
 
void setShowDevelWarning (bool value)
 
bool getShowDevelWarning ()
 
bool getShowNoteOverwriteWarning ()
 
void setShowNoteOverwriteWarning (bool bValue)
 
bool isRestoreLastSongEnabled ()
 
bool isRestoreLastPlaylistEnabled ()
 
bool isPlaylistUsingRelativeFilenames ()
 
void setLastSongFilename (const QString &filename)
 
const QString & getLastSongFilename ()
 
void setLastPlaylistFilename (const QString &filename)
 
const QString & getLastPlaylistFilename ()
 
void setHearNewNotes (bool value)
 
bool getHearNewNotes ()
 
void setRecordEvents (bool value)
 
bool getRecordEvents ()
 
void setPunchInPos (unsigned pos)
 
int getPunchInPos ()
 
void setPunchOutPos (unsigned pos)
 
int getPunchOutPos ()
 
bool inPunchArea (int pos)
 
void unsetPunchArea ()
 
void setQuantizeEvents (bool value)
 
bool getQuantizeEvents ()
 
const std::vector< QString > getRecentFiles ()
 
void setRecentFiles (const std::vector< QString > recentFiles)
 
void insertRecentFile (const QString sFilename)
 
QStringList getRecentFX ()
 
void setMostRecentFX (QString)
 
const QString & getQTStyle ()
 
void setQTStyle (const QString &sStyle)
 
const QString & getApplicationFontFamily ()
 
void setApplicationFontFamily (const QString &family)
 
int getApplicationFontPointSize ()
 
void setApplicationFontPointSize (int size)
 
QString getMixerFontFamily ()
 
void setMixerFontFamily (const QString &family)
 
int getMixerFontPointSize ()
 
void setMixerFontPointSize (int size)
 
float getMixerFalloffSpeed ()
 
void setMixerFalloffSpeed (float value)
 
bool showInstrumentPeaks ()
 
void setInstrumentPeaks (bool value)
 
int getPatternEditorGridResolution ()
 
void setPatternEditorGridResolution (int value)
 
bool isPatternEditorUsingTriplets ()
 
void setPatternEditorUsingTriplets (bool value)
 
bool isFXTabVisible ()
 
void setFXTabVisible (bool value)
 
bool getShowAutomationArea ()
 
void setShowAutomationArea (bool value)
 
unsigned getPatternEditorGridHeight ()
 
void setPatternEditorGridHeight (unsigned value)
 
unsigned getPatternEditorGridWidth ()
 
void setPatternEditorGridWidth (unsigned value)
 
unsigned getSongEditorGridHeight ()
 
void setSongEditorGridHeight (unsigned value)
 
unsigned getSongEditorGridWidth ()
 
void setSongEditorGridWidth (unsigned value)
 
void setColoringMethodAuxValue (int value)
 
int getColoringMethodAuxValue () const
 
void setColoringMethod (int value)
 
int getColoringMethod () const
 
WindowProperties getMainFormProperties ()
 
void setMainFormProperties (const WindowProperties &prop)
 
WindowProperties getMixerProperties ()
 
void setMixerProperties (const WindowProperties &prop)
 
WindowProperties getPatternEditorProperties ()
 
void setPatternEditorProperties (const WindowProperties &prop)
 
WindowProperties getSongEditorProperties ()
 
void setSongEditorProperties (const WindowProperties &prop)
 
WindowProperties getInstrumentRackProperties ()
 
void setInstrumentRackProperties (const WindowProperties &prop)
 
WindowProperties getAudioEngineInfoProperties ()
 
void setAudioEngineInfoProperties (const WindowProperties &prop)
 
WindowProperties getLadspaProperties (unsigned nFX)
 
void setLadspaProperties (unsigned nFX, const WindowProperties &prop)
 
UIStylegetDefaultUIStyle ()
 
bool patternModePlaysSelected ()
 
void setPatternModePlaysSelected (bool b)
 
bool useLash ()
 
void setUseLash (bool b)
 
bool hideKeyboardCursor ()
 
void setHideKeyboardCursor (bool b)
 
void setMaxBars (const int bars)
 
int getMaxBars () const
 
void setMaxLayers (const int layers)
 
int getMaxLayers () const
 
void setWaitForSessionHandler (bool value)
 
bool getWaitForSessionHandler ()
 
QString getJackSessionUUID ()
 
void setJackSessionUUID (QString uuid)
 
QString getJackSessionApplicationPath ()
 
void setJackSessionApplicationPath (QString path)
 
void setNsmClientId (const QString &nsmClientId)
 
QString getNsmClientId (void)
 
void setNsmSongName (const QString &nsmSongName)
 
QString getNsmSongName (void)
 
bool getOscServerEnabled ()
 
void setOscServerEnabled (bool val)
 
bool getOscFeedbackEnabled ()
 
void setOscFeedbackEnabled (bool val)
 
int getOscServerPort ()
 
void setOscServerPort (int oscPort)
 
bool getUseTimelineBpm ()
 Whether to use the bpm of the timeline. More...
 
void setUseTimelineBpm (bool val)
 Setting __useTimelineBpm. More...
 
void setShowPlaybackTrack (bool val)
 
bool getShowPlaybackTrack () const
 
int getRubberBandCalcTime ()
 
void setRubberBandCalcTime (int val)
 
int getRubberBandBatchMode ()
 
void setRubberBandBatchMode (int val)
 
int getLastOpenTab ()
 
void setLastOpenTab (int n)
 
void setH2ProcessName (const QString &processName)
 
QString getH2ProcessName ()
 
int getExportSampleDepthIdx () const
 
void setExportSampleDepthIdx (int nExportSampleDepthIdx)
 
int getExportSampleRateIdx () const
 
void setExportSampleRateIdx (int nExportSampleRateIdx)
 
int getExportModeIdx () const
 
void setExportModeIdx (int nExportMode)
 
QString getExportDirectory () const
 
void setExportDirectory (const QString &sExportDirectory)
 
int getExportTemplateIdx () const
 
void setExportTemplateIdx (int nExportTemplateIdx)
 
int getMidiExportMode () const
 
void setMidiExportMode (int nExportMode)
 
QString getMidiExportDirectory () const
 
void setMidiExportDirectory (const QString &sExportDirectory)
 
QString getPreferencesOverwritePath ()
 Returns m_sPreferencesOverwritePath. More...
 
void setPreferencesOverwritePath (const QString &newPath)
 Setting m_sPreferencesOverwritePath. More...
 
- Public Member Functions inherited from Object
 ~Object ()
 destructor More...
 
 Object (const Object &obj)
 copy constructor More...
 
 Object (const char *class_name)
 constructor More...
 
const char * class_name () const
 return the class name More...
 
virtual QString toQString (const QString &sPrefix, bool bShort=true) const
 Formatted string version for debugging purposes. More...
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG. More...
 

Static Public Member Functions

static void create_instance ()
 If __instance equals 0, a new Preferences singleton will be created and stored in it. More...
 
static Preferencesget_instance ()
 Returns a pointer to the current Preferences singleton stored in __instance. More...
 
- Static Public Member Functions inherited from Object
static void set_count (bool flag)
 enable/disable class instances counting More...
 
static bool count_active ()
 return true if class instances counting is enabled More...
 
static unsigned objects_count ()
 return the number of objects More...
 
static void write_objects_map_to (std::ostream &out)
 output the full objects map to a given ostream More...
 
static void write_objects_map_to_cerr ()
 output objects map to stderr More...
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation ! More...
 
static Loggerlogger ()
 return the logger instance More...
 

Data Fields

QString __lastspatternDirectory
 
QString __lastsampleDirectory
 
bool __playsamplesonclicking
 
bool __playselectedinstrument
 
bool m_bFollowPlayhead
 
bool m_brestartLash
 
bool m_bsetLash
 
bool __expandSongItem
 
bool __expandPatternItem
 
bool m_bbc
 
bool m_mmcsetplay
 
int m_countOffset
 
int m_startOffset
 
std::list< QString > sServerList
 
std::list< QString > m_patternCategories
 
QString m_sAudioDriver
 Audio driver. More...
 
bool m_bUseMetronome
 If set to true, samples of the metronome will be added to m_songNoteQueue in audioEngine_updateNoteQueue() and thus played back on a regular basis. More...
 
float m_fMetronomeVolume
 Metronome volume FIXME: remove this volume!! More...
 
unsigned m_nMaxNotes
 max notes More...
 
unsigned m_nBufferSize
 Buffer size of the audio. More...
 
unsigned m_nSampleRate
 Sample rate of the audio. More...
 
QString m_sOSSDevice
 Device used for output. More...
 
QString m_sMidiDriver
 MIDI driver. More...
 
QString m_sMidiPortName
 
QString m_sMidiOutputPortName
 
int m_nMidiChannelFilter
 
bool m_bMidiNoteOffIgnore
 
bool m_bMidiFixedMapping
 
bool m_bMidiDiscardNoteAfterAction
 
bool m_bEnableMidiFeedback
 
bool m_bOscServerEnabled
 Whether to start the OscServer thread. More...
 
bool m_bOscFeedbackEnabled
 Whether to send the current state of Hydrogen to the OSC clients. More...
 
int m_nOscTemporaryPort
 In case m_nOscServerPort is already occupied by another client, the alternative - random - port number provided by the OSC server will be stored in this variable. More...
 
int m_nOscServerPort
 Port number the OscServer will be started at. More...
 
QString m_sAlsaAudioDevice
 
QString m_sPortAudioDevice
 
QString m_sPortAudioHostAPI
 
int m_nLatencyTarget
 
QString m_sCoreAudioDevice
 
QString m_sJackPortName1
 
QString m_sJackPortName2
 
int m_bJackTransportMode
 Specifies whether or not Hydrogen will use the JACK transport system. More...
 
bool m_bJackConnectDefaults
 Toggles auto-connecting of the main stereo output ports to the system's default ports when starting the JACK server. More...
 
bool m_bJackTrackOuts
 If set to true, JackAudioDriver::makeTrackOutputs() will create two individual left and right output ports for every component of each instrument. More...
 
JackTrackOutputMode m_JackTrackOutputMode
 Specifies which audio settings will be applied to the sample supplied in the JACK per track output ports. More...
 
bool m_bJackTimebaseEnabled
 External applications with a faulty JACK timebase master implementation can mess up the transport within Hydrogen. More...
 
JackBBTSyncMethod m_JackBBTSync
 Since Hydrogen uses both fixed pattern lengths and recalculates the tick size each time it encounters an alternative tempo, its transport is incompatible to the BBT information provided by the JACK server. More...
 
int m_bJackMasterMode
 Specifies if Hydrogen should run as JACK time master. More...
 
QString m_sDefaultEditor
 Default text editor (used by Playlisteditor) More...
 
QString m_rubberBandCLIexecutable
 Rubberband CLI. More...
 

Private Member Functions

 Preferences ()
 
WindowProperties readWindowProperties (QDomNode parent, const QString &windowName, WindowProperties defaultProp)
 Read the xml nodes related to window properties. More...
 
void writeWindowProperties (QDomNode parent, const QString &windowName, const WindowProperties &prop)
 Write the xml nodes related to window properties. More...
 
void writeUIStyle (QDomNode parent)
 
void readUIStyle (QDomNode parent)
 

Private Attributes

QString m_sH2ProcessName
 
int __rubberBandCalcTime
 
bool m_useTheRubberbandBpmChangeEvent
 rubberband bpm change queue More...
 
bool m_bPatternModePlaysSelected
 When transport is in Song::PATTERN_MODE and this variable is set to true, the currently focused Pattern will be used for playback. More...
 
bool m_brestoreLastSong
 
bool m_brestoreLastPlaylist
 
bool m_bUseLash
 Show development version warning? More...
 
bool m_bShowDevelWarning
 
bool m_bShowNoteOverwriteWarning
 Last song used. More...
 
QString m_lastSongFilename
 
QString m_lastPlaylistFilename
 
bool quantizeEvents
 
bool recordEvents
 
bool readPrefFileforotherplaces
 
int punchInPos
 
int punchOutPos
 
bool m_bHideKeyboardCursor
 
int m_nMaxBars
 Maximum number of bars shown in the Song Editor at once. More...
 
int m_nMaxLayers
 Maximum number of layers to be used in the Instrument editor. More...
 
bool hearNewNotes
 
QStringList m_recentFX
 
std::vector< QString > m_recentFiles
 
QString jackSessionUUID
 
QString jackSessionApplicationPath
 
QString m_sNsmClientId
 
QString m_sNsmSongName
 
bool waitingForSessionHandler
 
bool __useTimelineBpm
 Whether to use local speeds specified along the Timeline or a constant tempo for the whole Song in Hydrogen::getTimelineBpm() and Hydrogen::getTimelineBpm(). More...
 
QString m_sQTStyle
 
int m_nLastOpenTab
 
int m_nDefaultUILayout
 
int m_nUIScalingPolicy
 
bool m_bShowPlaybackTrack
 
QString applicationFontFamily
 
int applicationFontPointSize
 
QString mixerFontFamily
 
int mixerFontPointSize
 
float mixerFalloffSpeed
 
int m_nPatternEditorGridResolution
 
bool m_bPatternEditorUsingTriplets
 
bool m_bShowInstrumentPeaks
 
bool m_bIsFXTabVisible
 
bool m_bShowAutomationArea
 
bool m_bUseRelativeFilenamesForPlaylists
 
unsigned m_nPatternEditorGridHeight
 
unsigned m_nPatternEditorGridWidth
 
unsigned m_nSongEditorGridHeight
 
unsigned m_nSongEditorGridWidth
 
WindowProperties mainFormProperties
 
WindowProperties mixerProperties
 
WindowProperties patternEditorProperties
 
WindowProperties songEditorProperties
 
WindowProperties instrumentRackProperties
 
WindowProperties audioEngineInfoProperties
 
WindowProperties m_ladspaProperties [MAX_FX]
 
UIStylem_pDefaultUIStyle
 
QString m_sPreferredLanguage
 
int m_nColoringMethod
 
int m_nColoringMethodAuxValue
 
QString m_sExportDirectory
 
int m_nExportModeIdx
 
int m_nExportSampleRateIdx
 
int m_nExportSampleDepthIdx
 
int m_nExportTemplateIdx
 
QString m_sMidiExportDirectory
 
int m_nMidiExportMode
 
QString m_sPreferencesOverwritePath
 Full path to local preferences file. More...
 

Static Private Attributes

static Preferences__instance = nullptr
 Object holding the current Preferences singleton. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Object
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes. More...
 
- Static Protected Attributes inherited from Object
static Logger__logger = nullptr
 logger instance pointer More...
 

Detailed Description

Manager for User Preferences File (singleton)

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
USE_JACK_TRANSPORT 

Specifies whether or not to use JACK transport capabilities.

If set, Hydrogen will start playing as soon as any over JACK client using its transport system is starting to play. Its counterpart is NO_JACK_TRANSPORT.

USE_JACK_TIME_MASTER 

Specifies that Hydrogen is using in the time master mode and will thus control specific aspects of the transport like the overall tempo.

Its counterpart is NO_JACK_TIME_MASTER.

SET_PLAY_ON 
BC_ON 
NO_JACK_TRANSPORT 

Specifies whether or not to use JACK transport capabilities.

If set, Hydrogen can be used independent of the JACK system while still using the JackAudioDriver. Its counterpart is USE_JACK_TRANSPORT.

NO_JACK_TIME_MASTER 

Specifies that Hydrogen is note using in the time master mode.

Its counterpart is USE_JACK_TIME_MASTER.

SET_PLAY_OFF 
BC_OFF 

◆ JackBBTSyncMethod

enum class JackBBTSyncMethod
strong

Specifies the variable, which has to remain constant in order to guarantee a working synchronization and relocation with Hydrogen as JACK timebase client.

Enumerator
constMeasure 

The measure - could be any - does not change during the song.

identicalBars 

The length of each pattern must match the measure of the corresponding bar in the timebase master.

This way both the pattern position of Hydrogen and the bar information provided by JACK can be assumed to be identical.

◆ JackTrackOutputMode

enum class JackTrackOutputMode
strong

Specifies which audio settings will be applied to the sample supplied in the JACK per track output ports.

Enumerator
postFader 

Applies layer, component, and instrument gain, note and instrument pan, note velocity, and main component and instrument volume to the samples.

preFader 

Only layer gain and note velocity will be applied to the samples.

◆ UI_LAYOUT_TYPES

Enumerator
UI_LAYOUT_SINGLE_PANE 
UI_LAYOUT_TABBED 

◆ UI_SCALING_POLICY

Enumerator
UI_SCALING_SMALLER 
UI_SCALING_SYSTEM 
UI_SCALING_LARGER 

Constructor & Destructor Documentation

◆ ~Preferences()

◆ Preferences()

Preferences ( )
private

Member Function Documentation

◆ create_instance()

void create_instance ( )
static

If __instance equals 0, a new Preferences singleton will be created and stored in it.

It is called in Hydrogen::create_instance().

◆ get_instance()

static Preferences * get_instance ( )
inlinestatic

Returns a pointer to the current Preferences singleton stored in __instance.

◆ getApplicationFontFamily()

const QString & getApplicationFontFamily ( )
inline

◆ getApplicationFontPointSize()

int getApplicationFontPointSize ( )
inline

◆ getAudioEngineInfoProperties()

WindowProperties getAudioEngineInfoProperties ( )
inline

◆ getColoringMethod()

int getColoringMethod ( ) const
inline

◆ getColoringMethodAuxValue()

int getColoringMethodAuxValue ( ) const
inline

◆ getDataDirectory()

const QString & getDataDirectory ( )

◆ getDefaultEditor()

const QString & getDefaultEditor ( )
inline

◆ getDefaultUILayout()

int getDefaultUILayout ( )
inline

◆ getDefaultUIStyle()

UIStyle * getDefaultUIStyle ( )
inline

◆ getExportDirectory()

QString getExportDirectory ( ) const
inline

◆ getExportModeIdx()

int getExportModeIdx ( ) const
inline

◆ getExportSampleDepthIdx()

int getExportSampleDepthIdx ( ) const
inline

◆ getExportSampleRateIdx()

int getExportSampleRateIdx ( ) const
inline

◆ getExportTemplateIdx()

int getExportTemplateIdx ( ) const
inline

◆ getH2ProcessName()

QString getH2ProcessName ( )
inline

◆ getHearNewNotes()

bool getHearNewNotes ( )
inline

◆ getInstrumentRackProperties()

WindowProperties getInstrumentRackProperties ( )
inline

◆ getJackSessionApplicationPath()

QString getJackSessionApplicationPath ( )
inline

◆ getJackSessionUUID()

QString getJackSessionUUID ( )
inline

◆ getLadspaProperties()

WindowProperties getLadspaProperties ( unsigned  nFX)
inline

◆ getLastOpenTab()

int getLastOpenTab ( )
inline

◆ getLastPlaylistFilename()

const QString & getLastPlaylistFilename ( )
inline

◆ getLastSongFilename()

const QString & getLastSongFilename ( )
inline

◆ getMainFormProperties()

WindowProperties getMainFormProperties ( )
inline

◆ getMaxBars()

int getMaxBars ( ) const
inline
Returns
m_nMaxBars.

◆ getMaxLayers()

int getMaxLayers ( ) const
inline
Returns
m_nMaxLayers.

◆ getMidiExportDirectory()

QString getMidiExportDirectory ( ) const
inline

◆ getMidiExportMode()

int getMidiExportMode ( ) const
inline

◆ getMixerFalloffSpeed()

float getMixerFalloffSpeed ( )
inline

◆ getMixerFontFamily()

QString getMixerFontFamily ( )
inline

◆ getMixerFontPointSize()

int getMixerFontPointSize ( )
inline

◆ getMixerProperties()

WindowProperties getMixerProperties ( )
inline

◆ getNsmClientId()

QString getNsmClientId ( void  )
inline

◆ getNsmSongName()

QString getNsmSongName ( void  )
inline

◆ getOscFeedbackEnabled()

bool getOscFeedbackEnabled ( )
inline

◆ getOscServerEnabled()

bool getOscServerEnabled ( )
inline

◆ getOscServerPort()

int getOscServerPort ( )
inline

◆ getPatternEditorGridHeight()

unsigned getPatternEditorGridHeight ( )
inline

◆ getPatternEditorGridResolution()

int getPatternEditorGridResolution ( )
inline

◆ getPatternEditorGridWidth()

unsigned getPatternEditorGridWidth ( )
inline

◆ getPatternEditorProperties()

WindowProperties getPatternEditorProperties ( )
inline

◆ getPreferencesOverwritePath()

QString getPreferencesOverwritePath ( )

◆ getPreferredLanguage()

const QString & getPreferredLanguage ( )
inline

◆ getPunchInPos()

int getPunchInPos ( )
inline

◆ getPunchOutPos()

int getPunchOutPos ( )
inline

◆ getQTStyle()

const QString & getQTStyle ( )
inline

◆ getQuantizeEvents()

bool getQuantizeEvents ( )
inline

◆ getRecentFiles()

const std::vector< QString > getRecentFiles ( )
inline

◆ getRecentFX()

QStringList getRecentFX ( )
inline

◆ getRecordEvents()

bool getRecordEvents ( )
inline

◆ getRubberBandBatchMode()

int getRubberBandBatchMode ( )
inline

◆ getRubberBandCalcTime()

int getRubberBandCalcTime ( )
inline

◆ getShowAutomationArea()

bool getShowAutomationArea ( )
inline

◆ getShowDevelWarning()

bool getShowDevelWarning ( )
inline

◆ getShowNoteOverwriteWarning()

bool getShowNoteOverwriteWarning ( )
inline

◆ getShowPlaybackTrack()

bool getShowPlaybackTrack ( ) const
inline

◆ getSongEditorGridHeight()

unsigned getSongEditorGridHeight ( )
inline

◆ getSongEditorGridWidth()

unsigned getSongEditorGridWidth ( )
inline

◆ getSongEditorProperties()

WindowProperties getSongEditorProperties ( )
inline

◆ getUIScalingPolicy()

int getUIScalingPolicy ( )
inline

◆ getUseTimelineBpm()

bool getUseTimelineBpm ( )
inline

Whether to use the bpm of the timeline.

Returns
__useTimelineBpm

◆ getWaitForSessionHandler()

bool getWaitForSessionHandler ( )
inline

◆ hideKeyboardCursor()

bool hideKeyboardCursor ( )
inline

◆ inPunchArea()

bool inPunchArea ( int  pos)
inline

◆ insertRecentFile()

void insertRecentFile ( const QString  sFilename)

◆ isFXTabVisible()

bool isFXTabVisible ( )
inline

◆ isPatternEditorUsingTriplets()

bool isPatternEditorUsingTriplets ( )
inline

◆ isPlaylistUsingRelativeFilenames()

bool isPlaylistUsingRelativeFilenames ( )
inline

◆ isRestoreLastPlaylistEnabled()

bool isRestoreLastPlaylistEnabled ( )
inline

◆ isRestoreLastSongEnabled()

bool isRestoreLastSongEnabled ( )
inline

◆ loadPreferences()

void loadPreferences ( bool  bGlobal)

Load the preferences file.

◆ patternModePlaysSelected()

bool patternModePlaysSelected ( )
inline

◆ readUIStyle()

void readUIStyle ( QDomNode  parent)
private

◆ readWindowProperties()

WindowProperties readWindowProperties ( QDomNode  parent,
const QString &  windowName,
WindowProperties  defaultProp 
)
private

Read the xml nodes related to window properties.

◆ savePreferences()

void savePreferences ( )

Save the preferences file.

◆ setApplicationFontFamily()

void setApplicationFontFamily ( const QString &  family)
inline

◆ setApplicationFontPointSize()

void setApplicationFontPointSize ( int  size)
inline

◆ setAudioEngineInfoProperties()

void setAudioEngineInfoProperties ( const WindowProperties prop)
inline

◆ setColoringMethod()

void setColoringMethod ( int  value)
inline

◆ setColoringMethodAuxValue()

void setColoringMethodAuxValue ( int  value)
inline

◆ setDefaultEditor()

void setDefaultEditor ( QString  editor)
inline

◆ setDefaultUILayout()

void setDefaultUILayout ( int  layout)
inline

◆ setExportDirectory()

void setExportDirectory ( const QString &  sExportDirectory)
inline

◆ setExportModeIdx()

void setExportModeIdx ( int  nExportMode)
inline

◆ setExportSampleDepthIdx()

void setExportSampleDepthIdx ( int  nExportSampleDepthIdx)
inline

◆ setExportSampleRateIdx()

void setExportSampleRateIdx ( int  nExportSampleRateIdx)
inline

◆ setExportTemplateIdx()

void setExportTemplateIdx ( int  nExportTemplateIdx)
inline

◆ setFXTabVisible()

void setFXTabVisible ( bool  value)
inline

◆ setH2ProcessName()

void setH2ProcessName ( const QString &  processName)
inline

◆ setHearNewNotes()

void setHearNewNotes ( bool  value)
inline

◆ setHideKeyboardCursor()

void setHideKeyboardCursor ( bool  b)
inline

◆ setInstrumentPeaks()

void setInstrumentPeaks ( bool  value)
inline

◆ setInstrumentRackProperties()

void setInstrumentRackProperties ( const WindowProperties prop)
inline

◆ setJackSessionApplicationPath()

void setJackSessionApplicationPath ( QString  path)
inline

◆ setJackSessionUUID()

void setJackSessionUUID ( QString  uuid)
inline

◆ setLadspaProperties()

void setLadspaProperties ( unsigned  nFX,
const WindowProperties prop 
)
inline

◆ setLastOpenTab()

void setLastOpenTab ( int  n)
inline

◆ setLastPlaylistFilename()

void setLastPlaylistFilename ( const QString &  filename)
inline

◆ setLastSongFilename()

void setLastSongFilename ( const QString &  filename)
inline

◆ setMainFormProperties()

void setMainFormProperties ( const WindowProperties prop)
inline

◆ setMaxBars()

void setMaxBars ( const int  bars)
inline
Parameters
barsSets m_nMaxBars.

◆ setMaxLayers()

void setMaxLayers ( const int  layers)
inline
Parameters
layersSets m_nMaxLayers.

◆ setMidiExportDirectory()

void setMidiExportDirectory ( const QString &  sExportDirectory)
inline

◆ setMidiExportMode()

void setMidiExportMode ( int  nExportMode)
inline

◆ setMixerFalloffSpeed()

void setMixerFalloffSpeed ( float  value)
inline

◆ setMixerFontFamily()

void setMixerFontFamily ( const QString &  family)
inline

◆ setMixerFontPointSize()

void setMixerFontPointSize ( int  size)
inline

◆ setMixerProperties()

void setMixerProperties ( const WindowProperties prop)
inline

◆ setMostRecentFX()

void setMostRecentFX ( QString  FX_name)

◆ setNsmClientId()

void setNsmClientId ( const QString &  nsmClientId)
inline

◆ setNsmSongName()

void setNsmSongName ( const QString &  nsmSongName)
inline

◆ setOscFeedbackEnabled()

void setOscFeedbackEnabled ( bool  val)
inline
Parameters
valSets m_bOscFeedbackEnabled

◆ setOscServerEnabled()

void setOscServerEnabled ( bool  val)
inline
Parameters
valSets m_bOscServerEnabled

◆ setOscServerPort()

void setOscServerPort ( int  oscPort)
inline
Parameters
oscPortSets m_nOscServerPort

◆ setPatternEditorGridHeight()

void setPatternEditorGridHeight ( unsigned  value)
inline

◆ setPatternEditorGridResolution()

void setPatternEditorGridResolution ( int  value)
inline

◆ setPatternEditorGridWidth()

void setPatternEditorGridWidth ( unsigned  value)
inline

◆ setPatternEditorProperties()

void setPatternEditorProperties ( const WindowProperties prop)
inline

◆ setPatternEditorUsingTriplets()

void setPatternEditorUsingTriplets ( bool  value)
inline

◆ setPatternModePlaysSelected()

void setPatternModePlaysSelected ( bool  b)
inline
Parameters
bSets m_bPatternModePlaysSelected

◆ setPreferencesOverwritePath()

void setPreferencesOverwritePath ( const QString &  newPath)

Setting m_sPreferencesOverwritePath.

Parameters
newPathPath to a local preferences file.

◆ setPreferredLanguage()

void setPreferredLanguage ( const QString &  sLanguage)
inline

◆ setPunchInPos()

void setPunchInPos ( unsigned  pos)
inline

◆ setPunchOutPos()

void setPunchOutPos ( unsigned  pos)
inline

◆ setQTStyle()

void setQTStyle ( const QString &  sStyle)
inline

◆ setQuantizeEvents()

void setQuantizeEvents ( bool  value)
inline

◆ setRecentFiles()

void setRecentFiles ( const std::vector< QString >  recentFiles)

◆ setRecordEvents()

void setRecordEvents ( bool  value)
inline

◆ setRestoreLastPlaylistEnabled()

void setRestoreLastPlaylistEnabled ( bool  restore)
inline

◆ setRestoreLastSongEnabled()

void setRestoreLastSongEnabled ( bool  restore)
inline

◆ setRubberBandBatchMode()

void setRubberBandBatchMode ( int  val)
inline

◆ setRubberBandCalcTime()

void setRubberBandCalcTime ( int  val)
inline

◆ setShowAutomationArea()

void setShowAutomationArea ( bool  value)
inline

◆ setShowDevelWarning()

void setShowDevelWarning ( bool  value)
inline

◆ setShowNoteOverwriteWarning()

void setShowNoteOverwriteWarning ( bool  bValue)
inline

◆ setShowPlaybackTrack()

void setShowPlaybackTrack ( bool  val)
inline

◆ setSongEditorGridHeight()

void setSongEditorGridHeight ( unsigned  value)
inline

◆ setSongEditorGridWidth()

void setSongEditorGridWidth ( unsigned  value)
inline

◆ setSongEditorProperties()

void setSongEditorProperties ( const WindowProperties prop)
inline

◆ setUIScalingPolicy()

void setUIScalingPolicy ( int  nPolicy)
inline

◆ setUseLash()

void setUseLash ( bool  b)
inline

◆ setUseRelativeFilenamesForPlaylists()

void setUseRelativeFilenamesForPlaylists ( bool  value)
inline

◆ setUseTimelineBpm()

void setUseTimelineBpm ( bool  val)
inline

Setting __useTimelineBpm.

Parameters
valNew choice.

◆ setWaitForSessionHandler()

void setWaitForSessionHandler ( bool  value)
inline

◆ showInstrumentPeaks()

bool showInstrumentPeaks ( )
inline

◆ unsetPunchArea()

void unsetPunchArea ( )
inline

◆ useLash()

bool useLash ( )
inline

◆ writeUIStyle()

void writeUIStyle ( QDomNode  parent)
private

◆ writeWindowProperties()

void writeWindowProperties ( QDomNode  parent,
const QString &  windowName,
const WindowProperties prop 
)
private

Write the xml nodes related to window properties.

Field Documentation

◆ __expandPatternItem

bool __expandPatternItem

◆ __expandSongItem

bool __expandSongItem

◆ __instance

Preferences * __instance = nullptr
staticprivate

Object holding the current Preferences singleton.

It is initialized with NULL, set with create_instance(), and accessed with get_instance().

◆ __lastsampleDirectory

QString __lastsampleDirectory

◆ __lastspatternDirectory

QString __lastspatternDirectory

◆ __playsamplesonclicking

bool __playsamplesonclicking

◆ __playselectedinstrument

bool __playselectedinstrument

◆ __rubberBandCalcTime

int __rubberBandCalcTime
private

◆ __useTimelineBpm

bool __useTimelineBpm
private

Whether to use local speeds specified along the Timeline or a constant tempo for the whole Song in Hydrogen::getTimelineBpm() and Hydrogen::getTimelineBpm().

It is set using setUseTimelineBpm() and accessed via getUseTimelineBpm().

◆ applicationFontFamily

QString applicationFontFamily
private

◆ applicationFontPointSize

int applicationFontPointSize
private

◆ audioEngineInfoProperties

WindowProperties audioEngineInfoProperties
private

◆ hearNewNotes

bool hearNewNotes
private

◆ instrumentRackProperties

WindowProperties instrumentRackProperties
private

◆ jackSessionApplicationPath

QString jackSessionApplicationPath
private

◆ jackSessionUUID

QString jackSessionUUID
private

◆ m_bbc

bool m_bbc

◆ m_bEnableMidiFeedback

bool m_bEnableMidiFeedback

◆ m_bFollowPlayhead

bool m_bFollowPlayhead

◆ m_bHideKeyboardCursor

bool m_bHideKeyboardCursor
private

◆ m_bIsFXTabVisible

bool m_bIsFXTabVisible
private

◆ m_bJackConnectDefaults

bool m_bJackConnectDefaults

Toggles auto-connecting of the main stereo output ports to the system's default ports when starting the JACK server.

◆ m_bJackMasterMode

int m_bJackMasterMode

Specifies if Hydrogen should run as JACK time master.

It has two states: Preferences::USE_JACK_TIME_MASTER and Preferences::NO_JACK_TIME_MASTER. It is set to Preferences::NO_JACK_TIME_MASTER by the JackAudioDriver::initTimebaseMaster() if Hydrogen couldn't be registered as time master.

◆ m_bJackTimebaseEnabled

bool m_bJackTimebaseEnabled

External applications with a faulty JACK timebase master implementation can mess up the transport within Hydrogen.

To guarantee the basic functionality, the user can disable timebase support and make Hydrogen only listen to the frame number broadcast by the JACK server.

◆ m_bJackTrackOuts

bool m_bJackTrackOuts

If set to true, JackAudioDriver::makeTrackOutputs() will create two individual left and right output ports for every component of each instrument.

If false, one usual stereo output will be created.

◆ m_bJackTransportMode

int m_bJackTransportMode

Specifies whether or not Hydrogen will use the JACK transport system.

It has two different states: USE_JACK_TRANSPORT and NO_JACK_TRANSPORT.

◆ m_bMidiDiscardNoteAfterAction

bool m_bMidiDiscardNoteAfterAction

◆ m_bMidiFixedMapping

bool m_bMidiFixedMapping

◆ m_bMidiNoteOffIgnore

bool m_bMidiNoteOffIgnore

◆ m_bOscFeedbackEnabled

bool m_bOscFeedbackEnabled

Whether to send the current state of Hydrogen to the OSC clients.

If set to true, the current state of Hydrogen will be sent to all known OSC clients using CoreActionController::initExternalControlInterfaces() and OscServer::handleAction() via OSC messages each time it gets updated..

Set by setOscFeedbackEnabled() and queried by getOscFeedbackEnabled().

◆ m_bOscServerEnabled

bool m_bOscServerEnabled

Whether to start the OscServer thread.

If set to true, the OscServer::start() function of the OscServer singleton will be called in Hydrogen::Hydrogen(). This will register all OSC message handlers and makes the server listen to port m_nOscServerPort.

Set by setOscServerEnabled() and queried by getOscServerEnabled().

◆ m_bPatternEditorUsingTriplets

bool m_bPatternEditorUsingTriplets
private

◆ m_bPatternModePlaysSelected

bool m_bPatternModePlaysSelected
private

When transport is in Song::PATTERN_MODE and this variable is set to true, the currently focused Pattern will be used for playback.

It is set by setPatternModePlaysSelected() and queried by patternModePlaysSelected(). Restore last song?

◆ m_brestartLash

bool m_brestartLash

◆ m_brestoreLastPlaylist

bool m_brestoreLastPlaylist
private

◆ m_brestoreLastSong

bool m_brestoreLastSong
private

◆ m_bsetLash

bool m_bsetLash

◆ m_bShowAutomationArea

bool m_bShowAutomationArea
private

◆ m_bShowDevelWarning

bool m_bShowDevelWarning
private

◆ m_bShowInstrumentPeaks

bool m_bShowInstrumentPeaks
private

◆ m_bShowNoteOverwriteWarning

bool m_bShowNoteOverwriteWarning
private

Last song used.

◆ m_bShowPlaybackTrack

bool m_bShowPlaybackTrack
private

◆ m_bUseLash

bool m_bUseLash
private

Show development version warning?

◆ m_bUseMetronome

bool m_bUseMetronome

If set to true, samples of the metronome will be added to m_songNoteQueue in audioEngine_updateNoteQueue() and thus played back on a regular basis.

◆ m_bUseRelativeFilenamesForPlaylists

bool m_bUseRelativeFilenamesForPlaylists
private

◆ m_countOffset

int m_countOffset

◆ m_fMetronomeVolume

float m_fMetronomeVolume

Metronome volume FIXME: remove this volume!!

◆ m_JackBBTSync

JackBBTSyncMethod m_JackBBTSync

Since Hydrogen uses both fixed pattern lengths and recalculates the tick size each time it encounters an alternative tempo, its transport is incompatible to the BBT information provided by the JACK server.

Only if the length of each pattern corresponds to the measure of the respective bar in the timebase master application, the bar information provided by JACK can be used directly to determine chosen pattern. If this, however, is not the case - which can quite easily happen - a complete history of all measure and tempo changes would be required to correctly identify the pattern. Since this is not provided by JACK, one has to either assume the measure or tempo to be constant or that the user took care of adjusting the lengths properly.

◆ m_JackTrackOutputMode

JackTrackOutputMode m_JackTrackOutputMode

Specifies which audio settings will be applied to the sample supplied in the JACK per track output ports.

◆ m_ladspaProperties

WindowProperties m_ladspaProperties[MAX_FX]
private

◆ m_lastPlaylistFilename

QString m_lastPlaylistFilename
private

◆ m_lastSongFilename

QString m_lastSongFilename
private

◆ m_mmcsetplay

bool m_mmcsetplay

◆ m_nBufferSize

unsigned m_nBufferSize

Buffer size of the audio.

It is set e.g. by JackAudioDriver::init() to the buffer size of the freshly opened JACK client.

◆ m_nColoringMethod

int m_nColoringMethod
private

◆ m_nColoringMethodAuxValue

int m_nColoringMethodAuxValue
private

◆ m_nDefaultUILayout

int m_nDefaultUILayout
private

◆ m_nExportModeIdx

int m_nExportModeIdx
private

◆ m_nExportSampleDepthIdx

int m_nExportSampleDepthIdx
private

◆ m_nExportSampleRateIdx

int m_nExportSampleRateIdx
private

◆ m_nExportTemplateIdx

int m_nExportTemplateIdx
private

◆ m_nLastOpenTab

int m_nLastOpenTab
private

◆ m_nLatencyTarget

int m_nLatencyTarget

◆ m_nMaxBars

int m_nMaxBars
private

Maximum number of bars shown in the Song Editor at once.

It is set by setMaxBars() and queried by getMaxBars(). In order to change this value, you have to manually edit the <maxBars> tag in the configuration file of Hydrogen in your home folder. Default value assigned in constructor: 400.

◆ m_nMaxLayers

int m_nMaxLayers
private

Maximum number of layers to be used in the Instrument editor.

It is set by setMaxLayers() and queried by getMaxLayers(). It is setIn order to change this value, you have to manually edit the <maxLayers> tag in the configuration file of Hydrogen in your home folder. Default value assigned in constructor: 16.

◆ m_nMaxNotes

unsigned m_nMaxNotes

max notes

◆ m_nMidiChannelFilter

int m_nMidiChannelFilter

◆ m_nMidiExportMode

int m_nMidiExportMode
private

◆ m_nOscServerPort

int m_nOscServerPort

Port number the OscServer will be started at.

Set by setOscServerPort() and queried by getOscServerPort().

◆ m_nOscTemporaryPort

int m_nOscTemporaryPort

In case m_nOscServerPort is already occupied by another client, the alternative - random - port number provided by the OSC server will be stored in this variable.

If the connection using the default port succeeded, the variable will be set to -1.

◆ m_nPatternEditorGridHeight

unsigned m_nPatternEditorGridHeight
private

◆ m_nPatternEditorGridResolution

int m_nPatternEditorGridResolution
private

◆ m_nPatternEditorGridWidth

unsigned m_nPatternEditorGridWidth
private

◆ m_nSampleRate

unsigned m_nSampleRate

Sample rate of the audio.

It is set e.g. by JackAudioDriver::init() to the sample rate of the freshly opened JACK client.

◆ m_nSongEditorGridHeight

unsigned m_nSongEditorGridHeight
private

◆ m_nSongEditorGridWidth

unsigned m_nSongEditorGridWidth
private

◆ m_nUIScalingPolicy

int m_nUIScalingPolicy
private

◆ m_patternCategories

std::list<QString> m_patternCategories

◆ m_pDefaultUIStyle

UIStyle* m_pDefaultUIStyle
private

◆ m_recentFiles

std::vector<QString> m_recentFiles
private

◆ m_recentFX

QStringList m_recentFX
private

◆ m_rubberBandCLIexecutable

QString m_rubberBandCLIexecutable

Rubberband CLI.

◆ m_sAlsaAudioDevice

QString m_sAlsaAudioDevice

◆ m_sAudioDriver

QString m_sAudioDriver

Audio driver.

Used in the audioEngine_startAudioDrivers() to create an audio driver using createDriver().

These choices are support:

◆ m_sCoreAudioDevice

QString m_sCoreAudioDevice

◆ m_sDefaultEditor

QString m_sDefaultEditor

Default text editor (used by Playlisteditor)

◆ m_sExportDirectory

QString m_sExportDirectory
private

◆ m_sH2ProcessName

QString m_sH2ProcessName
private

◆ m_sJackPortName1

QString m_sJackPortName1

◆ m_sJackPortName2

QString m_sJackPortName2

◆ m_sMidiDriver

QString m_sMidiDriver

MIDI driver.

Used in the audioEngine_startAudioDrivers() to create an MIDI driver.

These choices are support:

◆ m_sMidiExportDirectory

QString m_sMidiExportDirectory
private

◆ m_sMidiOutputPortName

QString m_sMidiOutputPortName

◆ m_sMidiPortName

QString m_sMidiPortName

◆ m_sNsmClientId

QString m_sNsmClientId
private

◆ m_sNsmSongName

QString m_sNsmSongName
private

◆ m_sOSSDevice

QString m_sOSSDevice

Device used for output.

◆ m_sPortAudioDevice

QString m_sPortAudioDevice

◆ m_sPortAudioHostAPI

QString m_sPortAudioHostAPI

◆ m_sPreferencesOverwritePath

QString m_sPreferencesOverwritePath
private

Full path to local preferences file.

Used in nsm_open_cb() to specify a preferences file specific to the current session.

If non-empty, the local file will be loaded instead of Filesystem::usr_config_path() or Filesystem::sys_config_path(). In general the underlying file does not have to be named "hydrogen.conf". But for the sake of consistency the latter naming is strongly recommended.

Note that this variable is a session variable, which won't be stored in the hydrogen.conf preferences file!

◆ m_sPreferredLanguage

QString m_sPreferredLanguage
private

◆ m_sQTStyle

QString m_sQTStyle
private

◆ m_startOffset

int m_startOffset

◆ m_useTheRubberbandBpmChangeEvent

bool m_useTheRubberbandBpmChangeEvent
private

rubberband bpm change queue

◆ mainFormProperties

WindowProperties mainFormProperties
private

◆ mixerFalloffSpeed

float mixerFalloffSpeed
private

◆ mixerFontFamily

QString mixerFontFamily
private

◆ mixerFontPointSize

int mixerFontPointSize
private

◆ mixerProperties

WindowProperties mixerProperties
private

◆ patternEditorProperties

WindowProperties patternEditorProperties
private

◆ punchInPos

int punchInPos
private

◆ punchOutPos

int punchOutPos
private

◆ quantizeEvents

bool quantizeEvents
private

◆ readPrefFileforotherplaces

bool readPrefFileforotherplaces
private

◆ recordEvents

bool recordEvents
private

◆ songEditorProperties

WindowProperties songEditorProperties
private

◆ sServerList

std::list<QString> sServerList

◆ waitingForSessionHandler

bool waitingForSessionHandler
private