|
hydrogen 1.1.1
|
Manager for User Preferences File (singleton) More...
#include <Preferences.h>
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... | |
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 Preferences * | get_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 Logger * | logger () |
| 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) |
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... | |
Manager for User Preferences File (singleton)
| 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 | |
|
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. |
|
strong |
Specifies which audio settings will be applied to the sample supplied in the JACK per track output ports.
| enum UI_LAYOUT_TYPES |
| enum UI_SCALING_POLICY |
| ~Preferences | ( | ) |
|
private |
|
static |
If __instance equals 0, a new Preferences singleton will be created and stored in it.
It is called in Hydrogen::create_instance().
|
inlinestatic |
Returns a pointer to the current Preferences singleton stored in __instance.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const QString & getDataDirectory | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| QString getPreferencesOverwritePath | ( | ) |
Returns m_sPreferencesOverwritePath.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Whether to use the bpm of the timeline.
|
inline |
|
inline |
|
inline |
| void insertRecentFile | ( | const QString | sFilename | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void loadPreferences | ( | bool | bGlobal | ) |
Load the preferences file.
|
inline |
|
private |
|
private |
Read the xml nodes related to window properties.
| void savePreferences | ( | ) |
Save the preferences file.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bars | Sets m_nMaxBars. |
|
inline |
| layers | Sets m_nMaxLayers. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void setMostRecentFX | ( | QString | FX_name | ) |
|
inline |
|
inline |
|
inline |
| val | Sets m_bOscFeedbackEnabled |
|
inline |
| val | Sets m_bOscServerEnabled |
|
inline |
| oscPort | Sets m_nOscServerPort |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| b | Sets m_bPatternModePlaysSelected |
| void setPreferencesOverwritePath | ( | const QString & | newPath | ) |
Setting m_sPreferencesOverwritePath.
| newPath | Path to a local preferences file. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void setRecentFiles | ( | const std::vector< QString > | recentFiles | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Setting __useTimelineBpm.
| val | New choice. |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
Write the xml nodes related to window properties.
| bool __expandPatternItem |
| bool __expandSongItem |
|
staticprivate |
Object holding the current Preferences singleton.
It is initialized with NULL, set with create_instance(), and accessed with get_instance().
| QString __lastsampleDirectory |
| QString __lastspatternDirectory |
| bool __playsamplesonclicking |
| bool __playselectedinstrument |
|
private |
|
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().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| bool m_bbc |
| bool m_bEnableMidiFeedback |
| bool m_bFollowPlayhead |
|
private |
|
private |
| bool m_bJackConnectDefaults |
Toggles auto-connecting of the main stereo output ports to the system's default ports when starting the JACK server.
| 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.
| bool m_bJackTimebaseEnabled |
| 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.
| 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.
| bool m_bMidiDiscardNoteAfterAction |
| bool m_bMidiFixedMapping |
| bool m_bMidiNoteOffIgnore |
| 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().
| 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().
|
private |
|
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?
| bool m_brestartLash |
|
private |
|
private |
| bool m_bsetLash |
|
private |
|
private |
|
private |
|
private |
Last song used.
|
private |
|
private |
Show development version warning?
| 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.
|
private |
| int m_countOffset |
| float m_fMetronomeVolume |
Metronome volume FIXME: remove this volume!!
| 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.
| JackTrackOutputMode m_JackTrackOutputMode |
Specifies which audio settings will be applied to the sample supplied in the JACK per track output ports.
|
private |
|
private |
|
private |
| bool m_mmcsetplay |
| 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.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| int m_nLatencyTarget |
|
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.
|
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.
| unsigned m_nMaxNotes |
max notes
| int m_nMidiChannelFilter |
|
private |
| int m_nOscServerPort |
Port number the OscServer will be started at.
Set by setOscServerPort() and queried by getOscServerPort().
| 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.
|
private |
|
private |
|
private |
| 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.
|
private |
|
private |
|
private |
| std::list<QString> m_patternCategories |
|
private |
|
private |
|
private |
| QString m_rubberBandCLIexecutable |
Rubberband CLI.
| QString m_sAlsaAudioDevice |
| QString m_sAudioDriver |
Audio driver.
Used in the audioEngine_startAudioDrivers() to create an audio driver using createDriver().
These choices are support:
| QString m_sCoreAudioDevice |
| QString m_sDefaultEditor |
Default text editor (used by Playlisteditor)
|
private |
|
private |
| QString m_sJackPortName1 |
| QString m_sJackPortName2 |
| QString m_sMidiDriver |
MIDI driver.
Used in the audioEngine_startAudioDrivers() to create an MIDI driver.
These choices are support:
|
private |
| QString m_sMidiOutputPortName |
| QString m_sMidiPortName |
|
private |
|
private |
| QString m_sOSSDevice |
Device used for output.
| QString m_sPortAudioDevice |
| QString m_sPortAudioHostAPI |
|
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!
|
private |
|
private |
| int m_startOffset |
|
private |
rubberband bpm change queue
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| std::list<QString> sServerList |
|
private |