My apologies if this question is silly, I'm a bit of a programming amateur... I'd like to create a patch wherein I could record a few seconds of audio from the adc (mic input), then play random segments of that audio back. Seems simple enough, but I'm having trouble mastering the art of recording sound in ChucK. Ideally, I'd like to use sndbuf to store the audio in a temporary buffer, though I'm wondering if my only option is to use WvOut to write the audio to an actual file. I'm not even doing very well using WvOut to record... I'd like the recording to be triggered by a button toggle (or even just triggered by a normal button with a set recording duration). I think I'm fairly comfortable with the MAUI button object, but I'm not sure how to implement triggered recording. I've seen examples that merely set up an adc => WvOut w => blackhole configuration, then tell the program to just do this for 5 seconds and then close the file, but I'd like something where I could have the shred running, and then activate a recording process when the button is pushed. I've tried implementing this with a while (button.state()) loop inside of an infinite time loop, but it usually ends up crashing. I also thought I saw something about a w.record operation in the ChucK wiki, but I didn't see anything about this function in the documentation. Anyway, sorry that this is so unfocused... I'm just not sure how to even start approaching the problem. Bottom line: can I use sndbuf to record live audio, and if not, how can I use WvOut to do this? Thanks, Matt Diamond
Matt; My apologies if this question is silly, I'm a bit of a programming
amateur...
There are no silly questions... but you might still feel slightly silly after looking at /examples/special and looking into any of the files with "LiSa" in their name as LiSa does exactly what you want to do in one convenient UGen. She will also act as a convolution reverb, a wave-table, a multi-tap delay line....... and I've been planning on trying to make LiSa work as a track&hold as well. It has been said before today but Dan does in fact rock. Cheers, Kas.
Wow, yeah, I can't believe I missed that on the unit generators reference page. Looks like it covers everything I was talking about. Thanks a lot. - Matt On Mar 18, 2009, at 8:17 PM, Kassen wrote:
Matt;
My apologies if this question is silly, I'm a bit of a programming amateur...
There are no silly questions... but you might still feel slightly silly after looking at /examples/special and looking into any of the files with "LiSa" in their name as LiSa does exactly what you want to do in one convenient UGen.
She will also act as a convolution reverb, a wave-table, a multi-tap delay line....... and I've been planning on trying to make LiSa work as a track&hold as well. It has been said before today but Dan does in fact rock.
Cheers, Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (2)
-
Kassen
-
Matt Diamond