electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
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
Buzzing feeedback
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
jam93



Joined: Feb 28, 2008
Posts: 4
Location: LA

PostPosted: Thu Feb 28, 2008 3:05 am    Post subject: Buzzing feeedback Reply with quote  Mark this post and the followings unread

Hello,

When I try to load 3 files i get a feedback click buzz? I also get the same pollution when i do two files and add delay to one? Is it a problem with my computer or the code itself?
Back to top
View user's profile Send private message
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Thu Feb 28, 2008 4:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Can you post the code that causes this. It's hard to guess what the problem is if you don't have the source at hand.
_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
jam93



Joined: Feb 28, 2008
Posts: 4
Location: LA

PostPosted: Thu Feb 28, 2008 4:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// patch
SawOsc s => Gain k => dac;


// feedback
k => Gain feedback => DelayL delay => k;

// set delay parameters
.75::second => delay.max => delay.delay;
// set feedback
.5 => feedback.gain;
// set effects mix
.75 => delay.gain;


  // initialize float variable
      440 => float a;
      659 => float e;
      392 => float g;
      561 => float cs;
      220 => float al;

     0 => float v;
     0 => float swap;

      while( true ) {
          0.01::ms => now;

          Std.rand2f(1.0, 20.0) => v;

          v%5 => swap;



   if(swap == 0){g=>s.freq;}
   if(swap == 1){e=>s.freq;}
   if(swap == 2){cs=>s.freq;}
   if(swap == 3){al=>s.freq;}
   if(swap == 4){a=>s.freq;}
 
}
 60=>s.freq;

when I run two instances of this[/code]
Back to top
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Thu Feb 28, 2008 4:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ahhh!! is it digital clipping? (too much overall amplitude at dac)
(maybe the overall dac value goes beyond the range -1 to 1)
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
jam93



Joined: Feb 28, 2008
Posts: 4
Location: LA

PostPosted: Fri Feb 29, 2008 1:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

are the different instances of a program additive. does the signal from two SinOsc from two programs add in processing?
Back to top
View user's profile Send private message
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Fri Feb 29, 2008 1:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes. All the signals are summed to the output. The file can be the same. Then there just will be many such shreds.
_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
jam93



Joined: Feb 28, 2008
Posts: 4
Location: LA

PostPosted: Fri Feb 29, 2008 3:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

How can I prevent the digital clipping If I lower the gain I can make two instances work but three do not even if I turn down the gain by 5 orders of magnitude.
Back to top
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Fri Feb 29, 2008 4:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think we should have a way to perform "limiting" on dac's own gain value!
If we can have a shred running forever and doing that job, it'd be cool.

Or how can we integrate Dyno's limiter into the system?

my idea is this:
dac => Dyno limiter => blackhole;
limiter.limit();
limiter.gain(.95); // just in case it jumps that fast

then, each sample, perform a not-too-complex comparison of dac.last() and limiter.last()
maybe something that involve dividing them..
and using the outcome to modifie dac.gain in real-time?

hmm.. i'll come back to read about this later.
i still don't have time to experiment with it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Fri Feb 29, 2008 7:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, I haven't seen a self-regulating gain block, but it sure would be useful. Such as:

Code:

if (i'm clipping) {
    lower my gain;
}


Could do this with FullRect => LPF and a shred setting gain value based on LPF output, perhaps?
Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Fri Feb 29, 2008 7:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

I tested the provided code, thanks jam93, in the Mac miniAudicle and even the first instance was horribly noisy. I think you have some feedback issues, though I didn't follow your code exactly. Adding more shreds just makes the feedback worse, and yes, the first two sound alike. I'd say look at the feedback to see if it isn't too strong.
Back to top
View user's profile Send private message Send e-mail
moudi



Joined: Oct 07, 2006
Posts: 63
Location: Bern Switzerland

PostPosted: Sun Mar 02, 2008 6:44 am    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz wrote:
I think we should have a way to perform "limiting" on dac's own gain value!
If we can have a shred running forever and doing that job, it'd be cool.

we had something similar a while ago:
http://electro-music.com/forum/topic-22832.html
it just explains how to use public ugens...

jassas
\moudi
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 [11 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
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org