Skip to content

Commit

Permalink
update to chuck 1.5.2.5 (#24)
Browse files Browse the repository at this point in the history
* update to chuck 1.5.2.5
* improve getter methods
  • Loading branch information
DBraun authored Jul 24, 2024
1 parent 2224d85 commit f5ed428
Show file tree
Hide file tree
Showing 8 changed files with 356 additions and 81 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR)

SET(VERSION 0.3.4)
SET(VERSION 0.3.5)
project(ChucKDesigner VERSION ${VERSION})
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ChucKDesignerCHOP)

Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ Install <a href="https://www.python.org/downloads/release/python-3117/">Python 3
Install CMake and confirm that it's installed by running <code>cmake --version</code> in a command prompt.
<br>
Then in this repository,
<br>
<code>
cmake . -DCMAKE_BUILD_TYPE=Release -Bbuild -DPYTHONVER="3.11"
</code>
<br>
Finally, open <code>build/ChucKDesignerCHOP.sln</code> and compile.
Then, <code>cmake --build build --config Release</code> to compile.
</details>

### MacOS
Expand All @@ -70,7 +69,17 @@ If you'd like to build the ChucKDesigner plugins yourself, these are the instruc

### Python interface to ChucK Audio CHOP

The ChucK Audio CHOP's functions:
The ChucK Audio CHOP's getter methods:

* `.get_float(name: str) -> float`
* `.get_int(name: str) -> int`
* `.get_string(name: str) -> str`
* `.get_float_array(name: str) -> List[float]`
* `.get_int_array(name: str) -> List[int]`

Note that these getters return results with a one-frame delay. They will return `None` the first time they're called. If `None` is returned on later calls, it means that the requested global variable wasn't found.

The ChucK Audio CHOP's setter methods:

* `.set_float(name: str, val: float)`
* `.set_int(name: str, val: int)`
Expand All @@ -84,6 +93,8 @@ The ChucK Audio CHOP's functions:
* `.broadcast_event(name: str)`
* `.set_log_level(level: int)` **0 is None and 10 is "Crazy"**

### Example

Suppose the ChucK Audio CHOP has compiled this code:

```chuck
Expand Down
Loading

0 comments on commit f5ed428

Please sign in to comment.