Author |
Message |
Acoustic Interloper
Joined: Jul 07, 2007 Posts: 2067 Location: Berks County, PA
Audio files: 89
|
Posted: Fri Jun 24, 2011 6:40 pm Post subject:
LiSa and the unchuck operator Subject description: They seem mutually exclusive. |
|
|
Connecting a signal flow from a source (adc in my current case) through a LiSa object and on to a sink (ultimately dac) statically works fine.
However, leaving the LiSa unconnected, then
Code: |
SOURCE => LisaBuffer ;
do the recording stuff
SOURCE =< LisaBuffer ;
LisaBuffer => SINK ;
do the playback stuff
LisaBuffer =< SINK ;
|
Does not work. Either there is no recording, or perhaps no playback, or maybe neither. Silence!
I would guess that the chuck scheduling software does not bother running signal through a path that is not both sourced and sinked, not recognizing the LiSa is a sink while recording and a source while playing back.
No problem, since presumably there is no cost associated with leaving the LiSa instance connected all the time. It should entail cost only when recording or playing.
Since this took me over an hour to debug today, just thought I'd ask if this is common knowledge, etc., or any other pitfalls with a LiSa to avoid. All seems OK now.
Thanks. _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
Back to top
|
|
|
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Sat Jun 25, 2011 11:06 am Post subject:
|
|
|
UGens basically stop dead in their tracks unless they're chucked to a dac channel or blackhole. This applies to LiSa as well as filters etc.
Try adding:
Code: | LisaBuffer => blackhole;
|
somewhere.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
|
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Sat Jun 25, 2011 11:13 am Post subject:
|
|
|
Note the difference between LiSa and SndBuf. When LiSa is recording, she pulls samples in realtime from an input. This means that she has to use ChucK's timing mechanism so the she gets the samples correctly, in time. Chucking the LiSa instance to a dac or blackhole connects her to the timing system. When she is unchucked, she is disconnected from the timing system, meaning she won't be drawing resources from ChucK's runtime.
When reading data into SndBuf, you call the read() method which (from the ChucK program's point of view) loads a full sound file into memory in an infinitesmal amount of time. You don't need timing to do that, so that works without chucking the SndBuf to a sample-sucking destination.
My view of it anyway.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
|
Acoustic Interloper
Joined: Jul 07, 2007 Posts: 2067 Location: Berks County, PA
Audio files: 89
|
Posted: Sun Jun 26, 2011 7:30 am Post subject:
|
|
|
Thanks, Stefan, your explanation makes sense. I would guess that there is little or no overhead for keeping a LiSa hooked up to an adc (directly or indirectly) when it's not recording, or to a dac (directly or indirectly) when it's not playing. It seems to need both in order to record and play, is working ok.
I am trying to merge Scrabble-to-MIDI with my SS2011 approach to processing acoustic instrument samples. For SS2011 I manipulated guitar and banjo samples manually; the pitch shifting parts I did a week ahead of time. For this project I am capturing the instrument samples in LiSa, and sending Scrabble-to-MIDI messages to ChucK to pitch shift the LiSa playback. The audio then goes to Live on distinct audio channels corresponding to the MIDI channels, where I can apply dsp effects. The goal is to do the whole thing live at performance time, including sampling the acoustic instruments and shifting their pitches dynamically.
It may be a bug in how I quantize time in Live, but I find it extremely difficult to get Live looping or clip recording to start and end at the right places for clean looping. With this ChucK patch I generate a click track while recording, and have no problem getting the loop boundaries to line up precisely. Still have a few issues to work out with the patch, should have it working later today.
Thanks for your help. _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
Back to top
|
|
|
|