Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-20 Thread Michael Heuer
Note there are also a few different sample-hold chubgraphs in LiCK https://github.com/heuermh/lick/tree/master/lick/lfo Cheers! michael > On Apr 20, 2020, at 2:10 PM, Forrest Curo wrote: > > Yes, I'm interested! > Whatever turns out

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-20 Thread Forrest Curo
Yes, I'm interested! Whatever turns out easier, one could apply it to note lengths, amplitudes, other parameters in same way for same reasons: a bit of patterned randomness. On Mon, Apr 20, 2020 at 11:32 AM Mario Buoninfante < mario.buoninfa...@gmail.com> wrote: > Hi, > > In case you're

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-20 Thread Mario Buoninfante
Hi, In case you're interested I made a SampHold chugin that you can find here: https://github.com/mariobuoninfante/ChucK_chugins Cheers, Mario On Mon, 20 Apr 2020 at 18:05, Forrest Curo wrote: > "A sample and hold uses a periodic wave as an input. The wave is sampled > at regular > intervals.

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-20 Thread Forrest Curo
Yeah, thanks! Though I ended up not needing an array, I'm pretty new to this, and can definitely can use help with the "everybody knows" stuff! Forrest On Mon, Apr 20, 2020 at 10:09 AM Jack Atherton wrote: > Hey Forrest, > > The issue you're having with your float array is that 'float

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-20 Thread Jack Atherton
Hey Forrest, The issue you're having with your float array is that 'float samples[];' is only declaring a null reference to an array. If you want it to refer to an actual array, you need to specify a length (e.g. float samples[ s.samples() ];) ChucK arrays can also be resized (which I only found

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-20 Thread Forrest Curo
"A sample and hold uses a periodic wave as an input. The wave is sampled at regular intervals. The resulting values are used as a control. It "samples" the wave and "holds" that value until a new value is sampled. It can be thought of as an analog to digital converter with a low frequency sampling

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-19 Thread Forrest Curo
I've achieved dreadfulness with this. Okay, will vary the rhythm etc and reduce the range, get a more interesting scale, but... hmm! SawOsc s => JCRev r => dac; .1 => s.gain; .1 => r.mix; 1 => int incsamp; 0 => int ps; 1 => float height; 0 => float maxsofar; 0 => float freq; SndBuf buf;

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-19 Thread Forrest Curo
Um. that works. So does this: SndBuf s => blackhole; "/home/forrest/chuck/examples/basic/om.wav" => s.read; float samples; 0 => int i; while (s.pos() < s.samples()) { <<< s.last() >>>; s.pos() => i; (s.valueAt(i)) => samples; <<< samples >>>; samp => now; } I was having

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-19 Thread Perry Cook
This is truly odd. I don’t have easy means to test it. I don’t know why it wouldbe broken dependent on the dac, however. For fun you might try something like this, just to verify that the valueAt() function is what’s busted. SndBuf s => blackhole; “Fred.wav” => s.read; while (s.pos() <