### Install KISS FFT with Make (Custom Prefix) Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissfft-131.1.0/README.md Example command to build and install KISS FFT using Make, specifying a custom installation prefix directory. Combines datatype, static, and OpenMP options with the install target. ```bash make PREFIX=/tmp/1234 KISSFFT_DATATYPE=int16_t KISSFFT_STATIC=1 KISSFFT_OPENMP=1 install ``` -------------------------------- ### Setup Tomlrb Development Environment Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/tomlrb-2.0.0/README.md Run bin/setup to install dependencies for development. Use bin/console for interactive experimentation. ```bash bin/setup ``` -------------------------------- ### Install KISS FFT with CMake (Custom Prefix) Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissfft-131.1.0/README.md Example commands to configure and build KISS FFT with CMake, specifying a custom installation prefix. Includes setting the installation directory and then performing the build and install steps. ```bash mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=/tmp/1234 -DKISSFFT_DATATYPE=int16_t -DKISSFFT_STATIC=ON -DKISSFFT_OPENMP=ON .. make all make install ``` -------------------------------- ### Windows Deployment Setup Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/CMakeLists.txt Configures system runtime library installation and copies necessary DLLs for Windows builds. ```cmake if(WIN32) # Visual Studio set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP true) include(InstallRequiredSystemLibraries) file(COPY ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Release) # Copy kissfft.dll from the API build directory to the GUI executable directory add_custom_command(TARGET ${APP_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${API_VENDORED_KISSFFT_DLL} $) # Locate windeployqt: prefer the Qt we configured against (QT_INSTALL_PREFIX), # else fall back to PATH — same resolution as macdeployqt above. if(QT_INSTALL_PREFIX AND EXISTS "${QT_INSTALL_PREFIX}/bin/windeployqt.exe") set(WINDEPLOYQT_BIN "${QT_INSTALL_PREFIX}/bin/windeployqt") else() set(WINDEPLOYQT_BIN "windeployqt") endif() message(STATUS "windeployqt: ${WINDEPLOYQT_BIN}") add_custom_command(TARGET ${APP_NAME} POST_BUILD COMMAND ${WINDEPLOYQT_BIN} $) endif() # Win32 ``` -------------------------------- ### Build aubio from Source (Step-by-Step) Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/installing.md Build aubio step-by-step using waf: get waf, configure, build, and install. ```bash # 2. step by step ./scripts/get_waf.sh ./waf configure ./waf build sudo ./waf install ``` -------------------------------- ### Starting Code Example Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/kramdown-2.1.0/test/testcases/block/06_codeblock/normal.html Initial code block used for starting sequences. ```ruby starting code ``` -------------------------------- ### Build libgit2 with Examples Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/vendor/libgit2/README.md To include example code in the build, use the `BUILD_EXAMPLES=ON` CMake option. The executable for examples will be in `build/examples`. ```bash cmake -DBUILD_EXAMPLES=ON .. cmake --build . ``` -------------------------------- ### Build Example Application Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/html/index.html Commands to compile the provided QScintilla example application. ```bash cd example qmake make ``` -------------------------------- ### Install Qt 6 ARM64 Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-WINDOWS-ARM64.md Installs the necessary Qt 6 ARM64 components using aqtinstall. Ensure you have Python and pip installed. ```bash pip install aqtinstall aqt install-qt windows desktop 6.10.2 win64_msvc2022_arm64 -m qtsvg qttools qttranslations -O C:\Qt ``` -------------------------------- ### Install libgit2 with CMake Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/vendor/libgit2/README.md Standard commands to configure the installation prefix and build the library. ```bash $ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix $ cmake --build . --target install ``` -------------------------------- ### Vector Sizing and Resizing with Sections Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api-tests/vendor/Catch2-3.8.0/docs/tutorial.md Demonstrates how sections in Catch2 execute the entire test case from the start for each section. Setup code is run multiple times. ```cpp TEST_CASE( "vectors can be sized and resized", "[vector]" ) { // This setup will be done 4 times in total, once for each section std::vector v( 5 ); REQUIRE( v.size() == 5 ); REQUIRE( v.capacity() >= 5 ); SECTION( "resizing bigger changes size and capacity" ) { v.resize( 10 ); REQUIRE( v.size() == 10 ); REQUIRE( v.capacity() >= 10 ); } SECTION( "resizing smaller changes size but not capacity" ) { v.resize( 0 ); REQUIRE( v.size() == 0 ); REQUIRE( v.capacity() >= 5 ); } SECTION( "reserving bigger changes capacity but not size" ) { v.reserve( 10 ); REQUIRE( v.size() == 5 ); REQUIRE( v.capacity() >= 10 ); } SECTION( "reserving smaller does not change size or capacity" ) { v.reserve( 0 ); REQUIRE( v.size() == 5 ); REQUIRE( v.capacity() >= 5 ); } } ``` -------------------------------- ### Install Python Bindings Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/html/index.html Command to build and install the Python bindings for QScintilla. ```bash cd Python sip-install ``` -------------------------------- ### Install WiX Extensions Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/install/windows/wix/BUILD_MSI.md Installs the necessary WiX extensions for building the MSI. Run this command once. ```bash wix extension add WixToolset.Util.wixext/6.0.2 wix extension add WixToolset.UI.wixext/6.0.2 ``` -------------------------------- ### Configure Build and Install Targets Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissnet-master-34b751b/CMakeLists.txt Handles optional test subdirectories and defines installation rules for the library. ```cmake if(kissnet_BUILD_TESTING) add_subdirectory(examples) add_subdirectory(tests) endif() if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) include(GNUInstallDirs) install(TARGETS kissnet EXPORT kissnetTargets DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(EXPORT kissnetTargets NAMESPACE kissnet:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/kissnet) install(FILES kissnet.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() include(FeatureSummary) add_feature_info(Tests kissnet_BUILD_TESTING "kissnet examples and tests") feature_summary(WHAT ALL) ``` -------------------------------- ### Install KissFFT Targets and Headers Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissfft-131.1.0/CMakeLists.txt Defines installation paths for libraries, binaries, and header files. ```cmake install(TARGETS kissfft EXPORT kissfft ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") install(FILES kiss_fft.h kissfft.hh kiss_fftnd.h kiss_fftndr.h kiss_fftr.h DESTINATION "${PKGINCLUDEDIR}") ``` -------------------------------- ### Configure and Install pkg-config Files Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api-tests/vendor/Catch2-3.8.0/CMakeLists.txt Generates and installs pkg-config files for Catch2 integration. ```cmake ## Provide some pkg-config integration set(PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig" CACHE PATH "Path where catch2.pc is installed" ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CMake/catch2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/catch2.pc @ONLY ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CMake/catch2-with-main.pc.in ${CMAKE_CURRENT_BINARY_DIR}/catch2-with-main.pc @ONLY ) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/catch2.pc" "${CMAKE_CURRENT_BINARY_DIR}/catch2-with-main.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR} ) ``` -------------------------------- ### Install Catch2 Documentation Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api-tests/vendor/Catch2-3.8.0/CMakeLists.txt Installs documentation files while excluding the doxygen directory. ```cmake # Install documentation if(CATCH_INSTALL_DOCS) install( DIRECTORY docs/ DESTINATION "${CMAKE_INSTALL_DOCDIR}" PATTERN "doxygen" EXCLUDE ) endif() ``` -------------------------------- ### Start Tau in Production Mode Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/beam/tau/README.md Builds a release and starts the server in a production-ready environment. ```batchfile rem Windows Command Prompt set MIX_ENV=prod mix tau.release _build\prod\rel\tau\bin\tau start > NUL 2>&1 ``` ```shell # macOS/Linux Terminal Prompt MIX_ENV=dev mix tau.release _build/prod/rel/tau/bin/tau start > /dev/null 2>&1 ``` -------------------------------- ### Install aubio Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/installing.md Install the compiled aubio C library and tools using sudo. ```bash $ sudo ./waf install ``` -------------------------------- ### Install Rugged Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/test/fixtures/text_file.md Install the gem via command line. ```bash $ gem install rugged ``` -------------------------------- ### Build and Install Reproc from Source Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/reproc-14.2.5/README.md Build and install reproc from source using CMake. This method requires CMake 3.13 or higher and involves creating a build directory, building, and then installing. ```sh cmake -B build cmake --build build cmake --install build ``` -------------------------------- ### Start Tau in Development Mode Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/beam/tau/README.md Configures the environment and starts the server for local development. ```batchfile rem Windows set MIX_ENV=dev mix setup.dev mix run --no-halt ``` ```shell # macOS/Linux MIX_ENV=dev mix setup.dev mix run --no-halt ``` -------------------------------- ### Install Make for Elixir Build Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-WINDOWS-ARM64.md Installs the Make utility, which is required for building Elixir from source. ```powershell winget install ezwinports.make ``` -------------------------------- ### Install Dependencies with Homebrew Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-MAC.md Installs essential dependencies like Qt6, CMake, Elixir, and pkg-config using Homebrew. ```bash brew install qt cmake elixir pkg-config ``` -------------------------------- ### Install Python aubio from Source Directory Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/installing.md Install the Python aubio module after cloning and navigating into the source directory. ```bash # from source directory cd aubio pip install -v . ``` -------------------------------- ### Get Substyles Start and Length Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/Scintilla/ScintillaDoc.html Returns the starting index and the total number of substyles allocated for a given base style. ```c SCI_GETSUBSTYLESSTART(int styleBase) → int ``` ```c SCI_GETSUBSTYLESLENGTH(int styleBase) → int ``` -------------------------------- ### Build MSI Examples Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/install/windows/wix/BUILD_MSI.md Demonstrates various ways to invoke the build-msi.bat script with different arguments for architecture and variant. ```batch build-msi.bat REM auto arch, variant from VERSION build-msi.bat arm64 REM ARM64, variant from VERSION build-msi.bat x64 release REM force release identity build-msi.bat arm64 beta REM force beta identity ``` -------------------------------- ### Access Build Help Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/requirements.rst Display the complete list of available configuration options. ```bash $ ./waf --help ``` -------------------------------- ### GET indentationGuides Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/html/classQsciScintilla.html Returns whether the display of indentation guides is enabled. ```APIDOC ## GET indentationGuides ### Description Returns true if the display of indentation guides is enabled. ### Method GET ### Response #### Success Response (200) - **enabled** (bool) - True if indentation guides are enabled. ``` -------------------------------- ### GET blockStart Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/html/classQsciLexer.html Retrieves the list of characters or words that define the start of a block. ```APIDOC ## GET blockStart ### Description Returns a space separated list of words or characters in a particular style that define the start of a block for auto-indentation. ### Method GET ### Endpoint /QsciLexer/blockStart ### Parameters #### Query Parameters - **style** (int) - Optional - The style identifier to filter by. ### Response #### Success Response (200) - **blockStartList** (string) - A space separated list of words or characters. ``` -------------------------------- ### getSelection() - Get Selection Range Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/html/classQsciScintilla.html Retrieves the start and end positions of the current text selection. ```APIDOC ## getSelection() ### Description If there is a selection, _*lineFrom_ is set to the line number in which the selection begins and _*lineTo_ is set to the line number in which the selection ends. (They could be the same.) _*indexFrom_ is set to the index at which the selection begins within _*lineFrom_, and _*indexTo_ is set to the index at which the selection ends within _*lineTo_. If there is no selection, _*lineFrom_, _*indexFrom_, _*lineTo_ and _*indexTo_ are all set to -1. ### Method void getSelection(int * _lineFrom_, int * _indexFrom_, int * _lineTo_, int * _indexTo_) const ### Parameters #### Path Parameters - **_lineFrom_** (int *) - Pointer to store the starting line number of the selection. - **_indexFrom_** (int *) - Pointer to store the starting index of the selection within the starting line. - **_lineTo_** (int *) - Pointer to store the ending line number of the selection. - **_indexTo_** (int *) - Pointer to store the ending index of the selection within the ending line. ``` -------------------------------- ### Instantiate and Discover Repositories Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/test/fixtures/text_file.md Open existing repositories, initialize new ones, or discover the .git directory path. ```ruby repo = Rugged::Repository.new('path/to/my/repository') # => # ``` ```ruby Rugged::Repository.init_at('.', :bare) ``` ```ruby Rugged::Repository.discover("/Users/me/projects/repo/lib/subdir/") # => "/Users/me/projects/repo/.git/" ``` -------------------------------- ### Match Partial Path Segments Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/10.3-Pattern-Matching.md Use '*' with partial segment names to match segments that start or end with specific characters. For example, '"/foo/b*/baz"' matches segments starting with 'b'. ```ruby sync "/foo/b*/baz" ``` ```ruby sync "/foo/*zz/baz" ``` -------------------------------- ### Initialize Beat Counter Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/A.11-beat-tracking.md Call `tick` to get the current beat value, which starts at 0 for each run. ```ruby puts tick #=> 0 ``` -------------------------------- ### Basic benchmark test example Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/vendor/libgit2/tests/benchmarks/README.md This example benchmarks the `git help` command. Ensure the `benchmark_helpers.sh` script is included first. ```bash #!/bin/bash -e # include the benchmark library . "$(dirname "$0")/benchmark_helpers.sh" # run the "help" command; this will benchmark `git2_cli help` gitbench help ``` -------------------------------- ### Configure Alternative Backends Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/README.md Initialize or open a repository using a custom storage backend instead of the local disk. ```ruby a_backend = MyProject::CustomObjectDB(opt1: 'setting', opt2: 'setting') repo = Rugged::Repository.init_at('repo_name', :bare, backend: a_backend) # or repo = Rugged::Repository.bare('repo_name', backend: a_backend) ``` -------------------------------- ### Syncing Threads with Delayed Start Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/05.7-Thread-Synchronisation.md This example shows how `cue` and `sync` maintain thread synchronisation even when one thread has a delayed start. The `sleep(0.3)` call would normally cause a timing offset, but `cue` and `sync` automatically correct for it. ```ruby in_thread do loop do cue :tick sleep 1 end end sleep(0.3) in_thread do loop do sync :tick sample :drum_heavy_kick end end ``` -------------------------------- ### Clone Sonic Pi Repository Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-RASPBERRY-PI.md Fetches the Sonic Pi source code and its submodules. Use this to get the latest development version. Ensure you have git installed. ```shell git clone --recurse-submodules https://github.com/sonic-pi-net/sonic-pi.git ~/Development/sonic-pi ``` -------------------------------- ### Build PlatformFolders on Windows Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/PlatformFolders-4.2.0/README.md Commands to configure and install the library on Windows, requiring administrative privileges. ```bash mkdir build && cd build cmake -DBUILD_TESTING=OFF .. runas /user:Administrator "cmake --build . --config Release --target install" ``` -------------------------------- ### Play a Sample Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/03.5-Partial-Samples.md Basic command to trigger a sample. No special setup is required. ```ruby sample :loop_amen ``` -------------------------------- ### Play a Specific Segment of a Sample Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/03.5-Partial-Samples.md Combine `start:` and `finish:` parameters to play a precise segment of an audio file. This example plays a section from 40% to 60% of the sample. ```ruby sample :loop_amen, start: 0.4, finish: 0.6 ``` -------------------------------- ### Source Environment Setup Script Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/installing.md Source this script to set environment variables for using aubio locally without installation. It configures library paths for both libaubio and the Python module. ```bash source ./scripts/setenv_local.sh ``` -------------------------------- ### Play Local Sample Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/03.6-External-Samples.md Use the `sample` command with the file path to play any supported audio file on your computer. This works across different operating systems. ```ruby # Raspberry Pi, Mac, Linux sample "/Users/sam/Desktop/my-sound.wav" # Windows sample "C:/Users/sam/Desktop/my-sound.wav" ``` -------------------------------- ### Manage Git Index (Staging Area) in Rugged Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/test/fixtures/text_file.md Provides examples for interacting with the Git Index, including reloading, counting entries, iterating, getting specific entries, unstaging, and staging files. ```ruby index = Rugged::Index.new(path) # Re-read the index file from disk. index.reload # Count up index entries. count = index.count # The collection of index entries. index.entries # Iterating over index entries. index.each { |i| puts i.inspect } # Get a particular entry in the index. index[path] # Unstage. index.remove(path) # Stage. Also updates existing entry if there is one. index.add(ientry) # Stage. Create ientry from file in path, updates the index. index.add(path) ``` -------------------------------- ### Install Catch2 using vcpkg Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api-tests/vendor/Catch2-3.8.0/docs/cmake-integration.md Clone the vcpkg repository, bootstrap it, integrate it with your system, and then install Catch2. This method is useful for managing dependencies across projects. ```bash git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install ./vcpkg install catch2 ``` -------------------------------- ### List CMake build options Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/vendor/libgit2/README.md Commands to initialize a build directory and display all available configuration options. ```bash # Create and set up a build directory $ mkdir build && cd build $ cmake .. # List all build options and their values $ cmake -L ``` -------------------------------- ### Match Single Characters Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/10.3-Pattern-Matching.md Use the '?' character to match a single character within a path segment. For example, '"/?oo/bar/baz"' matches paths where the first segment starts with any single character followed by 'oo'. ```ruby sync "/?oo/bar/baz" ``` -------------------------------- ### Example: Configure aubio with OpenBLAS Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/requirements.rst This example demonstrates configuring aubio with OpenBLAS. It shows the pkg-config output for BLAS libraries and the waf configure command, followed by the expected output confirming the 'blas' check and the OpenBLAS header. ```console $ pkg-config --libs blas -L/usr/lib/openblas-base -lblas $ ./waf configure --enable-atlas ... Checking for 'blas' : yes Checking for header openblas/cblas.h : yes ``` -------------------------------- ### Unit Tests with MiniTest::Test Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/minitest-5.18.1/README.rdoc Define unit tests using methods starting with 'test_'. The 'setup' method runs before each test. Use 'assert_equal' for equality checks and 'refute_match' for negative pattern matching. Tests can be skipped using 'skip'. ```ruby require "minitest/autorun" class TestMeme < Minitest::Test def setup @meme = Meme.new end def test_that_kitty_can_eat assert_equal "OHAI!", @meme.i_can_has_cheezburger? end def test_that_it_will_not_blend refute_match /^no/i, @meme.will_it_blend? end def test_that_will_be_skipped skip "test this later" end end ``` -------------------------------- ### Install Homebrew Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-MAC.md Installs Homebrew, a package manager for macOS, which is required for installing other dependencies. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ``` -------------------------------- ### Build KISS FFT with Make (Static, int16_t, OpenMP) Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissfft-131.1.0/README.md Example command to build KISS FFT using Make with specific configurations: static library, int16_t datatype, and OpenMP support enabled. ```bash make KISSFFT_DATATYPE=int16_t KISSFFT_STATIC=1 KISSFFT_OPENMP=1 all ``` -------------------------------- ### Install Rugged with SSH Support (gem install --with-ssh) Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/README.md Install Rugged with SSH support by passing the --with-ssh build option directly to the gem install command. ```bash gem install rugged -- --with-ssh ``` -------------------------------- ### Install Rugged with System Libraries Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/README.md Install Rugged using the system's libgit2 library instead of the vendored version by passing the --use-system-libraries flag. ```bash gem install rugged -- --use-system-libraries ``` -------------------------------- ### Register reproc++ Examples Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/reproc-14.2.5/reproc++/CMakeLists.txt Registers build targets for reproc++ examples, including conditional registration for multithreaded examples. ```cmake reproc_example(reproc++ drain CXX) reproc_example(reproc++ forward CXX) reproc_example(reproc++ run CXX) if(REPROC_MULTITHREADED) reproc_example(reproc++ background CXX DEPENDS Threads::Threads) endif() ``` -------------------------------- ### Install aubio Tools on Debian/Ubuntu Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/installing.md Install aubio tools on Debian/Ubuntu systems. Note: This may install an older version. ```bash # .deb (linux) WARNING: old version sudo apt-get install aubio-tools ``` -------------------------------- ### QsciMacro::startRecording Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/html/classQsciAbstractAPIs.html Starts the recording of user commands into a macro. ```APIDOC ## POST /QsciMacro/startRecording ### Description Start recording user commands and add them to the macro. ``` -------------------------------- ### Install Tomlrb Gem Locally Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/tomlrb-2.0.0/README.md Install the Tomlrb gem onto your local machine using 'bundle exec rake install'. ```bash bundle exec rake install ``` -------------------------------- ### Install Library Targets and Headers with CMake Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/vendor/libgit2/src/libgit2/CMakeLists.txt Defines installation rules for library binaries, directory structures, and specific header files. ```cmake install(TARGETS libgit2package EXPORT ${LIBGIT2_TARGETS_EXPORT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/git2/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBGIT2_FILENAME}") install(FILES ${PROJECT_BINARY_DIR}/include/git2/experimental.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBGIT2_FILENAME}") install(FILES "${PROJECT_BINARY_DIR}/include/${LIBGIT2_FILENAME}.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ``` -------------------------------- ### Install WaveFile Gem Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/wavefile-0.8.1/README.markdown Install the WaveFile gem from rubygems.org. Use sudo if installing into the default Ruby on MacOS to avoid permission errors. ```bash gem install wavefile ``` -------------------------------- ### Initialize New Bare Repository Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/README.md Create a new, bare Git repository at the specified path using Rugged::Repository.init_at. ```ruby Rugged::Repository.init_at('.', :bare) ``` -------------------------------- ### Uninstall Installed Files Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/installing.md Use the waf uninstall command to remove files previously installed by the install command. This requires administrator privileges. ```bash sudo ./waf uninstall ``` -------------------------------- ### Build and Test Kiss FFT with Make Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissfft-131.1.0/README.md Run this command to validate the build configured as an example. Ensure you are in the kissfft source tree. ```bash make KISSFFT_DATATYPE=int16_t KISSFFT_STATIC=1 KISSFFT_OPENMP=1 testsingle ``` -------------------------------- ### Set Public Header for Installation Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/PlatformFolders-4.2.0/CMakeLists.txt Defines the main header file for the library that will be installed. This ensures the header is correctly placed during the installation process. ```cmake set_target_properties(platform_folders PROPERTIES PUBLIC_HEADER "sago/platform_folders.h" ) ``` -------------------------------- ### Install Concurrent Ruby Edge Gem Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/concurrent-ruby-1.3.5/README.md Install the Edge gem separately using the gem command. Alternatively, add it to your Gemfile and run bundle install. ```shell gem install concurrent-ruby-edge ``` ```ruby gem 'concurrent-ruby-edge', require: 'concurrent-edge' ``` -------------------------------- ### Build PlatformFolders on Linux/macOS Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/PlatformFolders-4.2.0/README.md Commands to configure, build, and install the library on Unix-like systems. ```bash mkdir -p build && cd build cmake -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. sudo cmake --build . --target install ``` -------------------------------- ### Install Aubio Library and Headers Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/CMakeLists.txt Defines installation rules for the 'aubio' library and its header files. Headers are installed into 'include/aubio', excluding private and config headers. ```cmake install( TARGETS aubio INCLUDES DESTINATION include RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) install( DIRECTORY src/ DESTINATION include/aubio FILES_MATCHING PATTERN "*.h" PATTERN "*_priv.h" EXCLUDE PATTERN "config.h" EXCLUDE ) ``` -------------------------------- ### Build KISS FFT with CMake (Static, int16_t, OpenMP) Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/kissfft-131.1.0/README.md Example commands to configure and build KISS FFT using CMake with static library, int16_t datatype, and OpenMP support. This involves creating a build directory and running cmake followed by make. ```bash mkdir build && cd build cmake -DKISSFFT_DATATYPE=int16_t -DKISSFFT_STATIC=ON -DKISSFFT_OPENMP=ON .. make all ``` -------------------------------- ### Install Concurrent Ruby C Extensions Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/concurrent-ruby-1.3.5/README.md Install the optional C extensions gem for potential performance improvements under MRI. Add it to your Gemfile and run bundle install. ```ruby gem install concurrent-ruby-ext ``` ```ruby gem 'concurrent-ruby-ext' ``` -------------------------------- ### Install Catch2 from Git Repository Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api-tests/vendor/Catch2-3.8.0/docs/cmake-integration.md Clone the Catch2 repository, configure the build with CMake, and install it. Ensure you have the necessary permissions or specify CMAKE_INSTALL_PREFIX for custom locations. ```bash $ git clone https://github.com/catchorg/Catch2.git $ cd Catch2 $ cmake -B build -S . -DBUILD_TESTING=OFF $ sudo cmake --build build/ --target install ``` -------------------------------- ### Build and run benchmarks Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/sp_midi/external_libs/concurrentqueue/README.md Commands to compile and execute the benchmark suite from the build directory. ```bash cd build make benchmarks bin/benchmarks ``` -------------------------------- ### Indentation Guides Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/gui/QScintilla_src-2.14.1/doc/Scintilla/ScintillaDoc.html Methods to control the display and highlighting of indentation guides. ```APIDOC ## SCI_SETINDENTATIONGUIDES ### Description Sets the view mode for indentation guides. ### Method VOID ### Parameters #### Request Body - **indentView** (int) - Required - The view mode (0: SC_IV_NONE, 1: SC_IV_REAL, 2: SC_IV_LOOKFORWARD, 3: SC_IV_LOOKBOTH). ## SCI_SETHIGHLIGHTGUIDE ### Description Highlights the indentation guide corresponding to the current brace position. ### Method VOID ### Parameters #### Request Body - **column** (int) - Required - The column to highlight, or 0 to cancel. ``` -------------------------------- ### Command Line Options Reference Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api-tests/vendor/Catch2-3.8.0/docs/command-line.md A comprehensive list of command line flags for configuring test runs. ```text ... ``` ```text -h, -?, --help ``` ```text -s, --success ``` ```text -b, --break ``` ```text -e, --nothrow ``` ```text -i, --invisibles ``` ```text -o, --out ``` ```text -r, --reporter ``` ```text -n, --name ``` ```text -a, --abort ``` ```text -x, --abortx ``` ```text -w, --warn ``` ```text -d, --durations ``` ```text -f, --input-file ``` ```text -c, --section ``` ```text -#, --filenames-as-tags ``` ```text --list-tests ``` ```text --list-tags ``` ```text --list-reporters ``` ```text --list-listeners ``` ```text --order ``` ```text --rng-seed ``` ```text --libidentify ``` ```text --wait-for-keypress ``` ```text --skip-benchmarks ``` ```text --benchmark-samples ``` ```text --benchmark-resamples ``` -------------------------------- ### Install Targets and Export Configuration Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/api/vendor/PlatformFolders-4.2.0/CMakeLists.txt Configures the installation of the library, headers, and CMake export files. This enables 'make install' and allows external projects to find the library using find_package. ```cmake if(PLATFORMFOLDERS_ENABLE_INSTALL) # Gives "Make install" esque operations a location to install to... # and creates a .cmake file to be exported install(TARGETS platform_folders EXPORT "platform_foldersConfig" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" # Tells it where to put the header files PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sago" ) # "The install(TARGETS) and install(EXPORT) commands work together to install a target and a file to help import it" # Installs a cmake file which external projects can import. install(EXPORT "platform_foldersConfig" NAMESPACE sago:: DESTINATION "${_PROJECT_INSTALL_CMAKE_DIR}" ) # "The export command is used to generate a file exporting targets from a project build tree" # Creates an import file for external projects which are aware of the build tree. # May be useful for cross-compiling export(TARGETS platform_folders FILE "platform_folders-exports.cmake" ) # For the config and configversion macros include(CMakePackageConfigHelpers) # Creates the project's ConfigVersion.cmake file # This allows for find_package() to use a version in the call write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/platform_foldersConfigVersion.cmake" # This'll require versioning in the project() call VERSION ${CMAKE_PROJECT_VERSION} # Just assuming Semver is followed COMPATIBILITY SameMajorVersion ) # Install the ConfigVersion file, which is located in the build dir install(FILES "${CMAKE_CURRENT_BINARY_DIR}/platform_foldersConfigVersion.cmake" DESTINATION "${_PROJECT_INSTALL_CMAKE_DIR}" ) endif() ``` -------------------------------- ### Install Locale Gem Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/locale-2.1.2/README.rdoc Command to install the locale gem via RubyGems. ```bash % gem install locale ``` -------------------------------- ### Combine Sample Sources Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/03.7-Sample-Packs.md Demonstrates gathering samples from multiple directories and a specific file path. ```ruby samps = "/path/to/my/samples/" samps2 = "/path/to/my/samples2/" path = "/path/to/my/samples3/foo.wav" sample samps, samps2, path, 0 ``` -------------------------------- ### Repository Instantiation Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/server/ruby/vendor/rugged-1.9.0/test/fixtures/text_file.md How to open an existing or create a new Git repository using Rugged. ```APIDOC ## Repository Instantiation ### Description Instantiate a `Rugged::Repository` object to interact with a Git repository. ### Method `Rugged::Repository.new(path)` `Rugged::Repository.init_at(path, options = {})` `Rugged::Repository.discover(path)` ### Endpoint N/A (Library methods) ### Parameters #### Path Parameters - **path** (String) - Required - The file system path to the repository or a subdirectory within it. - **options** (Hash) - Optional - For `init_at`, can include `:bare => true` to create a bare repository. ### Request Example ```ruby # Open an existing repository repo = Rugged::Repository.new('path/to/my/repository') # Create a new repository Rugged::Repository.init_at('.', :bare) # Discover repository path from a subdirectory Rugged::Repository.discover("/Users/me/projects/repo/lib/subdir/") ``` ### Response #### Success Response (200) - **Rugged::Repository** - An instance of the Repository class. #### Response Example ```ruby # ``` ``` -------------------------------- ### Install aubio via conda Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/python_module.md Installs pre-compiled binaries from the conda-forge channel. ```console $ conda config --add channels conda-forge $ conda install -c conda-forge aubio ``` -------------------------------- ### Combined :slicer FX Example Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/etc/doc/tutorial/A.14-amplitude-modulation.md An advanced example integrating multiple :slicer FX instances with varying parameters within live loops to create complex sonic textures. ```ruby live_loop :dark_mist do co = (line 70, 130, steps: 8).tick with_fx :slicer, probability: 0.7, prob_pos: 1 do synth :prophet, note: :e1, release: 8, cutoff: co end with_fx :slicer, phase: [0.125, 0.25].choose do sample :guit_em9, rate: 0.5 end sleep 8 end live_loop :crashing_waves do with_fx :slicer, wave: 0, phase: 0.25 do sample :loop_mika, rate: 0.5 end sleep 16 end ``` -------------------------------- ### Example: Configure aubio with ATLAS BLAS Source: https://github.com/sonic-pi-net/sonic-pi/blob/dev/app/external/aubio-0.4.9/doc/requirements.rst This example shows how to configure aubio to use ATLAS BLAS. It includes checking BLAS libraries with pkg-config and the waf configure command, followed by the expected output indicating successful configuration. ```console $ pkg-config --libs blas -L/usr/lib/atlas-base/atlas -lblas $ ./waf configure --enable-atlas ... Checking for 'blas' : yes Checking for header atlas/cblas.h : yes ```