Skip to content

Commit ac37b15

Browse files
Merge pull request #1207 from plugdata-team/develop
Develop
2 parents 5818076 + 20b5900 commit ac37b15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+878
-265
lines changed

CMakeLists.txt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ option(RUN_CLANG_TIDY "" OFF)
88
option(ENABLE_TESTING "" OFF)
99
option(ENABLE_SFONT "" ON)
1010
option(ENABLE_SFIZZ "" ON)
11+
option(ENABLE_ASAN "" OFF)
1112
option(VERBOSE "" OFF)
1213

1314
set (CMAKE_CXX_STANDARD 20)
@@ -16,16 +17,6 @@ set (CMAKE_CXX_STANDARD 20)
1617
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
1718
set(CMAKE_C_VISIBILITY_PRESET hidden)
1819

19-
# Sfizz doesn't want to compile on aarch64 linux here...
20-
if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
21-
set(ENABLE_SFIZZ OFF)
22-
endif()
23-
24-
# Sfizz doesn't want to compile on aarch64 linux here...
25-
if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
26-
set(ENABLE_SFIZZ OFF)
27-
endif()
28-
2920
function(message)
3021
if (NOT MESSAGE_QUIET)
3122
_message(${ARGN})
@@ -59,6 +50,13 @@ set_property(GLOBAL PROPERTY USE_FOLDERS YES)
5950

6051
project(plugdata VERSION 0.8.0 LANGUAGES C CXX)
6152

53+
# Sfizz doesn't want to compile on aarch64 linux...
54+
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
55+
message(STATUS "Disabled sfizz")
56+
set(ENABLE_SFIZZ OFF)
57+
endif()
58+
59+
6260
add_subdirectory(Libraries/ EXCLUDE_FROM_ALL)
6361

6462
cmake_policy(SET CMP0091 NEW)
@@ -69,6 +67,11 @@ if (CMAKE_C_COMPILER_ID MATCHES "Clang")
6967
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=return-type")
7068
endif()
7169

70+
if(ENABLE_ASAN)
71+
add_compile_options(-fsanitize=address)
72+
add_link_options(-fsanitize=address)
73+
endif()
74+
7275
message(STATUS "Preparing documentation")
7376
execute_process(COMMAND python3 parse_documentation.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Scripts)
7477

