Skip to content

Commit

Permalink
Merge branch 'master' into releases/1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cme committed Dec 14, 2022
2 parents 2c89221 + 769ee9d commit 5e4da31
Show file tree
Hide file tree
Showing 342 changed files with 613 additions and 463 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ PROJECT(hydrogen)
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "2")
SET(VERSION_PATCH "0")
SET(VERSION_SUFFIX "beta")

SET(VERSION_SUFFIX "beta1")

SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Hydrogen
# Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
# Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
# Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
#
# http://www.hydrogen-music.org
#
Expand Down
22 changes: 14 additions & 8 deletions data/i18n/hydrogen_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4246,41 +4246,47 @@ Sei sicuro?</translation>
<source>It is not possible to delete the currently loaded drumkit:
&quot;%1&quot;.
To delete this drumkit first load another drumkit.</source>
<translation type="unfinished"></translation>
<translation>Non è possibile eliminare il drumkit correntemente caricato:
&quot;%1&quot;.
Per eliminare questo drumkit è necessario caricarne un altro.</translation>
</message>
<message>
<source>Warning, the &quot;%1&quot; drumkit will be deleted from disk.
Are you sure?</source>
<translation type="unfinished"></translation>
<translation>Avvertimento, il drumkit &quot;%1&quot; sarà eliminato dal disco.</translation>
</message>
<message>
<source>Drumkit deletion failed.</source>
<translation type="unfinished"></translation>
<translation>Eliminazione del drumkit fallita.</translation>
</message>
<message>
<source>Keep</source>
<translation type="unfinished"></translation>
<translation>Mantieni</translation>
</message>
<message>
<source>The existing kit has %1 instruments but the new one only has %2.
The first %2 instruments will be replaced with the new instruments and will keep their notes, but some of the remaining instruments have notes.
Would you like to keep or discard the remaining instruments and notes?
</source>
<translation type="unfinished"></translation>
<translation>Il kit esistente ha %1 strumenti ma il nuovo ne ha solamente %2.
I primi %2 strumenti saranno sostituiti con i nuovi strumenti e saranno mantenute le note, ma alcuni dei restanti
strumenti hanno note. Vuoi mantenenere o eliminare i restanti strumenti e note?</translation>
</message>
<message>
<source>Double click to expand the list</source>
<translation type="unfinished"></translation>
<translation>Doppio clic per espandere la lista</translation>
</message>
<message>
<source>Drumkit registered in the current song can not be found on disk.
Please load an existing drumkit first.
Current kit:</source>
<translation type="unfinished"></translation>
<translation>Il drumkit utilizzato nella canzone corrente non può essere trovato sul disco.
Per piacere, carica prima un drumkit esistente.
Kit corrente:</translation>
</message>
<message>
<source>is a system drumkit and can&apos;t be deleted.</source>
<translation type="unfinished"></translation>
<translation>è un drumkit di sistema e non può essere eliminato.</translation>
</message>
<message>
<source>Not implemented yet.</source>
Expand Down
2 changes: 1 addition & 1 deletion macos/build_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Hydrogen
# Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
# Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
# Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
#
# http://www.hydrogen-music.org
#
Expand Down
2 changes: 1 addition & 1 deletion macos/fixlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Hydrogen
# Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
# Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
# Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
#
# http://www.hydrogen-music.org
#
Expand Down
2 changes: 1 addition & 1 deletion macos/hydrogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Hydrogen
# Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
# Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
# Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
#
# http://www.hydrogen-music.org
#
Expand Down
2 changes: 1 addition & 1 deletion src/cli/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
55 changes: 43 additions & 12 deletions src/core/AudioEngine/AudioEngine.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down Expand Up @@ -605,7 +605,16 @@ void AudioEngine::updateBpmAndTickSize( std::shared_ptr<TransportPosition> pPos
AudioEngine::computeTickSize( static_cast<float>(m_pAudioDriver->getSampleRate()),
fNewBpm, pSong->getResolution() );
// Nothing changed - avoid recomputing
#ifndef WIN32
if ( fNewTickSize == fOldTickSize ) {
#else
// For some reason two identical numbers (according to their
// values when printing them) are not equal to each other in 32bit
// Windows. Course graining the tick change in here will do no
// harm except of for preventing tiny tempo changes. Integer value
// changes should not be affected.
if ( std::abs( fNewTickSize - fOldTickSize ) < 1e-2 ) {
#endif
return;
}

Expand Down Expand Up @@ -1273,6 +1282,11 @@ int AudioEngine::audioEngine_process( uint32_t nframes, void* /*arg*/ )
pAudioEngine->stopPlayback();
pAudioEngine->locate( 0 );

// Tell GUI to move the playhead position to the beginning of
// the song again since it only updates it in case transport
// is rolling.
EventQueue::get_instance()->push_event( EVENT_RELOCATION, 0 );

if ( dynamic_cast<FakeDriver*>(pAudioEngine->m_pAudioDriver) != nullptr ) {
___INFOLOG( "End of song." );

Expand Down Expand Up @@ -1498,7 +1512,8 @@ void AudioEngine::updateSongSize() {

auto updatePatternSize = []( std::shared_ptr<TransportPosition> pPos ) {
if ( pPos->getPlayingPatterns()->size() > 0 ) {
pPos->setPatternSize( pPos->getPlayingPatterns()->longest_pattern_length() );
// No virtual pattern resolution in here
pPos->setPatternSize( pPos->getPlayingPatterns()->longest_pattern_length( false ) );
} else {
pPos->setPatternSize( MAX_NOTES );
}
Expand Down Expand Up @@ -1666,7 +1681,16 @@ void AudioEngine::updateSongSize() {
// Ensure the tick offset is calculated as well (we do not expect
// the tempo to change hence the following call is most likely not
// executed during updateTransportPosition()).
#ifndef WIN32
if ( fOldTickSize == m_pTransportPosition->getTickSize() ) {
#else
// For some reason two identical numbers (according to their
// values when printing them) are not equal to each other in 32bit
// Windows. Course graining the tick change in here will do no
// harm except of for preventing tiny tempo changes. Integer value
// changes should not be affected.
if ( std::abs( m_pTransportPosition->getTickSize() - fOldTickSize ) < 1e-2 ) {
#endif
calculateTransportOffsetOnBpmChange( m_pTransportPosition );
}

Expand Down Expand Up @@ -1761,8 +1785,7 @@ void AudioEngine::updatePlayingPatternsPos( std::shared_ptr<TransportPosition> p

for ( const auto& ppattern : *( *( pSong->getPatternGroupVector() ) )[ nColumn ] ) {
if ( ppattern != nullptr ) {
pPlayingPatterns->add( ppattern );
ppattern->addFlattenedVirtualPatterns( pPlayingPatterns );
pPlayingPatterns->add( ppattern, true );
}
}

Expand All @@ -1771,7 +1794,7 @@ void AudioEngine::updatePlayingPatternsPos( std::shared_ptr<TransportPosition> p
// We omit the event when passing from one empty column to the
// next.
if ( pPos == m_pTransportPosition &&
( nPrevPatternNumber != 0 && pPlayingPatterns->size() != 0 ) ) {
( nPrevPatternNumber != 0 || pPlayingPatterns->size() != 0 ) ) {
EventQueue::get_instance()->push_event( EVENT_PLAYING_PATTERNS_CHANGED, 0 );
}
}
Expand All @@ -1784,8 +1807,7 @@ void AudioEngine::updatePlayingPatternsPos( std::shared_ptr<TransportPosition> p
! ( pPlayingPatterns->size() == 1 &&
pPlayingPatterns->get( 0 ) == pSelectedPattern ) ) {
pPlayingPatterns->clear();
pPlayingPatterns->add( pSelectedPattern );
pSelectedPattern->addFlattenedVirtualPatterns( pPlayingPatterns );
pPlayingPatterns->add( pSelectedPattern, true );

// GUI does not care about the internals of the audio
// engine and just moves along the transport position.
Expand All @@ -1806,9 +1828,8 @@ void AudioEngine::updatePlayingPatternsPos( std::shared_ptr<TransportPosition> p

if ( ( pPlayingPatterns->del( ppattern ) ) == nullptr ) {
// pPattern was not present yet. It will
// be added.
pPlayingPatterns->add( ppattern );
ppattern->addFlattenedVirtualPatterns( pPlayingPatterns );
// be added
pPlayingPatterns->add( ppattern, true );
} else {
// pPattern was already present. It will
// be deleted.
Expand All @@ -1826,7 +1847,8 @@ void AudioEngine::updatePlayingPatternsPos( std::shared_ptr<TransportPosition> p
}

if ( pPlayingPatterns->size() > 0 ) {
pPos->setPatternSize( pPlayingPatterns->longest_pattern_length() );
// No virtual pattern resolution in here
pPos->setPatternSize( pPlayingPatterns->longest_pattern_length( false ) );
} else {
pPos->setPatternSize( MAX_NOTES );
}
Expand Down Expand Up @@ -1905,8 +1927,17 @@ void AudioEngine::handleTimelineChange() {
const auto fOldTickSize = m_pTransportPosition->getTickSize();
updateBpmAndTickSize( m_pTransportPosition );
updateBpmAndTickSize( m_pQueuingPosition );


#ifndef WIN32
if ( fOldTickSize == m_pTransportPosition->getTickSize() ) {
#else
// For some reason two identical numbers (according to their
// values when printing them) are not equal to each other in 32bit
// Windows. Course graining the tick change in here will do no
// harm except of for preventing tiny tempo changes. Integer value
// changes should not be affected.
if ( std::abs( m_pTransportPosition->getTickSize() - fOldTickSize ) < 1e-2 ) {
#endif
// As tempo did not change during the Timeline activation, no
// update of the offsets took place. This, however, is not
// good, as it makes a significant difference to be located at
Expand Down
2 changes: 1 addition & 1 deletion src/core/AudioEngine/AudioEngine.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/AudioEngine/AudioEngineTests.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/AudioEngine/AudioEngineTests.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/AudioEngine/TransportPosition.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
6 changes: 5 additions & 1 deletion src/core/AudioEngine/TransportPosition.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down Expand Up @@ -360,6 +360,10 @@ class TransportPosition : public H2Core::Object<TransportPosition>
* If transport is in #H2Core::Song::Mode::Song, it corresponds
* to the patterns present in column #m_nColumn.
*
* Due to performance reasons no virtual patterns will be checked
* and expanded in this list. Instead, all contained patterns have
* to be added explicitly.
*
* See AudioEngine::updatePlayingPatterns() for details.
*/
PatternList* m_pPlayingPatterns;
Expand Down
2 changes: 1 addition & 1 deletion src/core/AutomationPathSerializer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/AutomationPathSerializer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/Basics/Adsr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/Basics/AutomationPath.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
4 changes: 2 additions & 2 deletions src/core/Basics/AutomationPath.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down Expand Up @@ -83,7 +83,7 @@ class AutomationPath : public Object<AutomationPath>
* displayed without line breaks.
*
* \return String presentation of current object.*/
QString toQString( const QString& sPrefix, bool bShort = true ) const override;
QString toQString( const QString& sPrefix = "", bool bShort = true ) const override;
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/Basics/Drumkit.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
4 changes: 2 additions & 2 deletions src/core/Basics/Drumkit.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down Expand Up @@ -256,7 +256,7 @@ class Drumkit : public H2Core::Object<Drumkit>
* displayed without line breaks.
*
* \return String presentation of current object.*/
QString toQString( const QString& sPrefix, bool bShort = true ) const override;
QString toQString( const QString& sPrefix = "", bool bShort = true ) const override;

private:
QString __path; ///< absolute drumkit path
Expand Down
2 changes: 1 addition & 1 deletion src/core/Basics/DrumkitComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hydrogen
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
* Copyright(c) 2008-2021 The hydrogen development team [[email protected]]
* Copyright(c) 2008-2022 The hydrogen development team [[email protected]]
*
* http://www.hydrogen-music.org
*
Expand Down
Loading

0 comments on commit 5e4da31

Please sign in to comment.