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
GenX
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Frostburn



Joined: Dec 12, 2007
Posts: 212
Location: Finland
Audio files: 7

PostPosted: Sat Feb 16, 2008 9:48 am    Post subject: GenX
Subject description: what are these things?
Reply with quote  Mark this post and the followings unread

They seem to be a class of waveshapers but I couldn't find any clear documentation on how they actually work...

I did manage to pull off a pitch to frequency waveshaper though:
Code:
Gen5 midi_to_freq;
[Std.mtof(0.0)/Std.mtof(128.0),1.0,1.0] => midi_to_freq.coefs;
Std.mtof(128.0) => midi_to_freq.gain;
Step pitch => midi_to_freq => SinOsc s => dac;
0 => s.sync;
1.0/128.0 => pitch.gain; //Keep the signal between 0.0 and 1.0
60.0 => pitch.next; //Play midi note 60
second => now;
s =< dac;
second => now;
SinOsc s2 => dac;
Std.mtof(60.0) => s2.freq;
second => now;

_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 6248
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sun Feb 17, 2008 11:08 am    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I have the same issue. They look great but it's not so clear what they do, how and why.

I think Dan has said he'd document those and LiSa properly but like all of the official DEV's he seems to be a busy man....

I didn't spend a lot of time with the Gen's yet, my ChucK experiments have been more about namespace issues lately.

_________________
while(!machine.crash() ) <<<"all is well">>>;
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



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

PostPosted: Sun Feb 17, 2008 9:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm.. I've tried a little bit with GEN.
I was using it as
- waveshaper .. like f(input) that kinda thing. but with input range limited to 0 to 1
- oscillator .. i guess there is this kind of thing in the examples.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Frostburn



Joined: Dec 12, 2007
Posts: 212
Location: Finland
Audio files: 7

PostPosted: Mon Feb 18, 2008 2:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Here's a bit hackish hard limiter using Gen7:
Code:
class Clipper{ //Works in [-100.0,100.0] range and clips to [-1.0,1.0] range
    Gain in => Gen7 clipper => Gain out; 0.01 => in.gain;
    [-1.0,0.49,-1.0,0.02,1.0,0.49,1.0] => clipper.coefs;
    Step half => clipper; 0.5 => half.next;
   
    fun void set_range(float min, float max){
        [min,0.5+min*0.01,min,(max-min)*0.01,max,0.5-max*0.01,max] => clipper.coefs;
    }
}

_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 6248
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Feb 18, 2008 2:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Looked at them some more.... CrurveTable looks good for waveshaping/ waveform generation. The real fun will start with modulating the coefs.... which will glitch.... Unless we run the controlling shred at the same speed as the controlling Phasor to make sure it only updates at the exact moments of zero-crossings. :¬)

Tricky, maybe, but I think it'll work.

_________________
while(!machine.crash() ) <<<"all is well">>>;
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 [5 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

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