Csound Csound-dev Csound-tekno Search About

[Csnd] Polyphony

Date2014-04-10 16:16
FromCOCHEDELAFERTE
Subject[Csnd] Polyphony
Hi all,


Since a while a'm searching a way to obtain polyphony effecrs. The best i
found is to shift a little the frequency, as shown in following (instrument
2), directly copied  on 120.csd from Doctor's tutorials

.


-odac -r44100 -k441


nchnls = 2

		instr	1
amix	oscil	10000, 440, 1
	outs	amix, amix
		endin

		instr	2
asig1	oscil	10000, 440, 1
asig2	oscil	10000, 440*.99, 1
asig3	oscil	10000, 440*1.01, 1	
amix	=	asig1+asig2+asig3
	outs	amix, amix
		endin



f1  0 4096 10   1
i1		0		8
i2		8		8




Now the problem : with the instrument A, the sound is perfect, but no
shifting. With the instrument 2, looks good, except an odd sinusoidal
effect.

Now my question : what can i make to erase this sinusoidal effect ? Filters,
but what for filters,and how ? Another method ?

Thank's for advance,


Greatings,

Sergio;.




polyphony.csd
  



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-10 17:18
FromJim Aikin
Subject[Csnd] Re: Polyphony
It appears that what you're experiencing is the phenomenon known as beating
or beats. It's inherent in the process. You'll hear periodic amplitude
changes (about 4.4 times per second) as the sine waves move in and out of
phase with one another.

You can mask the beating by adding a small, continuous, random fluctuation
to the frequencies of the oscillators. The beating will still be present,
but it will drift in frequency.

You can add more oscillators with slightly different frequency offsets.

The beating will be, perhaps, less obvious if you use a waveform with
overtones, such as a sawtooth.

Or you can try using compression (using the compress opcode) to control the
maximum amplitude. This may have other, undesirable results -- I haven't
tried it. Of course, this won't help with the amplitude dips when the sine
waves are out of phase, but it can reduce the peaks.



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734079.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-10 19:16
FromJustin Smith
SubjectRe: [Csnd] Re: Polyphony
I think adding a small noise source to the frequency is the right thing here, that closely resembles the reason we don't usually hear intense beating effects between natural instruments that are slightly out of tune. jitter2 is probably the best opcode for this.

Adding harmonics shouldn't help much, if the two sounds have the same harmonics at least.


On Thu, Apr 10, 2014 at 9:18 AM, Jim Aikin <midiguru23@sbcglobal.net> wrote:
It appears that what you're experiencing is the phenomenon known as beating
or beats. It's inherent in the process. You'll hear periodic amplitude
changes (about 4.4 times per second) as the sine waves move in and out of
phase with one another.

You can mask the beating by adding a small, continuous, random fluctuation
to the frequencies of the oscillators. The beating will still be present,
but it will drift in frequency.

You can add more oscillators with slightly different frequency offsets.

The beating will be, perhaps, less obvious if you use a waveform with
overtones, such as a sawtooth.

Or you can try using compression (using the compress opcode) to control the
maximum amplitude. This may have other, undesirable results -- I haven't
tried it. Of course, this won't help with the amplitude dips when the sine
waves are out of phase, but it can reduce the peaks.



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734079.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-04-10 22:10
FromCOCHEDELAFERTE
Subject[Csnd] Re: Polyphony
OK, thank's greatly to your both. Now i'll proceed several tries, beginning
with jitter2. Each time i'll report here, or if i have again multiple
questions, what appears as very possible. That can take some days, or a lot
of days,assuming that i must find how  solve the beating for my own needs.

Thank's again, really.


Best regards,

Sergio



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734093.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-12 17:39
FromCOCHEDELAFERTE
Subject[Csnd] Re: Polyphony
Hi Justin,
 

First tries with jitter2 : the values comes from the manual examples.

		instr	1
ktotamp	init 2
kamp1	init 0.66
kcps1	init 3
kamp2	init 0.66
kcps2	init 3
kamp3	init 0.66
kcps3	init 3

kj	jitter2	ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3

asig1	oscil	10000, 440+kj, 1
asig2	oscil	10000, (440*.99)+kj, 1
asig3	oscil	10000, (440*1.01)+kj, 1

This gives, for the moment, nothing interessant. What do you mean about :

- the use of the opcode ?
- the values ?


Best regards,

Sergio



polyphony.csd
  



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734187.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-12 19:05
FromJustin Smith
SubjectRe: [Csnd] Re: Polyphony
If you want jitter on every voice, there should be a separate jitter on each one, rather than adding the same jitter to all of them. You can start up multiple jitters with the same parameters and they will each have different randomized values. Then it is a question of tweaking the various amp and cps args until it sounds right.


On Sat, Apr 12, 2014 at 9:39 AM, COCHEDELAFERTE <Serge.Coche@free.fr> wrote:
Hi Justin,


First tries with jitter2 : the values comes from the manual examples.

                instr   1
ktotamp init 2
kamp1   init 0.66
kcps1   init 3
kamp2   init 0.66
kcps2   init 3
kamp3   init 0.66
kcps3   init 3

kj      jitter2 ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3

asig1   oscil   10000, 440+kj, 1
asig2   oscil   10000, (440*.99)+kj, 1
asig3   oscil   10000, (440*1.01)+kj, 1

This gives, for the moment, nothing interessant. What do you mean about :

- the use of the opcode ?
- the values ?


Best regards,

Sergio



polyphony.csd
<http://csound.1045644.n5.nabble.com/file/n5734187/polyphony.csd>



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734187.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-04-13 22:24
FromCOCHEDELAFERTE
Subject[Csnd] Re: Polyphony
Hi Justin,


Thank's for each part of your explanation. Now i get really changes, but
it's long way...

One question again : normally, i no longer need my old shift system with
"440 * .99", "440 * 1.01" and so on, assuming that this kind of thing is now
the work of jitter2, right ?


Cheers,

Sergio




--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734209.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-14 15:31
FromCOCHEDELAFERTE
Subject[Csnd] Re: Polyphony
Hi Jim,


Can you please tell me in what as source opcode the waveform "sawtooth" can
be found ? In the fact, it can really be interessant to work with jitter2 on
a waveform with reduced beating.


Cheers,

Sergio



--
View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734212.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-15 17:35
FromRory Walsh
SubjectRe: [Csnd] Re: Polyphony
vco and vco2 will give you access to saw tooth waveforms, or you can
just create one with a phasor, or alternatively, using a function
table/oscili:

f1 0 4096 7 0 4096 1

ASawtooth oscil 1, 200, 1

On 14 April 2014 15:31, COCHEDELAFERTE  wrote:
> Hi Jim,
>
>
> Can you please tell me in what as source opcode the waveform "sawtooth" can
> be found ? In the fact, it can really be interessant to work with jitter2 on
> a waveform with reduced beating.
>
>
> Cheers,
>
> Sergio
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Polyphony-tp5734077p5734212.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>