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
Chuck on the Raspberry Pi?
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
eem



Joined: Apr 08, 2010
Posts: 9
Location: France

PostPosted: Wed Dec 19, 2012 12:30 pm    Post subject: Chuck on the Raspberry Pi? Reply with quote  Mark this post and the followings unread

Hi all,

Does anyone ever tried/succeeded to run chuck on a Raspberry Pi? It would be the perfect platform for a cheap monitorless OSC/MIDI chuck station!

Nicolas

_________________
Electronique et Musique blog
Back to top
View user's profile Send private message
eem



Joined: Apr 08, 2010
Posts: 9
Location: France

PostPosted: Mon Dec 24, 2012 5:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

So, here is where I am after some time trying to get Chuck run on the Raspberry Pi.

First thing to do, get chuck:
Quote:
sudo apt-get install chuck


Chuck should install with no problem, but if you try to run it, you would get:
Quote:
chuck test.ck
[chuck]: (via rtaudio): no devices found for compiled audio APIs!
[chuck]: cannot initialize audio device (try using --silent/-s)


So at this point I tried to install and run JACK, but for some reason, I cannot manage to start the server. Instead I get a "bus error", and I still have to work this out.

Meanwhile I noticed a "chuck.alsa" installed along with the regular "chuck". So I tried launching my test.ck with this chuck.alsa, and it worked. Good news!

Later on, I tried a sketch dealing with OSC receiving, and it failed, saying "undefined type 'OSCSend'..." So I still have to investigate a bit.. I will let you know!

Cheers,

Nicolas

_________________
Electronique et Musique blog
Back to top
View user's profile Send private message
MusicMan11712



Joined: Aug 08, 2009
Posts: 1082
Location: Out scouting . . .

PostPosted: Mon Dec 24, 2012 7:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't have one of these and I haven't done anything with chuck in a while, but your efforts to make them work look interesting. I look forward to reading more of your experimentation.
Steve
Back to top
View user's profile Send private message
eem



Joined: Apr 08, 2010
Posts: 9
Location: France

PostPosted: Tue Dec 25, 2012 8:34 am    Post subject: Reply with quote  Mark this post and the followings unread

Ok, chuck v1.3.1.3 is now running on my RPi! Eventually I did not use the binary installed by apt-get. Instead I had to download the sources and compile chuck and other dependencies.

Requirements:
- alsa-lib-1.0.25.tar.bz2: http://www.alsa-project.org/main/forums.html/Download
- libsndfile-1.0.25.tar.gz: http://www.mega-nerd.com/libsndfile/
- chuck-1.3.1.3.tgz: http://chuck.cs.princeton.edu/


Install the ALSA library
On my RPi, chuck compilation failed because of "alsa/asoundlib.h" missing. I realized that whereas ALSA is installed and running properly, the include files are not installed. So I installed alsa-lib:

Code:
tar -xjf alsa-lib-1.0.25.tar.bz2
sudo ./configure
sudo make
sudo make install


Then the /usr/include/alsa directory appeared.

Install libsndfile
Code:
tar -xvf libsndfile-1.0.25.tar.gz
sudo ./configure
sudo make
sudo make install


Install chuck
I followed the instructions given at http://chuck.cs.princeton.edu/doc/build/:
Code:
tar xvzf chuck-1.3.1.3.tgz
cd chuck-1.3.1.3/src/
sudo make linux-alsa


I tested the newly created chuck with some of my sketches, and everything seems to be fine! The performances should be closely monitored though, with quite an high CPU usage.

One last thing, in order to get the sound from the headphone jack output while using the HDMI video:
Code:
sudo amixer cset numid=3 1


Here it is, I hope this will be useful to others!

Nicolas

_________________
Electronique et Musique blog
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Tue Dec 25, 2012 5:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Very cool! Nice bit of research there. Smile
_________________
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
MusicMan11712



Joined: Aug 08, 2009
Posts: 1082
Location: Out scouting . . .

PostPosted: Tue Dec 25, 2012 6:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Congrats!!! Glad to hear you got it working. Nice documentation for others who might want to give it a try.
Steve
Back to top
View user's profile Send private message
witt0191



Joined: Feb 13, 2008
Posts: 23
Location: UK

PostPosted: Sat Dec 29, 2012 5:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

very cool will try this next week

Scott
Back to top
View user's profile Send private message
tony



Joined: Oct 07, 2006
Posts: 21
Location: indonesia
Audio files: 2

PostPosted: Fri Jun 07, 2013 2:19 am    Post subject: not work with usb soundcard external Reply with quote  Mark this post and the followings unread

hi all I following your step its succsessfull , I am try with onboard soundcard it no problem but when using external usb sound card it not work, I got message
Code:

[chuck]: RtApiAlsa::getDeviceInfo: pcm device (hw:1,0) data format not supported by RtAudio.
[chuck]: RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:1,0), Device or resource busy.
[chuck]: RtApiAlsa::getDeviceInfo: pcm device (hw:1,0) data format not supported by RtAudio.
[chuck]: RtApiAlsa::probeDeviceOpen: pcm device (hw:1,0) won't open for input.
[chuck]: cannot initialize audio device (use --silent/-s for non-realtime)

I dont know why, please if you know how to solve this problem, let Me know
thanks[/code]
Back to top
View user's profile Send private message
nightstraveler



Joined: Jul 04, 2014
Posts: 1
Location: Baltimore, MD US

PostPosted: Fri Jul 04, 2014 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

When I try the steps described above I get the following when running
Code:
sudo make
in libsndfile directory
Code:
  CC     chanmap.lo
  CC     id3.lo
  CCLD   libcommon.la
  CCLD   libsndfile.la
GSM610/.libs/libgsm.a: member GSM610/.libs/libgsm.a(table.o) in archive is not an object
collect2: ld returned 1 exit status
make[2]: *** [libsndfile.la] Error 1


anyone else get this or know a way around it?

thanks![/list][/code]
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 [9 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