electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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
A simple CSound program converted to ChucK
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
chuckles



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Tue Jun 05, 2007 2:33 pm    Post subject: A simple CSound program converted to ChucK Reply with quote  Mark this post and the followings unread

I took instrument 1706 in chap. 17 of the CSound Book to see how easy it would be to convert to a ChucK program. It plays OK although I don't know how correct my code is. Feel free to criticize or correct.

I used Gen9 to emulate the GEN9 use in the original (builds a table of a quarter of a sine wave to use as a volume map).

CSound uses "reinit" and labels to generate multi notes from a single call in the orc section; in ChucK of course you have loops, shreds and functions.

It's a very simple example which plays a 40 second composition bascially just picking random pitches and durations from some small arrays. Each time I do a project like this I learn something new.

For instance, the ADSR documentation doesn't tell you what the level at the end of the attack segment is. By writing a little test program I know now it's 1.0 (logical I guess but it doesn't say so anywhere that I can find.)

c.


1706.01.ck
 Description:
Ultra basic conversion of orchestra/score instrument 1706 from the CSound book. See the other attached file for the CSound code.

Download
 Filename:  1706.01.ck
 Filesize:  5.93 KB
 Downloaded:  187 Time(s)


1706 notes.txt
 Description:
The .orc and .sco codes that 1706.01.ck is based on.

Download
 Filename:  1706 notes.txt
 Filesize:  10.65 KB
 Downloaded:  162 Time(s)

Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


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

PostPosted: Tue Jun 05, 2007 3:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'll have a more carefull look at this tomorow and get the Csound book out. Sounds like fun!

For now, about that ADSR; that should likely be in the docs. It was probably omitted because it's normal for ADSR's to be "unity gain" (meaning 1) at the top of the attack. I think that all digital modulars I've ever seen use this, likely most analogues as well but there's it's harder to measure and it seems to matter less.

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



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Wed Jun 06, 2007 8:21 am    Post subject: Thanks for the response Reply with quote  Mark this post and the followings unread

I'm getting a large amount of entertainment out of the CSound book. I took all the audio examples and burned them to 6 CDs which I'm listening to in order to steal, I mean borrow, ideas from... In fact I notice that there is an In C version by Boulanger which I need to listen and look at.

Incidentally, this may not be self evident, but the best place to go for CSound forum action is not csounds.com but rather nabble:

http://www.nabble.com/Csound-f480.html

apparently a 5.06 release is in the offing imminently.

I agree that it seems reasonable for the ADSR to go to 1.0 at the end of attack. But I can see that there might be a place for a weird envelope where it goes to some smaller value at the end of the attack seqment, and then move to a higher value at the end of decay... I'm sure this can be done in many other ways.

Best to all
c.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


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

PostPosted: Wed Jun 06, 2007 9:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Did you read the article on "acoustic viability"? That article blew my mind first time I read it and it continues to have a huge unfluence on how I aproach sound design.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chuckles



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Thu Jun 07, 2007 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Do you mean this article?

http://emusician.com/mag/emusic_spectral_vistas/

(Funny typo in your message: I think "unfluence" ought to be a real English word, describing an artist or style that is NOT an influence on your work or whose style you consciously try to do the opposite of.)
...c...
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 [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
e-m mkii

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 through 2009 by electro-music.com - Conditions Of Use