Skip to content

Commit

Permalink
Feature/daisy (Wasted-Audio#18)
Browse files Browse the repository at this point in the history
* try to add generator for daisy

* some progress

* refactoring header into more consistent cpp style

* revert to raw c as include; find way to cleanup/prevent wrapper duplicates?

* add examples from pd2dsy and instructions how to build

* add daisy to changelog and docs

* use local c/cpp files from project-dir
  • Loading branch information
dromer authored Jul 29, 2021
1 parent 7e29867 commit 5e48364
Show file tree
Hide file tree
Showing 20 changed files with 805 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=====

Next Release
-----

* Daisy support

0.1.2
-----

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Available generator options:
* `js`
* `pdext`
* `unity`
* `daisy`
* `dpf`
* `vst2`
* `lv2`
Expand All @@ -104,6 +105,10 @@ This can be handy when using a third-party patch library for example https://git

`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -p "[~/Workspace/Projects/Enzien/heavylib/, ~/Desktop/myLib/]"`


### `-m` Meta Data
`hvcc` can take extra meta-data via a supplied json file. It depends on the generator which fields are supported.

### `--copyright` User Copyright

By default all the generated source files via `hvcc` will have the following copyright text applied to the top of the file:
Expand Down
1 change: 1 addition & 0 deletions docs/01.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Heavy can interpret and convert a subset of features from Pure Data patches:
* Android
* [Bela](http://bela.io)
* [Hoxton OWL](https://www.rebeltech.org/product/owl-modular/)
* [Daisy](https://www.electro-smith.com/daisy)
* Raspberry Pi
* Web (Javascript)

Expand Down
34 changes: 34 additions & 0 deletions examples/daisy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
To build these test patches:

Install `arm-none-eabi-gcc` on your respective OS.

Then convert one of the examples to daisy:
`hvcc seed_test.pd -m seed_meta.json -n seed_test -g daisy -o .`

Then pull in, and compile, libdaisy:

```bash
git clone https://github.com/electro-smith/libDaisy.git libdaisy
cd libdaisy
git checkout d47eb0f
make
```

When it's done building, from the examples dir:

```
cd daisy/source/
make
```

This should result in a `build/` dir with some artifacts:

```ls
-rw-r--r-- 1 dreamer dreamer 3.5K Jul 15 19:35 HeavyDaisy_seed_test.d
-rw-r--r-- 1 dreamer dreamer 9.9K Jul 15 19:35 HeavyDaisy_seed_test.o
-rw-r--r-- 1 dreamer dreamer 42K Jul 15 19:35 HeavyDaisy_seed_test.lst
-rw-r--r-- 1 dreamer dreamer 957K Jul 15 19:35 HeavyDaisy_seed_test.map
-rwxr-xr-x 1 dreamer dreamer 1.2M Jul 15 19:35 HeavyDaisy_seed_test.elf
-rw-r--r-- 1 dreamer dreamer 171K Jul 15 19:35 HeavyDaisy_seed_test.hex
-rwxr-xr-x 1 dreamer dreamer 61K Jul 15 19:35 HeavyDaisy_seed_test.bin
```
3 changes: 3 additions & 0 deletions examples/daisy/patch_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"board": "patch"
}
82 changes: 82 additions & 0 deletions examples/daisy/patch_test.pd
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#N canvas 351 118 960 926 10;
#X obj 336 445 dac~ 1 2 3 4;
#X obj 213 350 *~;
#X obj 363 369 *~;
#X obj 404 371 *~;
#X obj 559 366 *~;
#X obj 336 291 r Ctrl2 @hv_param;
#X obj 471 296 r Ctrl3 @hv_param;
#X obj 617 292 r Ctrl4 @hv_param;
#X obj 412 239 osc~;
#X obj 354 143 loadbang;
#X msg 354 164 440;
#X obj 373 194 f;
#X obj 413 196 +;
#X obj 416 145 r Encoder @hv_param;
#X obj 413 169 * 20;
#X msg 548 143 1;
#X msg 589 144 -1;
#X floatatom 459 218 5 0 0 0 - - -, f 5;
#X text 594 119 turn encoder to set pitch;
#X text 603 268 ctrls set volume per channel;
#X obj 329 111 r EncSwitch @hv_param;
#X text 110 116 press encoder to reset osc pitch;
#X obj 125 291 r Ctrl1 @hv_param;
#X obj 128 321 * 0.8;
#X obj 333 316 * 0.8;
#X obj 472 323 * 0.8;
#X obj 606 328 * 0.8;
#X obj 100 485 r Gate1 @hv_param;
#X obj 142 513 t b b;
#X msg 174 543 1;
#X msg 130 543 0 500;
#X obj 227 381 *~;
#X obj 272 514 t b b;
#X msg 295 540 1;
#X msg 250 540 0 500;
#X obj 282 567 line;
#X obj 227 492 r Gate2 @hv_param;
#X obj 364 395 *~;
#X text 389 486 gate ins trigger env for outs 1-2;
#X obj 154 569 line;
#X connect 1 0 31 0;
#X connect 2 0 37 0;
#X connect 3 0 0 2;
#X connect 4 0 0 3;
#X connect 5 0 24 0;
#X connect 6 0 25 0;
#X connect 7 0 26 0;
#X connect 8 0 2 0;
#X connect 8 0 3 0;
#X connect 8 0 4 0;
#X connect 8 0 1 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 11 0 12 1;
#X connect 12 0 11 0;
#X connect 12 0 17 0;
#X connect 12 0 8 0;
#X connect 13 0 14 0;
#X connect 14 0 12 0;
#X connect 15 0 14 0;
#X connect 16 0 14 0;
#X connect 20 0 10 0;
#X connect 22 0 23 0;
#X connect 23 0 1 1;
#X connect 24 0 2 1;
#X connect 25 0 3 1;
#X connect 26 0 4 1;
#X connect 27 0 28 0;
#X connect 28 0 30 0;
#X connect 28 1 29 0;
#X connect 29 0 39 0;
#X connect 30 0 39 0;
#X connect 31 0 0 0;
#X connect 32 0 34 0;
#X connect 32 1 33 0;
#X connect 33 0 35 0;
#X connect 34 0 35 0;
#X connect 35 0 37 1;
#X connect 36 0 32 0;
#X connect 37 0 0 1;
#X connect 39 0 31 1;
3 changes: 3 additions & 0 deletions examples/daisy/petal_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"board": "petal"
}
43 changes: 43 additions & 0 deletions examples/daisy/petal_test.pd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#N canvas 754 73 659 567 12;
#X obj 29 30 adc~;
#X obj 29 375 dac~;
#X obj 43 105 delwrite~ \$0-delay 1000;
#X obj 28 252 *~;
#X obj 256 132 r Knob3 @hv_param;
#X obj 254 184 + 1;
#X obj 254 158 * -1;
#X obj 31 307 +~;
#X obj 221 275 *~;
#X obj 96 249 line~;
#X obj 43 142 r Knob4 @hv_param;
#X obj 43 168 * 999;
#X obj 96 275 vd~ \$0-delay;
#X obj 96 374 s~ feedback;
#X obj 96 326 *~;
#X obj 143 324 r Knob5 @hv_param;
#X obj 43 77 +~;
#X obj 70 30 r~ feedback;
#X obj 96 187 t f 5;
#X obj 96 218 pack f f;
#X connect 0 0 3 0;
#X connect 0 0 16 0;
#X connect 3 0 7 0;
#X connect 4 0 6 0;
#X connect 4 0 8 1;
#X connect 5 0 3 1;
#X connect 6 0 5 0;
#X connect 7 0 1 0;
#X connect 7 0 1 1;
#X connect 8 0 7 1;
#X connect 9 0 12 0;
#X connect 10 0 11 0;
#X connect 11 0 18 0;
#X connect 12 0 8 0;
#X connect 12 0 14 0;
#X connect 14 0 13 0;
#X connect 15 0 14 1;
#X connect 16 0 2 0;
#X connect 17 0 16 1;
#X connect 18 0 19 0;
#X connect 18 1 19 1;
#X connect 19 0 9 0;
3 changes: 3 additions & 0 deletions examples/daisy/pod_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"board": "pod"
}
108 changes: 108 additions & 0 deletions examples/daisy/pod_test.pd
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#N canvas -430 210 1440 679 10;
#X obj 785 449 dac~;
#X obj 863 354 osc~;
#X obj 588 372 osc~;
#X obj 695 357 line;
#X obj 658 389 *~;
#X obj 972 356 line;
#X msg 1016 325 1;
#X obj 922 390 *~;
#X obj 977 271 r Button2 @hv_param;
#X obj 708 274 r Button1 @hv_param;
#X obj 978 299 t b b;
#X msg 968 326 0 500;
#X obj 707 299 t b b;
#X msg 740 326 1;
#X msg 697 326 0 500;
#X obj 592 276 r Knob1 @hv_param;
#X obj 861 273 r Knob2 @hv_param;
#X obj 591 301 * 2000;
#X obj 861 298 * 2000;
#X obj 762 54 r EncSwitch @hv_param;
#X text 253 292 knob1 adjusts left pitch;
#X text 253 313 button1 triggers left envelope;
#X text 1135 273 knob2 adjusts right pitch;
#X text 1135 292 button2 triggers right envelope;
#X obj 509 290 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X text 485 30 pressing encoder toggles vibrato;
#X obj 859 134 osc~;
#X obj 859 86 loadbang;
#X obj 590 341 +~;
#X obj 861 331 +~;
#X obj 859 198 *~;
#X obj 708 234 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 754 83 f;
#X obj 784 84 + 1;
#X obj 813 84 % 2;
#X obj 711 33 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 755 115 5 0 0 0 - - -, f 5;
#X msg 858 109 10;
#X obj 982 232 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 1088 241 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 933 84 r Encoder @hv_param;
#X obj 930 134 f;
#X obj 958 133 +;
#X floatatom 958 162 5 0 0 0 - - -, f 5;
#X msg 1093 82 1;
#X msg 1142 82 -1;
#X obj 857 166 *~;
#X obj 932 109 * 25;
#X text 1196 85 rotating encoder sets vibrato depth;
#X msg 827 108 0;
#X msg 891 109 100;
#X connect 1 0 7 0;
#X connect 2 0 4 0;
#X connect 3 0 4 1;
#X connect 4 0 0 0;
#X connect 5 0 7 1;
#X connect 6 0 5 0;
#X connect 7 0 0 1;
#X connect 8 0 10 0;
#X connect 9 0 12 0;
#X connect 10 0 11 0;
#X connect 10 1 6 0;
#X connect 11 0 5 0;
#X connect 12 0 14 0;
#X connect 12 1 13 0;
#X connect 13 0 3 0;
#X connect 14 0 3 0;
#X connect 15 0 17 0;
#X connect 16 0 18 0;
#X connect 17 0 28 0;
#X connect 18 0 29 0;
#X connect 19 0 32 0;
#X connect 24 0 17 0;
#X connect 26 0 46 0;
#X connect 27 0 37 0;
#X connect 27 0 49 0;
#X connect 27 0 50 0;
#X connect 28 0 2 0;
#X connect 29 0 1 0;
#X connect 30 0 28 1;
#X connect 30 0 29 1;
#X connect 31 0 12 0;
#X connect 32 0 33 0;
#X connect 32 0 30 1;
#X connect 32 0 36 0;
#X connect 33 0 34 0;
#X connect 34 0 32 1;
#X connect 35 0 32 0;
#X connect 37 0 26 0;
#X connect 38 0 10 0;
#X connect 39 0 18 0;
#X connect 40 0 47 0;
#X connect 41 0 42 1;
#X connect 42 0 43 0;
#X connect 42 0 41 0;
#X connect 42 0 46 1;
#X connect 44 0 47 0;
#X connect 45 0 47 0;
#X connect 46 0 30 0;
#X connect 47 0 42 0;
#X connect 49 0 32 0;
#X connect 50 0 41 0;
3 changes: 3 additions & 0 deletions examples/daisy/seed_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"board": "seed"
}
Loading

0 comments on commit 5e48364

Please sign in to comment.