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 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Faux Pas Quartet and friends Music From Last Thursday
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
Welcome (and how to get started!)
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Kassen
Janitor
Janitor


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

PostPosted: Sun Aug 13, 2006 11:12 am    Post subject:  Welcome (and how to get started!) Reply with quote  Mark this post and the followings unread

Welcome to our new ChucK forum!

ChucK is a relatively young programing language for music, it runs on Mac, Windows and Linux. ChucK's focus is on expressive code with a strong emphasis on reasoning about time and timing.

http://chuck.cs.princeton.edu/

ChucK is relatively easy to get into (one of it's aims is education) and it's relatively compact and easy to read (which is a big advantage in livecoding). ChucK programs get compiled to a virtual machine, more parts of the program can be added at any time while it runs and they can be recompiled and updated while they run as well.

Because of this and because ChucK supports a wide range of input devices (MIDI, OSC, the computer keyboard (make your own hotkeys!) and HID devices like joypads) ChucK is very suitable for quickly trying out new ideas on controll or interface design. It might be worthwhile to learn a little ChucK just to be able to control traditional synths with joypads or algorithms like Markov chains. It might also be worthwhile to learn ChucK just to get a new perspective on time, timing and concurrency in music. Building your own instrument for live or studio use is also very possible.

It's also free and open source so there is nothing to lose.

Right now ChucK is very young so not everything is finished and optimised yet and there are bugs. This comes from it being a ongoing experiment. I encourage everybody to be a part of that experiment and report on what works and what doesn't as well on how it could work better.

So; how do you get started?

The first step would be downloading ChucK and installing it. The latest version can be found here:

http://chuck.cs.princeton.edu/release/

I also recommend joining the mailing lists for announced updates and the list for users in order to hear about the latest developments and for asking questions.

http://chuck.cs.princeton.edu/community/

So; how to get started writing your own programs?
You could start reading the manual But I think it's more fun to start with running some of the example programs that come with your download. If you are unsure about which ones to try I recommend trying the "otf" series of files, Those are a set of files that ca be added to the virtual machine one by one and together they form as simple techno loop. Try and modify and recompile some of the code and see what happens. Where does what aspect of the sound come from?
After that it may be interesting to look at some of the interfaces, maybe you'd like to use a joypad or MIDI controller to interact with those loops.

Once you get going a lot of the manual and the more complicated examples will make a lot more sense.

As you start to write more serious programs you may want a specialised editor. Well, we have two to choose from! First of all there is the Audicle;

http://audicle.cs.princeton.edu/

The Audicle is a specialised developers environment for ChucK, it comes with a build in virtual machine and various ways of representing the contents of the virtual machine and the sound it generates in realtime 3d. It's like a luxury model for those with a bit more experience with ChucK and a graphical card that can keep up.

for more modest needs or minimalists there is the mini Audicle;

http://audicle.cs.princeton.edu/mini/

The mini Audicle is more like a traditional text editor but with ChucK syntax highlighting and a build in virtual machine as well. Graphical interfaces elements like leds and sliders are being developed for it as well.

What way of ChucKing is good for you depends on your personal tastes. It's completely possible to switch between different ways depending on your mood or even use several at the same time. Because the editors are also still in heavy development it's recommended to start out with the command prompt. If you are unsure about how a prompt works with regard to changing directories and so on refer to your OS's manual; you only need a few of the commands and none are very hard.

Happy ChucKing! Do not hesitate to open a thread here if you have questions or would like to share some interesting code. For harder questions it may be best to post to the mailing list. It's not unlikely that you'll chance upon a bug or two. If so report it to Ge (gewang at cs dot princeton dot edu). Because this is a young and experimental language that's in constant development it may happen that you find that the manual is out of date, incomplete or just plain wrong. Since the manual is meant to explain how it all works feedback from new users on where it's unclear is already valuable. We have a Wiki page where you can put all such notes, requests or your own explanations.

Handy tip; when posting code examples to the board (please do, it's fun and sure beats mp3 in both size and sound quality!) make sure to disable HTML in your post or you have the risk of the board getting confused about all the triangular brackets.

_________________
Kassen

Last edited by Kassen on Tue Dec 12, 2006 10:41 am; edited 3 times in total
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 Aug 29, 2006 3:08 pm    Post subject: i vote for chuck Reply with quote  Mark this post and the followings unread

Cool yes yes! i vote for chuck also.
for me, as a newbie.. i'm quite used to working in the terminal/command-prompt
so using chuck executable (on windows & linux) is okay to me.

for new users not familiar with command-line, i recommend miniAudicle
so that you can try chucking really easily
(just edit and Add Shred)

but working in the terminal/command-prompt is pure fun for performance.
using chuck --loop in one terminal
and add, remove, or maybe kill in another terminal
(and chuck --shell so that we don't have to type chuck everytime)
is what i recommend playing also.

let's keep chucking. i'm quite new in the field
but i can see chuck'd be a great language for performance and composition!
i'm gonna be around here to share some new/newbie experiences.
take care all.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
chuckles



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

PostPosted: Mon Jun 23, 2008 3:47 pm    Post subject:  Re: Welcome (and how to get started!) Reply with quote  Mark this post and the followings unread

Kassen wrote:
Welcome to our new ChucK forum!

...It's also free and open source so there is nothing to lose...


Except for countless hours!

Still lovin' it. I'm an instant gratification type and Csound and Psycollider just take too much work to make things happen. In ChucK you can do awesome things in just a line or two (see the thread "One-line ChucK Crazy")
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: Mon Jun 23, 2008 4:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

"countless hours" of "instant gratification" sounds quite ChucKian to me!
:¬)

_________________
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: Wed Mar 18, 2009 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Compiling ChucK & miniAudicle on Fedora 10, Planet CCRMA
(just to note down what was needed to compile and install)


After installing Fedora Core 10 and Planet CCRMA, what I need to do further before compiling ChucK are these:

(as root)

yum install bison flex libsndfile-devel gcc gcc-c++

for alsa:
yum install alsa-lib-devel

for jack:
yum install jack-audio-connection-kit-devel

then in src directory, type make linux-alsa or make linux-jack
(mainly i still haven't compiled for OSS)

i usually install chuck by copying chuck to /usr/bin and chuck for jack as /usr/bin/chuck-jack so i can have both versions in different names.

- - -

for miniAudicle, add this:
yum install wxGTK-devel

then make linux-alsa or make linux-jack
the miniAudicle executable file will be in wxw directory,
as usual, i copy the alsa version to /usr/bin and the jack version as /usr/bin/miniAudicle-jack

- - -

Happy ChucKing on Fedora
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: Sun Nov 01, 2009 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Finally, Ubuntu 9.10 is released, and so did the new version of ChucK (1.2.1.3) and miniAudicle (0.2.0.0). Now we can compile easier, we don't have to hack the source code any more.

Here's the requirements before compiling and installing ChucK and miniAudicle:

* build-essential bison flex
* libsndfile-dev
* libasound-dev (if you're compiling for ALSA)
* libjack-dev (if you're compiling for JACK, but i always prepare both ALSA and JACK version)

For miniAudicle, you also need libwxgtk2.8-dev (in the past, miniAudicle needs version 2.6 not 2.8, now it's ok with version 2.Cool.

Compiling miniAudicle

From the source code folder, use make linux-alsa to compile for ALSA version. The result executable will be miniAudicle in wxw folder. I usually move it to /usr/bin for running it from anywhere easily.

To make for JACK, extract a fresh new miniAudicle source code, then make linux-jack to compile for JACK. This time, I usually move the exectuable and rename to /usr/bin/miniAudicle-jack so I can keep 2 versions alongside.

Compiling ChucK

From the source code's src folder, use make linux-alsa or make linux-jack whether you need ALSA or JACK version, and the result: chuck can be copied to /usr/bin, just like my example above with miniAudicle.

Happy ChucKing on Ubuntu.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Pehr



Joined: Aug 14, 2005
Posts: 1307
Location: Björkvik, Sweden
Audio files: 2

PostPosted: Tue Jan 12, 2010 5:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Tried to install Chuck yesterday, but could not get it to work like it should.

I could run chuck files from cmd and I heard sounds, but I don't understand where the "live programming" takes place, since the cmd-window locks when I run chuck.

Do I execute a ck file and then edit the code i mA to update the ongoing sound? or how does it work?

EDIT: prob since I haven't done the source installation yet, I should mention Rolling Eyes . However the SI is a littel unclear to me, could someone clarify?

_________________
YouTube channel
flickr photostream
http://loxodrom.blogspot.com
http://www.garageband.com/artist/loxodrom
http://soundcloud.com/loxodrom
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 3618
Location: Sweden
Audio files: 254
G2 patch files: 95

PostPosted: Tue Jan 12, 2010 6:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Pehr wrote:
Tried to install Chuck yesterday, but could not get it to work like it should.


Are you running just the miniAudicle, the command line, or both at the same time? I think you use either one or the other. The live feature in ChucK means you can start up a .ck file, then another one, kill the first, add another one and so on. You don't get to, say, add a SinOsc osc => dac on a command line python style. You can also add shreds from inside a ChucK app, using Machine.add().

I'm a command line guy, so I'd do this by first starting the main ChucK process:

Code:
chuck main.ck


This app contains an endless wait loop of some sorts, possible along with some other ChucK code doing whatever. Then I'd add chuck applications like this:

Code:
chuck + shred1.ck
chuck + shred2.ck


I don't do this a lot, so I don't know the syntax for removing these shreds. Here's the part about concurreny in the manual, and there's a link to the on-the-fly commands in there, too:

http://chuck.cs.princeton.edu/doc/language/spork.html

If you're on miniAudicle, I hope someone else can jump in with specifics - I think there's an "Add Shred" button or something similar that you use instead of "chuck + ". Hope that helps.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Pehr



Joined: Aug 14, 2005
Posts: 1307
Location: Björkvik, Sweden
Audio files: 2

PostPosted: Tue Jan 12, 2010 8:27 am    Post subject: Reply with quote  Mark this post and the followings unread

0k, I ran cmd and mA at the same time...

Didn't know what to do in mA Rolling Eyes Laughing
I guess I have to investigate further into this tonight. Twisted Evil

_________________
YouTube channel
flickr photostream
http://loxodrom.blogspot.com
http://www.garageband.com/artist/loxodrom
http://soundcloud.com/loxodrom
Back to top
View user's profile Send private message
Pehr



Joined: Aug 14, 2005
Posts: 1307
Location: Björkvik, Sweden
Audio files: 2

PostPosted: Tue Jan 12, 2010 2:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Source Installation
To build chuck from the source (Windows users: it's possible to build ChucK from both Visual
C++ 6.0 and from cygwin - this section describes the cygwin build):
1. Go to the src/ directory (replace chuck-x.x.x.x with the actual directory name):
Code:
%>cd chuck-x.x.x.x/src/

0k, downloaded cygwin (I thought cmd was enough but 0k). Can't find this directory in cygwin...
2. If you type 'make' here, you should get the following message:
Code:
%>make
[chuck] : please use one of the following con gurations:
make osx, make osx-ub, make win32,
make linux-oss, make linux-alsa, make linux-jack

No,I get "bash:make: command not found"
Now, type the command corresponding to your platform...
for example, for MacOS X (universal binary):
Code:
%>make osx-ub

for example, for MacOS X (current):
Code:
%>make osx

for example, for Windows (under cygwin):
Code:
%>make win32

3. If you would like to install chuck (cp into /usr/bin by default). If you don't like the destination,
edit the make le under `install', or skip this step altogether. (we recommend putting it somewhere
in your path, it makes on-the-
y programming easier)
Code:
# (optional: edit the makefi le fi rst)
%>make install

You may need to have administrator privileges in order to install ChucK. If you have admin access
then you can use the sudo command to install.
I don't really this installation procedure, actually it makes no sence at all to me Razz. Shound it be this hard? I mean I'm not a hacker, but I'm not stupid with computors either Rolling Eyes

_________________
YouTube channel
flickr photostream
http://loxodrom.blogspot.com
http://www.garageband.com/artist/loxodrom
http://soundcloud.com/loxodrom
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 3618
Location: Sweden
Audio files: 254
G2 patch files: 95

PostPosted: Wed Jan 13, 2010 4:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Pehr wrote:
Source Installation
To build chuck from the source (Windows users: it's possible to build ChucK from both Visual


Why do you want to build chuck? Do you want to add or modify the c source code? I think the instructions for building ChucK assume that you have some experience with unix environments (of which cygwin is an imitation). Granted, a more smooth way to set up the source code would be nice.

In cygwin, you can jump to your hard drive by typing something like "cd c:". From there you should be able to go to wherever you put ChucK's source code.

To be able to run "make" (a general purpose build tool in Unix), you need to have installed a cygwin package containing it. In cygwin's setup tool, you should be able to find a category called something like "Developer tools". Select "Install" for that one (and others that feel like they may be development related), and make should be installed so that after a restart of cygwin, you should be able to type make.

BTW, where is the page with those "Source Installation" instructions?

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Pehr



Joined: Aug 14, 2005
Posts: 1307
Location: Björkvik, Sweden
Audio files: 2

PostPosted: Wed Jan 13, 2010 5:01 am    Post subject: Reply with quote  Mark this post and the followings unread

aha, so you don't need the "source" in order to chuck Embarassed
Then I have installed chuck. I just need to learn how to work with mA Laughing

_________________
YouTube channel
flickr photostream
http://loxodrom.blogspot.com
http://www.garageband.com/artist/loxodrom
http://soundcloud.com/loxodrom
Back to top
View user's profile Send private message
apl



Joined: Apr 09, 2011
Posts: 1
Location: Maine

PostPosted: Sat Apr 09, 2011 8:00 pm    Post subject: Hello
Subject description: Indroduction-and help
Reply with quote  Mark this post and the followings unread

Hi,

Just compiled chuck using tinycore linux and alsa(linux-alsa option during make). It seems very interesting, the one problem I am running into is distortion in sound when initiating chuck. I am going through the tutorial, the first time I run a program in the shell it is distorted, I repeat quickley after it sounds cleaner. Any ideas?

Thanks in advance
Andy
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 [13 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
mps board

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