electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
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 audio and linux alsa
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [7 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
berlinbrown



Joined: Jan 23, 2009
Posts: 4
Location: Atlanta, Ga

PostPosted: Fri Jan 23, 2009 11:00 pm    Post subject: Chuck audio and linux alsa
Subject description: Just compiled chuck 'make linux-alsa' and I can run the apps, no error, but no sound either.
Reply with quote  Mark this post and the followings unread

I am running the examples in the source distro, and every one will not give sound. Can I possibly output to a wav file or other format.

I do the following, no sound.

bbrown@houston:~/src/chuck/chuck-1.2.1.2/examples/stereo$ chuck stereo_noise.ck --verbose
[chuck]Sad2:SYSTEM): setting log level to: 5 (INFORM)...
[chuck]Sad2:SYSTEM): initializing virtual machine...
[chuck]Sad2:SYSTEM): | behavior: HALT
[chuck]Sad2:SYSTEM): | locking down special objects...
[chuck]Sad2:SYSTEM): | allocating shreduler...
[chuck]Sad2:SYSTEM): | allocating messaging buffers...
[chuck]Sad2:SYSTEM): | real-time audio: YES
[chuck]Sad2:SYSTEM): | mode: CALLBACK
[chuck]Sad2:SYSTEM): | sample rate: 48000
[chuck]Sad2:SYSTEM): | buffer size: 512
[chuck]Sad2:SYSTEM): | num buffers: 8
[chuck]Sad2:SYSTEM): | devices adc: 0 dac: 0 (default 0)
[chuck]Sad2:SYSTEM): | channels in: 2 out: 2
[chuck]Sad2:SYSTEM): initializing compiler...
[chuck]Sad3:SEVERE): | initializing type checker...
[chuck]Sad3:SEVERE): | | adding base classes...
[chuck]Sad3:SEVERE): | | | class 'object'
[chuck]Sad3:SEVERE): | | | class 'array'
[chuck]Sad3:SEVERE): | | | class 'string'
[chuck]Sad3:SEVERE): | | | class 'ugen'
[chuck]Sad3:SEVERE): | | | class 'uanablob'
[chuck]Sad3:SEVERE): | | | class 'uana'
[chuck]Sad3:SEVERE): | | | class 'shred'
[chuck]Sad3:SEVERE): | | | class 'event'
[chuck]Sad3:SEVERE): | | | class 'io'
[chuck]Sad3:SEVERE): | | | class 'class'
[chuck]Sad3:SEVERE): | initializing emitter...
[chuck]Sad3:SEVERE): | loading built-in modules...
[chuck]Sad3:SEVERE): | | module osc...
[chuck]Sad3:SEVERE): | | module xxx...
[chuck]Sad3:SEVERE): | | module filter...
[chuck]Sad3:SEVERE): | | module STK...
[chuck]Sad3:SEVERE): | | module xform...
[chuck]Sad3:SEVERE): | | module extract...
[chuck]Sad3:SEVERE): | | class 'machine'...
[chuck]Sad3:SEVERE): | | class 'std'...
[chuck]Sad5:INFORM): | | initializing KBHitManager...
[chuck]Sad5:INFORM): | | starting kb loop...
[chuck]Sad3:SEVERE): | | class 'math'...
[chuck]Sad3:SEVERE): | | class 'opsc'...
[chuck]Sad2:SYSTEM): type dependency resolution: MANUAL
[chuck]Sad2:SYSTEM): initializing synthesis engine...
[chuck]Sad3:SEVERE): | initializing 'dac'...
[chuck]Sad3:SEVERE): | initializing 'adc'...
[chuck]Sad3:SEVERE): | initializing 'blackhole'...
[chuck]Sad2:SYSTEM): | initializing 'real-time' audio...
[chuck]Sad5:INFORM): | | initializing callback...
[chuck]Sad3:SEVERE): | allocating buffers for 512 x 2 samples...
[chuck]Sad3:SEVERE): starting compilation...
[chuck]Sad2:SYSTEM): starting listener on port: 8888...
[chuck]Sad2:SYSTEM): running virtual machine...
[chuck]Sad3:SEVERE): | initializing audio buffers...
[chuck]Sad3:SEVERE): | virtual machine running...
[chuck]Sad3:SEVERE): starting real-time audio...


When running normal audio programs like a music program, it is set to alsa mixer and will play.

