electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks GalleryGallery 
 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
SinOsc Weirdness
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Inventor



Joined: Oct 13, 2007
Posts: 828
Location: Florida, USA
Audio files: 37

PostPosted: Mon Mar 17, 2008 6:03 pm    Post subject: SinOsc Weirdness
Subject description: If you unChucK a SinOsc input, it goes silent
Reply with quote  Mark this post and the followings unread

I noticed a problem with SinOsc's going silent in Synth Lab, so I made the following test code:

Code:
// ChucK up a sinosc and hear the tone
SinOsc s1 => dac;
s1.freq (500);
5::second => now;

// set up a feedback loop and hear the humm
s1 => SinOsc s2 => s1;
s2.freq (1000);
s2.gain (1000);
5::second => now;

// unchuck the feedback and hear *nothing* ?
s2 =< s1;
5::second => now;


I thought when you unChucKed the input to the SinOsc, it would revert to being an ordinary sine wave generator with no input, but apparently this is not the case. This is undesired behavior because one cannot return the SinOsc back to stand-alone operation, once it has been set for modulation.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 409
Location: bangkok, thailand
Audio files: 2

PostPosted: Mon Mar 17, 2008 9:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is my reply:

Code:
// ChucK up a sinosc and hear the tone
SinOsc s1 => dac;
s1.freq (500);
5::second => now;

// set up a feedback loop and hear the humm
s1 => SinOsc s2 => s1;
s2.freq (1000);
s2.gain (1000);
5::second => now;

// unchuck the feedback and hear *nothing* ?
s2 =< s1;

// because SinOsc is originally set the .sync to 0
// that means during the s2 => s1 above, .freq would be set to other values from syncing with s2
<<< s1.freq() >>>;

// how about if we reset the .freq value?
s1.freq(500);

5::second => now;


I guess if you want to avoid the problem,
the .sync = 2 would be a nice default for the oscillators created.
So that chucking around won't make it stop at a different freq but rather add value to the frequency (FM).

Oh.. more idea on FMing,
if we want to do the Phase Modulation easily in modular synth like this,
i recommend using this method:

phasor => WhateverOsc;
and set WhateverOsc.sync(1); // for syncing Phase with the input

then, to set frequency, set at the phasor.freq
to add in Phase Modulation, just chuck another signal into WhateverOsc, it'll just add itself.

I recommend having this feature for modulation also is that some complex FM especially with feedback usually drives the synth out of tune,
if phase modulation is under control, it will not be that out of tune.

But I love all two heheh. .... hmm .. that's all folks.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Inventor



Joined: Oct 13, 2007
Posts: 828
Location: Florida, USA
Audio files: 37

PostPosted: Mon Mar 17, 2008 9:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz, that worked! Thanks for the insight. It seems strange that in my function to ChucK/unChucK I must also set frequencies, but that's OK as long as it works! Now Synth Lab is more stable.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 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
Top Selling Products! CLICK HERE!

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003, 2004, 2005, 2006 and 2007 by electro-music.com