[Solved] Using a DAC (MCP4911) instead of a low-pass filter

Wow, that is a lot of code to send two bytes to a DAC.

This part

#include <SPI.h>
#include "MCP4911.h"

#define AOUT_CS 5
#define AOUT_LDAC 6
#define AOUT_CLK 7
#define AOUT_SDI 8

The SPI pins are specific hardware pins. On a '328, D13-12-11 and typically 10 for CS.
On a '2560, something like D53-52-51 and 50 somewhere in that range).
On a 1284, D13-12-11-10 for Bobuino, and D7-6-5-4 for other versions.
Not sure where on a 32U4 (Leonardo).

How will those "# define"s work when SPI.transfers are actually being used, as in below?

    // Enable SPI communications 
    digitalWrite(cs,LOW);
    // Send command word
    byte0 = cmdWrd >> 8;
    byte1 = cmdWrd & 0b0000000011111111;
    SPI.transfer(byte0);
    SPI.transfer(byte1);
    // Disable SPI communications
    digitalWrite(cs,HIGH);

Could be I am totally misunderstanding this as well, really the first time I looked at what goes into a library/class whatever it is called that you crafted.