Am I doing something wrong.

My system is an intel x86,

Linux houston 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux

Ubuntu Linux (most recent one)
Back to top
View user's profile Send private message
Slinky



Joined: Jan 09, 2009
Posts: 15
Location: Sweden

PostPosted: Sun Jan 25, 2009 3:38 am    Post subject: Re: Chuck audio and linux alsa
Subject description: Just compiled chuck 'make linux-alsa' and I can run the apps, no error, but no sound either.
Reply with quote  Mark this post and the followings unread

berlinbrown wrote:
I am running the examples in the source distro, and every one will not give sound. Can I possibly output to a wav file or other format.

I do the following, no sound.

bbrown@houston:~/src/chuck/chuck-1.2.1.2/examples/stereo$ chuck stereo_noise.ck --verbose


If you wish to output to a wav file, you can find a "rec.ck" from the examples/basic directory of chuck. The command line would be "chuck stereo_noise.ck ../basic/rec.ck:output.wav" in this case. See also rec-auto.ck.

You said in other music programs you get audio, can you check what alsaplayer --verbose says when playing an audio file? I'm thinking perhaps ChucK writes to wrong Alsa device by default.

If Jack works for you, one option might be to try to compile Jack output. That way you get more flexibility for routing the outputs/inputs to various applications.

_________________
"Mortal immortals, immortal mortals, living their death and dying their life."
--Heraclitus, Fragment 62, Hippolytus Ref. Ix, 10,6
Back to top
View user's profile Send private message Visit poster's website
berlinbrown



Joined: Jan 23, 2009
Posts: 4
Location: Atlanta, Ga

PostPosted: Sun Jan 25, 2009 9:50 am    Post subject: Reply with quote  Mark this post and the followings unread

I haven't been able to make much progress. I tried the output to wave and just seemed to hang, not do anything, with the command you gave.

I went back to the regular audio and this is what I get. I haven't able to tell what device I am running with, the alsaplayer didn't print much.

bbrown@houston:~/src/chuck/chuck-1.2.1.2/examples/stereo$ chuck stereo_noise.ck --verbose
[chuck]Sad2:SYSTEM): setting log level to: 5 (INFORM)...
[chuck]Sad2:SYSTEM): initializing virtual machine...
[chuck]Sad2:SYSTEM): | behavior: HALT
[chuck]Sad2:SYSTEM): | locking down special objects...
[chuck]Sad2:SYSTEM): | allocating shreduler...
[chuck]Sad2:SYSTEM): | allocating messaging buffers...
[chuck]Sad2:SYSTEM): | real-time audio: YES
[chuck]Sad2:SYSTEM): | mode: CALLBACK
[chuck]Sad2:SYSTEM): | sample rate: 48000
[chuck]Sad2:SYSTEM): | buffer size: 512
[chuck]Sad2:SYSTEM): | num buffers: 8
[chuck]Sad2:SYSTEM): | devices adc: 0 dac: 0 (default 0)
[chuck]Sad2:SYSTEM): | channels in: 2 out: 2
[chuck]Sad2:SYSTEM): initializing compiler...
[chuck]Sad3:SEVERE): | initializing type checker...
[chuck]Sad3:SEVERE): | | adding base classes...
[chuck]Sad3:SEVERE): | | | class 'object'
[chuck]Sad3:SEVERE): | | | class 'array'
[chuck]Sad3:SEVERE): | | | class 'string'
[chuck]Sad3:SEVERE): | | | class 'ugen'
[chuck]Sad3:SEVERE): | | | class 'uanablob'
[chuck]Sad3:SEVERE): | | | class 'uana'
[chuck]Sad3:SEVERE): | | | class 'shred'
[chuck]Sad3:SEVERE): | | | class 'event'
[chuck]Sad3:SEVERE): | | | class 'io'
[chuck]Sad3:SEVERE): | | | class 'class'
[chuck]Sad3:SEVERE): | initializing emitter...
[chuck]Sad3:SEVERE): | loading built-in modules...
[chuck]Sad3:SEVERE): | | module osc...
[chuck]Sad3:SEVERE): | | module xxx...
[chuck]Sad3:SEVERE): | | module filter...
[chuck]Sad3:SEVERE): | | module STK...
[chuck]Sad3:SEVERE): | | module xform...
[chuck]Sad3:SEVERE): | | module extract...
[chuck]Sad3:SEVERE): | | class 'machine'...
[chuck]Sad3:SEVERE): | | class 'std'...
[chuck]Sad5:INFORM): | | initializing KBHitManager...
[chuck]Sad5:INFORM): | | starting kb loop...
[chuck]Sad3:SEVERE): | | class 'math'...
[chuck]Sad3:SEVERE): | | class 'opsc'...
[chuck]Sad2:SYSTEM): type dependency resolution: MANUAL
[chuck]Sad2:SYSTEM): initializing synthesis engine...
[chuck]Sad3:SEVERE): | initializing 'dac'...
[chuck]Sad3:SEVERE): | initializing 'adc'...
[chuck]Sad3:SEVERE): | initializing 'blackhole'...
[chuck]Sad2:SYSTEM): | initializing 'real-time' audio...
[chuck]Sad5:INFORM): | | initializing callback...
[chuck]Sad3:SEVERE): | allocating buffers for 512 x 2 samples...
[chuck]Sad3:SEVERE): starting compilation...
[chuck]Sad2:SYSTEM): starting listener on port: 8888...
[chuck]Sad2:SYSTEM): running virtual machine...
[chuck]Sad3:SEVERE): | initializing audio buffers...
[chuck]Sad3:SEVERE): | virtual machine running...
[chuck]Sad3:SEVERE): starting real-time audio...
[chuck]Sad2:SYSTEM): RtApiAlsa: callback thread error...
[chuck]Sad5:INFORM): | (RtApiAlsa: audio read error for device (hw:VT82xx,0): Input/output error.)
[chuck]Sad5:INFORM): | closing thread...
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: Sun Jan 25, 2009 10:21 am    Post subject: Reply with quote  Mark this post and the followings unread

