Skip to content

Commit

Permalink
fixes and doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesneimog committed Nov 11, 2024
1 parent f9a0381 commit df65577
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Documentation/en/patch/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ After you compile your patch, will be created in the ROOT of the project a file

Abstractions files must be inside `Libs` folder and be called as `Libs/myabs`. For now, use things like `declare -path Libs` and then trying to create `myabs` will not work!

## Compiling using PureData
## <h2 align="center">Compile your patch</h2>

To compile your `patch` using Pd you need to use the `pd4web` object and its help patch. To access it you can create a new patch, create the `pd4web` object, click with the right click on it, and click on help.

Expand Down
43 changes: 43 additions & 0 deletions Documentation/en/patch/gui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<p align="center">
Here we list all the objects that are supported by the GUI module and how to use them inside your web patch.
</p>

---

!!! warning "pd4web just render GUI objects"
`pd4web` just render the GUI objects. We don't aim to make Pd available in the browser. We aim to make projects that use Pd available in the browser, projects like pieces, algorithms, or audio engines.

## <h2 align="center">Supported Gui Objects</h2>

For now, just these objects are supported:

- `bng`: Bang object;
- `tgl`: Toggle object;
- `nbx`: Number box object;
- `vsl`: Vertical slider object;
- `hsl`: Horizontal slider object;
- `vradio`: Vertical radio object;
- `hradio`: Horizontal radio object;
- `vu`: Vertical vu object;
- `cnv`: Canvas object;
- `text`: Comment object;

From external libraries:

- `else/knob`: Knob object;
- `else/keyboard`: Keyboard object;

You can check these objects working in the [examples](../../../tests/gui) folder.

---
## <h2 align="center">How to use this objects?</h2>

`pd4web` intercepts the messages sent by the objects and sends them to the web patch. Connections can't be intercepted, so you need to use `send`, `s` or `receive`, `r` objects to connect the GUI objects. This is how you can use the `toggle` object:

!!! danger "Don't use connections"
The connections between objects are not intercepted by `pd4web`. You need to use `send` and `receive` objects to connect the GUI objects.

<p align="center">
<img src="../gui.png" alt="gui" width="100%" style="border-radius: 10px">
</p>

Binary file added Documentation/en/patch/gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Documentation/en/patch/problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ This means that you need to use a higher number for memory and recompile your pa

### Compilation problems

If you have problems to compile, the easiear way to solve is to report what is the problem using the GitHub issues.

### `flutex.c` problems

These problems are common when using some set of objects. If this happens, probably is because you are using some object that I don't use in my patches. So, you need to report this problem to me and I will try to solve this.

To report the problem you must share the patch that is causing the problem, without the patch is impossible to solve the problem. You can always reduce the patch to the minimum size that is causing the problem.
23 changes: 0 additions & 23 deletions Documentation/tests/ml5/.tmp/plaits.pd

This file was deleted.

1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ nav:
- Home: en/index.md
- Compile your patch:
- Intro: en/patch/install.md
- Gui Objects: en/patch/gui.md
- Compile: en/patch/compile.md
- Problems: en/patch/problems.md
- en/libraries.md
Expand Down

0 comments on commit df65577

Please sign in to comment.