| Author |
Message |
berlinbrown

Joined: Jan 23, 2009 Posts: 4 Location: Atlanta, Ga
|
Posted: 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. |
 |
|
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] 2:SYSTEM): setting log level to: 5 (INFORM)...
[chuck] 2:SYSTEM): initializing virtual machine...
[chuck] 2:SYSTEM): | behavior: HALT
[chuck] 2:SYSTEM): | locking down special objects...
[chuck] 2:SYSTEM): | allocating shreduler...
[chuck] 2:SYSTEM): | allocating messaging buffers...
[chuck] 2:SYSTEM): | real-time audio: YES
[chuck] 2:SYSTEM): | mode: CALLBACK
[chuck] 2:SYSTEM): | sample rate: 48000
[chuck] 2:SYSTEM): | buffer size: 512
[chuck] 2:SYSTEM): | num buffers: 8
[chuck] 2:SYSTEM): | devices adc: 0 dac: 0 (default 0)
[chuck] 2:SYSTEM): | channels in: 2 out: 2
[chuck] 2:SYSTEM): initializing compiler...
[chuck] 3:SEVERE): | initializing type checker...
[chuck] 3:SEVERE): | | adding base classes...
[chuck] 3:SEVERE): | | | class 'object'
[chuck] 3:SEVERE): | | | class 'array'
[chuck] 3:SEVERE): | | | class 'string'
[chuck] 3:SEVERE): | | | class 'ugen'
[chuck] 3:SEVERE): | | | class 'uanablob'
[chuck] 3:SEVERE): | | | class 'uana'
[chuck] 3:SEVERE): | | | class 'shred'
[chuck] 3:SEVERE): | | | class 'event'
[chuck] 3:SEVERE): | | | class 'io'
[chuck] 3:SEVERE): | | | class 'class'
[chuck] 3:SEVERE): | initializing emitter...
[chuck] 3:SEVERE): | loading built-in modules...
[chuck] 3:SEVERE): | | module osc...
[chuck] 3:SEVERE): | | module xxx...
[chuck] 3:SEVERE): | | module filter...
[chuck] 3:SEVERE): | | module STK...
[chuck] 3:SEVERE): | | module xform...
[chuck] 3:SEVERE): | | module extract...
[chuck] 3:SEVERE): | | class 'machine'...
[chuck] 3:SEVERE): | | class 'std'...
[chuck] 5:INFORM): | | initializing KBHitManager...
[chuck] 5:INFORM): | | starting kb loop...
[chuck] 3:SEVERE): | | class 'math'...
[chuck] 3:SEVERE): | | class 'opsc'...
[chuck] 2:SYSTEM): type dependency resolution: MANUAL
[chuck] 2:SYSTEM): initializing synthesis engine...
[chuck] 3:SEVERE): | initializing 'dac'...
[chuck] 3:SEVERE): | initializing 'adc'...
[chuck] 3:SEVERE): | initializing 'blackhole'...
[chuck] 2:SYSTEM): | initializing 'real-time' audio...
[chuck] 5:INFORM): | | initializing callback...
[chuck] 3:SEVERE): | allocating buffers for 512 x 2 samples...
[chuck] 3:SEVERE): starting compilation...
[chuck] 2:SYSTEM): starting listener on port: 8888...
[chuck] 2:SYSTEM): running virtual machine...
[chuck] 3:SEVERE): | initializing audio buffers...
[chuck] 3:SEVERE): | virtual machine running...
[chuck] 3: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
|
|
 |
Slinky

Joined: Jan 09, 2009 Posts: 15 Location: Sweden
|
Posted: 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. |
 |
|
| 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
|
|
 |
berlinbrown

Joined: Jan 23, 2009 Posts: 4 Location: Atlanta, Ga
|
Posted: Sun Jan 25, 2009 9:50 am Post subject:
|
 |
