65 m_pTheme = std::make_shared<Theme>();
74 QString rubberBandCLIPath = getenv(
"PATH" );
75 QStringList rubberBandCLIPathList = rubberBandCLIPath.split(
":");
79 for(
int i = 0; i < rubberBandCLIPathList.size(); ++i){
144 sServerList.push_back( QString(
"http://hydrogen-music.org/feeds/drumkit_list.php") );
160#if defined(H2CORE_HAVE_ALSA)
162#elif defined(H2CORE_HAVE_PORTMIDI)
164#elif defined(H2CORE_HAVE_COREMIDI)
166#elif defined(H2CORE_HAVE_JACK)
190#ifdef H2CORE_HAVE_ALSA
194 if ( alsaDevices.size() == 0 ||
195 alsaDevices.contains(
"hw:0" ) ) {
200 if ( alsaDevices[ 0 ] !=
"null" ) {
202 }
else if ( alsaDevices.size() > 1 ) {
275 if ( bGlobalPrefLoaded || bUserPrefLoaded ) {
301 bool bRecreate =
false;
303 QString sPreferencesFilename =
305 INFOLOG( QString(
"Loading preferences file [%1]" )
306 .arg( sPreferencesFilename ) );
310 ERRORLOG( QString(
"Global preferences file [%1] is not readable!" )
311 .arg( sPreferencesFilename ) );
315 WARNINGLOG( QString(
"User-level preferences file [%1] is not readable! It will be recreated." )
316 .arg( sPreferencesFilename ) );
324 doc.
read( sPreferencesFilename,
false );
325 XMLNode rootNode = doc.firstChildElement(
"hydrogen_preferences" );
327 if ( !rootNode.isNull() ) {
347 rootNode.
read_int(
"defaultUILayout",
350 rootNode.
read_int(
"uiScalingPolicy",
366 QString test = rootNode.
read_string(
"path_to_rubberband",
"",
false,
false );
367 if ( QFile( test ).exists() ==
true ){
375 XMLNode recentUsedSongsNode = rootNode.firstChildElement(
"recentUsedSongs" );
376 if ( ! recentUsedSongsNode.isNull() ) {
377 QDomElement songElement = recentUsedSongsNode.firstChildElement(
"song" );
378 while( !songElement.isNull() && ! songElement.text().isEmpty() ){
380 songElement = songElement.nextSiblingElement(
"song" );
384 WARNINGLOG(
"recentUsedSongs node not found" );
387 XMLNode recentFXNode = rootNode.firstChildElement(
"recentlyUsedEffects" );
388 if ( ! recentFXNode.isNull() ) {
389 QDomElement fxElement = recentFXNode.firstChildElement(
"FX" );
390 while ( !fxElement.isNull() && ! fxElement.text().isEmpty()) {
392 fxElement = fxElement.nextSiblingElement(
"FX" );
395 WARNINGLOG(
"recentlyUsedEffects node not found" );
399 XMLNode serverListNode = rootNode.firstChildElement(
"serverList" );
400 if ( ! serverListNode.isNull() ) {
401 QDomElement serverElement = serverListNode.firstChildElement(
"server" );
402 while ( !serverElement.isNull() && !serverElement.text().isEmpty() ) {
404 serverElement = serverElement.nextSiblingElement(
"server" );
411 XMLNode patternCategoriesNode = rootNode.firstChildElement(
"patternCategories" );
412 if ( ! patternCategoriesNode.isNull() ) {
413 QDomElement patternCategoriesElement = patternCategoriesNode.firstChildElement(
"categories" );
414 while ( !patternCategoriesElement.isNull() && !patternCategoriesElement.text().isEmpty() ) {
416 patternCategoriesElement = patternCategoriesElement.nextSiblingElement(
"categories" );
419 WARNINGLOG(
"patternCategories node not found" );
424 XMLNode audioEngineNode = rootNode.firstChildElement(
"audio_engine" );
425 if ( audioEngineNode.isNull() ) {
429 const QString sAudioDriver = audioEngineNode.
read_string(
435 WARNINGLOG(
"Falling back to 'Auto' audio driver" );
445 XMLNode ossDriverNode = audioEngineNode.firstChildElement(
"oss_driver" );
446 if ( ossDriverNode.isNull() ) {
454 XMLNode portAudioDriverNode = audioEngineNode.firstChildElement(
"portaudio_driver" );
455 if ( portAudioDriverNode.isNull() ) {
456 WARNINGLOG(
"portaudio_driver node not found" );
465 XMLNode coreAudioDriverNode = audioEngineNode.firstChildElement(
"coreaudio_driver" );
466 if ( coreAudioDriverNode.isNull() ) {
467 WARNINGLOG(
"coreaudio_driver node not found" );
474 XMLNode jackDriverNode = audioEngineNode.firstChildElement(
"jack_driver" );
475 if ( jackDriverNode.isNull() ) {
481 QString sMode = jackDriverNode.
read_string(
"jack_transport_mode",
"NO_JACK_TRANSPORT",
false,
false );
482 if ( sMode ==
"NO_JACK_TRANSPORT" ) {
484 }
else if ( sMode ==
"USE_JACK_TRANSPORT" ) {
492 QString tmMode = jackDriverNode.
read_string(
"jack_transport_mode_master",
"NO_JACK_TIME_MASTER",
false,
false );
493 if ( tmMode ==
"NO_JACK_TIME_MASTER" ) {
495 }
else if ( tmMode ==
"USE_JACK_TIME_MASTER" ) {
502 int nJackTrackOutputMode = jackDriverNode.
read_int(
"jack_track_output_mode", 0,
false,
false );
503 switch ( nJackTrackOutputMode ) {
511 WARNINGLOG( QString(
"Unknown jack_track_output_mode value [%1]. Using JackTrackOutputMode::postFader instead." )
512 .arg( nJackTrackOutputMode ) );
519 XMLNode alsaAudioDriverNode = audioEngineNode.firstChildElement(
"alsa_audio_driver" );
520 if ( alsaAudioDriverNode.isNull() ) {
521 WARNINGLOG(
"alsa_audio_driver node not found" );
528 XMLNode midiDriverNode = audioEngineNode.firstChildElement(
"midi_driver" );
529 if ( midiDriverNode.isNull() ) {
556 XMLNode oscServerNode = audioEngineNode.firstChildElement(
"osc_configuration" );
557 if ( oscServerNode.isNull() ) {
558 WARNINGLOG(
"osc_configuration node not found" );
568 XMLNode guiNode = rootNode.firstChildElement(
"gui" );
569 if ( guiNode.isNull() ) {
645 guiNode.
read_string(
"exportDialogFormat",
"flac",
true,
true ) );
647 "exportDialogCompressionLevel", 0.0,
true,
true );
652 guiNode.
read_bool(
"showExportSongLicenseWarning",
true,
656 guiNode.
read_bool(
"showExportDrumkitLicenseWarning",
true,
659 guiNode.
read_bool(
"showExportDrumkitCopyleftWarning",
true,
662 guiNode.
read_bool(
"showExportDrumkitAttributionWarning",
true,
671 QString bcMode = guiNode.
read_string(
"bc",
"BC_OFF",
false,
false );
672 if ( bcMode ==
"BC_OFF" ) {
674 }
else if ( bcMode ==
"BC_ON" ) {
679 QString setPlay = guiNode.
read_string(
"setplay",
"SET_PLAY_OFF",
false,
false );
680 if ( setPlay ==
"SET_PLAY_OFF" ) {
682 }
else if ( setPlay ==
"SET_PLAY_ON" ) {
697 for (
unsigned nFX = 0; nFX <
MAX_FX; nFX++ ) {
698 QString sNodeName = QString(
"ladspaFX_properties%1").arg( nFX );
702 XMLNode pColorThemeNode = guiNode.firstChildElement(
"colorTheme" );
703 if ( !pColorThemeNode.isNull() ) {
712 guiNode.
read_int(
"SongEditor_ColoringMethod",
716 colors[ ii ] = guiNode.
read_color( QString(
"SongEditor_pattern_color_%1" ).arg( ii ),
717 m_pTheme->getColorTheme()->m_accentColor,
false,
false );
729 XMLNode filesNode = rootNode.firstChildElement(
"files" );
730 if ( filesNode.isNull() ) {
744 XMLNode pMidiEventMapNode = rootNode.firstChildElement(
"midiEventMap" );
745 if ( !pMidiEventMapNode.isNull() ) {
746 XMLNode pMidiEventNode = pMidiEventMapNode.firstChildElement(
"midiEvent" );
747 while ( !pMidiEventNode.isNull() ) {
748 if( pMidiEventNode.firstChildElement().nodeName() == QString(
"mmcEvent")){
749 QString
event = pMidiEventNode.firstChildElement(
"mmcEvent").text();
750 QString sAction = pMidiEventNode.firstChildElement(
"action").text();
751 QString sParam = pMidiEventNode.firstChildElement(
"parameter").text();
752 QString sParam2 = pMidiEventNode.firstChildElement(
"parameter2").text();
753 QString sParam3 = pMidiEventNode.firstChildElement(
"parameter3").text();
755 std::shared_ptr<Action> pAction = std::make_shared<Action>( sAction );
756 pAction->setParameter1( sParam );
757 pAction->setParameter2( sParam2 );
758 pAction->setParameter3( sParam3 );
762 if( pMidiEventNode.firstChildElement().nodeName() == QString(
"noteEvent")){
763 QString
event = pMidiEventNode.firstChildElement(
"noteEvent").text();
764 QString sAction = pMidiEventNode.firstChildElement(
"action").text();
765 QString sParam = pMidiEventNode.firstChildElement(
"parameter").text();
766 QString sParam2 = pMidiEventNode.firstChildElement(
"parameter2").text();
767 QString sParam3 = pMidiEventNode.firstChildElement(
"parameter3").text();
768 QString s_eventParameter = pMidiEventNode.firstChildElement(
"eventParameter").text();
769 std::shared_ptr<Action> pAction = std::make_shared<Action>( sAction );
770 pAction->setParameter1( sParam );
771 pAction->setParameter2( sParam2 );
772 pAction->setParameter3( sParam3 );
776 if( pMidiEventNode.firstChildElement().nodeName() == QString(
"ccEvent") ){
777 QString
event = pMidiEventNode.firstChildElement(
"ccEvent").text();
778 QString sAction = pMidiEventNode.firstChildElement(
"action").text();
779 QString sParam = pMidiEventNode.firstChildElement(
"parameter").text();
780 QString sParam2 = pMidiEventNode.firstChildElement(
"parameter2").text();
781 QString sParam3 = pMidiEventNode.firstChildElement(
"parameter3").text();
782 QString s_eventParameter = pMidiEventNode.firstChildElement(
"eventParameter").text();
783 std::shared_ptr<Action> pAction = std::make_shared<Action>( sAction );
784 pAction->setParameter1( sParam );
785 pAction->setParameter2( sParam2 );
786 pAction->setParameter3( sParam3 );
790 if( pMidiEventNode.firstChildElement().nodeName() == QString(
"pcEvent") ){
791 QString
event = pMidiEventNode.firstChildElement(
"pcEvent").text();
792 QString sAction = pMidiEventNode.firstChildElement(
"action").text();
793 QString sParam = pMidiEventNode.firstChildElement(
"parameter").text();
794 QString sParam2 = pMidiEventNode.firstChildElement(
"parameter2").text();
795 QString sParam3 = pMidiEventNode.firstChildElement(
"parameter3").text();
796 std::shared_ptr<Action> pAction = std::make_shared<Action>( sAction );
797 pAction->setParameter1( sParam );
798 pAction->setParameter2( sParam2 );
799 pAction->setParameter3( sParam3 );
803 pMidiEventNode = pMidiEventNode.nextSiblingElement(
"midiEvent" );
811 WARNINGLOG(
"hydrogen_preferences node not found" );
821 if ( bRecreate && ! bGlobal ) {
822 WARNINGLOG(
"Recreating configuration file." );
837 QString sPreferencesFilename;
839 if ( sPreferencesOverwritePath.isEmpty() ) {
842 sPreferencesFilename = sPreferencesOverwritePath;
845 INFOLOG( QString(
"Saving preferences file %1" ).arg( sPreferencesFilename ) );
901 for (
unsigned i = 0; i < nSongs; i++ ) {
912 if ( ++nFX > 10 )
break;
917 std::list<QString>::const_iterator cur_Server;
921 serverListNode.
write_string( QString(
"server") , QString( *cur_Server ) );
925 std::list<QString>::const_iterator cur_patternCategories;
929 patternCategoriesNode.
write_string( QString(
"categories") , QString( *cur_patternCategories ) );
975 sMode =
"NO_JACK_TRANSPORT";
977 sMode =
"USE_JACK_TRANSPORT";
979 jackDriverNode.
write_string(
"jack_transport_mode", sMode );
987 tmMode =
"NO_JACK_TIME_MASTER";
989 tmMode =
"USE_JACK_TIME_MASTER";
991 jackDriverNode.
write_string(
"jack_transport_mode_master", tmMode );
996 int nJackTrackOutputMode;
998 nJackTrackOutputMode = 0;
1000 nJackTrackOutputMode = 1;
1002 jackDriverNode.
write_int(
"jack_track_output_mode", nJackTrackOutputMode );
1009 XMLNode alsaAudioDriverNode = audioEngineNode.
createNode(
"alsa_audio_driver" );
1066 for (
unsigned nFX = 0; nFX <
MAX_FX; nFX++ ) {
1067 QString sNode = QString(
"ladspaFX_properties%1").arg( nFX );
1093 guiNode.
write_float(
"exportDialogCompressionLevel",
1119 setPlay =
"SET_PLAY_OFF";
1121 setPlay =
"SET_PLAY_ON";
1166 if ( ppAction !=
nullptr && ! ppAction->isNull() ){
1170 midiEventNode.
write_string(
"action" , ppAction->getType());
1171 midiEventNode.
write_string(
"parameter" , ppAction->getParameter1() );
1172 midiEventNode.
write_string(
"parameter2" , ppAction->getParameter2() );
1173 midiEventNode.
write_string(
"parameter3" , ppAction->getParameter3() );
1178 if ( ppAction !=
nullptr && ! ppAction->isNull() ){
1183 midiEventNode.
write_int(
"eventParameter" , nnPitch );
1184 midiEventNode.
write_string(
"action" , ppAction->getType() );
1185 midiEventNode.
write_string(
"parameter" , ppAction->getParameter1() );
1186 midiEventNode.
write_string(
"parameter2" , ppAction->getParameter2() );
1187 midiEventNode.
write_string(
"parameter3" , ppAction->getParameter3() );
1192 if ( ppAction !=
nullptr && ! ppAction->isNull() ){
1197 midiEventNode.
write_int(
"eventParameter" , nnParam );
1198 midiEventNode.
write_string(
"action" , ppAction->getType() );
1199 midiEventNode.
write_string(
"parameter" , ppAction->getParameter1() );
1200 midiEventNode.
write_string(
"parameter2" , ppAction->getParameter2() );
1201 midiEventNode.
write_string(
"parameter3" , ppAction->getParameter3() );
1206 if ( ppAction !=
nullptr && ! ppAction->isNull() ){
1211 midiEventNode.
write_string(
"action" , ppAction->getType() );
1212 midiEventNode.
write_string(
"parameter" , ppAction->getParameter1() );
1213 midiEventNode.
write_string(
"parameter2" , ppAction->getParameter2() );
1214 midiEventNode.
write_string(
"parameter3" , ppAction->getParameter3() );
1218 return doc.
write( sPreferencesFilename );
1222 const QString s = QString( sDriver ).toLower();
1223 if ( s ==
"auto" ) {
1226 else if ( s ==
"jack" || s ==
"jackaudio") {
1229 else if ( s ==
"oss" ) {
1232 else if ( s ==
"alsa" ) {
1235 else if ( s ==
"pulseaudio" || s ==
"pulse" ) {
1238 else if ( s ==
"coreaudio" || s ==
"core" ) {
1241 else if ( s ==
"portaudio" || s ==
"port" ) {
1246 ERRORLOG( QString(
"Unable to parse driver [%1]" ). arg( sDriver ) );
1263 return "PulseAudio";
1277 return "Unhandled driver type";
1285#ifndef H2CORE_HAVE_JACK
1287 INFOLOG(
"Hydrogen was compiled without JACK support." );
1291 #ifndef H2CORE_HAVE_DYNAMIC_JACK_CHECK
1293 INFOLOG(
"JACK support enabled." );
1304 auto checkExecutable = [&](
const QString& sExecutable,
1305 const QString& sOption ) {
1307 process.start( sExecutable, QStringList( sOption ) );
1308 process.waitForFinished( -1 );
1310 if ( process.exitCode() != 0 ) {
1311 return QString(
"" );
1314 QString sStdout = process.readAllStandardOutput();
1315 if ( sStdout.isEmpty() ) {
1316 return QString(
"No output" );
1319 return QString( sStdout.trimmed() );
1323 bool bJackSupport =
false;
1326 QString sCapture = checkExecutable(
"jackd",
"--version" );
1327 if ( ! sCapture.isEmpty() ) {
1328 bJackSupport =
true;
1330 INFOLOG( QString(
"'jackd' of version [%1] found." )
1342 sCapture = checkExecutable(
"jackdbus",
"-h" );
1343 if ( ! sCapture.isEmpty() ) {
1344 bJackSupport =
true;
1346 INFOLOG(
"'jackdbus' found." );
1354 sCapture = checkExecutable(
"pw-jack",
"-h" );
1355 if ( ! sCapture.isEmpty() ) {
1356 bJackSupport =
true;
1358 INFOLOG(
"'pw-jack' found." );
1363 if ( bJackSupport ) {
1364 INFOLOG(
"Dynamic JACK discovery succeeded. JACK support enabled." );
1367 WARNINGLOG(
"Dynamic JACK discovery failed. JACK support disabled." );
1371 return bJackSupport;
1378 std::vector<AudioDriver> drivers;
1387 #ifdef H2CORE_HAVE_PORTAUDIO
1390 if ( bJackSupported ) {
1393#elif defined(__APPLE__)
1394 #ifdef H2CORE_HAVE_COREAUDIO
1397 if ( bJackSupported ) {
1400 #ifdef H2CORE_HAVE_PULSEAUDIO
1403 #ifdef H2CORE_HAVE_PORTAUDIO
1407 if ( bJackSupported ) {
1410 #ifdef H2CORE_HAVE_PULSEAUDIO
1413 #ifdef H2CORE_HAVE_ALSA
1416 #ifdef H2CORE_HAVE_OSS
1419 #ifdef H2CORE_HAVE_PORTAUDIO
1444 XMLNode windowPropNode = parent.firstChildElement( windowName );
1445 if ( windowPropNode.isNull() ) {
1446 WARNINGLOG(
"Error reading configuration file: " + windowName +
" node not found" );
1449 prop.
x = windowPropNode.
read_int(
"x", prop.
x,
false,
false );
1450 prop.
y = windowPropNode.
read_int(
"y", prop.
y,
false,
false );
static QStringList getDevices()
Use the name hints to build a list of potential device names.
static QString scripts_dir()
returns user scripts path
static bool file_executable(const QString &path, bool silent=false)
returns true if the given path is an existing executable regular file
static AudioFormat AudioFormatFromSuffix(const QString &sFile, bool bSilent=false)
Determines the audio format of the provided filename or path based on its suffix.
static QString usr_config_path()
static QString songs_dir()
returns user songs path
static QString playlists_dir()
returns user playlist path
static const QString & getPreferencesOverwritePath()
static QString sys_config_path()
returns system config path
static QString AudioFormatToSuffix(const AudioFormat &format, bool bSilent=false)
Converts format to the default lower case suffix of the format.
static bool file_readable(const QString &path, bool silent=false)
returns true if the given path is an existing readable regular file
static QString patterns_dir()
returns user patterns path
FontSize
Enables custom scaling of the font size in the GUI.
static float FALLOFF_NORMAL
static bool isAvailable()
Checks whether the Logger instances was already created and can be used by other parts of Hydrogen.
static QString EventToQString(Event event)
Manager for User Preferences File (singleton)
float getMixerFalloffSpeed()
WindowProperties audioEngineInfoProperties
void writeWindowProperties(XMLNode parent, const QString &windowName, const WindowProperties &prop)
Write the xml nodes related to window properties.
bool m_bShowAutomationArea
QString m_sPortAudioDevice
QString m_sLastExportPatternAsDirectory
static AudioDriver parseAudioDriver(const QString &sDriver)
int m_bJackTimebaseMode
Specifies if Hydrogen support the of JACK Timebase protocol.
Filesystem::AudioFormat m_exportFormat
bool m_bShowExportDrumkitAttributionWarning
bool m_bShowInstrumentPeaks
WindowProperties m_playlistDialogProperties
QString m_sDefaultEditor
Default text editor (used by Playlisteditor)
void setPatternColors(std::vector< QColor > patternColors)
bool __useTimelineBpm
Whether to use local speeds specified along the Timeline or a constant tempo for the whole Song in Hy...
JackTrackOutputMode m_JackTrackOutputMode
Specifies which audio settings will be applied to the sample supplied in the JACK per track output po...
bool m_bUseRelativeFilenamesForPlaylists
void setLadspaProperties(unsigned nFX, const WindowProperties &prop)
WindowProperties songEditorProperties
bool __playselectedinstrument
void setMixerProperties(const WindowProperties &prop)
void setPatternEditorProperties(const WindowProperties &prop)
bool m_bOscFeedbackEnabled
Whether to send the current state of Hydrogen to the OSC clients.
void setQTStyle(const QString &sStyle)
const QString & getApplicationFontFamily() const
void setMostRecentFX(QString)
void setSongEditorProperties(const WindowProperties &prop)
std::vector< QString > m_recentFiles
const QString & getQTStyle()
WindowProperties mixerProperties
unsigned m_nPatternEditorGridWidth
unsigned m_nSampleRate
Sample rate of the audio.
bool m_bShowNoteOverwriteWarning
Last song used.
WindowProperties instrumentRackProperties
QString m_sPortAudioHostAPI
static std::vector< AudioDriver > getSupportedAudioDrivers()
bool savePreferences()
Save the preferences file.
bool m_bPatternEditorUsingTriplets
bool m_bEnableMidiFeedback
void setVisiblePatternColors(int nValue)
void setColoringMethod(InterfaceTheme::ColoringMethod coloringMethod)
const QString & getLevel3FontFamily() const
void setInstrumentRackProperties(const WindowProperties &prop)
InterfaceTheme::Layout getDefaultUILayout()
bool m_bOscServerEnabled
Whether to start the OscServer thread.
QString m_sMidiOutputPortName
unsigned m_nSongEditorGridHeight
void setApplicationFontFamily(const QString &family)
QString m_sLastImportDrumkitDirectory
QString m_sLastExportSongDirectory
QString m_sLastOpenPatternDirectory
static void create_instance()
If __instance equals 0, a new Preferences singleton will be created and stored in it.
int m_nMaxLayers
Maximum number of layers to be used in the Instrument editor.
unsigned m_nPatternEditorGridHeight
int getMaxPatternColors() const
WindowProperties m_directorProperties
void setLevel3FontFamily(const QString &family)
void setDirectorProperties(const WindowProperties &prop)
void setPlaylistDialogProperties(const WindowProperties &prop)
static QString audioDriverToQString(const AudioDriver &driver)
QString m_sMidiDriver
MIDI driver.
QString m_lastSongFilename
unsigned m_nSongEditorGridWidth
int m_nExportSampleRateIdx
bool m_bShowExportDrumkitCopyleftWarning
QString m_lastPlaylistFilename
QString m_sLastExportThemeDirectory
bool m_bLoadingSuccessful
void setMainFormProperties(const WindowProperties &prop)
void setAudioEngineInfoProperties(const WindowProperties &prop)
std::list< QString > sServerList
@ postFader
Applies layer, component, and instrument gain, note and instrument pan, note velocity,...
@ preFader
Only layer gain and note velocity will be applied to the samples.
bool loadPreferences(bool bGlobal)
Load the preferences file.
int m_nPatternEditorGridResolution
QString m_sLastExportDrumkitDirectory
QString m_sLastExportMidiDirectory
AudioDriver m_audioDriver
Audio driver.
QString m_sLastImportThemeDirectory
std::list< QString > m_patternCategories
FontTheme::FontSize getFontSize() const
bool m_bJackConnectDefaults
Toggles auto-connecting of the main stereo output ports to the system's default ports when starting t...
unsigned m_nMaxNotes
max notes
bool readPrefFileforotherplaces
bool m_bUseLash
Show development version warning?
QString m_sAlsaAudioDevice
void setFontSize(FontTheme::FontSize fontSize)
QString m_sCoreAudioDevice
bool __playsamplesonclicking
InterfaceTheme::ColoringMethod getColoringMethod() const
bool m_bMidiDiscardNoteAfterAction
bool m_useTheRubberbandBpmChangeEvent
rubberband bpm change queue
bool m_bUseMetronome
If set to true, samples of the metronome will be added to H2Core::AudioEngine::m_songNoteQueue and th...
QString m_sLastOpenLayerDirectory
WindowProperties mainFormProperties
QString m_sOSSDevice
Device used for output.
InterfaceTheme::ScalingPolicy getUIScalingPolicy()
bool m_bMidiNoteOffIgnore
std::vector< QColor > getPatternColors() const
QString m_sLastSaveSongAsDirectory
bool m_brestoreLastPlaylist
QString m_rubberBandCLIexecutable
Rubberband CLI.
QString m_sLastAddSongToPlaylistDirectory
int m_nExportSampleDepthIdx
WindowProperties patternEditorProperties
bool m_bJackTimebaseEnabled
External applications with a faulty JACK Timebase implementation can mess up the transport within Hyd...
void setDefaultUILayout(InterfaceTheme::Layout layout)
const QString & getLevel2FontFamily() const
int m_nMaxBars
Maximum number of bars shown in the Song Editor at once.
QString m_sLastPlaylistScriptDirectory
bool m_bShowExportSongLicenseWarning
int getVisiblePatternColors() const
float m_fMetronomeVolume
Metronome volume FIXME: remove this volume!!
static bool checkJackSupport()
Attempts to call several JACK executables in order to check for existing JACK support.
QString m_sLastExportLilypondDirectory
void setMixerFalloffSpeed(float value)
int m_nOscTemporaryPort
In case m_nOscServerPort is already occupied by another client, the alternative - random - port numbe...
WindowProperties readWindowProperties(XMLNode parent, const QString &windowName, WindowProperties defaultProp)
Read the xml nodes related to window properties.
bool m_bShowExportDrumkitLicenseWarning
static QString getNullMidiPort()
Choice of m_sMidiPortName and m_sMidiOutputPortName in case no port/device was selected.
float m_fExportCompressionLevel
static Preferences * __instance
Object holding the current Preferences singleton.
int m_nOscServerPort
Port number the OscServer will be started at.
bool m_bJackTrackOuts
If set to true, JackAudioDriver::makeTrackOutputs() will create two individual left and right output ...
void setLevel2FontFamily(const QString &family)
int m_bJackTransportMode
Specifies whether or not Hydrogen will use the JACK transport system.
QString m_sPreferredLanguage
QString m_sLastOpenSongDirectory
@ NO_JACK_TRANSPORT
Specifies whether or not to use JACK transport capabilities.
@ USE_JACK_TRANSPORT
Specifies whether or not to use JACK transport capabilities.
@ NO_JACK_TIMEBASE_CONTROL
Specifies that Hydrogen should not be in control of JACK Timebase information.
@ USE_JACK_TIMEBASE_CONTROL
Specifies that Hydrogen should attempt to acquire JACK Timebase control.
bool m_bShowPlaybackTrack
std::shared_ptr< Theme > m_pTheme
unsigned m_nBufferSize
Buffer size of the audio.
QString m_sLastPlaylistDirectory
void setUIScalingPolicy(InterfaceTheme::ScalingPolicy policy)
bool m_bHideKeyboardCursor
QString m_sLastOpenPlaybackTrackDirectory
WindowProperties m_ladspaProperties[MAX_FX]
static void readColorTheme(XMLNode parent, std::shared_ptr< Theme > pTheme)
static void writeColorTheme(XMLNode *parent, std::shared_ptr< Theme > pTheme)
XMLDoc is a subclass of QDomDocument with read and write methods.
XMLNode set_root(const QString &node_name, const QString &xmlns=nullptr)
create the xml header and root node
bool read(const QString &filepath, bool bSilent=false)
read the content of an xml file
bool write(const QString &filepath)
write itself into a file
XMLNode is a subclass of QDomNode with read and write values methods.
int read_int(const QString &node, int default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads an integer stored into a child node
bool read_bool(const QString &node, bool default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads a boolean stored into a child node
QColor read_color(const QString &node, const QColor &defaultValue=QColor(97, 167, 251), bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
QString read_string(const QString &node, const QString &default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads a string stored into a child node
float read_float(const QString &node, float default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads a float stored into a child node
void write_color(const QString &node, const QColor &color)
void write_float(const QString &node, const float value)
write a float into a child node
XMLNode createNode(const QString &name)
create a new XMLNode that has to be appended into de XMLDoc
void write_string(const QString &node, const QString &value)
write a string into a child node
void write_bool(const QString &node, const bool value)
write a boolean into a child node
void write_int(const QString &node, const int value)
write an integer into a child node
The MidiMap maps MidiActions to MidiEvents.
void registerMMCEvent(QString, std::shared_ptr< Action >)
Sets up the relation between a mmc event and an action.
void registerNoteEvent(int, std::shared_ptr< Action >)
Sets up the relation between a note event and an action.
std::multimap< int, std::shared_ptr< Action > > getCCActionMap() const
void registerPCEvent(std::shared_ptr< Action >)
Sets up the relation between a program change and an action.
std::vector< std::shared_ptr< Action > > getPCActions() const
Returns the pc action which was linked to the given event.
std::multimap< QString, std::shared_ptr< Action > > getMMCActionMap() const
static void create_instance()
If __instance equals 0, a new MidiMap singleton will be created and stored in it.
std::multimap< int, std::shared_ptr< Action > > getNoteActionMap() const
static MidiMap * get_instance()
Returns a pointer to the current MidiMap singleton stored in __instance.
static void reset_instance()
Convenience function calling reset() on the current MidiMap __instance.
void registerCCEvent(int, std::shared_ptr< Action >)
Sets up the relation between a cc event and an action.
#define MAX_FX
Maximum number of effects.
std::string get_version()
Returns the current Hydrogen version string.
static const std::string version