| Author |
Message |
jconnolly

Joined: Mar 06, 2009 Posts: 2 Location: New York, NY
|
Posted: Fri Mar 06, 2009 8:22 am Post subject:
ChucK (linux-alsa) problems starting real-time audio |
 |
|
Hi All,
I've recently come across ChucK and find the project very interesting. I do work for Bug Labs and we're interested in getting it running on the BUG. I've got it cross compiled and running, but it's not working right. I've got it compiled and running on my x86 machine and I've compared the output of:
| Code: | | chuck chirp.ck --verbose |
and
The difference between chuck chirp.ck --verbose on my x86 machine and the BUG is just that
| Code: | | [chuck]:(3:SEVERE): starting real-time audio.. |
occurs in my x86 (working) version, not on the BUG (nonworking).
The differences in --probe don't seem all that disconcerting (nonworking):
| Code: | [chuck]: found 2 device(s) ...
[chuck]: ------( chuck -- dac1 )---------------
[chuck]: device name = "hw:PIM_AUDIO13,0"
[chuck]: probe [success] ...
[chuck]: # output channels = 2
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 2
[chuck]: default device = YES
[chuck]: natively supported data formats:
[chuck]: 16-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]: 88200 Hz
[chuck]: 96000 Hz
[chuck]:
[chuck]: ------( chuck -- dac2 )---------------
[chuck]: device name = "hw:PIM_AUDIO24,0"
[chuck]: probe [success] ...
[chuck]: # output channels = 2
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 2
[chuck]: default device = NO
[chuck]: natively supported data formats:
[chuck]: 16-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]: 88200 Hz
[chuck]: 96000 Hz
[chuck]:
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
[chuck]: RtMidiIn::initialize: error creating ALSA sequencer input client object.
[chuck]:
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
[chuck]: RtMidiOut::initialize: error creating ALSA sequencer client object.
[chuck]: |
Working x86:
| Code: | [chuck]: found 2 device(s) ...
[chuck]: ------( chuck -- dac1 )---------------
[chuck]: device name = "hw:Intel,0"
[chuck]: probe [success] ...
[chuck]: # output channels = 8
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 2
[chuck]: default device = YES
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: 32-bit int
[chuck]: supported sample rates:
[chuck]: 44100 Hz
[chuck]: 48000 Hz
[chuck]: 96000 Hz
[chuck]: 192000 Hz
[chuck]:
[chuck]: ------( chuck -- dac2 )---------------
[chuck]: device name = "hw:Intel,4"
[chuck]: probe [success] ...
[chuck]: # output channels = 0
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 0
[chuck]: default device = NO
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: 32-bit int
[chuck]: supported sample rates:
[chuck]: 44100 Hz
[chuck]: 48000 Hz
[chuck]: 96000 Hz
[chuck]:
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
[chuck]: RtMidiIn::initialize: error creating ALSA sequencer input client object.
[chuck]:
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
[chuck]: RtMidiOut::initialize: error creating ALSA sequencer client object.
[chuck]: |
Any suggestions? I've compiled ChucK 1.2.1.2 for both my x86 and arm11 BUG...
Thanks. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Mar 07, 2009 10:15 am Post subject:
|
 |
|
Hmmmm, so basically the only symptom is "it doesn't work"? I agree with you that the probe looks good. Did you get any errors while compiling for the BUG? It's sometimes possible to create a non-working but running executable if you miss compilation errors for the audio libraries. Did you get other applications that are based on the RTAudio library and using ALSA to work?
This project sounds quite exciting but errors in cross compiling ChucK to ARM micro processors are a bit beyond my expertise *cough*. I suggest you join the ChucK-dev list and as there; both RTAudio's maintainer and Ge (who has managed to port ChucK to the iPhone)are there, they should have a better chance of helping you.
As and aside; I just had a look at your company's page again and this does look quite exciting, I hope we can get to work. _________________ Kassen |
|
|
Back to top
|
|
 |
jconnolly

Joined: Mar 06, 2009 Posts: 2 Location: New York, NY
|
Posted: Sat Mar 07, 2009 10:24 am Post subject:
|
 |
