DaisySP Updates!

Hi all, we’ve made some changes to DaisySP that we’d like to share!
These have come together under the banner of DaisySP V1.0.0 :sparkles:

TLDR: How does this affect me?

For standalone projects, one at a time, cd into libDaisy and DaisySP.
Run git pull --recurse-submodules then make . If you have a VS Code task set up to build the libraries, you can use that too once you’ve pulled the latest versions.

If you are using DaisyExamples, you should just run git pull --recurse-submodules on DaisyExamples itself, then rebuild the libraries.

For standalone projects, you must add USE_DAISYSP_LGPL=1 to your makefile if you want to use the LGPL modules.

For DaisyExamples, this has already been done to any relevant examples.

Here is an example program from DaisyExamples that uses a module moved to DaisySP-LGPL. Check out the Makefile to see the one line tweak you’ll need to make to continue with these changes.

Other than that, nothing has changed from a user perspective. You’re good to go!

The Changes

  • For license reasons, all LGPL licensed modules were split into a separate library, DaisySP-LGPL which will be under the LGPL license.
  • DaisySP, libDaisy, and DaisyExamples will remain under the MIT License.
  • If you want to continue using the LGPL modules in your user app, you must add USE_DAISYSP_LGPL=1 to your Makefile.
  • The build process was not modified at all from a user perspective, when you build DaisySP, make will automatically build DaisySP-LGPL if it is present. This also applies to the use of the VS Code tasks.
  • The process for using modules has not changed either, simply #include "daisysp.h" as before and use the modules across both repos seamlessly.
  • We’ve also created a new DaisySP module called OnePole ported from pichenettes’ stmlib/dsp/filter.h.
    • This was necessary in order to replace the Tone filter in KarplusString without using LGPL code in the MIT codebase. Plus it’s a nice module to have around!
  • We’ve gone through and upated DaisyExamples as well to reflect these changes

Tech Details

  • DaisySP-LGPL is compiled to its own .a file, so it can be statically linked later alongside DaisySP.
  • In keeping with LGPL practice, DaisySP-LGPL includes a script with instructions to create a folder with everything users need to re-link their firmware with a modified version of DaisySP-LGPL.
  • All modules in both DaisySP and DaisySP-LGPL gained a license header, which we will continue to use going forward.

The Modules

  • Control/line
  • Dynamics/balance
  • Dynamics/Compressor
  • Effects/bitcrush
  • Effects/fold
  • Filters/Allpass
  • Filters/Atone
  • Filters/Biquad
  • Filters/Comb
  • Filters/Mode
  • Filters/moogladder
  • Filters/NlFilt
  • Filters/Tone
  • PhysicalModelingpluck
  • PhysicalModelingpolypluck
  • Synthesis/blosc
  • Utility/jitter
  • Utility/port

We’re planning on making lots of improvements to DaisySP soon, and we’ll continue posting updates here as that happens.
As always, we welcome any feedback you may have, thanks for being a part of the community, and happy coding! :rocket:

2 Likes

I’m using the DaisyExample repo and I’m unable to run the rebuild all command

➜  DaisyExamples git:(master) ✗ git pull --recurse-submodules
Fetching submodule DaisySP
Fetching submodule libDaisy
Fetching submodule libDaisy/tests/googletest
Fetching submodule stmlib
Already up to date.
➜  DaisyExamples git:(master) ✗ ./rebuild_all.sh
building libDaisy . . .
arm-none-eabi-ar: creating build/libdaisy.a
done.
building DaisySP . . .
done.
Building: pod/SynthVoice
In file included from SynthVoice.cpp:1:
../../DaisySP/Source/daisysp.h:93:10: fatal error: daisysp-lgpl.h: No such file or directory
   93 | #include "daisysp-lgpl.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [build/SynthVoice.o] Error 1
finished

I am getting the same error. Tried with 2 standalone projects. Everything builds as expected w/o the new makefile option.

Updating an existing repository didn’t work for me, various errors, but cloning a new repo, everything I’ve tried (not comprehensive, but tried some things) seems to work.

1 Like

@hornper

If daisysp-lgpl.h cannot be found, it suggests to me that DaisySP-LGPL wasn’t cloned properly. Were you able to run git pull --recurse-submodules without error? Depending on your level of comfort with git you may have more luck just cloning a fresh repo. That being said, if you run the git commands and can send along the results that would help debug the issue.

@KnightHill
Sounds like a similar issue you’re having. Are your standalone projects inside of DaisyExamples? If not you’ll have to pull DaisySP and libDaisy one at a time. If you want to send along what the git commands say when you run them that would help diagnose it.

