diff --git a/CMakeLists.txt b/CMakeLists.txt index 62589694..b6d6d89b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,15 @@ set(PDCMAKE_DIR CACHE PATH "Path to pd.cmake") include(${PDCMAKE_DIR}/pd.cmake) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + add_compile_definitions(PY4PD_DEBUG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") # Adds debugging symbols and disables optimization + message(STATUS "Building in Debug Mode") +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG") # Optimized for Release mode, disables debugging symbols + message(STATUS "Building in Release Mode") +endif() + # ╭──────────────────────────────────────╮ # │ Object Definitions │ # ╰──────────────────────────────────────╯ @@ -36,6 +45,15 @@ endif() message(STATUS "NumPy include directory: ${NUMPY_INCLUDE_DIR}") +# Print numpy version +execute_process( + COMMAND python${PYVERSION} -c "import numpy; print(numpy.__version__)" + OUTPUT_VARIABLE NUMPY_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE EXEC_RESULT) + +message(STATUS "NumPy version: ${NUMPY_VERSION}") + # ──────────── Python Include ──────────── if(WIN32) execute_process( @@ -117,3 +135,4 @@ pd_add_datafile(py4pd "${PY4PD_HELP_FILES}") pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/Resources/py.py") pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/LICENSE") pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/README.md") +pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/Resources/Help-Files/" DESTINATION "py4pd/help") diff --git a/Documentation/pd-users/methods.md b/Documentation/pd-users/methods.md index 440f455f..20c77b29 100644 --- a/Documentation/pd-users/methods.md +++ b/Documentation/pd-users/methods.md @@ -36,10 +36,6 @@ Next, I present all methods used in `py4pd` object. The methods are messages tha Create a new `.py` script. -- :my-icons-pd: __[functions](#functions)__ - - Print all the functions inside a script. - - :my-icons-pd: __[reload](#reload)__ Reload the Python Function. diff --git a/Documentation/projects.md b/Documentation/projects.md deleted file mode 100644 index 62e68957..00000000 --- a/Documentation/projects.md +++ /dev/null @@ -1,143 +0,0 @@ -# How-To Projects - -## Piece/Music Projects - -* [Ideias Roubadas III (2024)](https://github.com/charlesneimog/Ideias-Roubadas-III): Piece where I use `py4pd` to convert svg to eletroacustic music. -* [Moteto (2024)](https://github.com/charlesneimog/Moteto): Piece where `py4pd` is used offline to render tests and the score. -* [Ecos (2023)](https://github.com/charlesneimog/Eco): Piece where using `py4pd` we create a server to generate images in real-time. - -## Project 1 - Simple Script - -Once you install Python and `py4pd`, the simple way to use Python inside PureData is by `.py` files. You must organize your work as - -``` -├─ PROJECT_FOLDER -├── myscript.py -└── mypatch.pd -``` - -Inside mscript.py you must define some Python function. Let's say: - -``` py -def mysum(x, y): - return x + y -``` - -After define the `mysum` function, you can load using `py4pd myscript mysum` (`[py4pd