Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Re: Csound on Embedded Linux (BeagleBone)

Date2012-11-05 19:14
Fromjohn ffitch
SubjectRe: [Csnd] Re: Csound on Embedded Linux (BeagleBone)
> This makes sense but I'm afraid I have no idea what to do about it. Any
> suggestions?
> 
> Trev

I would start by locating the place in InOut/libsnd.c and adding lots
of print statements to find the values.  If I was on a serious
computer I would use gdb with breakpoints.

==John ffitch

Date2012-11-09 04:18
FromWilliam Wignall
SubjectRe: [Csnd] Re: Csound on Embedded Linux (BeagleBone)
Hello John and Others,

I don't think I am skilled enough to go in and edit C code. But here's more information that may shed more light on my situation.


When I run a CSD:

beaglebone:~$ csound hello.csd
time resolution is 1000.000 ns
Csound version 5.18.02 beta (float samples) Nov  4 2012
UnifiedCSD: hello.csd
Creating options
Creating orchestra
Creating score
Parsing successful!
Elapsed time at end of orchestra compile: real: 0.034s, CPU: 0.030s
Sorting score
Elapsed time at end of score sort: real: 0.042s, CPU: 0.030s
graphics not supported on this terminal, ascii substituted
0dBFS level = 32768.0
orch now loaded
audio buffered in 256 sample-frame blocks
sfinit: cannot open (null)
inactive allocs returned to freespace
end of score.              overall amps:      0.0
           overall samples out of range:        0
1 errors in performance
Elapsed time at end of performance: real: 0.051s, CPU: 0.040s
beaglebone:~$


the CSD is here:

beaglebone:~$ ls
bison  csound  flex  hello.csd  hello.wav  libsndfile  scons  work


the csound folder has the tar.gz, the extracted folder, and the materials to build it from sources.
Csound will write a file, in this case, hello.wav. However this file is 0kb.


I'm not familiar enough with Linux to know how to manipulate permissions, but I can check them:

beaglebone:~$ ls -l
total 28
drwxrwxrwx 3 trev trev 4096 Jun 18  2012 bison
drwxrwxrwx 4 trev trev 4096 Nov  5  2012 csound
drwxrwxrwx 3 trev trev 4096 Nov  4  2012 flex
-rwxrwxrwx 1 trev trev  229 Jun 18  2012 hello.csd
-rwxrwxrwx 1 trev trev    0 Jun 18  2012 hello.wav
drwxrwxrwx 3 root root 4096 Jun 18  2012 libsndfile
drwxrwxrwx 3 root root 4096 Nov  3  2012 scons
drwxrwxrwx 4 root root 4096 Nov  3  2012 work
beaglebone:~$


ALSA

beaglebone:~$ aplay hello.wav
ALSA lib conf.c:3700:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:682: audio open error: No such file or directory

beaglebone:~$ aplay -l
aplay: device_list:252: no soundcards found...

beaglebone:~$ aplay --version
aplay: version 1.0.25 by Jaroslav Kysela <perex@perex.cz>
beaglebone:~$



Speaker Test
Did this to check output. I don't need speakers because I can listen to the file by transferring it to my Mac.


beaglebone:/home/trev# speaker-test

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
Playback open error: -2,No such file or directory
beaglebone:/home/trev#


So the big thing that crosses my mind is the absence of a sound card. But is a sound card really required to just write to the disk? That's all I want to do for now. I've tried running Csound with the -o, -W, -A, -h, and -f flags and they still produce the same error.  Is there anything additional concerning ALSA that I need (besides a sound card if I really do need that)?


I hope this information helps.


Trev





On Mon, Nov 5, 2012 at 2:14 PM, john ffitch <jpff@codemist.co.uk> wrote:
> This makes sense but I'm afraid I have no idea what to do about it. Any
> suggestions?
>
> Trev

I would start by locating the place in InOut/libsnd.c and adding lots
of print statements to find the values.  If I was on a serious
computer I would use gdb with breakpoints.

==John ffitch


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"