Merge pull request #254 from rerdavies/dev

Experimental Ubuntu 24.04 x64 build
This commit is contained in:
Robin Davies
2024-11-11 21:40:06 -05:00
committed by GitHub
27 changed files with 302 additions and 409 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
+33 -30
View File
@@ -1,11 +1,14 @@
cmake_minimum_required(VERSION 3.16.0)
project(pipedal
VERSION 1.3.66
VERSION 1.3.67
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
)
set (DISPLAY_VERSION "PiPedal v1.3.66-Release")
set (PACKAGE_ARCHITECTURE "arm64")
EXECUTE_PROCESS( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE DEBIAN_ARCHITECTURE )
set (DISPLAY_VERSION "PiPedal v1.3.67-Experimetnal")
set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE})
set (CMAKE_INSTALL_PREFIX "/usr/")
include(CTest)
@@ -28,16 +31,6 @@ add_subdirectory("src")
# install (TARGETS pipedal_nm_p2pd DESTINATION ${CMAKE_INSTALL_PREFIX}/sbin
# )
# select LV2 source directory for the current build architecture
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
set(LV2_SOURCE_DIRECTORY ${PROJECT_SOURCE_DIR}/lv2/${CMAKE_SYSTEM_PROCESSOR}/ToobAmp.lv2)
if (NOT EXISTS ${LV2_SOURCE_DIRECTORY})
message(FATAL_ERROR "Lv2 Binaries for architecture '${CMAKE_SYSTEM_PROCESSOR}' have not been provisioned. See lv2/Readme.md")
endif()
# add_subdirectory("test")
# add_test(NAME Test COMMAND piddletest)
set (REACT_BUILD_DIRECTORY ${PROJECT_SOURCE_DIR}/build/react/build/)
@@ -73,22 +66,34 @@ install (
DESTINATION /etc/pipedal/config
)
install (DIRECTORY ${LV2_SOURCE_DIRECTORY}
DESTINATION /usr/lib/lv2
)
install(CODE
[[
file(GET_RUNTIME_DEPENDENCIES
EXECUTABLES
${CMAKE_INSTALL_PREFIX}/sbin/pipedaladmind
${CMAKE_INSTALL_PREFIX}/sbin/pipedald
${CMAKE_INSTALL_PREFIX}/sbin/pipedal_update
#${CMAKE_INSTALL_PREFIX}/sbin/pipedal_nm_p2pd
#${CMAKE_INSTALL_PREFIX}/sbin/pipedal_p2pd
${CMAKE_INSTALL_PREFIX}/bin/pipedalconfig
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
if ("${DEBIAN_ARCHITECTURE}" MATCHES "arm64")
# select LV2 source directory for the current build architecture
set(LV2_SOURCE_DIRECTORY ${PROJECT_SOURCE_DIR}/build/lv2/${CMAKE_SYSTEM_PROCESSOR}/ToobAmp.lv2)
install (DIRECTORY ${LV2_SOURCE_DIRECTORY}
DESTINATION /usr/lib/lv2
)
]]
)
elseif("${DEBIAN_ARCHITECTURE}" MATCHES "amd64")
add_custom_target(extract_toobamp_lv2_files ALL
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lv2/x86_64/unpackArtifact.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Extracting x64 ToobAmp components"
)
set(LV2_SOURCE_DIRECTORY ${PROJECT_SOURCE_DIR}/build/lv2_x64/pkg/usr/lib/lv2/ToobAmp.lv2)
install (DIRECTORY ${LV2_SOURCE_DIRECTORY}
DESTINATION /usr/lib/lv2
)
else()
message(FATAL_ERROR "Unknown/unsupported build architecture: ${DEBIAN_ARCHITECTURE}")
endif()
set(CPACK_GENERATOR "DEB")
@@ -99,9 +104,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "IoT guitar effect pedal for Raspberry Pi"
set(CPACK_DEBIAN_PACKAGE_SECTION sound)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "jackd2, hostapd, dhcpcd, dnsmasq" )
set(CPACK_DEBIAN_PACKAGE_DEPENDS "lv2-dev, authbind, gpg" )
#set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
+1
View File
@@ -20,6 +20,7 @@
#pragma once
#include <string>
#include <cstdint>
namespace pipedal {
+2 -2
View File
@@ -6,7 +6,7 @@
<a href="https://rerdavies.github.io/pipedal/LicensePiPedal.html"><img src="https://img.shields.io/badge/MIT-MIT?label=license&color=%23808080"/></a>
<a href="https://github.com/rerdavies/pipedal/actions"><img src="https://img.shields.io/github/actions/workflow/status/rerdavies/pipedal/cmake.yml?branch=main"/></a>
Download:&nbsp;<a href='https://rerdavies.github.io/pipedal/download.html'>v1.3.66</a>
Download:&nbsp;<a href='https://rerdavies.github.io/pipedal/download.html'>v1.3.67</a>
Website:&nbsp;[https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
Documentation:&nbsp;[https://rerdavies.github.io/pipedal/Documentation.html](https://rerdavies.github.io/pipedal/Documentation.html).
@@ -15,7 +15,7 @@ Documentation:&nbsp;[https://rerdavies.github.io/pipedal/Documentation.html](htt
#### Important notice: PiPedal has a submitted a request to support sharing of Pipedal presets at [PatchStorage.com](https:///patchstorage.com). We need your support! Please vote for PiPedal [here](https://patchstorage.com/requests/pipedal/).
#### NEW version 1.3.66 Release, providing [snapshots](https://rerdavies.github.io/pipedal/Snaphots.html), and a new Performance View. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
#### NEW version 1.3.67 Release, providing [snapshots](https://rerdavies.github.io/pipedal/Snaphots.html), and a new Performance View. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
&nbsp;
+17 -9
View File
@@ -20,13 +20,13 @@ with
Run the following commands to install dependent libraries required by the PiPedal build.
sudo apt update
sudo apt install -y liblilv-dev libboost-dev jackd2 libjack-jackd2-dev libnl-3-dev libnl-genl-3-dev libsystemd-dev catch
sudo apt install -y libasound2-dev jackd2 uuid-dev libxrandr-dev
sudo apt install -y authbind
sudo apt install -y libavahi-client-dev
sudo apt install -y libnm-dev libicu-dev
sudo apt update
sudo apt install -y liblilv-dev libboost-dev jackd2 libjack-jackd2-dev libnl-3-dev libnl-genl-3-dev libsystemd-dev catch
sudo apt install -y libasound2-dev jackd2 uuid-dev libxrandr-dev
sudo apt install -y authbind
sudo apt install -y libavahi-client-dev
sudo apt install -y libnm-dev libicu-dev
sudo apt install -y libsdbus-c++-dev libzip-dev google-perftools libgoogle-perftools-dev
@@ -46,13 +46,21 @@ In the project root, run the following commands to initialze and update pipedal
must be performed even if you used Visual Studio Code to initially install the project.
cd ~/src/pipedal
git submodule init
git submodule update
git submodule update --init --recursive
Run the following command to install and configure React dependencies.
cd ~/src/pipedal
./react-config # Configure React NPM dependencies.
And one final step. Edit the file `/etc/sysctl.conf`, and add or increase the value for the maximum number of watchable user
files:
fs.inotify.max_user_watches=524288
Then run `sudo sysctl -p` to get the change to take effect. Visual Studio Code and the React Debug server both need this
setting to run properly. Older versions of Raspberry Pi OS set this value too low; and I am not honestly sure whether current
versions of Raspberry Pi OS have fixed the problem.
--------------------------
[<< Building PiPedal from Source](BuildingPiPedalFromSource.md) | [Up](Documentation.md) | [The Build System >>](TheBuildSystem.md)
+6 -2
View File
@@ -5,11 +5,15 @@ page_icon: img/Compiling.jpg
{% include pageIcon.html %}
PiPedal has only been tested on Raspberry Pi OS, and Ubuntu, but should run with little or no modification on most Linux distributions. Pull requests to correct problems with building PiPedal on other versions of Linux are welcome.
PiPedal has only been tested on Raspberry Pi OS, and Ubuntu, but should run with some modifications on most Linux distributions. Pull requests to correct problems with building PiPedal on other versions of Linux are welcome. However, getting build pre-requisites installed on non-Debian-derived Linux distrubutions (distros that don't use `apt`) will be challenging.
To build and debug PiPedal using Visual Studio Code, you need 8GB of memory. You can build PiPedal with 2GB of memory.
You should also be able to cross-compile PiPedal easily enough, but we do not currently provide support on how to do this. Visual Studio Code provides excellent support for cross-compiling, and good support for remote and cross-platform debugging, all of which should work with the PiPedal CMake build. However, management of ARM pakages on a Windows machine when cross-compiling is not great. Remote debugging may be a better path.
If your Pi is short on memory, you _can_ run VSCode on laptop or desktop and configure VSCode to connect to your Raspberry PI using SSH connections. You can definitely build PiPedal using remote SSH connections on a 6GB Ubnutu VM; and can probably build Pipedal using SSH connections on a 4GB Raspberry Pi, as long as you are careful.
As a last resort, you be able to configure VSCode and/or CMake to crosss-compile PiPedal on a laptop or desktop computer; but installing build dependencies when cross-compiling will be extremely challenging. This is not a scenario that we can provide support for.
--------
[<< Which LV2 Plugins Does PiPedal Support?](WhichLv2PluginsAreSupported.md) | [Up](Documentation.md) | [Build Prerequisites >>](BuildPrerequisites.md)
+105 -74
View File
@@ -31,115 +31,117 @@ or
pipedalconfig -stop #Stops the Jack service as well.
But there's no harm in running a debug react server that's configured to connect to the web
socket of a production instance of pipedald on port 80, if you aren't planning to debug C++ code.
Although not strictly neccesary, you should probably add your login account to the pipedal_d group.
sudo usermod -a -G pipedal_d *youruserid*
This will allow you to run `pipedald` under the debugger of your choice using the
same /etc/pipedal and /var/pipedal directories as an instance of `pipedal` running
under systemd. Note that when running under systemd, `pipedald` runs under an unprivileged
`piedal_d` service account, and relies it's group (also 'pipedal_d`) in order to access its
data files, and to communicate with the `pipedaladmin` service, which does run with root
priveleges when `pipedald` needs to perform operations that do required root privileges.
For what it's worth, `pipedaldmin` is virtually undebuggable, becuase it does require root privileges to run.
If you really _must_ debug pipedaladmin, you can fire up a sudo isntance of Visual Studio Code
and attach to the running daemon process. But running program as large as VS Code with root privileges
is a dangerous process, that VS Code firmly (and righfully) complains about. And configuring
VSCode to run with root privileges as a painful process. Avoid if you can.
The pipedald service will run with or without the pipedaladmind service, but some operations (shutdown, reboot,
audio and Wi-Fi configuration changes) may fail if the pipedaladmind service is not running.
audio and Wi-Fi configuration changes) may fail if the pipedaladmind service is not running. Pipedal communicates
with pipedaladmin via Unix docket that can only be opened by members of the pipedal_d group. So if you have
added your own account to the `pipedal_d` group, debug instances of `pipedald` will in fact work properly.
In production, the pipedald web server serves the PiPedal web socket, as well as static HTML from the built
react components. But while debugging, it is much more convenient to use the React debug server for
React sources, and configure pipedald to serve only the websocket.
Note that a debug instance of `pipedald` cannot bind to port 80, since that requires either root privileges or
access to port 80 via `authd`. So you will have to configure the debug isntance of `pipedald`'s web server to
bind to port 8080 instead. The react server will serve the web applicaton on port 3000, so you will point your web
browser to `raspberrpi:3000`. And you will then need to configure the react application to make web socket
connection on port 8080 (where pipedald provides all dynamic content in the web app).
You may find it convenient to reconfigure the systemd intances of `pipedald` to bind to port 8080 as well.
That will allow the react server to point clients to either a debug instance or the systemd instance of `pipedald`
depending, depending on which instance of pipedald is currently running. Run the following command to
make the systemd instance of `pipedald` bind to port 8080 instead of port 80:
pipedalconfig --install --port 8080
(which will also restart the `pipedald` service).
To start the React debug server, from a shell, `cd` to the react directory, and run `./start`. The react debug
server will detect any changes to React sources, and rebuild them automatically (no build step required).
Actual debugging is performed using the Chrome debugger (which is remarkably well integrated with React).
To get this to work on Raspberry Pi, you will probably have to make a configuration change.
Edit the file `/etc/sysctl.conf`, and add or increase the value for the maximum number of watchable user
files:
fs.inotify.max_user_watches=524288
followed by `sudo sysctl -p`. Note that VS Code and the React framework both need this change.
Actual debugging is performed using the Chrome debugger (which is remarkably well integrated with React).
You won't actually see changes to the version of the systemd version of the static web app until you
do a full _Release_ or _RelWithDebInfo_ build of PiPedal, followed by running `./install.sh` which pushes
the built react app in the location where the systemd version of `pipedald` serves static web content.
By default, the debug React app will attempt to contact the pipedald server on ws:*:8080 -- the address on which
the debug version of pipedald listens on. This can be reconfigured
in the file `react/src/public/var/config.json` if desired. If you connect to the the pipedald server port, pipedald intercepts requests for this file and points the react app at itself, so the file has no effect when running in production.
the debug version of pipedald listens on. This can be reconfigured
in the file `react/src/public/var/config.json` if desired. If you connect to the the pipedald server port (port 80), pipedald intercepts requests for this file and points the react app at itself, so the file has no effect when running in production.
The React app will display the message "Error: Failed to connect to the server", until you start the pipedald websocket server in the VSCode debugger. It's quite reasonable to point the react debug app at a production instance of the pipedald server instead.
The React app will display the message "Error: Failed to connect to the server", until you start the pipedald websocket server in the VSCode debugger. However, it's quite reasonable to point the react debug app at a systemd instance of the pipedald server instead, if you don't intend to debug C++ code.
react/public/var/config.json:
{
...
"socket_server_port": 80,
"socket_server_port": 8080, # (PiPedald's port number)
"socket_server_address": "*",
...
}
Setting socket_server_address to "*" configures the web app to using the host address of the current
web page. If you set it to a specific address, the web app will attempt to establish a websocket connection
son that specific address instead. (Not sure what that's useful for, but it's there if you ever need it).
Setting socket_server_address to "*" configures Browers clients to make web socket connections on the same
IP address they used to load the web app in the first place. If you set it to a specific address, the web app
will attempt to establish a websocket connection son that specific address instead. (Not sure what that's useful
for, but it's there if you ever need it). When running under systemd, Pipedal usually redirects browser clients
to an IPv4 address if the initial connection was made via IPv6, since long-lasting IPv6 websocket connections
are problematic, and IPv6 link-local adresses (which you sometimes get from mDNS servers) are completely toxic.
The React debug server does not do that (since the app configuration that clients get from the
React server is static). If you're connecting using mDNS (via 'raspberrypi:3000', for example), you could
end up connectiong to the React web app on an IPv6 address. So it might be useful for that. The easier solution
is probably just to use an explicit IPv4 address when you connect to the React debug server.
The original development for this app was done with Visual Studio Code. Open the root project directory in
Visual Studio Code, and it will detect the CMake build files, and configure itself appropriately. Wait for
the CMake plugin in Visual Studio Code to configure itself, after loading.
The original development for this app was done with Visual Studio Code. And it's probably easiest to go with the flow when building
or debugging PiPedal. Open the root project directory in Visual Studio Code, and VSCode will automatically detect the CMake build
files, and configure itself appropriately. It usually takes VSCode about 20 or 30 seconds to completely configure itself for a CMake project
and to settle down a bit.
Once CMake has configured itself, build and debug commands are available on the CMake toolbar at the
bottom of the Visual Studio Code window. Set the build variant to debug. Set the debug target to "pipedald".
Click on the Build button to build the app. Click on the Debug button to launch a debugger.
Once VSCode has configured itself, build and debug commands are available on the CMake toolbar at the
bottom of the Visual Studio Code window. (Or in the CMake tab on the left-hand side of VSCOde if you have
chosen not to configure the CMake add-on to make CMake controls visible on the bottom toolbar).
Choose your compiler toolset. PipPedald sort of builds on a Clang toolset; although Clang may give warnings. But it's usually
not significantly worse than building on a newly released version fo GCC. It's probably best to do your first build with the build
variant set to RelWithDebugInfo. If you can get to the point that you can install Pipedal using ./install.sh, then that will
ensure that all the various configuration files that Pipedal requires are deployed in all the right places, whether the services
run properly or not. Check system logs using `journalctl -b0 | less` to see how well your newly built version of
Pipedal is doing, and stop systemd services as neccesary and appropriate.
Set the build variant to debug. Set the debug target to "pipedald". Click on the Build button to build the app. Click on the Debug button to launch a debugger.
To get the debugger to launch and run correctly, you will need to set command-line parameters for pipedald.
Command-line arguments can be set in the file `.vscode/launch.json`:
{
...
"cmake.debugConfig": {
"args": [
"<projectdirectory>/debugConfig",
"<projectdirectory>/build/react/src/build",
"-port",
"0.0.0.0:8080"
],
...
}
where `<projectdirectory>` is the root directory of the pipedal project.
The default debug configuration for pipedal is configured to use /var/pipedal for storing working data files,
which allows it to share configuration with a production instance of pipedal. Be warned that the permissioning
for this folder is intricate. If you plan to use the data from a production server, get the production server
installed first so the permissions are set correctly.
If you install a production instance later, remove the entire directory before doing so, to ensure that none
of the files in that directory are permissioned incorrectly.
You will need to add your userid to the pipedal_d group if you plan to share the /var/pipedal directory.
sudo usermod -a -G pipedal_d *youruserid*
You will need to reboot your machine to get the group membership change to take effect,or log out and log back
in if you can do that.
To run pipedald in a debugger, you need to use the following command-line to launch pipedal:
build/src/pipedald /etc/pipedal/config /etc/pipedal/react -port 0.0.0.0:8080
The first argument specifies where the pipedal daemon's configuration files are. The second argument specifies where
built static web pages for the web application are. And the port option specifies the port on which the daemon will
listen. If you are using a React debug server to serve up the web appliation you will point your browser at the
React debug server on port 3000; but the web application will still need to connect to web sockets on the 8080 port.
If you are using Visual Studio Code, you might find it useful to add the following section to your `.vscode/launch.json` file:
{
...
{
{
"name": "(gdb) pipedald",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
"args": [ "/etc/pipedal/config", "/etc/pipedal/react", "-port", "0.0.0.0:8080" ],
"args": [ "/etc/pipedal/config", "/etc/pipedal/react", "-port", "0.0.0.0:8080", "-log-level","debug" ],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{
// add the directory where our target was built to the PATHs
// it gets resolved by CMake Tools:
"name": "PATH",
"value": "$PATH:${command:cmake.launchTargetDirectory}"
},
{
"name": "LD_LIBRARY_PATH",
"value": "/usr/local/lib/aarch64-linux-gnu"
}
],
"externalConsole": false,
@@ -152,8 +154,37 @@ If you are using Visual Studio Code, you might find it useful to add the followi
}
]
},
...
}
You must then set `pipedald` as the debug target on the CMake toolbar, AND configure the VSCode debugger
to use the `(gdb) pipedald` debug configuration. Click on the VSCode Debug tag on the left-hand side of the VSCode
window, and select the debug configuration using the dropdown found at the top edge of the Debug tab.
The recommended way to debug `pipedald` is to point it at the `/etc/pipedal` and `/var/pipedal` directories
that the live systemd version of `pipedald` uses. It is theoretically possible to get a debug instance to use
a completely separate set of directories; but setting up the initial files and folders created by the PiPedal
is complicated; and I have done that personally in a very long time.
You will need to add your userid to the pipedal_d group if you plan to share the /var/pipedal directory.
sudo usermod -a -G pipedal_d *youruserid*
And you will need to reboot your machine to get the group membership change to take effect,or log out and log back
in if you can do that.
To debug the React app, use Chrome debugging tools. Load the PiPedal web app, and then press F12 in Chrome. You can
then set breakpoints in PiPedal's Typescript source (visible on the Source Tab of the Chrome Debugger). Chrome provides
very capable and functional debugging of Typescript right in the browser.
There is a chrome add-on for debugging React apps; you may need to install the add-on in Chrome to get all of
this to happen properly.
Having gone through a huge amount of work to get this point, let it be known that the Pipedal project is
very receptive to accepting push request to its Github repository. So, if you have fixes, or changes, or enhancements
to a PiPedal fork, feel free to push them back to the main repository. The best way to do this is to create a branch on
your personal fork of PiPedal, and make a pull request against the main PiPedal Github repository. Keeping your pushed changes
on a branch in your fork allows us to go back and forth a bit on proposed changes without making a mess of your fork.
-----
+3 -3
View File
@@ -13,17 +13,17 @@ page_icon: img/Install4.jpg
Download the most recent Debian (.deb) package for your platform:
- [Raspberry Pi OS bookworm (64-bit) v1.3.66](https://github.com/rerdavies/pipedal/releases/download/)
- [Raspberry Pi OS bookworm (64-bit) v1.3.67](https://github.com/rerdavies/pipedal/releases/download/)
- [Ubuntu/Raspberry Pi OS bullseyeye (64-bit) v1.2.31](https://github.com/rerdavies/pipedal/releases/download/v1.1.31/pipedal_1.1.31_arm64.deb)
Version 1.3.66 has not yet been tested on Ubuntu or Raspberry Pi OS bullseye. On these platforms, we recommend that you use version 1.1.31.
Version 1.3.67 has not yet been tested on Ubuntu or Raspberry Pi OS bullseye. On these platforms, we recommend that you use version 1.1.31.
Install the package by running
```
sudo apt update
cd ~/Downloads
sudo apt-get install pipedal_1.3.66_arm64.deb
sudo apt-get install pipedal_1.3.67_arm64.deb
```
Adjust accordingly if you have downloaded v1.1.31.
+2 -2
View File
@@ -4,7 +4,7 @@
Download the most recent Debian (.deb) package for your platform:
- <a href="https://github.com/rerdavies/pipedal/releases/download/v1.3.66/pipedal_1.3.66_arm64.deb">Raspberry Pi OS Bookworm (64-bit) v1.3.66</a>
- <a href="https://github.com/rerdavies/pipedal/releases/download/v1.3.67/pipedal_1.3.67_arm64.deb">Raspberry Pi OS Bookworm (64-bit) v1.3.67</a>
Install the package by running
@@ -12,7 +12,7 @@ Install the package by running
```
sudo apt update
cd ~/Downloads
sudo apt-get install ./pipedal_1.3.66_arm64.deb
sudo apt-get install ./pipedal_1.3.67_arm64.deb
```
Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
+2 -2
View File
@@ -1,7 +1,7 @@
<img src="GithubBanner.png" width="100%"/>
<a href="Installing.html"><i>v1.3.66</i></a>
<a href="Installing.html"><i>v1.3.67</i></a>
&nbsp;
@@ -10,7 +10,7 @@ To view PiPedal documentation, click [here](Documentation.md).
#### Important notice: PiPedal has a submitted a request to support sharing of Pipedal presets at [PatchStorage.com](https:///patchstorage.com). We urgently need your support! Please vote for PiPedal [here](https://patchstorage.com/requests/pipedal/).
#### NEW version 1.3.66 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
#### NEW version 1.3.67 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
&nbsp;
+9
View File
@@ -3,3 +3,12 @@ This folder contains pre-built binaries for an initial bundle of Lv2 plugins.
This arrangment is temporary, and is expected to go away, once a reliable distribution
of this project and the ToobAmp project via apt can be arranged.
To update the arm64 binaries for ToobAmp, build the ToobAmp project, run `./install.sh` in the ToobAmp project directory,
and then run `./provisionLv2` in the pipedal root directory. This copies the ToobAmp binaries into the pipedal source tree.
The x86_64 binaries are, instead built from an artifact provided by the github CMake build action. Currently, these
binaries are built on an Ubuntu 24.04 LTS build runner. PiPedals's build runner should run on the same build runner
configuration. The CMake build process will unpack the artifact, and extract ToobAmp LV2 binaries into the build directory
where the debian package can pick them up.
-224
View File
@@ -1,224 +0,0 @@
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix midi: <http://lv2plug.in/ns/ext/midi#> .
@prefix epp: <http://lv2plug.in/ns/ext/port-props#> .
@prefix uiext: <http://lv2plug.in/ns/extensions/ui#> .
@prefix idpy: <http://harrisonconsoles.com/lv2/inlinedisplay#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix mod: <http://moddevices.com/ns/mod#> .
@prefix param: <http://lv2plug.in/ns/ext/parameters#> .
@prefix work: <http://lv2plug.in/ns/ext/worker#> .
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix patch: <http://lv2plug.in/ns/ext/patch#> .
@prefix plug: <http://two-play.com/plugins/toob-cab-sim#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix state: <http://lv2plug.in/ns/ext/state#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://two-play.com/plugins/toob#frequencyResponseVector>
a lv2:Parameter ;
rdfs:label "frequencyResponseVector" ;
rdfs:range atom:Vector .
<http://two-play.com/plugins/toob-cab-sim#uiState>
a lv2:Parameter ;
rdfs:label "uiState" ;
rdfs:range atom:Vector .
<http://two-play.com/rerdavies#me>
a foaf:Person ;
foaf:name "Robin Davies" ;
foaf:mbox <mailto:rerdavies@gmail.com> ;
foaf:homepage <http://two-play.com/> .
<http://two-play.com/plugins/toob-cab-sim>
a lv2:Plugin ,
lv2:SimulatorPlugin ;
doap:name "TooB Cab Simulator" ,
"TooB Cab Simulator"@en-gb-gb
;
doap:license <https://two-play.com/TooB/licenses/isc> ;
doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ;
lv2:microVersion 13 ;
rdfs:comment "TooB amplifier cabinet simulator." ;
mod:brand "TooB";
mod:label "Cab Simulator";
lv2:requiredFeature urid:map ;
lv2:optionalFeature lv2:hardRTCapable;
lv2:extensionData state:interface;
patch:readable
<http://two-play.com/plugins/toob#frequencyResponseVector>,
<http://two-play.com/plugins/toob-cab-sim#uiState>;
rdfs:comment """
The TooB Cabinet simulator provides EQ tools for emulating cabinet response. See the presets for
emulations of well-known cabinets.
The TooB Cabinet Simulator is part of the TooB Amp Emulation Toolkit. Typically, you would
use the following plugins in the following order:
- TooB Input Stage
- TooB Tone Stack
- Toob Power Stage
- Toob Cabinet Simulator
""";
lv2:port
[
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 0 ;
lv2:symbol "locut" ;
lv2:name "Lo Cut";
lv2:default 120.0 ;
lv2:minimum 30.0 ;
lv2:maximum 300.0 ;
units:unit units:hz ;
lv2:scalePoint [
rdfs:label "30Hz" ;
rdf:value 30.0
], [
rdfs:label "300Hz" ;
rdf:value 300
];
rdfs:comment "Low cutoff frequency. 30hz to 300hz. Set to minimum to disable." ;
], [
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 1 ;
lv2:symbol "bright" ;
lv2:name "Bright";
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 20.0 ;
units:unit units:db;
lv2:scalePoint [
rdfs:label "0dB" ;
rdf:value 0.0
] , [
rdfs:label "10dB" ;
rdf:value 10
] , [
rdfs:label "20dB" ;
rdf:value 20
];
rdfs:comment "Bright boost (0db to 20db)." ;
], [
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 2 ;
lv2:symbol "brightf" ;
lv2:name "BrightF";
lv2:default 1300.0 ;
lv2:minimum 1000.0 ;
lv2:maximum 5000.0;
units:unit units:hz;
lv2:designation param:cutoffFrequency ;
rdfs:comment "Bright boost frequency. (1khz to 8khz)" ;
], [
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 3 ;
lv2:symbol "hicut" ;
lv2:name "Hi Cut";
lv2:default 6000.0 ;
lv2:minimum 2000.0 ;
lv2:maximum 13000.0;
units:unit units:hz;
lv2:portProperty epp:logarithmic;
lv2:designation param:cutoffFrequency ;
rdfs:comment "Hi cutoff frequency. 2khz to 13khz. Set to maximum to disable." ;
], [
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 4 ;
lv2:symbol "comb" ;
lv2:name "Comb";
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0;
rdfs:comment "Amount of comb filtering. 0 to 1. Set to minimum to disable." ;
], [
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 5 ;
lv2:symbol "combf" ;
lv2:name "Comb F";
lv2:default 2000.0 ;
lv2:minimum 1000.0 ;
lv2:maximum 8000.0;
units:unit units:hz;
lv2:designation param:cutoffFrequency ;
rdfs:comment "Comb filter frequency. (1khz to 8khz)" ;
], [
a lv2:InputPort ,
lv2:ControlPort ;
lv2:index 6 ;
lv2:symbol "trim" ;
lv2:name "Trim";
lv2:default 0.0 ;
lv2:minimum -30.0 ;
lv2:maximum 30.0;
units:unit units:db;
rdfs:comment "Master volume trim. (-30db to + 30db)" ;
],
[
a lv2:AudioPort ,
lv2:InputPort ;
lv2:index 7 ;
lv2:symbol "in" ;
lv2:name "In"
] ,
[
a lv2:AudioPort ,
lv2:OutputPort ;
lv2:index 8 ;
lv2:symbol "out" ;
lv2:name "Out"
], [
a atom:AtomPort ,
lv2:InputPort;
atom:bufferType atom:Sequence ;
atom:supports patch:Message;
lv2:designation lv2:control ;
lv2:index 9 ;
lv2:symbol "control" ;
lv2:name "Control" ;
rdfs:comment "Plugin to GUI communication" ;
] , [
a atom:AtomPort ,
lv2:OutputPort ;
atom:bufferType atom:Sequence ;
atom:supports patch:Message;
lv2:designation lv2:control ;
lv2:index 10 ;
lv2:symbol "notify" ;
lv2:name "Notify" ;
rdfs:comment "Plugin to GUI communication" ;
]
.
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/bash
rm -rf build/lv2_x64
mkdir build/lv2_x64
mkdir build/lv2_x64/pkg
dpkg-deb -x lv2/x86_64/toobamp_*_amd64.deb build/lv2_x64/pkg
+2
View File
@@ -21,6 +21,7 @@
export default class GovernorSettings {
deserialize(input: any) : GovernorSettings{
this.hasGovernor = input.hasGovernor;
this.governors = input.governors;
this.governor = input.governor;
return this;
@@ -29,6 +30,7 @@ export default class GovernorSettings {
{
return new GovernorSettings().deserialize(this);
}
hasGovernor: boolean = true;
governors: string[] = ["ondemand","performance"];
governor: string = "performance";
+28 -28
View File
@@ -19,10 +19,10 @@
import React from 'react';
import Typography from '@mui/material/Typography';
import {isDarkMode} from './DarkMode';
import { isDarkMode } from './DarkMode';
const RED_COLOR = isDarkMode()? "#F88":"#C00";
const GREEN_COLOR = isDarkMode()? "rgba(255,255,255,0.7)": "#666";
const RED_COLOR = isDarkMode() ? "#F88" : "#C00";
const GREEN_COLOR = isDarkMode() ? "rgba(255,255,255,0.7)" : "#666";
@@ -33,23 +33,18 @@ function cpuDisplay(cpu: number): string {
return cpu.toFixed(1) + "%";
}
function fmtCpuFreq(freq: number): string
{
if (freq >= 100000000)
{
return (freq/1000000).toFixed(1) + " GHz";
function fmtCpuFreq(freq: number): string {
if (freq >= 100000000) {
return (freq / 1000000).toFixed(1) + " GHz";
}
if (freq >= 10000000)
{
return (freq/1000000).toFixed(2) + " GHz";
if (freq >= 10000000) {
return (freq / 1000000).toFixed(2) + " GHz";
}
if (freq >= 1000000)
{
return (freq/1000000).toFixed(3) + " GHz";
if (freq >= 1000000) {
return (freq / 1000000).toFixed(3) + " GHz";
}
if (freq >= 1000)
{
return (freq/1000).toFixed(3) + " MHz";
if (freq >= 1000) {
return (freq / 1000).toFixed(3) + " MHz";
}
return freq + " KHz";
}
@@ -65,6 +60,7 @@ export default class JackHostStatus {
this.temperaturemC = input.temperaturemC;
this.cpuFreqMax = input.cpuFreqMax;
this.cpuFreqMin = input.cpuFreqMin;
this.hasCpuGovernor = input.hasCpuGovernor;
this.governor = input.governor;
return this;
}
@@ -80,6 +76,7 @@ export default class JackHostStatus {
temperaturemC: number = -1000000;
cpuFreqMax: number = 0;
cpuFreqMin: number = 0;
hasCpuGovernor: boolean = false;
governor: string = "";
static getCpuInfo(label: string, status?: JackHostStatus): React.ReactNode {
@@ -91,18 +88,21 @@ export default class JackHostStatus {
}
return (<div style={{ whiteSpace: "nowrap" }}>
<Typography variant="caption" color="inherit">{label}</Typography>
<Typography variant="caption" color="inherit">
{
(status.cpuFreqMax === status.cpuFreqMin)?
(
<span> {status.governor} {fmtCpuFreq(status.cpuFreqMax)} </span>
)
:(
<span> {status.governor} {fmtCpuFreq(status.cpuFreqMax)}-{fmtCpuFreq(status.cpuFreqMax)} </span>
{(status.cpuFreqMin != 0 || status.cpuFreqMax != 0) &&
(
<Typography variant="caption" color="inherit">
{
(status.cpuFreqMax === status.cpuFreqMin) ?
(
<span> {status.governor} {fmtCpuFreq(status.cpuFreqMax)} </span>
)
: (
<span> {status.governor} {fmtCpuFreq(status.cpuFreqMax)}-{fmtCpuFreq(status.cpuFreqMax)} </span>
)
}
</Typography>
)
}
</Typography>
)}
</div>);
+13
View File
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <ifaddrs.h>
#include "Ipv6Helpers.hpp"
#include "CpuGovernor.hpp"
using namespace pipedal;
@@ -143,6 +144,10 @@ void AdminClient::SetGovernorSettings(const std::string &settings)
{
throw PiPedalException("Can't use AdminClient when running interactively.");
}
if (!HasCpuGovernor())
{
return;
}
std::stringstream cmd;
cmd << "GovernorSettings ";
json_writer writer(cmd, true);
@@ -161,6 +166,10 @@ void AdminClient::MonitorGovernor(const std::string &governor)
{
return;
}
if (!HasCpuGovernor())
{
return;
}
std::stringstream cmd;
cmd << "MonitorGovernor ";
json_writer writer(cmd, true);
@@ -178,6 +187,10 @@ void AdminClient::UnmonitorGovernor()
{
return;
}
if (!HasCpuGovernor())
{
return;
}
std::stringstream cmd;
cmd << "UnmonitorGovernor";
cmd << '\n';
+4 -4
View File
@@ -76,7 +76,7 @@ static int exec(const std::string &command)
if ((pid = fork()) == 0)
{
execv(argv[0], (char *const *)argv.data());
write(1,"!\n",2);
auto _ = write(1,"!\n",2);
exit(EXIT_FAILURE);
}
else
@@ -84,7 +84,7 @@ static int exec(const std::string &command)
if (pid == -1)
{
write(1,"*",1);
auto _ = write(1,"*",1);
perror("execv");
return EXIT_FAILURE;
}
@@ -99,8 +99,8 @@ static int exec(const std::string &command)
void updateLog(const std::string &message)
{
write(1,message.c_str(),message.length());
write(1,"\n",1);
auto _ = write(1,message.c_str(),message.length());
_ = write(1,"\n",1);
}
+16 -1
View File
@@ -63,6 +63,10 @@ public:
void Start(std::string governor)
{
std::unique_lock<std::mutex> lock(mutex);
if (!HasCpuGovernor())
{
return;
}
if (!pThread)
{
this->governor = governor;
@@ -81,6 +85,10 @@ public:
}
void Stop()
{
if (!HasCpuGovernor())
{
return;
}
std::unique_lock<std::mutex> lock(mutex);
if (pThread)
{
@@ -109,6 +117,10 @@ private:
std::string savedGovernor;
void ServiceProc()
{
if (!HasCpuGovernor())
{
return;
}
savedGovernor = pipedal::GetCpuGovernor();
pipedal::SetCpuGovernor(this->governor);
while (true)
@@ -303,7 +315,10 @@ private:
{
throw PiPedalArgumentException("Invalid arguments.");
}
governorMonitorThread.SetGovernor(governor);
if (HasCpuGovernor())
{
governorMonitorThread.SetGovernor(governor);
}
result = 0;
}
else if (command == "WifiConfigSettings")
+10 -3
View File
@@ -101,8 +101,8 @@ static void GetCpuFrequency(uint64_t *freqMin, uint64_t *freqMax)
catch (const std::exception &)
{
}
if (fMin == 0)
fMax = 0;
if (fMax == 0)
fMin = 0;
*freqMin = fMin;
*freqMax = fMax;
}
@@ -2091,7 +2091,13 @@ public:
result.cpuUsage_ = audioDriver->CpuUse();
}
GetCpuFrequency(&result.cpuFreqMax_, &result.cpuFreqMin_);
result.governor_ = GetGovernor();
result.hasCpuGovernor_ = HasCpuGovernor();
if (result.hasCpuGovernor_)
{
result.governor_ = GetGovernor();
} else {
result.governor_ = "";
}
return result;
}
@@ -2278,5 +2284,6 @@ JSON_MAP_REFERENCE(JackHostStatus, msSinceLastUnderrun)
JSON_MAP_REFERENCE(JackHostStatus, temperaturemC)
JSON_MAP_REFERENCE(JackHostStatus, cpuFreqMin)
JSON_MAP_REFERENCE(JackHostStatus, cpuFreqMax)
JSON_MAP_REFERENCE(JackHostStatus, hasCpuGovernor)
JSON_MAP_REFERENCE(JackHostStatus, governor)
JSON_MAP_END()
+1
View File
@@ -184,6 +184,7 @@ namespace pipedal
int32_t temperaturemC_ = -100000;
uint64_t cpuFreqMax_ = 0;
uint64_t cpuFreqMin_ = 0;
bool hasCpuGovernor_ = true;
std::string governor_;
DECLARE_JSON_MAP(JackHostStatus);
+4 -2
View File
@@ -737,14 +737,16 @@ set (DEBIAN_COPYRIGHT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../debian/copyright)
# generate Copyright section of settings page.
# warning: there may be multiple versions. Pick the latest.
if(EXISTS "/usr/share/doc/libboost1.74-dev")
if(EXISTS "/usr/share/doc/libboost1.83-dev")
set (BOOST_COPYRIGHT_DIR "libboost1.83-dev")
elseif(EXISTS "/usr/share/doc/libboost1.74-dev")
set (BOOST_COPYRIGHT_DIR "libboost1.74-dev")
elseif(EXISTS "/usr/share/doc/libboost1.71-dev")
set (BOOST_COPYRIGHT_DIR "libboost1.71-dev")
elseif(EXISTS "/usr/share/doc/libboost1.67-dev")
set (BOOST_COPYRIGHT_DIR "libboost1.67-dev")
else()
message(ERROR "Boost libary version has changed. Please update me.")
message(FATAL_ERROR "Boost libary version has changed. Please update me.")
endif()
+24 -16
View File
@@ -26,26 +26,34 @@
using namespace pipedal;
#ifdef __WIN32__
// not a feature on Win32.
void pipedal::SetCpuGovernor(const std::string &governor) { }
std::vector<std::string> pipedal::GetAvailableGovernors() { return std::vector<std::string>(); }
#else
static const int SYSFS_RETRIES = 3;
bool pipedal::HasCpuGovernor()
{
#ifdef __WIN32__
return false;
#else
std::filesystem::path sysFsPath = SS("/sys/devices/system/cpu/cpu" << 0 << "/cpufreq/scaling_governor");
return std::filesystem::exists(sysFsPath);
#endif
}
std::string pipedal::GetCpuGovernor()
{
std::string result;
try {
std::ifstream f("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor");
if (!f.is_open())
{
return "";
}
f >> result;
} catch (const std::exception &)
{
return result;
}
return result;
@@ -115,6 +123,10 @@ void pipedal::SetCpuGovernor(const std::string &governor) {
break;
std::filesystem::path sysFsPath = SS("/sys/devices/system/cpu/cpu" << nCpu << "/cpufreq/scaling_governor");
if (!std::filesystem::exists(sysFsPath))
{
return;
}
if (!writeAndVerify(sysFsPath,governor))
{
@@ -125,17 +137,13 @@ void pipedal::SetCpuGovernor(const std::string &governor) {
}
}
std::vector<std::string> pipedal::GetAvailableGovernors() {
if (!HasCpuGovernor())
{
return std::vector<std::string>();
}
return std::vector<std::string> {
"performance",
"ondemand",
"powersave"
};
}
#endif
void SetCpuGovernor(const std::string &governor);
std::vector<std::string> GetAvailableGovernors();
+1
View File
@@ -23,6 +23,7 @@
#include <vector>
namespace pipedal {
bool HasCpuGovernor();
std::string GetCpuGovernor();
void SetCpuGovernor(const std::string &governor);
+4 -3
View File
@@ -50,6 +50,7 @@ namespace fs = std::filesystem;
#include "GithubResponseHeaders.hpp"
class pipedal::UpdaterImpl : public Updater
{
public:
@@ -236,7 +237,7 @@ void UpdaterImpl::Stop()
if (event_writer != -1)
{
uint64_t value = CLOSE_EVENT;
write(this->event_writer, &value, sizeof(uint64_t));
auto _ = write(this->event_writer, &value, sizeof(uint64_t));
}
if (thread)
{
@@ -256,7 +257,7 @@ void UpdaterImpl::Stop()
void UpdaterImpl::CheckNow()
{
uint64_t value = CHECK_NOW_EVENT;
write(this->event_writer, &value, sizeof(uint64_t));
auto _ = write(this->event_writer, &value, sizeof(uint64_t));
}
void UpdaterImpl::SetUpdateListener(UpdateListener &&listener)
@@ -912,7 +913,7 @@ void UpdaterImpl::SetUpdatePolicy(UpdatePolicyT updatePolicy)
void UpdaterImpl::ForceUpdateCheck()
{
uint64_t value = UNCACHED_CHECK_NOW_EVENT;
write(this->event_writer, &value, sizeof(uint64_t));
auto _ = write(this->event_writer, &value, sizeof(uint64_t));
}
UpdateStatus::UpdateStatus()
+1 -1
View File
@@ -97,7 +97,7 @@ void segvHandler(int sig) {
// Print out all the frames to stderr
const char *message = "Error: SEGV signal received.\n";
write(STDERR_FILENO,message,strlen(message));
auto _ = write(STDERR_FILENO,message,strlen(message));
backtrace_symbols_fd(array+2, size-2, STDERR_FILENO);
_exit(EXIT_FAILURE);
+6 -2
View File
@@ -14,6 +14,7 @@
#include "TemporaryFile.hpp"
#include "json_variant.hpp"
#include "GithubResponseHeaders.hpp"
#include "Finally.hpp"
using namespace std;
using namespace pipedal;
@@ -37,12 +38,15 @@ std::string psystem(const std::string &command)
std::string cmdRedirected = command + " 2>&1";
std::array<char, 128> buffer;
std::string result;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmdRedirected.c_str(), "r"), pclose);
FILE *pipe = popen(cmdRedirected.c_str(), "r");
if (!pipe)
{
throw std::runtime_error("popen() failed!");
}
while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr)
Finally ([pipe]() {
pclose(pipe);
});
while (fgets(buffer.data(), buffer.size(), pipe) != nullptr)
{
result += buffer.data();
}