Getting to know Daisy (C++)

Let me apologize in advanced for always using the FV-1 as my reference point for DSP concepts.
  • Does the Daisy have a concept like Registers?
    • In the FV-1, we had 32 registers, which were like spaces that could hold a numeric value.
    • Reading and writing to them was how we routed signals, pot values, lfos through different functions.
    • On the Daisy, and with C++, it's probably not like that at all.
 
C++ has variables, and you have (virtually) an unlimited number of them. (as well as arrays, and vectors, and all sorts of other data types)

For example:

C++:
float leftInput = in[i];  //  Store left input sample in a variable of type float named leftInput
float rightInput = in[i+1];  //  Store right input sample in a variable of type float named rightInput

float leftWet = leftInput * 2.0f;  //  Apply 2x Gain to leftInput and store in a variable named leftWet
float rightWet = rightInput * 2.0f;  //  Apply 2x Gain to rightInput and store in a variable named rightWet
 
Last edited by a moderator:
C++ also has compound assignment operators, which are much simpler than the name implies and shorten up your code a bit.

Instead of typing:
C++:
myValue = myValue + 1;
You can shorten it up with:
C++:
myValue += 1;
 
I see there are a few free programs for working in C++. Are there any recommendations here about which one to choose?
 
The ARM Toolchain is the easiest to get setup, although there are a few bumps along the way.

I'm using VSCode as my editor right now.

Doing it this way requires a little bit of command line work to compile your code and upload to the Daisy... Ideally I want to get everything set up in Visual Studio, the Community Edition is free.
 
@PedalPCB have you started working on the hardware definitions / header file for the Terrarium?

Looking at DaisyExamples/libdaisy/src/daisy_petal.h... it seems like you could create pedalpcb_terrarium.h just by commenting out a couple dozen lines.
 
@PedalPCB have you started working on the hardware definitions / header file for the Terrarium?
The current version of the Terrarium doesn't really need it. There are only two variations from the Petal configuration (aside from not having the LED driver and rotary encoder)... A couple of the toggle switches will be accessed as footswitches, and the two LEDs have to be manually accessed by GPIO pins. I suppose we could customize a header file for that, but I was trying to keep it as compatible with the vanilla Daisy config as possible.

Now, one of the next projects I have in mind is likely going to need a bit of customization. At some point I'd like to start working on a customized platform that we can all use as a common base for designs. A sort of "Open Pedal Initiative" if you will. Once we're all a bit more up to speed on how things are going to work (and what we'll need) we'll have to start discussing that for sure.

What about codeblocks? I've used it for C/C++ DLLs etc and it's pretty lightweight.

I thought about CodeBlocks (and even Eclipse).

The main reason I was focusing on VC++ is because there seems to be good support (and info) for using a hardware debugger... This is fairly new to me, I've always debugged manually with code but when working with a device like this with no display a hardware debugger seems like it could be really useful.

I'd need to get a bit more experience and a better feel for how everything comes together before going off the beaten path, but I'm all for doing it. VC++ is great, but it's definitely one heavy package compared to both of those.
 
The current version of the Terrarium doesn't really need it. There are only two variations from the Petal configuration (aside from not having the LED driver and rotary encoder)... A couple of the toggle switches will be accessed as footswitches, and the two LEDs have to be manually accessed by GPIO pins. I suppose we could customize a header file for that, but I was trying to keep it as compatible with the vanilla Daisy config as possible.

Now, one of the next projects I have in mind is likely going to need a bit of customization. At some point I'd like to start working on a customized platform that we can all use as a common base for designs. A sort of "Open Pedal Initiative" if you will. Once we're all a bit more up to speed on how things are going to work (and what we'll need) we'll have to start discussing that for sure.



I thought about CodeBlocks (and even Eclipse).

The main reason I was focusing on VC++ is because there seems to be good support (and info) for using a hardware debugger... This is fairly new to me, I've always debugged manually with code but when working with a device like this with no display a hardware debugger seems like it could be really useful.

I'd need to get a bit more experience and a better feel for how everything comes together before going off the beaten path, but I'm all for doing it. VC++ is great, but it's definitely one heavy package compared to both of those.
Just ordered a daisy seed since I'm hoping the board will be available soon! Trying to get all the programs and things from the Daisy forum downloaded... very new to this whole thing and feel a little in over my head. Have you used Atom before? I have a little experience with it so I'm hoping it will work!
 
Just ordered a daisy seed since I'm hoping the board will be available soon! Trying to get all the programs and things from the Daisy forum downloaded... very new to this whole thing and feel a little in over my head. Have you used Atom before? I have a little experience with it so I'm hoping it will work!

I've never used Atom, but even if you have to compile from the command line it should work as a code editor.

I've used plain old Windows Notepad more than VSCode. ?
 
I think I'll go with atom for now then until I know what I'm doing better to choose one:) also is that available now? Just went to order and it looks like its pulling up a waitlist as of right now
 
Back
Top