[Csnd] Is audio hw for audio output a must, a compulsory requirement, in order to use csound?
| Date | 2019-09-09 17:37 |
| From | Marco Ippolito |
| Subject | [Csnd] Is audio hw for audio output a must, a compulsory requirement, in order to use csound? |
Trying to understand the CSound Cpp API examples: https://github.com/csound/csoundAPI_examples/tree/master/cpp
While in a laptop with Ubuntu 18.04.02. Desktop
(base) marco@marco-U36SG:~/csoundCppAPIexamples$ g++ -std=c++17 -DUSE_DOUBLE -I /usr/include/csound -L /usr/lib/csound GetStringChannelExample.cpp -lcsound64 -lcsnd6 -o GetStringChannelExample
(base) marco@marco-U36SG:~/csoundCppAPIexamples$ ./GetStringChannelExample
0dBFS level = 32768.0
--Csound version 6.10 (double samples) 2018-01-27
[commit: none]
libsndfile-1.0.28
UnifiedCSD: test2.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
Elapsed time at end of orchestra compile: real: 0.004s, CPU: 0.004s
sorting score ...
... done
Elapsed time at end of score sort: real: 0.004s, CPU: 0.004s
graphics suppressed, ascii substituted
0dBFS level = 1.0
orch now loaded
audio buffered in 256 sample-frame blocks
ALSA output: total buffer size: 1024, period size: 256
writing 512 sample blks of 64-bit floats to dac:hw:0,0
SECTION 1:
Csound is already started, call csoundReset()
before starting again.
new alloc for instr 1:
number("0") number("4") number("9") number("13") number("18") number("23") number("27") number("32") number("36") number("41") number("45") number("50") number("54") number("59") number("64") number("68")
....
.. 2.000 T 2.000 TT 2.000 M: 0.00000 0.00000
Score finished in csoundPerformKsmps() with 2.
inactive allocs returned to freespace
end of score. overall amps: 0.00000 0.00000
overall samples out of range: 0 0
0 errors in performance
Elapsed time at end of performance: real: 2.183s, CPU: 0.056s
345 512 sample blks of 64-bit floats written to dac:hw:0,0
"-284") number("-280") number("-276") number("-272") number("-267") number("-263") number("-258") number("-254") number("-249") number("-245") number("-241") number("-236") number("-232") number("-227") number("-223") number("-218") number("-214") number("-209") number("-205") number("-201") number("-196") number("-192") number("-187") number("-183") number("-178") number("-174") number("-169") number("-165") number("-160") number("-156") number("-151") number("-147") number("-142") number("-138") number("-133") number("-128") number("-124") number("-120") number("-115") number("-111") number("-106") number("-101") number("-97") number("-92") number("-88") number("-83") number("-79") number("-74") number("-70") number("-65") number("-61") number("-56") number("-51") number("-47") number("-42") number("-38") number("-33") number("-29") number("-24") number("-20") number("-15") number("-10") number("-6") (base)
If I execute it in a PC with Ubuntu 18.04.02 Server Edition:
g++ -std=c++17 -DUSE_DOUBLE -I /usr/include/csound -L /usr/lib/csound GetStringChannelExample.cpp -lcsound64 -lcsnd6 -o GetStringChannelExample
./GetStringChannelExample
0dBFS level = 32768.0
--Csound version 6.10 (double samples) 2018-01-27
[commit: none]
libsndfile-1.0.28
UnifiedCSD: test2.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
Elapsed time at end of orchestra compile: real: 0.002s, CPU: 0.002s
sorting score ...
... done
Elapsed time at end of score sort: real: 0.002s, CPU: 0.002s
graphics suppressed, ascii substituted
0dBFS level = 1.0
orch now loaded
audio buffered in 256 sample-frame blocks
ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
*** Cannot open device 'hw:0,0' for audio output: No such file or directory
Failed to initialise real time audio output
Csound is already started, call csoundReset()
before starting again.
new alloc for instr 1:
backtrace() returned 9 addresses
/usr/lib/libcsound64.so.6.0(+0x3f7e3) [0x7fceafb877e3]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7fceaf1f4f20]
/usr/lib/libcsound64.so.6.0(+0x71e40) [0x7fceafbb9e40]
/usr/lib/libcsound64.so.6.0(+0x416fb) [0x7fceafb896fb]
/usr/lib/libcsound64.so.6.0(csoundPerformKsmps+0x4e) [0x7fceafb8af2e]
./GetStringChannelExample(+0x5636) [0x56548943d636]
./GetStringChannelExample(+0x49be) [0x56548943c9be]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fceaf1d7b97]
./GetStringChannelExample(+0x482a) [0x56548943c82a]
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score. overall amps:1223429016165112858709840092334586502756894325677469770853880705287987293493815397855487815700990809631356585639191110216110140235418537698854959046347356708472482085140370050813159068867604191355490806957786149779005869190076417255236965723497859944048178126009727411987714460960686080.000002086400331197168445674989881145629829133011378587025929850678587391343008167314831564856819746931111408068005119143573081941611585480481990818872063564516595465618723177842580741077513073439668761458655670087951673295789201662422633295693314907520127730060262239796785043381070221355473843519488.00000
overall samples out of range: 1371 1319
1 errors in performance
Elapsed time at end of performance: real: 0.255s, CPU: 0.003s
What does it mean? Is audio hw for audio output a must, a compulsory requirement, in order to use csound?
How can the problem be solved?
Marco
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2019-09-09 18:08 |
| From | Forrest Curo |
| Subject | Re: [Csnd] Is audio hw for audio output a must, a compulsory requirement, in order to use csound? |
You need to find out how to point csound to your laptop's internal audio hardware. 'hw:0,0' either isn't the right address -- or has already been claimed by some audio program other than csound. aplay -l and aplay -L should tell you what working audio your laptop already contains. Forrest Curo San Diego On Mon, Sep 9, 2019 at 9:37 AM Marco Ippolito <ippolito.marco@gmail.com> wrote: Trying to understand the CSound Cpp API examples: https://github.com/csound/csoundAPI_examples/tree/master/cpp |
| Date | 2019-09-09 19:31 |
| From | Justin Smith |
| Subject | Re: [Csnd] Is audio hw for audio output a must, a compulsory requirement, in order to use csound? |
csound doesn't require audio hardware, and if you don't provide the "-o dac" flag (or equivalents) it will simply output to a file as fast as it can produce the data On Mon, Sep 9, 2019 at 10:08 AM Forrest Curo |
| Date | 2019-09-09 20:03 |
| From | Pete Goodeve |
| Subject | Re: [Csnd] Is audio hw for audio output a must, a compulsory requirement, in order to use csound? |
| Attachments | None |