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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
  host / artist show at your time
today> Modulator ESP Adventures In Sound
 Forum index » DIY Hardware and Software » ChucK programming language
Two-Line ChucK Crazy
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
kijjaz



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

PostPosted: Tue Oct 02, 2007 12:01 pm    Post subject: Two-Line ChucK Crazy
Subject description: two lines of codes with analysis features
Reply with quote  Mark this post and the followings unread

Very Happy here i come again..
let's make some two-line chuck crazies with those new UAna capabilities.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
kijjaz



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

PostPosted: Wed Oct 03, 2007 12:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

I still can't produce any usable codes with UAna(s) in two lines..
I'm still lost in the documents hahaha...

this is a big challenge for me. Shocked
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


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

PostPosted: Wed Oct 03, 2007 4:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

80 characters per line max, right?
Code:

IFFT i=>dac;complex c[512];int A;
while(1){#(++A%.33,A%1.65)=>c[A%512]; i.transform(c);1024::samp=>now;}


Note really Uana as no real analysis takes place so I'm not sure this is within the rules but I like it (warning, nasty!)

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



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

PostPosted: Thu Oct 04, 2007 1:59 am    Post subject: Reply with quote  Mark this post and the followings unread

woww..... ahahhaha this is it ^_^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


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

PostPosted: Thu Oct 04, 2007 3:45 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
dac=>FFT f =^ IFFT i=>dac;Shakers s => dac;.98 => dac.gain;4=>s.preset;
while(i.size()::samp=>now){i.upchuck();(maybe*maybe*maybe)=>s.noteOn;}


A lot more friendly then my last one. Abusing the loop as a resonator.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



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

PostPosted: Sun Oct 07, 2007 1:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// Economical Fried Egg
Noise a => FFT b =^ IFFT c => dac; 2 => b.size => c.size;
while(1) c.upchuck(), (1 + a.last())::ms * 40 => now;


added some modification for use with SinOsc:

Code:
// (another) Intergalactic Soundcheck
SinOsc a => FFT b =^ IFFT c => dac; b.size(c.size(5)); a.freq(.01);
while(1) c.upchuck(), (1.1 + a.last())::ms * .1 => now;
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


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

PostPosted: Mon Oct 08, 2007 4:27 am    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz wrote:
// (another) Intergalactic Soundcheck


Cool! I like how it gets "almost stuck" then starts again.


documentation wrote:

//(note: do not use the returned array for anything
// other than reading/setting windows in FFT/IFFT).


Why not?

Code:
// Step s => PoleZero p => dac;.99 => p.blockZero; int A;
// while(4::samp => now) Windowing.hann(64)[++A%64] => s.next;


or, in one line if you don't care about the DC offset;
Code:

Step s => dac;int A;while(4::samp => now) Windowing.hann(64)[++A%64] => s.next;


Quite perverse and stupid but it works.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



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

PostPosted: Tue Nov 27, 2007 10:25 am    Post subject: Reply with quote  Mark this post and the followings unread

i've just had time to experiment more with fft, ifft
here's my latest attempts. thanks for playing with them ^_^

Code:
SqrOsc s => FFT a =^ IFFT b => dac => a; int i;
while(true) { b.upchuck(); a.size(b.size(i + 2))::samp => now; i++; }


Code:
Noise s => FFT a =^ IFFT b => dac => a; 1 => int i;
while(true) { b.upchuck(); a.size(b.size(i % 1000 + 100))::samp => now; 13 +=> i; }
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [8 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