Libraries/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,20 @@ file(GLOB ELSE_SOURCES
191191
${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/shared/*.c
192192
)
193193

194+
file(GLOB_RECURSE CIRCUIT_SOURCES
195+
${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/Compiled/audio/circuit~/Source/circuit~.c
196+
${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/Compiled/audio/circuit~/Source/Simulator.cpp
197+
${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/Compiled/audio/circuit~/Libraries/**/*.c
198+
)
199+
194200
file(GLOB_RECURSE PLAITS_SOURCES
195201
${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/Compiled/audio/plaits~/plaits~.cpp
196202
${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/Compiled/audio/plaits~/*.cc
197203
)
198204

205+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/pd-else/Code_source/Compiled/audio/circuit~/Libraries)
206+
207+
list(APPEND ELSE_SOURCES ${CIRCUIT_SOURCES})
199208
list(APPEND ELSE_SOURCES ${PLAITS_SOURCES})
200209

201210
if(ENABLE_SFIZZ)

Libraries/libpd/x_libpd_multi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,12 @@ void setup_ptouch0x2eout();
767767
void setup_spread0x2emc_tilde();
768768
void setup_rotate0x2emc_tilde();
769769
void pipe2_setup();
770+
void circuit_tilde_setup();
771+
772+
void op2_tilde_setup();
773+
void op4_tilde_setup();
774+
void op6_tilde_setup();
775+
770776

771777
#if ENABLE_SFIZZ
772778
void sfz_tilde_setup();
@@ -1085,6 +1091,12 @@ void libpd_init_else(void)
10851091
setup_spread0x2emc_tilde();
10861092
setup_rotate0x2emc_tilde();
10871093
pipe2_setup();
1094+
circuit_tilde_setup();
1095+
1096+
/* Not yet!
1097+
op2_tilde_setup();
1098+
op4_tilde_setup();
1099+
op6_tilde_setup(); */
10881100
}
10891101

10901102
void libpd_init_cyclone(void)

Libraries/pd-else

Submodule pd-else updated 205 files

Resources/Documentation/vanilla/clone.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ categories:
66
see_also:
77
- poly
88
pdcategory: vanilla, UI, Data Management
9-
last_update: '0.47'
9+
last_update: '0.54'
1010
inlets:
1111
nth:
1212
- type: list
@@ -18,14 +18,20 @@ outlets:
1818
- type: data outlets
1919
description: output with a prepended instance number
2020
- type: signal outlets
21-
description: output the sum of all instances' outputs
21+
description: output from all instances either as multichannel signal or summed into mono signal
2222

2323
flags:
2424
- name: -x
2525
description: avoids including a first argument setting voice number
2626
- name: -s <float>
2727
description: sets starting voice number
2828
default: 0
29+
- name: -di
30+
description: distribute multichannel input signals across cloned patches
31+
- name: -do
32+
description: combine signal outputs to make a multichannel signal
33+
- name: -d
34+
description: set both -di and -do flags
2935

3036
arguments:
3137
- type: symbol
@@ -36,6 +42,10 @@ arguments:
3642
description: optional arguments to the abstraction
3743

3844
methods:
45+
- type: resize <float>
46+
description: resizes the number of copies
47+
- type: vis <list>
48+
description: opens a copy, takes copy number and visualization status (1 to open, 0 to close)
3949
- type: next <list>
4050
description: forwards a message to the next instance's inlet (incrementing and repeating circularly)
4151
- type: this <list>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: snake~, snake_in~
3+
description: combine mono signals into multichannel signals
4+
categories:
5+
- object
6+
pdcategory: vanilla, Mixing and Routing, Audio I/O
7+
last_update: '0.54'
8+
see_also:
9+
- snake~ out
10+
- inlet~
11+
- clone
12+
- throw~
13+
- send~
14+
arguments:
15+
- description: number of channels
16+
default: 2
17+
type: float
18+
inlets:
19+
nth:
20+
- type: float/signal
21+
description: mono input to merge into a multichannel signal
22+
outlets:
23+
1st:
24+
- type: signals
25+
description: multichannel signal
26+
draft: false
27+
---
28+
ssssssssss
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: snake_out~
3+
description: split multichannel signals into mono signals
4+
categories:
5+
- object
6+
pdcategory: vanilla, Mixing and Routing, Audio I/O
7+
last_update: '0.54'
8+
see_also:
9+
- snake~ out
10+
- inlet~
11+
- clone
12+
- throw~
13+
- send~
14+
arguments:
15+
- description: number of channels
16+
default: 2
17+
type: float
18+
inlets:
19+
1st:
20+
- type: signals
21+
description: a multichannel signal to break into mono tracks
22+
outlets:
23+
nth:
24+
- type: signal
25+
description: mono outputs
26+
draft: false
27+
---
28+
ssssssssss

Resources/Fonts/IconFont.ttf

80 Bytes
Binary file not shown.

Resources/Scripts/package_resources.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def splitFile(file, num_files):
8181

8282
globMove("./Abstractions/*-help.pd", "./Documentation/5.reference")
8383
copyDir("../../Libraries/pd-else/Documentation/Help-files/", "./Documentation/9.else")
84+
copyFile("../../Libraries/pd-else/Documentation/extra_files/f2s~-help.pd", "./Documentation/9.else")
8485

8586
#copyFile("../Patches/beat-help.pd", "./Documentation/5.reference")
8687
copyFile("../Patches/param-help.pd", "./Documentation/5.reference")
@@ -99,6 +100,7 @@ def splitFile(file, num_files):
99100
makeDir("Extra")
100101
makeDir("Extra/GS")
101102
copyDir("../../Libraries/pd-else/Documentation/extra_files", "Extra/else");
103+
copyFile("../../Libraries/pd-else/Documentation/README.pdf", "Extra/else");
102104
copyDir("../../Libraries/pd-else/Code_source/Compiled/audio/sfont~/sf", "Extra/else/sf");
103105
copyDir("../Patches/Presets", "./Extra/Presets")
104106
copyDir("../Patches/Palettes", "./Extra/palette")

Source/Canvas.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ Canvas::Canvas(PluginEditor* parent, pd::Patch::Ptr p, Component* parentGraph)
108108

109109
setSize(infiniteCanvasSize, infiniteCanvasSize);
110110

111-
// initialize per canvas zoom to 100% when first creating canvas
112-
zoomScale.setValue(1.0f);
111+
// initialize to default zoom
112+
auto defaultZoom = SettingsFile::getInstance()->getPropertyAsValue("default_zoom");
113+
zoomScale.setValue(getValue<float>(defaultZoom)/100.0f);
113114
zoomScale.addListener(this);
114115

115116
// Add lasso component
@@ -275,7 +276,9 @@ void Canvas::zoomToFitAll()
275276

276277
void Canvas::lookAndFeelChanged()
277278
{
278-
lasso.setColour(LassoComponent<Object>::lassoFillColourId, findColour(PlugDataColour::objectSelectedOutlineColourId).withAlpha(0.3f));
279+
lasso.setColour(LassoComponent<Object>::lassoFillColourId, findColour(PlugDataColour::objectSelectedOutlineColourId).withAlpha(0.125f));
280+
281+
lasso.setColour(LassoComponent<Object>::lassoOutlineColourId, findColour(PlugDataColour::objectSelectedOutlineColourId).withAlpha(0.8f));
279282
}
280283

281284
void Canvas::paint(Graphics& g)
@@ -461,7 +464,9 @@ void Canvas::performSynchronise()
461464
// Remove deleted objects
462465
for (int n = objects.size() - 1; n >= 0; n--) {
463466
auto* object = objects[n];
464-
if (!object->getPointer() || patch.objectWasDeleted(object->getPointer())) {
467+
468+
// If the object is showing it's initial editor, meaning no object was assigned yet, allow it to exist without pointing to an object
469+
if ((!object->getPointer()|| patch.objectWasDeleted(object->getPointer())) && !object->isInitialEditorShown()) {
465470
setSelected(object, false, false);
466471
objects.remove(n);
467472
}

0 commit comments

Comments
 (0)