electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
LiSa and the unchuck operator
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Fri Jun 24, 2011 6:40 pm    Post subject: LiSa and the unchuck operator
Subject description: They seem mutually exclusive.
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Sat Jun 25, 2011 11:06 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Sat Jun 25, 2011 11:13 am    Post subject: Reply with quote  Mark this post and the followings unread

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. Smile

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Sun Jun 26, 2011 7:30 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use