23#ifndef CORE_ACTION_CONTROLLER_H
24#define CORE_ACTION_CONTROLLER_H
52 bool setStripVolume(
int nStrip,
float fVolumeValue,
bool bSelectStrip );
59 bool setStripPan(
int nStrip,
float fValue,
bool bSelectStrip );
66 bool setStripPanSym(
int nStrip,
float fValue,
bool bSelectStrip );
100 bool newSong(
const QString& songPath );
117 bool openSong(
const QString& songPath,
const QString& sRecoverSongPath =
"" );
132 bool openSong( std::shared_ptr<Song> pSong,
bool bRelinking =
true );
152 bool saveSongAs(
const QString& sNewFilename );
216 bool addTag(
int nPosition,
const QString& sText );
282 bool setDrumkit(
const QString& sDrumkit,
bool bConditional =
true );
295 bool setDrumkit( std::shared_ptr<Drumkit> pDrumkit,
bool bConditional =
true );
303 bool upgradeDrumkit(
const QString& sDrumkitPath,
const QString& sNewPath =
"" );
317 bool validateDrumkit(
const QString& sDrumkitPath,
bool bCheckLegacyVersions =
false );
344 const QString& sTargetDir =
"",
345 QString* pInstalledPath =
nullptr,
346 bool* pEncodingIssuesDetected =
nullptr );
364 bool locateToTick(
long nTick,
bool bWithJackBroadcast =
true );
372 bool newPattern(
const QString& sPatternName );
382 bool openPattern(
const QString& sPath,
int nPatternNumber = -1 );
408 int nPatternNumber = -1 );
427 bool handleNote(
int nNote,
float fVelocity,
bool bNoteOff =
false );
446 std::shared_ptr<Instrument>
getStrip(
int nStrip )
const;
465 bool setSong( std::shared_ptr<Song> pSong,
bool bRelinking =
true );
487 const QString& sDrumkitPath,
489 QString* sDrumkitDir,
490 QString* sTemporaryFolder,
491 bool* pLegacyFormatEncountered );
bool locateToColumn(int nPatternGroup)
Relocates transport to the beginning of a particular column/Pattern group.
bool setPattern(Pattern *pPattern, int nPatternNumber)
Opens a pattern to the current pattern list.
bool clearInstrumentInPattern(int nInstrumentNumber, int nPatternNumber=-1)
Deletes all notes for instrument pInstrument in a specified pattern.
bool addTag(int nPosition, const QString &sText)
Adds a tag to the Timeline.
bool setSong(std::shared_ptr< Song > pSong, bool bRelinking=true)
Sets a H2Core::Song to be used by Hydrogen.
bool sendStripIsSoloedFeedback(int nStrip)
bool sendMetronomeIsActiveFeedback()
bool setMetronomeIsActive(bool isActive)
void updatePreferences()
In case a different preferences file was loaded with Hydrogen already fully set up this function refr...
bool openSong(const QString &songPath, const QString &sRecoverSongPath="")
Opens the H2Core::Song specified in songPath.
bool locateToTick(long nTick, bool bWithJackBroadcast=true)
Relocates transport to a particular tick.
bool handleNote(int nNote, float fVelocity, bool bNoteOff=false)
Handle an incoming note event, e.g.
bool sendStripPanFeedback(int nStrip)
bool deleteTempoMarker(int nPosition)
Delete a tempo marker from the Timeline.
std::shared_ptr< Instrument > getStrip(int nStrip) const
bool newPattern(const QString &sPatternName)
Creates an empty pattern and adds it to the pattern list.
bool toggleStripIsMuted(int nStrip)
bool newSong(const QString &songPath)
Create an empty H2Core::Song, which will be stored in songPath.
bool savePreferences()
Saves the current state of the H2Core::Preferences.
bool extractDrumkit(const QString &sDrumkitPath, const QString &sTargetDir="", QString *pInstalledPath=nullptr, bool *pEncodingIssuesDetected=nullptr)
Extracts the compressed .h2drumkit file in sDrumkitPath into sTargetDir.
bool sendMasterIsMutedFeedback()
bool setStripVolume(int nStrip, float fVolumeValue, bool bSelectStrip)
bool toggleStripIsSoloed(int nStrip)
bool sendStripVolumeFeedback(int nStrip)
bool activateSongMode(bool bActivate)
Switches between Song and Pattern mode of playback.
bool validateDrumkit(const QString &sDrumkitPath, bool bCheckLegacyVersions=false)
Checks whether the provided drumkit in sDrumkitPath can be found, can be loaded, and does comply with...
bool setDrumkit(const QString &sDrumkit, bool bConditional=true)
Wrapper around setDrumkit() that allows loading drumkits by name or path.
bool setInstrumentPitch(int nInstrument, float fValue)
bool setStripPanSym(int nStrip, float fValue, bool bSelectStrip)
bool toggleGridCell(int nColumn, int nRow)
Fills or clears a specific grid cell in the SongEditor.
bool removePattern(int nPatternNumber)
Removes a pattern from the pattern list.
bool activateLoopMode(bool bActivate)
Toggle loop mode of playback.
std::shared_ptr< Drumkit > retrieveDrumkit(const QString &sDrumkitPath, bool *bIsCompressed, QString *sDrumkitDir, QString *sTemporaryFolder, bool *pLegacyFormatEncountered)
Loads the drumkit specified in sDrumkitPath.
bool upgradeDrumkit(const QString &sDrumkitPath, const QString &sNewPath="")
Upgrades the drumkit found at absolute path sDrumkitPath.
bool activateJackTimebaseControl(bool bActivate)
(Un)registers Hydrogen as JACK Timebaes constroller.
void insertRecentFile(const QString sFilename)
Add sFilename to the list of recent songs in Preferences::m_recentFiles.
bool setMasterIsMuted(bool isMuted)
bool activateJackTransport(bool bActivate)
(De)activates the usage of Jack transport.
bool setStripIsMuted(int nStrip, bool isMuted)
bool setMasterVolume(float masterVolumeValue)
bool activateTimeline(bool bActivate)
(De)activates the usage of the Timeline.
bool sendStripIsMutedFeedback(int nStrip)
bool setStripIsSoloed(int nStrip, bool isSoloed)
bool sendMasterVolumeFeedback()
bool initExternalControlInterfaces()
bool saveSongAs(const QString &sNewFilename)
Saves the current H2Core::Song to the path provided in sNewFilename.
bool saveSong()
Saves the current H2Core::Song.
bool deleteTag(int nPosition)
Delete a tag from the Timeline.
bool sendStripPanSymFeedback(int nStrip)
bool setStripPan(int nStrip, float fValue, bool bSelectStrip)
bool quit()
Triggers the shutdown of Hydrogen.
bool addTempoMarker(int nPosition, float fBpm)
Adds a tempo marker to the Timeline.
const int m_nDefaultMidiFeedbackChannel
bool openPattern(const QString &sPath, int nPatternNumber=-1)
Opens a pattern from disk and adds it to the pattern list.
bool handleOutgoingControlChanges(std::vector< int > params, int nValue)
Pattern class is a Note container.