Csound Csound-dev Csound-tekno Search About

[Csnd] Beatings question **reformulated.**

Date2019-08-30 16:50
FromCsounder Csounder <0000017e1be09e0e-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] Beatings question **reformulated.**
AttachmentsMidi string.wav  

When do and do# are played together by strings (as in the midi-strings wave attached) the interval sounds wonderful.
When do and do# are played together by the instrument below, there is a BOTHERING, UGLY beating.   According
to my poor acoustics knowledge, the beatings should be listened too at the midi-strings wave attached, but it does NOT happen.

The question is: what is needed to  be added to the instruments below to avoid the beatings??
Please send code, NOT explanations. As a beginner, explanations will ONLY  confuse more and more. Thanks in advance.


<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>



Date2019-08-30 17:35
Fromjohn
SubjectRe: [Csnd] Beatings question **reformulated.**
Can you explain the 160Hz and 	170Hz in your program?  I would expect 
beating at 10 times a second (10 = 170-160).

I am not sure what "do" and "do#" mean and how they relate to 169 and 179 
Hz so hard to provide code.

==John ff

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

Date2019-08-30 17:36
FromHlöðver Sigurðsson
SubjectRe: [Csnd] Beatings question **reformulated.**
Not sure which beating you are refering to, but with 10hz difference you could be experiencing 10hz binaural effect.

Also this isn't nececcarily a equally-tempered interval (160hz and 170hz).

You could use some reference if you want to use absolute herz values http://www.sengpielaudio.com/calculator-notenames.htm

You can also use cpsmidinn to convert midi value to freq

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
ifreq = cpsmidinn(p4)
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 40
i1 3 14 41

</CsScore>
</CsoundSynthesizer>

On Fri, 30 Aug 2019 at 18:25, Csounder Csounder <0000017e1be09e0e-dmarc-request@listserv.heanet.ie> wrote:

When do and do# are played together by strings (as in the midi-strings wave attached) the interval sounds wonderful.
When do and do# are played together by the instrument below, there is a BOTHERING, UGLY beating.   According
to my poor acoustics knowledge, the beatings should be listened too at the midi-strings wave attached, but it does NOT happen.

The question is: what is needed to  be added to the instruments below to avoid the beatings??
Please send code, NOT explanations. As a beginner, explanations will ONLY  confuse more and more. Thanks in advance.


<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


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
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

Date2019-08-30 17:38
FromHlöðver Sigurðsson
SubjectRe: [Csnd] Beatings question **reformulated.**
sorry didn't do this right, (fix from my previous reply would be):

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
ifreq = cpsmidinn(p4)
asig oscil kvol*.7,ifreq ,1

out asig,asig

endin


On Fri, 30 Aug 2019 at 18:36, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
Not sure which beating you are refering to, but with 10hz difference you could be experiencing 10hz binaural effect.

Also this isn't nececcarily a equally-tempered interval (160hz and 170hz).

You could use some reference if you want to use absolute herz values http://www.sengpielaudio.com/calculator-notenames.htm

You can also use cpsmidinn to convert midi value to freq

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
ifreq = cpsmidinn(p4)
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 40
i1 3 14 41

</CsScore>
</CsoundSynthesizer>

On Fri, 30 Aug 2019 at 18:25, Csounder Csounder <0000017e1be09e0e-dmarc-request@listserv.heanet.ie> wrote:

When do and do# are played together by strings (as in the midi-strings wave attached) the interval sounds wonderful.
When do and do# are played together by the instrument below, there is a BOTHERING, UGLY beating.   According
to my poor acoustics knowledge, the beatings should be listened too at the midi-strings wave attached, but it does NOT happen.

The question is: what is needed to  be added to the instruments below to avoid the beatings??
Please send code, NOT explanations. As a beginner, explanations will ONLY  confuse more and more. Thanks in advance.


<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


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
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

Date2019-08-30 17:52
FromCsounder Csounder <0000017e1be09e0e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Beatings question **reformulated.**
AttachmentsMidi string.wav  

In short I want to generate two sounds with near frequency  that sound together without beatings as in the .wav file i attached (here again).

When the frequency of two sounds are near as in the code below (it does not matter if the frequencies are 160-170, or 170-180, or whatever)  a  horrible beating is listened, and i have no idea how to avoid that. Can you provide the code? i mean  the instruments and the score?

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


On Friday, August 30, 2019, 7:36:10 PM GMT+3, john <jpff@CODEMIST.CO.UK> wrote:


Can you explain the 160Hz and     170Hz in your program?  I would expect
beating at 10 times a second (10 = 170-160).

I am not sure what "do" and "do#" mean and how they relate to 169 and 179
Hz so hard to provide code.

==John ff

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


Date2019-08-30 17:58
FromRichard van Bemmelen
SubjectRe: [Csnd] Beatings question **reformulated.**
I DO here beatings in the strings example, namely a 'tremolo' kind of effect as soon as the second note is played.
It is a well known fact that an interval like c-e played very low on a piano does not sound as good as the same interval played a few octaves higher.
That is because musical notes are not on a lineair scale, so the frequency difference in the  lower played interval is not the same as in the higher one... 

Richard

Op vr 30 aug. 2019 om 18:25 schreef Csounder Csounder <0000017e1be09e0e-dmarc-request@listserv.heanet.ie>:

When do and do# are played together by strings (as in the midi-strings wave attached) the interval sounds wonderful.
When do and do# are played together by the instrument below, there is a BOTHERING, UGLY beating.   According
to my poor acoustics knowledge, the beatings should be listened too at the midi-strings wave attached, but it does NOT happen.