Berlin, Could you run "chuck --probe" and post the output here? That should tell us more about how ChucK sees your system with regard to audio in&out (as well as MIDI).

Also; I have no idea of your level of experience with Linux compilation but I should ask as this seems to be a relatively common oversight; could you verify you have the "dev" version of the ALSA library as well as the regular version? For me these are called; "libasound2" and "libasound2-dev" and I run Ubuntu as well. If you lack the "dev" version you'll need to grab that, then recompile ChucK.

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



Joined: Jan 23, 2009
Posts: 4
Location: Atlanta, Ga

PostPosted: Sun Jan 25, 2009 10:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is the output:
bbrown@houston:~/src/chuck/chuck-1.2.1.2/examples/stereo$ chuck --probe
[chuck]: found 2 device(s) ...
[chuck]: ------( chuck -- dac1 )---------------
[chuck]: device name = "hw:VT82xx,0"
[chuck]: probe [success] ...
[chuck]: # output channels = 0
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 0
[chuck]: default device = YES
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: 32-bit int
[chuck]: supported sample rates:
[chuck]: 8000 Hz
[chuck]: 11025 Hz
[chuck]: 16000 Hz
[chuck]: 22050 Hz
[chuck]: 32000 Hz
[chuck]: 44100 Hz
[chuck]: 48000 Hz
[chuck]:
[chuck]: ------( chuck -- dac2 )---------------
[chuck]: device name = "hw:VT82xx,1"
[chuck]: probe [success] ...
[chuck]: # output channels = 2
[chuck]: # input channels = 0
[chuck]: # duplex Channels = 0
[chuck]: default device = NO
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: supported sample rates:
[chuck]: 44100 Hz
[chuck]: 48000 Hz
[chuck]:
[chuck]: ------( chuck -- 1 MIDI inputs )------
[chuck]: [0] : "Midi Through Port-0"
[chuck]:
[chuck]: ------( chuck -- 1 MIDI outputs )-----
[chuck]: [0] : "Midi Through Port-0"
[chuck]:

---------------

I got libsound2-dev, I will recompile again just to make sure


----------------

OK, i tried to change the 'dac' output to device '1', this is the output I get:

