Skip to content

Commit

Permalink
Merge branch 'dev' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
samaaron committed Sep 14, 2022
2 parents 78f0a98 + 471019e commit fd8298a
Show file tree
Hide file tree
Showing 32 changed files with 1,267 additions and 1,084 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# History
* [v4.2.0 'Batch'](#v4.2.0), 14th Sept, 2022
* [v4.1.0 'Phase'](#v4.1.0), 30th August 2022
* [v4.0.3 'Dovetail'](#v4.0.3), 18th July 2022
* [v4.0.2 'Relink'](#v4.0.2), 15th July 2022
Expand Down Expand Up @@ -28,6 +29,32 @@
* [v2.0.1](#v2.0.1), 9th Sept, 2014
* [v2.0 'Phoenix'](#v2.0), 2nd Sept, 2014

<a name="v4.2.0"></a>

## Version 4.2.0 'Batch'
14th September 2022
<!-- [(view commits)](https://github.com/sonic-pi-net/sonic-pi/commits/v4.2.0): -->

The main purpose of this release is to address a booting issue discovered on a school Windows cluster with common security restrictions. This issue was reported by Adam Cooper from Moor Park High School & Sixth Form in the UK. Adam was wonderfully helpful in finding the specific issue and testing potential solutions. Thanks Adam!

If you happen to have had any trouble running v4 of Sonic Pi on your school clusters, please give this release a go! (Note, this issue didn't affect v3 of Sonic Pi).

In addition, there have been some translation improvements, Global Time Warp now has a greater range and a couple of `time_warp` related bugs were found and dealt with. Have fun!

### GUI
* Change Global Time Warp range from +-250 to -250 -> 999. This lets users access the full phase down to a BPM of 48.

### Improvements
* Booting process on Windows has been modified to enable it to run when executing in an environment which restricts access to CMD (which prevents terminal usage and running .bat files). This is typical in schools.
* Sonic Pi stores all its history, configuration and logs in a folder called `.sonic-pi` which is typically placed in the user's home directory. If the user happens to not have permission to write to their home directory, Sonic Pi now raises a descriptive error on boot and explains that the fix is to set an environment variable called `SONIC_PI_HOME` to point to a directory the user does have permission to write to.

### Translations
* Improvements to the Dutch, Hungarian and Indonesian translations.

### Bugfixes
* Teach timing safety system that `time_warp` doesn't sleep (even if it contains calls to `sleep` internally). This now means that wrapping all code within a `live_loop` with `time_warp` no longer causes the thread to spin out of control. It instead reports that the live loop did not sleep as expected.
* Throw error when attempting to call `sync` within a `time_warp`. This is because time warps are effectively timeless and `sync` asks the running thread to wait for an unknown period (until a matching event appears). Attempting to wait within a timeless context is clearly nonsensical!

<a name="v4.1.0"></a>

## Version 4.1.0 'Phase'
Expand Down
141 changes: 53 additions & 88 deletions CONTRIBUTORS.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion app/api/include/api/sonicpi_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ enum class APIInitResult
{
Successful,
TerminalError,
ScsynthBootError
ScsynthBootError,
HomePathNotWritableError
};

enum class BootDaemonInitResult
Expand All @@ -55,6 +56,7 @@ enum class BootDaemonInitResult
enum class SonicPiPath
{
RootPath, // Sonic Pi Application root
HomePath, // User-writable home directory root (parent of UserPath).
UserPath, // User-writable folder for config/saves etc.
RubyPath, // Path to ruby executable
BootDaemonPath, // Path to the Boot Daemon script
Expand Down
13 changes: 8 additions & 5 deletions app/api/src/sonicpi_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,12 @@ APIInitResult SonicPiAPI::Init(const fs::path& root, bool noScsynthInputs)
}
}

if (m_homeDirWriteable) {
LOG(INFO, "Home dir writable: ");
} else {
return APIInitResult::HomePathNotWritableError;
}


EnsurePathsAreCanonical();
StartClearLogsScript();
Expand All @@ -671,11 +677,7 @@ APIInitResult SonicPiAPI::Init(const fs::path& root, bool noScsynthInputs)
}
});

if (m_homeDirWriteable) {
LOG(INFO, "Home dir writable: ");
} else {
LOG(INFO, "Home dir NOT writable: ");
}


LOG(INFO, "Log Path: " + GetPath(SonicPiPath::LogPath).string());
m_state = State::Initializing;
Expand Down Expand Up @@ -722,6 +724,7 @@ bool SonicPiAPI::InitializePaths(const fs::path& root)
m_paths[SonicPiPath::RootPath] = fs::canonical(fs::absolute(root));

// Sonic pi home directory
m_paths[SonicPiPath::HomePath] = FindHomePath();
m_paths[SonicPiPath::UserPath] = FindHomePath() / ".sonic-pi";

// Set path to Ruby executable (system dependent)
Expand Down
9 changes: 5 additions & 4 deletions app/gui/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ cmake_minimum_required(VERSION 3.2)

message(STATUS "CMakeLists: Sonic Pi Qt GUI")

if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
endif()

project("Sonic Pi"
LANGUAGES CXX C
DESCRIPTION "A code-based music creation and performance tool"
VERSION 4.1.0
VERSION 4.2.0
HOMEPAGE_URL "https://sonic-pi.net"
)

if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
endif()

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

Expand Down
2 changes: 1 addition & 1 deletion app/gui/qt/html/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
code_as <span class="highlight">:art</span></pre>
</p>

<p class="version">v4.1.0</p>
<p class="version">v4.2.0</p>

</center>

Expand Down
2 changes: 1 addition & 1 deletion app/gui/qt/html/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@

<br/>

<p class="version">v4.1.0</p>
<p class="version">v4.2.0</p>
</center>
</body>
Binary file modified app/gui/qt/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/gui/qt/images/splash2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/gui/qt/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fd8298a

Please sign in to comment.