Csound Csound-dev Csound-tekno Search About

[Csnd] harsh beats

Date2011-08-04 07:35
FromDennis Raddle
Subject[Csnd] harsh beats
So I'm fooling with a keyboard-type sound (bright attack and slow
decay) and trying various ways to do it. The first way I tried was
using gbuzz and modulating the spectrum. My hope was to make some kind
of sound that could be truly beautiful and functional for someone not
equipped with an acoustic piano to practice on. (Yes I've tried
PianoTeq and no I don't like it as much as the basic piano samplers
for the reason of harsh beats as well.)

The major immediately noticeable problem was harsh beats, unpleasant
beats. All of the intervals were "strange" in some way (compared to a
real piano or even a sampler piano) but the minor second was downright
ugly and not functional in beautiful harmonies such as Bach writes.

I doubled checked how I was computing the frequency and no problem there.

Before I go on, I want to get a sense from the group here if this is
an understood property of certain synthesis methods.

Maybe it has something to do with the fact that the partials are all in phase?


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-08-04 17:21
FromAidan Collins
SubjectRe: [Csnd] harsh beats
Can I ask how you are computing the frequencies? There are a lot of
more or less built in frequency opcodes that I've never had problems
with, like csp2pch, or cpsmidi.

Another thing I can think of is that any beating between frequencies
might be reduced by moving them in panning space. A quick way to pan
notes slightly is to divide the midi notenumber by the highest note
you expect to be using to get an ipan variable between 0-1, which you
can use to make the highest note panned full to the right, and the
lowest full to the left.

There are also plenty of options for using just intonation or other
alternate tuning scales if you want to eliminate beating altogether.

On Thu, Aug 4, 2011 at 2:35 AM, Dennis Raddle  wrote:
> So I'm fooling with a keyboard-type sound (bright attack and slow
> decay) and trying various ways to do it. The first way I tried was
> using gbuzz and modulating the spectrum. My hope was to make some kind
> of sound that could be truly beautiful and functional for someone not
> equipped with an acoustic piano to practice on. (Yes I've tried
> PianoTeq and no I don't like it as much as the basic piano samplers
> for the reason of harsh beats as well.)
>
> The major immediately noticeable problem was harsh beats, unpleasant
> beats. All of the intervals were "strange" in some way (compared to a
> real piano or even a sampler piano) but the minor second was downright
> ugly and not functional in beautiful harmonies such as Bach writes.
>
> I doubled checked how I was computing the frequency and no problem there.
>
> Before I go on, I want to get a sense from the group here if this is
> an understood property of certain synthesis methods.
>
> Maybe it has something to do with the fact that the partials are all in phase?
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-08-04 17:31
FromJim Aikin
Subject[Csnd] Re: harsh beats
There might be several reasons why you're experiencing some type of
harshness. Without knowing more about what you're doing, it's difficult to
diagnose.

Your signal may be too loud, causing clipping. That would certainly cause
harsh sounds.

You may have set the sample rate too low in Csound. Normally, sr=44100, and
this should be sufficient. If for some reason you omitted a zero at the end
of that line, you'll certainly hear aliasing.

If you hear the problem most noticeably with minor seconds, it's possible
that you're hearing the normal beating of equal-tempered intervals, which is
masked on the piano by the sheer complexity of the acoustic environment.

It's also possible that you're running the signal from gbuzz through a
filter that is sensitive to input level, and sending it too hot a signal.

Can you give us more specifics?

--Jim Aikin


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


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-08-04 17:42
FromJeff Taylor
SubjectRe: [Csnd] harsh beats
You may also want to consider that the overtones on a piano are a bit inharmonic.  You may be able to get a closer to an actual piano overtone series by using FM synthesis or something along those lines.  You will need to set up an alternate tuning, much like actual piano tuners do, if you go this route, however.

--
Electronically,
Jeff Taylor


On Thu, Aug 4, 2011 at 1:35 AM, Dennis Raddle <dennis.raddle@gmail.com> wrote:
So I'm fooling with a keyboard-type sound (bright attack and slow
decay) and trying various ways to do it. The first way I tried was
using gbuzz and modulating the spectrum. My hope was to make some kind
of sound that could be truly beautiful and functional for someone not
equipped with an acoustic piano to practice on. (Yes I've tried
PianoTeq and no I don't like it as much as the basic piano samplers
for the reason of harsh beats as well.)