|
| Kassen wrote: | | Did you get other applications that are based on the RTAudio library and using ALSA to work? |
Good idea. looks like rtaudio is in the OpenEmbedded repositories, along with some tests, so I'll start there.
| Quote: | | I suggest you join the ChucK-dev list and as there; both RTAudio's maintainer and Ge (who has managed to port ChucK to the iPhone)are there, they should have a better chance of helping you. |
Thanks I'll try that and update this thread if I get some kind of resolution.
| Quote: | | As and aside; I just had a look at your company's page again and this does look quite exciting, I hope we can get to work. |
Thanks! Yes, I'm looking forward to doing some cool things with audio... stay tuned.  |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Mar 07, 2009 11:07 am Post subject:
|
 |
|
| jconnolly wrote: |
looks like rtaudio is in the OpenEmbedded repositories, along with some tests, so I'll start there. |
That sounds perfect. I think you'll find quite a few FOSS media programs use RTAudio so making sure it works with BUG should be worthwhile.
| Quote: |
Thanks! Yes, I'm looking forward to doing some cool things with audio... stay tuned.  |
I'd be quite curious to hear what kind of performance you could get out of this. _________________ Kassen |
|
|
Back to top
|
|
 |
telaviv

Joined: Apr 15, 2009 Posts: 1 Location: Berkeley
|
Posted: Wed Apr 15, 2009 2:00 am Post subject:
|
 |
|
I have pretty much the same issue except on an x86 computer. I compiled it with the linux-alsa, and it pretty much works except for the fact that i can't hear any sound. The probe is as follows:
| Code: |
[chuck]: found 6 device(s) ...
[chuck]: ------( chuck -- dac1 )---------------
[chuck]: device name = "hw:I82801DBICH4,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]: 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:I82801DBICH4,1"
[chuck]: probe [success] ...
[chuck]: # output channels = 0
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 0
[chuck]: default device = NO
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: supported sample rates:
[chuck]: 48000 Hz
[chuck]:
[chuck]: ------( chuck -- dac3 )---------------
[chuck]: device name = "hw:I82801DBICH4,2"
[chuck]: probe [success] ...
[chuck]: # output channels = 0
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 0
[chuck]: default device = NO
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: supported sample rates:
[chuck]: 48000 Hz
[chuck]:
[chuck]: ------( chuck -- dac4 )---------------
[chuck]: device name = "hw:I82801DBICH4,3"
[chuck]: probe [success] ...
[chuck]: # output channels = 0
[chuck]: # input channels = 2
[chuck]: # duplex Channels = 0
[chuck]: default device = NO
[chuck]: natively supported data formats:
[chuck]: 16-bit int
[chuck]: supported sample rates:
[chuck]: 48000 Hz
[chuck]:
[chuck]: ------( chuck -- dac5 )---------------
[chuck]: device name = "hw:I82801DBICH4,4"
[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]: 48000 Hz
[chuck]:
[chuck]: ------( chuck -- dac6 )---------------
[chuck]: device name = "hw:Modem,0"
[chuck]: probe [failed] ...
[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]:
|
Running chuck --verbose chirp.ck gives me:
| Code: |
[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]:(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): | starting kb loop...
[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): virtual machine stopped...
[chuck]:(5:INFORM): detaching all resources...
[chuck]:(5:INFORM): | (via STK): detaching file handles...
[chuck]:(5:INFORM): | detaching MIDI devices...
[chuck]:(5:INFORM): | shutting down KBHitManager...
[chuck]:(5:INFORM): | shutting down HID...
[chuck]:(2:SYSTEM): shutting down virtual machine...
[chuck]:(2:SYSTEM): | unprotecting special objects...
[chuck]:(2:SYSTEM): | shutting down real-time audio...
[chuck]:(2:SYSTEM): | freeing bbq subsystem...
[chuck]:(2:SYSTEM): | freeing shreduler...
[chuck]:(2:SYSTEM): | freeing msg/reply/event buffers...
[chuck]:(3:SEVERE): | clearing shreds...
[chuck]:(3:SEVERE): | | freeing dumped shreds...
[chuck]:(2:SYSTEM): | freeing special ugens...
[chuck]:(2:SYSTEM): shutting down compiler...
[chuck]:(3:SEVERE): | shutting down type checker...
|
i've tried using the --srate48000 option as well and still nothing. |
|
|
Back to top
|
|
 |
|