bbrown@houston:~/src/chuck/chuck-1.2.1.2/examples/stereo$ chuck --dac1 curly2.ck --verbose
[chuck]Sad2:SYSTEM): setting log level to: 5 (INFORM)...
[chuck]Sad2:SYSTEM): initializing virtual machine...
[chuck]Sad2:SYSTEM): | behavior: HALT
[chuck]Sad2:SYSTEM): | locking down special objects...
[chuck]Sad2:SYSTEM): | allocating shreduler...
[chuck]Sad2:SYSTEM): | allocating messaging buffers...
[chuck]Sad2:SYSTEM): | real-time audio: YES
[chuck]Sad2:SYSTEM): | mode: CALLBACK
[chuck]Sad2:SYSTEM): | sample rate: 48000
[chuck]Sad2:SYSTEM): | buffer size: 512
[chuck]Sad2:SYSTEM): | num buffers: 8
[chuck]Sad2:SYSTEM): | devices adc: 0 dac: 1 (default 0)
[chuck]Sad2:SYSTEM): | channels in: 2 out: 2
[chuck]Sad2:SYSTEM): initializing compiler...
[chuck]Sad3:SEVERE): | initializing type checker...
[chuck]Sad3:SEVERE): | | adding base classes...
[chuck]Sad3:SEVERE): | | | class 'object'
[chuck]Sad3:SEVERE): | | | class 'array'
[chuck]Sad3:SEVERE): | | | class 'string'
[chuck]Sad3:SEVERE): | | | class 'ugen'
[chuck]Sad3:SEVERE): | | | class 'uanablob'
[chuck]Sad3:SEVERE): | | | class 'uana'
[chuck]Sad3:SEVERE): | | | class 'shred'
[chuck]Sad3:SEVERE): | | | class 'event'
[chuck]Sad3:SEVERE): | | | class 'io'
[chuck]Sad3:SEVERE): | | | class 'class'
[chuck]Sad3:SEVERE): | initializing emitter...
[chuck]Sad3:SEVERE): | loading built-in modules...
[chuck]Sad3:SEVERE): | | module osc...
[chuck]Sad3:SEVERE): | | module xxx...
[chuck]Sad3:SEVERE): | | module filter...
[chuck]Sad3:SEVERE): | | module STK...
[chuck]Sad3:SEVERE): | | module xform...
[chuck]Sad3:SEVERE): | | module extract...
[chuck]Sad3:SEVERE): | | class 'machine'...
[chuck]Sad3:SEVERE): | | class 'std'...
[chuck]Sad5:INFORM): | | initializing KBHitManager...
[chuck]Sad5:INFORM): | | starting kb loop...
[chuck]Sad3:SEVERE): | | class 'math'...
[chuck]Sad3:SEVERE): | | class 'opsc'...
[chuck]Sad2:SYSTEM): type dependency resolution: MANUAL
[chuck]Sad2:SYSTEM): initializing synthesis engine...
[chuck]Sad3:SEVERE): | initializing 'dac'...
[chuck]Sad3:SEVERE): | initializing 'adc'...
[chuck]Sad3:SEVERE): | initializing 'blackhole'...
[chuck]Sad2:SYSTEM): | initializing 'real-time' audio...
[chuck]Sad5:INFORM): | | exception caught: '(via rtaudio): no devices found for given stream parameters:
... RtApiAlsa: pcm device (hw:VT82xx,0) won't open: Device or resource busy.
'...
[chuck]Sad5:INFORM): | | trying 0 input 2 output...
[chuck]: (via rtaudio): unable to open specified device(s) with given stream parameters:
... RtApiAlsa: pcm device (hw:VT82xx,0) won't open: Device or resource busy.

[chuck]: cannot initialize audio device (try using --silent/-s)
-----

Seems like it won't detect the device, but other apps work.
Back to top
View user's profile Send private message
Slinky



Joined: Jan 09, 2009
Posts: 15
Location: Sweden

PostPosted: Sun Jan 25, 2009 12:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Berlinbrown, please check that no such programs are running, which could be using the audio system. I know that gives trouble if the program does not want to play nice with others which want to use audio.

E.g. if you're in KDE, quit Amarok and so on.

Also, try -dac2. Maybe you must also specify -adc1 or -adc2.

_________________
"Mortal immortals, immortal mortals, living their death and dying their life."
--Heraclitus, Fragment 62, Hippolytus Ref. Ix, 10,6
Back to top
View user's profile Send private message Visit poster's website
berlinbrown



Joined: Jan 23, 2009
Posts: 4
Location: Atlanta, Ga

PostPosted: Sun Jan 25, 2009 9:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

No dice, I went to the 'ubunut' apt-get install chuck version

And that didn't seem to work either.

I may keep trying though.
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 [7 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
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org