|
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] 2:SYSTEM): setting log level to: 5 (INFORM)...
[chuck] 2:SYSTEM): initializing virtual machine...
[chuck] 2:SYSTEM): | behavior: HALT
[chuck] 2:SYSTEM): | locking down special objects...
[chuck] 2:SYSTEM): | allocating shreduler...
[chuck] 2:SYSTEM): | allocating messaging buffers...
[chuck] 2:SYSTEM): | real-time audio: YES
[chuck] 2:SYSTEM): | mode: CALLBACK
[chuck] 2:SYSTEM): | sample rate: 48000
[chuck] 2:SYSTEM): | buffer size: 512
[chuck] 2:SYSTEM): | num buffers: 8
[chuck] 2:SYSTEM): | devices adc: 0 dac: 0 (default 0)
[chuck] 2:SYSTEM): | channels in: 2 out: 2
[chuck] 2:SYSTEM): initializing compiler...
[chuck] 3:SEVERE): | initializing type checker...
[chuck] 3:SEVERE): | | adding base classes...
[chuck] 3:SEVERE): | | | class 'object'
[chuck] 3:SEVERE): | | | class 'array'
[chuck] 3:SEVERE): | | | class 'string'
[chuck] 3:SEVERE): | | | class 'ugen'
[chuck] 3:SEVERE): | | | class 'uanablob'
[chuck] 3:SEVERE): | | | class 'uana'
[chuck] 3:SEVERE): | | | class 'shred'
[chuck] 3:SEVERE): | | | class 'event'
[chuck] 3:SEVERE): | | | class 'io'
[chuck] 3:SEVERE): | | | class 'class'
[chuck] 3:SEVERE): | initializing emitter...
[chuck] 3:SEVERE): | loading built-in modules...
[chuck] 3:SEVERE): | | module osc...
[chuck] 3:SEVERE): | | module xxx...
[chuck] 3:SEVERE): | | module filter...
[chuck] 3:SEVERE): | | module STK...
[chuck] 3:SEVERE): | | module xform...
[chuck] 3:SEVERE): | | module extract...
[chuck] 3:SEVERE): | | class 'machine'...
[chuck] 3:SEVERE): | | class 'std'...
[chuck] 5:INFORM): | | initializing KBHitManager...
[chuck] 5:INFORM): | | starting kb loop...
[chuck] 3:SEVERE): | | class 'math'...
[chuck] 3:SEVERE): | | class 'opsc'...
[chuck] 2:SYSTEM): type dependency resolution: MANUAL
[chuck] 2:SYSTEM): initializing synthesis engine...
[chuck] 3:SEVERE): | initializing 'dac'...
[chuck] 3:SEVERE): | initializing 'adc'...
[chuck] 3:SEVERE): | initializing 'blackhole'...
[chuck] 2:SYSTEM): | initializing 'real-time' audio...
[chuck] 5:INFORM): | | initializing callback...
[chuck] 3:SEVERE): | allocating buffers for 512 x 2 samples...
[chuck] 3:SEVERE): starting compilation...
[chuck] 2:SYSTEM): starting listener on port: 8888...
[chuck] 2:SYSTEM): running virtual machine...
[chuck] 3:SEVERE): | initializing audio buffers...
[chuck] 3:SEVERE): | virtual machine running...
[chuck] 3:SEVERE): starting real-time audio...
[chuck] 2:SYSTEM): RtApiAlsa: callback thread error...
[chuck] 5:INFORM): | (RtApiAlsa: audio read error for device (hw:VT82xx,0): Input/output error.)
[chuck] 5:INFORM): | closing thread... |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Jan 25, 2009 10:21 am Post subject:
|
 |
|
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
|
|
 |
berlinbrown

Joined: Jan 23, 2009 Posts: 4 Location: Atlanta, Ga
|
Posted: Sun Jan 25, 2009 10:27 am Post subject:
|
 |
|
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] 2:SYSTEM): setting log level to: 5 (INFORM)...
[chuck] 2:SYSTEM): initializing virtual machine...
[chuck] 2:SYSTEM): | behavior: HALT
[chuck] 2:SYSTEM): | locking down special objects...
[chuck] 2:SYSTEM): | allocating shreduler...
[chuck] 2:SYSTEM): | allocating messaging buffers...
[chuck] 2:SYSTEM): | real-time audio: YES
[chuck] 2:SYSTEM): | mode: CALLBACK
[chuck] 2:SYSTEM): | sample rate: 48000
[chuck] 2:SYSTEM): | buffer size: 512
[chuck] 2:SYSTEM): | num buffers: 8
[chuck] 2:SYSTEM): | devices adc: 0 dac: 1 (default 0)
[chuck] 2:SYSTEM): | channels in: 2 out: 2
[chuck] 2:SYSTEM): initializing compiler...
[chuck] 3:SEVERE): | initializing type checker...
[chuck] 3:SEVERE): | | adding base classes...
[chuck] 3:SEVERE): | | | class 'object'
[chuck] 3:SEVERE): | | | class 'array'
[chuck] 3:SEVERE): | | | class 'string'
[chuck] 3:SEVERE): | | | class 'ugen'
[chuck] 3:SEVERE): | | | class 'uanablob'
[chuck] 3:SEVERE): | | | class 'uana'
[chuck] 3:SEVERE): | | | class 'shred'
[chuck] 3:SEVERE): | | | class 'event'
[chuck] 3:SEVERE): | | | class 'io'
[chuck] 3:SEVERE): | | | class 'class'
[chuck] 3:SEVERE): | initializing emitter...
[chuck] 3:SEVERE): | loading built-in modules...
[chuck] 3:SEVERE): | | module osc...
[chuck] 3:SEVERE): | | module xxx...
[chuck] 3:SEVERE): | | module filter...
[chuck] 3:SEVERE): | | module STK...
[chuck] 3:SEVERE): | | module xform...
[chuck] 3:SEVERE): | | module extract...
[chuck] 3:SEVERE): | | class 'machine'...
[chuck] 3:SEVERE): | | class 'std'...
[chuck] 5:INFORM): | | initializing KBHitManager...
[chuck] 5:INFORM): | | starting kb loop...
[chuck] 3:SEVERE): | | class 'math'...
[chuck] 3:SEVERE): | | class 'opsc'...
[chuck] 2:SYSTEM): type dependency resolution: MANUAL
[chuck] 2:SYSTEM): initializing synthesis engine...
[chuck] 3:SEVERE): | initializing 'dac'...
[chuck] 3:SEVERE): | initializing 'adc'...
[chuck] 3:SEVERE): | initializing 'blackhole'...
[chuck] 2:SYSTEM): | initializing 'real-time' audio...
[chuck] 5: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] 5: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
|
|
 |
Slinky

Joined: Jan 09, 2009 Posts: 15 Location: Sweden
|
Posted: Sun Jan 25, 2009 12:07 pm Post subject:
|
 |
|
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
|
|
 |
berlinbrown

Joined: Jan 23, 2009 Posts: 4 Location: Atlanta, Ga
|
Posted: Sun Jan 25, 2009 9:27 pm Post subject:
|
 |
|
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
|
|
 |
|