Apologies for the long wall of text! Feel free to skip.
Beneath, I describe how I –– just another hobbyist –– would approach this as a do-it-yourself project with a high likelihood of acceptable results based on my experience thus far.
One of my hobbies is to use microcontrollers with native USB to add features to Linux-based appliances.
For arbitrary signal generation at up to 300 kHz, I'd probably use one of my
Teensy 4.0 boards, adding suitable digital-to-analog converter using SPI, plus an amplifier (since the DAC voltage range is limited to 0–3.3V or 0–5V and not much current) based on a suitable op-amp.
Using the default USB serial without any tricks, it can easily maintain over 20 MBytes/sec in one direction from a program running on the computer (that the Teensy is connected to via USB), because of the native USB 2.0 High Speed port; i.e. theoretical maximum is 480 Mbit/s.
(I've done something similar, because I also like to use my microcontrollers as ad-hoc tools: when I need something special or odd, I cobble together one from my microcontrollers and other parts, use it to achieve the task, then take (the expensive parts) apart for reuse in later projects.)
As Teensy has a 1 MByte of RAM (yes, several orders of magnitude more than typical Arduinos), it is trivial to create a 16-bit waveform buffer with up to 250,000 samples or so total, or about a quarter of a second long at 1 Msamples/second. As long as the DAC is good enough, Teensy has no problem DMA'ing data from such waveform buffers at up to 100 MHz SPI clock rates, although you do need to make a simple carrier board as at such fast rates, the wiring matters a lot, and just jumper wires on a breadboard may not work. I suppose something like 3 Msamples/second should suffice for 300kHz signals, and typical SPI DACs can maintain that at 48 MHz SPI clock. If you don't mind a bit of latency, then combining the two means you can provide arbitrary length waveforms, only limited by your disk space, at up to say 3 Msamples/second (using about 6 MBytes/second). The files are typically just raw 16-bit signed integer WAV audio files (ignoring their sample rate), so the waveforms can be constructed either by your own programs or in audio editors.
Another option is to switch to
Teensy 4.1, which has a microSD card socket, and supports up to 16 MBytes of additional PSRAM (for 2×$2.25, you need to solder them yourself), so you could store the waveforms on an SD card (again, as raw WAV files), and generate the waveforms without any computer, standalone. Could add a couple of buttons and a small OLED or TFT (Teensy 4.x have 3 SPI buses) for control –– although OLED displays are electrically noisy, and some strong supply filtering, perhaps a capacitor-inductor-capacitor, would be needed for the DAC and opamp supplies.
For the DAC, I'd probably splurge and get a
TI DAC8832. It's a 16-bit one, and should be able to reproduce the waveform basically exactly at 1 Msamples/sec; it can do 3.125 Msamples/sec continuously, but the output slew rate limits the achievable maximum frequency, depending on the amplitude, to somewhere above 500 kHz or so. Mouser sells these for about 10€ apiece in singles, JLCPCB charges almost $15 for each using their assembly service, but I think it would be worth it. (The opamp will cost almost as much, too.)
It is the output amplification/buffering and sufficient filtering of the DAC supply to avoid digital circuitry noise in the output, that I'd likely stumble on. For bipolar operation (so output would swing below zero too), I would just go with the datasheet suggestion (as outlined in the front page), and ask for further advice and suggestions here. The output signal voltage amplitude range would probably be about ±5V.
And, because I'm just a hobbyist, I'd probably also add a TI ISO7740 between the DAC and the microcontroller, powering the isolated side from say a couple of 9V batteries, or suitable LiFePo cells in series (without a DC-DC converter, due to noise that entails). That way, I could connect the DAC "ground" –– 0V reference –– to the target ground or 0V reference, not having to make sure the microcontroller (and the computer) is referenced to the same potential. But also, the digital side can then be powered from any noisy USB powerbank or computer, without adding digital noise to the output analog signal. (So, the actual purpose of that isolation is more a barrier of supply noise, the DAC end powered by a battery or similar very-low-noise source; allowing the output reference to vary a couple of hundred volts from the host or Teensy "ground" reference is just a cherry on top of the cake.)
It isn't an off-the-shelf solution by any means, but I do claim it is well within the capabilities of a hobbyist willing to learn. Experimenting with Teensies in the Arduino/
Teensyduino environment –– Teensies have all sorts of nice additions compared to the "bare" Arduino environment –– and then learning enough electronics to cobble this together would definitely be an adventure, but one that I think anyone with enough motivation can do. As to schematics and simple boards, I do recommend taking a look at
EasyEDA online schematic and PCB editor: it is easy for us hobbyists to learn, but is also coupled to JLCPCB board manufacturing (and assembly) and LCSC parts catalog. You can find a lot of designs at
oshwlab.com (it's where you can "publish" your EasyEDA projects), and open most of them in EasyEDA. You can see mine
here; as you can tell, I too am just a hobbyist, and still have lots to learn –– all my designs can definitely be done better.