Edit:

While I’m thinking of it, I’ve been using the github desktop app to great success recently for some things instead of the command line. That may be an easier interface for some things!

I was getting the same error. In addidtion to the updated DaisySP, there seems to be one file updated on libDaisy library aswell - \libDaisy\core\Makefile. I replaced that file on my existing repository with the new one, recompiled the libraries and it worked for me at least.

For some reason it worked rebuilding when using git clone --recursive https://github.com/electro-smith/DaisyExamples but before that I tried:

git clone https://github.com/electro-smith/DaisyExamples
git submodule update --init

and got this output:

➜  daisy rm -rf DaisyExamples/
➜  daisy git clone https://github.com/electro-smith/DaisyExamples.git
Cloning into 'DaisyExamples'...
remote: Enumerating objects: 14358, done.
remote: Counting objects: 100% (268/268), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 14358 (delta 198), reused 251 (delta 194), pack-reused 14090
Receiving objects: 100% (14358/14358), 600.18 MiB | 11.44 MiB/s, done.
Resolving deltas: 100% (10367/10367), done.
Updating files: 100% (1561/1561), done.
➜  daisy cd DaisyExamples/          
➜  DaisyExamples git:(master) git submodule update --init
Submodule 'DaisySP' (https://github.com/electro-smith/DaisySP) registered for path 'DaisySP'
Submodule 'libDaisy' (https://github.com/electro-smith/libDaisy) registered for path 'libDaisy'
Submodule 'stmlib' (https://github.com/pichenettes/stmlib) registered for path 'stmlib'
Cloning into '/Users/panopticon/dev/daisy/DaisyExamples/DaisySP'...
Cloning into '/Users/panopticon/dev/daisy/DaisyExamples/libDaisy'...
Cloning into '/Users/panopticon/dev/daisy/DaisyExamples/stmlib'...
Submodule path 'DaisySP': checked out 'a0494a3adb67f549e18dfd71a35fa656f65b38b6'
Submodule path 'libDaisy': checked out '85172e2b5c9abea1bf56dcd5d2c7b3f5717eb66b'
Submodule path 'stmlib': checked out '5dc8b89b9d166de5f47ba91ee9d25c8805c2bd86'
➜  DaisyExamples git:(master) ./rebuild_all.sh     
building libDaisy . . .
arm-none-eabi-ar: creating build/libdaisy.a
done.
building DaisySP . . .
done.
Building: pod/SynthVoice
In file included from SynthVoice.cpp:1:
../../DaisySP/Source/daisysp.h:93:10: fatal error: daisysp-lgpl.h: No such file or directory
   93 | #include "daisysp-lgpl.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [build/SynthVoice.o] Error 1
finished

Not sure if thats just my computer acting funny but I got it working now :slight_smile:

1 Like

@utarefson good catch! Users will have to also update libDaisy to get everything working, glad it’s working for you.

@hornper Glad it’s working!

I cloned and built both libDaisy and DaisSP from scratch, added USE_DAISYSP_LGPL=1 to my makefile, and I still getting the following error:

main.cpp:14:8: error: ‘Compressor’ does not name a type
14 | static Compressor comp;

This is a standalone project, I am using make to build. I have tried adding #define USE_DAISYSP_LGPL 1
to my source file. When this is done, the error changes to:

./…/DaisySP/Source/daisysp.h:93:10: fatal error: daisysp-lgpl.h: No such file or directory

I was finally able to build my standalone project by adding:

  1. #define USE_DAISYSP_LGPL 1 to my main cpp file
  2. C_INCLUDES += -I…/…/DaisySP/DaisySP-LGPL/Source to my makefile

My guess is the problem is because the generic Makefile under libDaisy/core doesn’t always conditionally add the daisysp-lgpl include path.

Glad you got it working. If you want to go back and play with it some more, here’s some steps that might get it working with the more “official” solution.

Make sure you’ve git pulled the latest libDaisy, this brings in the conditional settings in the core makefile that we’ll turn on with our local flag.

Add the line USE_DAISYSP_LGPL=1 to your local makefile. This will do both the C_INCLUDES and automatically add the define needed.

(BTW nice profile picture!)

I just ran into the same build issue. I believe it is because of the new submodule that hasn’t been initialised, so the following fixed the issue for me:

# (assuming you're in DaisyExamples)
cd DaisySP
git submodule update --init
cd ..
./rebuild_all.sh