Csound Csound-dev Csound-tekno Search About

No sound output when playing back samples

Date2015-04-19 18:57
FromBeinan Li
SubjectNo sound output when playing back samples
AttachmentsNone  None  
Hi Csound,

Fairly new to Csound, I tried to put together a sample code from the book Cound Power by Jim Aikin, to play a sample using the table system.

The book says that we need to feed the f-table the number of samples and adds a minus sign to it if it's not 2^n samples long, so I inspected the file using Audacity and below is my complete code. The instrument definition code was taken from the book itself. In the end I hear nothing after running the code. The code and the output log are given below.

Note that even though I did not give the RAWWAVE_PATH environment variable. The wave file used here (mono) is placed under the same folder as the code. And I've made it work with another granular synth code under the same folder.

Something tells me that the f-table (giSample) failed to get loaded, but I'm not sure.
I'd appreciate it if anyone can see where it went wrong, or share tips about debugging Csound.

I'm on Mac OS X 10.10 with Csound 6.03.2.

Code: 

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 10
nchnls = 1
0dbfs = 1

giSample ftgen 0, 0, -24187, 1, "grain.wav", 0, 0, 0

instr 1
iamp = p4
ilen tableng giSample
p3 = ilen/sr

aphas phasor 1/p3
aphas = aphas * ilen
asig table aphas, giSample
asig = asig * iamp

outs asig, asig
endin

</CsInstruments>
<CsScore>

</CsScore>
</CsoundSynthesizer>

EndOfCode

Log:

virtual_keyboard real time MIDI plugin for Csound
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes. [m
[m0dBFS level = 32768.0
Csound version 6.03.2 (double samples) May 12 2014
libsndfile-1.0.25
WARNING: [mcould not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libjacko.dylib' (-1)
WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libjackTransport.dylib' (-1)
WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/librtjack.dylib' (-1) [m
[mUnifiedCSD:  /Users/kakyo/Documents/test/csound/ch7_ex7sample_pg144_1.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes. [m
[mrtaudio: PortAudio module enabled ... 
using callback interface
rtmidi: PortMIDI module enabled
Elapsed time at end of orchestra compile: real: 0.003s, CPU: 0.003s
sorting score ...
... done
Elapsed time at end of score sort: real: 0.003s, CPU: 0.003s
--Csound version 6.03.2 (double samples) May 12 2014
displays suppressed
0dBFS level = 1.0
ftable 101:
audio sr = 44100, monaural
opening RAW infile grain.wav
orch now loaded
audio buffered in 1024 sample-frame blocks
PortAudio V19-devel (built Jun  4 2013 18:37:15)
   0: dac0 (AirPlay)
   1: dac1 (Built-in Output)
   2: dac2 (WavTap)
PortAudio: selected output device 'Built-in Output'
writing 2048 sample blks of 64-bit floats to dac 
SECTION 1:

EndOfLog

Thanks,
Beinan

Date2015-04-19 19:48
FromSteven Yi
SubjectRe: No sound output when playing back samples
Hi Beinan,

I think the simplest thing here to check is that there is no score in
the CsScore section.  I think you will need either "i1 0 1" in the
CsScore section to start instrument 1.

Note, without score text in the CsScore section, Csound should go into
realtime render mode and will keep running until explicitly shutdown.
If score text is found, Csound will run as long as the duration of the
score.

I'd try that first and if there are any other issues report back here.

All best,
steven

On Sun, Apr 19, 2015 at 1:57 PM, Beinan Li  wrote:
> Hi Csound,
>
> Fairly new to Csound, I tried to put together a sample code from the book
> Cound Power by Jim Aikin, to play a sample using the table system.
>
> The book says that we need to feed the f-table the number of samples and
> adds a minus sign to it if it's not 2^n samples long, so I inspected the
> file using Audacity and below is my complete code. The instrument definition
> code was taken from the book itself. In the end I hear nothing after running
> the code. The code and the output log are given below.
>
> Note that even though I did not give the RAWWAVE_PATH environment variable.
> The wave file used here (mono) is placed under the same folder as the code.
> And I've made it work with another granular synth code under the same
> folder.
>
> Something tells me that the f-table (giSample) failed to get loaded, but I'm
> not sure.
> I'd appreciate it if anyone can see where it went wrong, or share tips about
> debugging Csound.
>
> I'm on Mac OS X 10.10 with Csound 6.03.2.
>
> Code:
>
> 
> 
> 
> 
>
> sr = 44100
> ksmps = 10
> nchnls = 1
> 0dbfs = 1
>
> giSample ftgen 0, 0, -24187, 1, "grain.wav", 0, 0, 0
>
> instr 1
> iamp = p4
> ilen tableng giSample
> p3 = ilen/sr
>
> aphas phasor 1/p3
> aphas = aphas * ilen
> asig table aphas, giSample
> asig = asig * iamp
>
> outs asig, asig
> endin
>
> 
> 
>
> 
> 
>
> EndOfCode
>
> Log:
>
> virtual_keyboard real time MIDI plugin for Csound
> Error: define environment variable RAWWAVE_PATH
> (points to rawwaves directory) to use STK opcodes. [m
> [m0dBFS level = 32768.0
> Csound version 6.03.2 (double samples) May 12 2014
> libsndfile-1.0.25
> WARNING: [mcould not open library
> '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libjacko.dylib'
> (-1)
> WARNING: could not open library
> '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libjackTransport.dylib'
> (-1)
> WARNING: could not open library
> '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/librtjack.dylib'
> (-1) [m
> [mUnifiedCSD:  /Users/kakyo/Documents/test/csound/ch7_ex7sample_pg144_1.csd
> STARTING FILE
> Creating options
> Creating orchestra
> Creating score
> Error: define environment variable RAWWAVE_PATH
> (points to rawwaves directory) to use STK opcodes. [m
> [mrtaudio: PortAudio module enabled ...
> using callback interface
> rtmidi: PortMIDI module enabled
> Elapsed time at end of orchestra compile: real: 0.003s, CPU: 0.003s
> sorting score ...
> ... done
> Elapsed time at end of score sort: real: 0.003s, CPU: 0.003s
> --Csound version 6.03.2 (double samples) May 12 2014
> displays suppressed
> 0dBFS level = 1.0
> ftable 101:
> audio sr = 44100, monaural
> opening RAW infile grain.wav
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> PortAudio V19-devel (built Jun  4 2013 18:37:15)
>    0: dac0 (AirPlay)
>    1: dac1 (Built-in Output)
>    2: dac2 (WavTap)
> PortAudio: selected output device 'Built-in Output'
> writing 2048 sample blks of 64-bit floats to dac
> SECTION 1:
>
> EndOfLog
>
> Thanks,
> Beinan
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here