The question is: what is needed to  be added to the instruments below to avoid the beatings??
Please send code, NOT explanations. As a beginner, explanations will ONLY  confuse more and more. Thanks in advance.


<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


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
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

Date2019-08-30 19:28
Fromjohn
SubjectRe: [Csnd] Beatings question **reformulated.**
i tink you are seeking to deny basic mathematics physics and acoustics. 
You can minimue beating effects wuth just intonation but you cannot ovecoe 
reality.

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

Date2019-08-30 19:34
FromHlöðver Sigurðsson
SubjectRe: [Csnd] Beatings question **reformulated.**
These beating would come from violins too, depending on the violins, the vibrato and the dozens (hundreds) of overtones playing togeather, will make the the binaural effect way less audible. That's why simple sinewaves are usually picked when pseudo-science people online make binaural "drugs" (an example is here https://www.youtube.com/watch?v=3diYC2J8icc) here you can listen with headphones and compare left and right channels. This is the same phenomena that you're experiencing, except in 2 channels (the brain will will in the gap).

On Fri, 30 Aug 2019 at 20:29, john <jpff@codemist.co.uk> wrote:
i tink you are seeking to deny basic mathematics physics and acoustics.
You can minimue beating effects wuth just intonation but you cannot ovecoe
reality.

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
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

Date2019-08-30 19:59
FromCsounder Csounder <0000017e1be09e0e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Beatings question **reformulated.**
AttachmentsMidi string.wav  
I'll try to express myself even more clearly: how to get the two sounds in the .csd file below to sound so wonderful (that means without beatings or almost)  as the two sounds in the .wav file? anyone has some instrument/s like that and agree to share?

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


On Friday, August 30, 2019, 9:29:12 PM GMT+3, john <jpff@CODEMIST.CO.UK> wrote:


i tink you are seeking to deny basic mathematics physics and acoustics.
You can minimue beating effects wuth just intonation but you cannot ovecoe
reality.


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

Date2019-08-30 21:51
FromFrancois PINOT
SubjectRe: [Csnd] Beatings question **reformulated.**
Just try this

asig oscil kvol*0.5, p4, 1

François

Le ven. 30 août 2019 à 21:28, Csounder Csounder <0000017e1be09e0e-dmarc-request@listserv.heanet.ie> a écrit :
I'll try to express myself even more clearly: how to get the two sounds in the .csd file below to sound so wonderful (that means without beatings or almost)  as the two sounds in the .wav file? anyone has some instrument/s like that and agree to share?

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


On Friday, August 30, 2019, 9:29:12 PM GMT+3, john <jpff@CODEMIST.CO.UK> wrote:


i tink you are seeking to deny basic mathematics physics and acoustics.
You can minimue beating effects wuth just intonation but you cannot ovecoe
reality.


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
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
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

Date2019-08-30 22:09
FromPete Goodeve
SubjectRe: [Csnd] Beatings question **reformulated.**
AttachmentsNone  None  msw.png  

Date2019-08-30 22:19
FromBill Alves
SubjectRe: [Csnd] Beatings question **reformulated.**
The relationship between perceived dissonance and timbre is complex. A semitone played by a piano will always sound more dissonant than a semitone played by a violin section. Among the reasons for this are two: the sudden high frequency content of the piano attacks and the chorus effect of the violin section, which helps mask the beating. Try this:

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
ioff0 random 0.997, 1.003
ioff1 random 0.997, 1.003
ioff2 random 0.997, 1.003
ioff3 random 0.997, 1.003
ioff4 random 0.997, 1.003
ioff5 random 0.997, 1.003
ioff6 random 0.997, 1.003
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
kfilt linseg p4,p3/2,p4*4,p3/2,p4
asig0 oscil kvol*.1,p4*ioff0 ,1
asig1 oscil kvol*.1,p4*ioff1 ,1
asig2 oscil kvol*.1,p4*ioff2 ,1
asig3 oscil kvol*.1,p4*ioff3 ,1
asig4 oscil kvol*.1,p4*ioff4 ,1
asig5 oscil kvol*.1,p4*ioff5 ,1
asig6 oscil kvol*.1,p4*ioff6 ,1
asig sum asig0,asig1,asig2,asig3,asig4,asig5,asig6
aout tone asig,kfilt
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .125 .0625 .03125 .015 .07

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


On Aug 30, 2019, at 11:59 AM, Csounder Csounder <0000017e1be09e0e-dmarc-request@LISTSERV.HEANET.IE> wrote:

I'll try to express myself even more clearly: how to get the two sounds in the .csd file below to sound so wonderful (that means without beatings or almost)  as the two sounds in the .wav file? anyone has some instrument/s like that and agree to share?

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
kvol linseg 0,p3*.05,1,p3*.9,1,p3*.05,0
asig oscil kvol*.7,p4 ,1
out asig,asig

endin



</CsInstruments>
<CsScore>
f1 0 4096 10 1 .5 .25 .1

i1 0 20 160
i1 3 14 170

</CsScore>
</CsoundSynthesizer>


On Friday, August 30, 2019, 9:29:12 PM GMT+3, john <jpff@CODEMIST.CO.UK> wrote:


i tink you are seeking to deny basic mathematics physics and acoustics.
You can minimue beating effects wuth just intonation but you cannot ovecoe
reality.


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
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<Midi string.wav>

Bill Alves
Professor of Music, The Claremont Colleges
Harvey Mudd College
301 Platt Blvd. Claremont CA 91711
http://pages.hmc.edu/alves/
http://www.billalves.com/