Author |
Message |
chuckles
Joined: Apr 02, 2007 Posts: 72 Location: San Diego, California
|
Posted: Tue Jun 05, 2007 2:33 pm Post subject:
A simple CSound program converted to ChucK |
 |
|
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.
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: |
309 Time(s) |
Description: |
The .orc and .sco codes that 1706.01.ck is based on. |
|
 Download |
Filename: |
1706 notes.txt |
Filesize: |
10.65 KB |
Downloaded: |
279 Time(s) |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Jun 05, 2007 3:47 pm Post subject:
|
 |
|
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
|
|
 |
chuckles
Joined: Apr 02, 2007 Posts: 72 Location: San Diego, California
|
Posted: Wed Jun 06, 2007 8:21 am Post subject:
Thanks for the response |
 |
|
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
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Wed Jun 06, 2007 9:02 am Post subject:
|
 |
|
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
|
|
 |
chuckles
Joined: Apr 02, 2007 Posts: 72 Location: San Diego, California
|
Posted: Thu Jun 07, 2007 8:48 am Post subject:
|
 |
|
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
|
|
 |
|