[Csnd] diskin2 instrument question
Date | 2018-09-21 17:09 |
From | K Hoeger |
Subject | [Csnd] diskin2 instrument question |
Attachments | NaLT1.wav TinLT1.wav |
Hello, I have created two diskin2 instruments. One instrument does not play back audibly consistently, and I would like help understanding why. The working instrument (Na, instrument 1) plays on beats 0.0, 3.0, and 4.0. The 3.0 and 4.0 occur successively, and I can hear each incidence. The other instrument, (Tin, instrument 2) is supposed to play on beats 1.0 and 2.0. I can only hear incidence of beat 1.0, but cannot hear the 2.0 which should happen right after it. Please let me know if you need anything other than what I have included (.csd file contents, .wav files, command line printout) to help me fix the issue. Best wishes, Katarina --- CSOUND FILE --- <CsoundSynthesizer> <CsOptions> -odac ;;;RT audio out </CsOptions> <CsInstruments> sr = 96000 ksmps = 1 nchnls = 2 instr 1 ; Na a1 diskin2 "NaLT1.wav", 1, 0, 1, 0, 32 outs a1, a1 endin instr 2 ; Tin a1 diskin "TinLT1.wav", 1, 0, 1, 0, 32 outs a1, a1 endin </CsInstruments> <CsScore> t 0 120 ; -- Na i1 0.0 1 ;m1 i1 3.0 1 i1 4.0 1 ;m2 i1 7.0 1 i1 8.0 1 ;m3 i1 11.0 1 i1 12.0 1 ;m4 i1 15.0 1 ; -- Tin i2 1.0 1 ;m1 i2 2.0 1 i2 5.0 1 ;m2 i2 6.0 1 i2 9.0 1 ;m3 i2 10.0 1 i2 13.0 1 ;m4 i2 14.0 1 e </CsScore> </CsoundSynthesizer> --- Command Line Output--- 0dBFS level = 32768.0 --Csound version 6.10 (double samples) Dec 21 2017 [commit: 2b6f2d970da3d1abf09b70bd027cd401841136b6] libsndfile-1.0.29pre1 WARNING: could not open library 'C:\Program Files\Csound6_x64\plugins64\\py.dll' (-1) UnifiedCSD: teentaalManual.csd STARTING FILE Creating options Creating orchestra closing tag Creating score rtaudio: PortAudio module enabled ... using callback interface Elapsed time at end of orchestra compile: real: 0.018s, CPU: 0.018s sorting score ... ... done Elapsed time at end of score sort: real: 0.019s, CPU: 0.019s graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 4096 sample-frame blocks PortAudio V19.6.0-devel, revision unknown 0: dac0 (Microsoft Sound Mapper - Output [MME]) 1: dac1 (Speakers (Realtek High Definiti [MME]) 2: dac2 (Primary Sound Driver [Windows DirectSound]) 3: dac3 (Speakers (Realtek High Definition Audio) [Windows DirectSound]) 4: dac4 (ASIO4ALL v2 [ASIO]) 5: dac5 (Speakers (Realtek High Definition Audio) [Windows WASAPI]) 6: dac6 (Speakers (Realtek HD Audio output) [Windows WDM-KS]) 7: dac7 (SPDIF Out (Realtek HDA SPDIF Out) [Windows WDM-KS]) PortAudio: selected output device 'Speakers (Realtek High Definiti' writing 8192 sample blks of 64-bit floats to dac SECTION 1: new alloc for instr 1: diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 0.000 .. 1.000 T 0.500 TT 0.500 M: 38754.4 38754.4 number of samples out of range: 2 2 new alloc for instr 2: diskin2: opened 'TinLT1.wav': 44100 Hz, 1 channel(s), 43670 sample frames B 1.000 .. 2.000 T 1.000 TT 1.000 M: 29204.5 29204.5 B 2.000 .. 3.000 T 1.500 TT 1.500 M: 29204.5 29204.5 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 3.000 .. 4.000 T 2.000 TT 2.000 M: 38754.4 38754.4 number of samples out of range: 2 2 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 4.000 .. 5.000 T 2.500 TT 2.500 M: 38754.4 38754.4 number of samples out of range: 2 2 B 5.000 .. 6.000 T 3.000 TT 3.000 M: 15251.5 15251.5 B 6.000 .. 7.000 T 3.500 TT 3.500 M: 29204.5 29204.5 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 7.000 .. 8.000 T 4.000 TT 4.000 M: 38754.4 38754.4 number of samples out of range: 2 2 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 8.000 .. 9.000 T 4.500 TT 4.500 M: 38754.4 38754.4 number of samples out of range: 2 2 B 9.000 .. 10.000 T 5.000 TT 5.000 M: 10168.2 10168.2 B 10.000 .. 11.000 T 5.500 TT 5.500 M: 29204.5 29204.5 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 11.000 .. 12.000 T 6.000 TT 6.000 M: 38754.4 38754.4 number of samples out of range: 2 2 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 12.000 .. 13.000 T 6.500 TT 6.500 M: 38754.4 38754.4 number of samples out of range: 2 2 B 13.000 .. 14.000 T 7.000 TT 7.000 M: 8238.5 8238.5 B 14.000 .. 15.000 T 7.500 TT 7.500 M: 29204.5 29204.5 diskin2: opened 'NaLT1.wav': 44100 Hz, 1 channel(s), 43680 sample frames B 15.000 .. 16.000 T 8.000 TT 8.000 M: 38754.4 38754.4 number of samples out of range: 2 2 Score finished in csoundPerform(). resetting Csound instance inactive allocs returned to freespace end of score. overall amps: 38754.4 38754.4 overall samples out of range: 16 16 0 errors in performance Elapsed time at end of performance: real: 9.552s, CPU: 9.552s closing device 188 8192 sample blks of 64-bit floats written to dac 0dBFS level = 32768.0 --Csound version 6.10 (double samples) Dec 21 2017 [commit: 2b6f2d970da3d1abf09b70bd027cd401841136b6] libsndfile-1.0.29pre1 end of score. overall amps: 0.0 overall samples out of range: 0 0 errors in performance Elapsed time at end of performance: real: 0.017s, CPU: 0.017s |
Date | 2018-09-21 18:09 |
From | Victor Lazzarini |
Subject | Re: [Csnd] diskin2 instrument question |
we’ll need the soundfiles to test it; using other sounds it works OK. You could also simplify your code. Only one instrument needed |
Date | 2018-09-21 18:16 |
From | Jana Hübenthal |
Subject | Re: [Csnd] diskin2 instrument question |
Hi Katarina, just tested your files on csound 6.10, 2018-01-27, but on Ubuntu. I think everything is playing, but: - in instr2 you used diskin instead of
diskin2 ... - are you sure you want the internal looping of the diskin2/diskin opcodes? Sounds a little bit chaotic, especially if played at different (slower) tempo. Maybe you should try the simplified, nearly all defaulting versions of the diskin2/diskin lines in your CSD: a1 diskin2 "NaLT1.wav" a1 diskin "TinLT1.wav" (-> maybe
also use diskin2) Sounds more straightforward to me if using these opcodes just to "fire" percussion samples. Best,
Am 21.09.2018 um 18:09 schrieb K
Hoeger:
|
Date | 2018-09-21 19:25 |
From | K Hoeger |
Subject | Re: [Csnd] diskin2 instrument question |
I used all the suggestions. Thank you both for pointing out how to make my code more efficient/sound better! Replacing diskin with diskin2 fixed the problem I noticed originally. Was the difference due to the difference between reading a stream and reading a file? Best, Katarina On Fri, Sep 21, 2018 at 1:16 PM Jana Hübenthal <jana@ebene11.de> wrote:
|
Date | 2018-09-21 19:40 |
From | Jana Hübenthal |
Subject | Re: [Csnd] diskin2 instrument question |
These opcodes should be similar, but they accept a slightly different parameter list. Regarding the 6th one, it defines the interpolation window size in diskin2 but leads to skipping initialization in diskin if not zero (you provided a 32!). Skipping any initialization is always for *very* specialized cases, as you enter that opcode without a proper, well defined state. Best, Am 21.09.2018 um 20:25 schrieb K
Hoeger:
|
Date | 2018-09-21 19:59 |
From | K Hoeger |
Subject | Re: [Csnd] diskin2 instrument question |
Thank you! On Fri, Sep 21, 2018 at 2:40 PM Jana Hübenthal <jana@ebene11.de> wrote:
|