[chuck-users] New to ChucK: can this be done easily?

Forrest Cahoon forrest.cahoon at gmail.com
Sun Jun 10 17:35:19 EDT 2018

Hi ChucKers!

I have a sonification project that I'm wondering if it makes sense to do in

I have a csv file with frequencies and amplitudes for 4 different sine
waves, representing values at (say) half-second intervals. I want to read
in a line, and then smoothly change the frequency and amplitude values
using linear interpolation over the course of 24000 samples (a half second
at 48k samples per second), then read in the next line, and smoothly change
to those values over the next half-second, etc. until the data runs out.

I could code this in C using libsndfile, but if I didn't have to worry
about converting frequencies into phase distances between samples I'd
consider that a win.

I noticed Chuck has FileIO methods to read input files (although these are
very poorly documented) so thought it should be possible to read in a csv

I could calculate the amount of frequency and amplitude change per sample
and adjust these in a 1-sample loop, and that's already simpler than coding
in C. But I'm hoping there's some way to tell ChucK "I want this (e.g.
frequency) value to change smoothly from its current value to f1 over the
course of a half-second". If that were possible, ChucK would be a clear
choice for my project.

Thanks for any response!

Forrest Cahoon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20180610/b3f2132e/attachment.html>

More information about the chuck-users mailing list