create OSC controlled synth for voxbox

create OSC controlled synth for voxbox

task id: voxboxOSC

2024-06-18 08:19: Current gameplan #voxboxOSC

The rust library <<rust/crates/cpal>> didn't work on my alpine linux box, but <<rust/crates/rosc>>. was fine. So, the plan is to build something up using libsoundio, then have the inner loop be implemented in C.

2024-06-18 08:57: setting up some boilerplate #voxboxOSC #timelog:00:19:32

Now we have some C code making sound, and some exported rust code setting the frequency of a sine tone.

2024-06-18 09:17: splitting up C code a bit #voxboxOSC #timelog:00:16:34

This code is from the libsoundio sine example. I need to make sure this is organized well enough that I can start putting custom DSP code from Rust, and eventually add OSC polling.

Okay, nevermind on the splitting. I have a better sense of this control flow. I want to make sure I can get my Rust data into C okay.

While I didn't do any refactoring, I did manage to figure out how to send userdata to the SoundIO struct.

2024-06-18 09:34: Initial attempts to get a voice working #voxboxOSC #timelog:00:39:50

2024-06-18 10:16: Initial attempt at receiving OSC messages #voxboxOSC #timelog:00:17:13

2024-06-18 10:35: Now we try to get it to shut up over OSC #voxboxOSC #timelog:00:18:24

2024-06-18 11:01: Why are pitches sounding different on OSX and Linux? #voxboxOSC

2024-06-18 11:03: I explicitely hard coded a request for 44.1kHz on OSX and that seemed to fix it #voxboxOSC

2024-06-19 13:18: Get OSC messages to actually control stuff #voxboxOSC

In rust, this might be slightly difficult with how I am currently arranging things because I have my OSC listener component separated from the DSP component. Ideally, I'd like to have the DSP be a reference inside the OSC component, but that may be tricky.

2024-06-19 14:35: We are leaking memory #voxboxOSC

Because the main loop in C, I'm leaking memory when I allocate the DSP object.

2024-06-19 14:40: Wait I figured out how to free it unsafely! #voxboxOSC

It involves calling unsafe{Box::from_raw()} and then drop.

2024-06-19 14:53: okay pitch control works from OSC. Taking a break from this #voxboxOSC #timelog:01:08:19

2024-06-20 12:46: Implement gain, add smoothing parameter abstraction #voxboxOSC #timelog:00:21:47