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
curvetable issue
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
emil



Joined: Sep 25, 2011
Posts: 2
Location: somewhere

PostPosted: Sun Sep 25, 2011 11:59 am    Post subject: curvetable issue Reply with quote  Mark this post and the followings unread

Dear list,

I have an issue with the curvetable. Hopefully someone can give me hint.

I'm trying to set up a curve with more then 32 timeN / curvaturenN / valueN values.

Everything works fine for less then 32 values, but when I put more then 32, chuck will instantly crash.

Not sure if this is a bug, some undocumented limitations of the curve or I'm making something wrong.

Here is a example:




[/code]
//****************
CurveTable c;

// coeffs are all FLOATS, specifying proportional times, values, and curvature:
// [time0, value0, curvature to next, time1, value1, curvature,..
// timeN-1, valueN-1, curvaturen-1, timeN, valueN]

float cur, val;
0.1=>cur=>val;
// set
[
0.129, val, cur, 0.13, val, cur, 0.131, val, cur, 0.132, val, cur, 0.133, val, cur, 0.134, val, cur, 0.135, val, cur, 0.136, val, cur,
0.137, val, cur, 0.138, val, cur, 0.139, val, cur, 0.14, val, cur, 0.141, val, cur, 0.142, val, cur, 0.143, val, cur, 0.144, val, cur,
0.145, val, cur, 0.146, val, cur, 0.147, val, cur, 0.148, val, cur, 0.149, val, cur, 0.15, val, cur, 0.151, val, cur, 0.152, val, cur,
0.153, val, cur, 0.154, val, cur, 0.155, val, cur, 0.156, val, cur, 0.157, val, cur, 0.158, val, cur, 0.159, val, cur, 0.16, val, cur, // at this point the curve works good

0.161, val, cur, 0.162, val, cur, 0.163, val, cur, 0.164, val, cur, 0.165, val, cur, 0.166, val, cur, 0.167, val, cur, 0.168, val, cur, //if we include more point we get a crash
0.169, val, cur, 0.171, val, cur, 0.172, val, cur, 0.173, val, cur, 0.174, val, cur, 0.175, val, cur, 0.176, val, cur, 0.177, val, cur,
0.178, val, cur, 0.179, val, cur, 0.180, val, cur, 0.180, val, cur, 0.181, val, cur, 0.182, val, cur, 0.183, val, cur, 0.184, val, cur,
0.185, val, cur, 0.186, val, cur, 0.187, val, cur, 0.188, val, cur, 0.189, val, cur, 0.190, val, cur, 0.191, val, cur, 0.192, val
] => c.coefs;

// create an envelope to scan through the table values
Envelope e => blackhole;
e.duration(10000::ms);
0. => e.value;
e.keyOn(); //ramp to 1 in 10 seconds

// patch
Phasor p => c => dac;
// set
440. => p.freq;

// ready
while (true)
{
// print
<<< e.value(), c.lookup(e.value()) >>>;

// end
if(e.value() == 1.) break;

// advance time
10::ms => now;
}
//**************
[/code]
Back to top
View user's profile Send private message
GrandJu



Joined: Jul 04, 2010
Posts: 32
Location: Rennes France

PostPosted: Wed Sep 28, 2011 8:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi emil,

I don't know how curvetable works. That's why I just took a look at the manual.
page 175 section GenX: it is written:"Currently coefficients
past the 100th are ignored."

I think your problem may be linked to that...

Cheers,
Ju
Back to top
View user's profile Send private message
emil



Joined: Sep 25, 2011
Posts: 2
Location: somewhere

PostPosted: Thu Sep 29, 2011 1:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Ju,

thanks for the input.
Your right but in this case whe are only using 63 coefficients. The curve will crash chuck also with 33 coefficients.

Cheers,
Emil
Back to top
View user's profile Send private message
GrandJu



Joined: Jul 04, 2010
Posts: 32
Location: Rennes France

PostPosted: Wed Oct 12, 2011 4:18 am    Post subject: Reply with quote  Mark this post and the followings unread

ok, I certainly mistake about number of parameters and number of coefficient...
Back to top
View user's profile Send private message
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