The major immediately noticeable problem was harsh beats, unpleasant
beats. All of the intervals were "strange" in some way (compared to a
real piano or even a sampler piano) but the minor second was downright
ugly and not functional in beautiful harmonies such as Bach writes.

I doubled checked how I was computing the frequency and no problem there.

Before I go on, I want to get a sense from the group here if this is
an understood property of certain synthesis methods.

Maybe it has something to do with the fact that the partials are all in phase?


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2011-08-04 20:12
FromJustin Smith
SubjectRe: [Csnd] harsh beats

I am under the impression that a physical string is momentarily "tightened" by the hammer's impact, causing a short and subtle detuning that settles into the real frequency of the string. This effect is more pronounced on the looser strings (the lowest pitches). By adding a frequency dependant envelope of detuning (a pitch shift maybe starting at 1 - 10 cents and dropping to at 0 about 10 cents per second? definitely play with these numbers I could be off by an order of magnitude) you may find you get less pronounced beating, and a more "natural" sound.

----- Original message -----
> You may also want to consider that the overtones on a piano are a bit
> inharmonic.  You may be able to get a closer to an actual piano overtone
> series by using FM synthesis or something along those lines.  You will
> need to set up an alternate tuning, much like actual piano tuners do, if
> you go this route, however.
>
> --
> Electronically,
> Jeff Taylor
>
>
> On Thu, Aug 4, 2011 at 1:35 AM, Dennis Raddle
> <dennis.raddle@gmail.com>wrote:
>
> > So I'm fooling with a keyboard-type sound (bright attack and slow
> > decay) and trying various ways to do it. The first way I tried was
> > using gbuzz and modulating the spectrum. My hope was to make some kind
> > of sound that could be truly beautiful and functional for someone not
> > equipped with an acoustic piano to practice on. (Yes I've tried
> > PianoTeq and no I don't like it as much as the basic piano samplers
> > for the reason of harsh beats as well.)
> >
> > The major immediately noticeable problem was harsh beats, unpleasant
> > beats. All of the intervals were "strange" in some way (compared to a
> > real piano or even a sampler piano) but the minor second was downright
> > ugly and not functional in beautiful harmonies such as Bach writes.
> >
> > I doubled checked how I was computing the frequency and no problem
> > there.
> >
> > Before I go on, I want to get a sense from the group here if this is
> > an understood property of certain synthesis methods.
> >
> > Maybe it has something to do with the fact that the partials are all in
> > phase?
> >
> >
> > Send bugs reports to the Sourceforge bug tracker
> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > Discussions of bugs and features can be posted here
> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> > "unsubscribe csound"
> >
> >
>
> Send bugs reports to the Sourceforge bug tracker
>                        https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


Date2011-08-04 23:06
FromDennis Raddle
SubjectRe: [Csnd] harsh beats
The problem is mostly on minor 2nds, major 7ths and some minor 9ths.
These intervals can be part of very beautiful harmony, but they don't
sound beautiful in this simple synthesizer.

Here's the csd file. It shows how I'm computing the frequency in cps
(from the midi key number). Maybe I'm doing that wrongly. At least I
should be using the built-in opcode.



-d -M0 --midi-key=5 --midi-velocity-amp=b4


sr=44100
ksmps=1
nchnls=2


;----------------------------------------------------------------------
;----------------------------------------------------------------------
instr 1

idur = p3
iamp = p4
ikey = p5
icps  pow 2.0, (ikey-69.0)/12
icps = icps*440.0

i_gbuzz_amp = 1
i_num_harm = sr/icps/2
i_low_harm = 1
i_mult = 0.5
icosfn = 2
asig gbuzz i_gbuzz_amp, icps, i_num_harm, i_low_harm, i_mult, icosfn

kenv linseg 0.0, 0.05, 1
ktail linenr 1, 0, 0.15, 0.01
aout = 5000*asig*kenv*ktail

   outs aout, aout

endin






f0 3600 ; dummy table to keep on for an hour
f2 0 8193 11 1 ; cosine wave
e





Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"