Initializing Hardware

How would I go about creating a custom hardware map for an Arduino-based project using the Seed?
Instead of using the hardware setup specified by:

DaisyHardware hw;
hw = DAISY.init(DAISY_SEED, AUDIO_SR_48K);

I would like to use a custom setup and am wondering what I need to write instead of this.
Do I need to copy something like the daisy_petal.h and daisy_petal.cpp files within the DaisyExamples>libdaisy>src folders, modify them for my pin definitions, and replace the reference to “DAISY_SEED” in the above code to my file names? Or is there a way to define pins within the program?

If it doesn’t need to be portable, and you’re just experimenting you can use the pin names as specified in the Daisy Pinout with standard Arduino functions (analogRead, digitalRead, digitalWrite, etc.)

If you want something reusable, you can create a separate struct or class in your sketch that has the “DaisyHardware” object, and whatever additional components you want to attach.

You can use macros similar to what are made in in the daisy_x.h files you mentioned.

For example if you have something with just a single button attached to your daisy seed that you can keep in another file:

// myhardware.h
#define MYHARDWARE_BUTTON_PIN D0

struct MyHardware
{
  void Init() { 
    seed = DAISY.init(DAISY_SEED, AUDIO_SR_48K);
    pinMode(MYHARDWARE_BUTTON_PIN, INPUT);
  }
  DaisyHardware seed;
}

And then in your sketch you could:

#include MyHardware.h
MyHardware hw;

setup() {
  hw.Init()
}

loop() {
  bool state = digitalRead(MYHARDWARE_BUTTON_PIN);
}

Ok thank you.
So I can remove the DaisyHardware hw; line and just “initialize” the pins myself with
#define sw1 9
and
pinMode(sw1, INPUT) for example and then utilize the pins with the standard Arduino functions you mentioned?

With this method, how would I initialize the Daisy for 48K Audio? Would I use something like
hw = DAISY.init(AUDIO_SR_48K)?