Csound Csound-dev Csound-tekno Search About

request ideas for avoiding clash of harmonics or digital artifacts

Date2016-04-25 01:56
FromMichael Mossey
Subjectrequest ideas for avoiding clash of harmonics or digital artifacts
I'm requesting ideas for oscillator and function types that would help me improve pitch and interval definition in the bass.

The main thing I've tried so far is a tone generated from oscili with a GEN09 f table based on a sawtooth-like wave. (That is, partial N has strength 1/N.) The partials go out to roughly 10K. I make a separate table for every six pitches so that I can maintain that bandwidth, roughly, in each register.

The problem is that intervals in the bass sound lousy. A perfect fifth doesn't sound strong and beautiful, for instance. When I tried a GEN09 table that eliminated all the lower harmonics and just had those above 5K, the sound it generated was terrible. It was a grating noise, piercing and irritating. That must reveal something.

First I thought the problem might be errors in the waveform generation, caused by interpolation-related error, quantization error, etc. Maybe I'm getting non-harmonic aliasing. I tried increasing the sample rate to 19200, and later 38400. I tried huge GEN09 tables. I think this improved things, but in the end the sounds still weren't usable. 

Then I wondered if a sawtooth wave might inherently create problems because of interpolation-related errors that occur during its giant rise time at the beginning of the cycle. I tried varying the phase of each harmonic, and ended up with an algorithm that put harmonic N at phase   

360 * (N-1) / Max_harmonic_num

This creates a waveform that spreads the high frequency energy, and has much smaller spikes throughout rather than one giant one. 

I don't think this helped much, if at all.

So, where to go from here? 

- Right now I'm preparing to try oscbnk, wondering if it will create some random variation in the harmonics that will prevent different pitches from clashing.

- I want to try poscili, wondering if greater precision will reduce errors

- I want to try a different approach to band-limiting the signal, perhaps vco2 or GEN30 tables

- this is inefficient, but maybe having an oscili for every harmonic, and use jitter to add random variation in phase and amplitude. 

- stretch tuning. Perhaps MIDI pitch P would be tuned to 440 * B ** ((p-69)/12) where B is slightly greater than 2. Partials would be adjusted using the same base so they are not harmonic any more.

Any comments?

Mike






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

Date2016-04-25 04:05
FromPaul Batchelor
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts
Is there a reference sound or instrument that you have in mind?

Have you tried band limited oscillators like vco2, or keyboard scaling the filters?

You could also look into making the fifth a little bit sharper if that is highest "target" note, as that perceptually can make things sound better as well. If it is a really exposed part, I would make these adjustments on a note-by-note basis.

On Sun, Apr 24, 2016 at 5:56 PM, Michael Mossey <michaelmossey@gmail.com> wrote:
I'm requesting ideas for oscillator and function types that would help me improve pitch and interval definition in the bass.

The main thing I've tried so far is a tone generated from oscili with a GEN09 f table based on a sawtooth-like wave. (That is, partial N has strength 1/N.) The partials go out to roughly 10K. I make a separate table for every six pitches so that I can maintain that bandwidth, roughly, in each register.

The problem is that intervals in the bass sound lousy. A perfect fifth doesn't sound strong and beautiful, for instance. When I tried a GEN09 table that eliminated all the lower harmonics and just had those above 5K, the sound it generated was terrible. It was a grating noise, piercing and irritating. That must reveal something.

First I thought the problem might be errors in the waveform generation, caused by interpolation-related error, quantization error, etc. Maybe I'm getting non-harmonic aliasing. I tried increasing the sample rate to 19200, and later 38400. I tried huge GEN09 tables. I think this improved things, but in the end the sounds still weren't usable. 

Then I wondered if a sawtooth wave might inherently create problems because of interpolation-related errors that occur during its giant rise time at the beginning of the cycle. I tried varying the phase of each harmonic, and ended up with an algorithm that put harmonic N at phase   

360 * (N-1) / Max_harmonic_num

This creates a waveform that spreads the high frequency energy, and has much smaller spikes throughout rather than one giant one. 

I don't think this helped much, if at all.

So, where to go from here? 

- Right now I'm preparing to try oscbnk, wondering if it will create some random variation in the harmonics that will prevent different pitches from clashing.

- I want to try poscili, wondering if greater precision will reduce errors

- I want to try a different approach to band-limiting the signal, perhaps vco2 or GEN30 tables

- this is inefficient, but maybe having an oscili for every harmonic, and use jitter to add random variation in phase and amplitude. 

- stretch tuning. Perhaps MIDI pitch P would be tuned to 440 * B ** ((p-69)/12) where B is slightly greater than 2. Partials would be adjusted using the same base so they are not harmonic any more.

Any comments?

Mike






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

Date2016-04-25 06:07
FromMichael Mossey
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts
Paul,

The first goal is something that sounds good when you play piano music through it, without needing tweaking.

But there's a more general goal. Right now I use the Pianoteq, and that has clarity in the bass. But it doesn't have a lot of upper-end extension (i.e. not much energy in the high partials). I think a synthesized sound could do better and reveal more "music" and sound more "alive." I know that's true from listening to compositions that avoid the bass register. Also, I like the precise sense of time in synthesized sounds with a sharp attack. My MIDI playback system uses a lot of tricks to add rubato, and the musical effect is more clear with a synthesized sound.

I don't want to limit myself to a piano sound. I think that sustained sounds with a variety of attacks could sound good, with the goal being an abundance of high partials. I think this is the secret behind Switched-On Bach. You might say, "Oh, Mike likes analog synths!" and that might be true (considering I suspect some of my objection might be digital artifacts), but I'm not sure that's the core issue. I think Switched-On Bach II, done on a digital synth, is less interesting than the first album not because it's digital, but because it lacks high partials compared to the brilliant and exciting sounds on the first album.

The problem I'm having with muddy or ugly bass intervals doesn't seem to be a matter of the type of attack or be affected by simple amplitude or filter/cutoff envelopes. It shows up in every instance of generating a bass note by a single oscillator and waveform. (I want to try more ways of doing that, such as vco2.) 

I can't tune notes individually, but I don't see why one can't achieve decent clarity in a variety of tunings--after all, piano and harpsichord models do it. 

I'm a couple hours away from running a few test compositions through a piano like sound made from oscbnk, using 16 randomized oscillators in the hope it will soften the interaction of partials.

I also plan to try vco2.

Mike





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

Date2016-04-25 08:01
FromOeyvind Brandtsegg
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts
I think it would be very interesting to see csd examples of the these
artifacts. You describe it precisely enough to recreate, but then
again it would be so much easier to discuss if we could start from the
exact same sound. I am (among other things) interested in ear training
for DSP and these artifacts sound like they could be used to
differentiate between different harmonic patterns, ...possibly(?)

2016-04-25 7:07 GMT+02:00 Michael Mossey :
> Paul,
>
> The first goal is something that sounds good when you play piano music
> through it, without needing tweaking.
>
> But there's a more general goal. Right now I use the Pianoteq, and that has
> clarity in the bass. But it doesn't have a lot of upper-end extension (i.e.
> not much energy in the high partials). I think a synthesized sound could do
> better and reveal more "music" and sound more "alive." I know that's true
> from listening to compositions that avoid the bass register. Also, I like
> the precise sense of time in synthesized sounds with a sharp attack. My MIDI
> playback system uses a lot of tricks to add rubato, and the musical effect
> is more clear with a synthesized sound.
>
> I don't want to limit myself to a piano sound. I think that sustained sounds
> with a variety of attacks could sound good, with the goal being an abundance
> of high partials. I think this is the secret behind Switched-On Bach. You
> might say, "Oh, Mike likes analog synths!" and that might be true
> (considering I suspect some of my objection might be digital artifacts), but
> I'm not sure that's the core issue. I think Switched-On Bach II, done on a
> digital synth, is less interesting than the first album not because it's
> digital, but because it lacks high partials compared to the brilliant and
> exciting sounds on the first album.
>
> The problem I'm having with muddy or ugly bass intervals doesn't seem to be
> a matter of the type of attack or be affected by simple amplitude or
> filter/cutoff envelopes. It shows up in every instance of generating a bass
> note by a single oscillator and waveform. (I want to try more ways of doing
> that, such as vco2.)
>
> I can't tune notes individually, but I don't see why one can't achieve
> decent clarity in a variety of tunings--after all, piano and harpsichord
> models do it.
>
> I'm a couple hours away from running a few test compositions through a piano
> like sound made from oscbnk, using 16 randomized oscillators in the hope it
> will soften the interaction of partials.
>
> I also plan to try vco2.
>
> Mike
>
>
>
>
>
> 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


Date2016-04-25 08:27
FromMichael Mossey
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts
Yes, I've working for a week on software that fills out csd templates, and can be quickly configured to try different things. My goal is to find the clearest demonstrations of each technique, then render demonstration wavs and put them and the csds on my web page for all to try. It will probably be another week or longer before it's all ready, but I will let you know.

Mike

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

Date2016-04-25 08:33
FromMichael Mossey
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts
By the way, ten years ago I asked if csound does dither, and I was told it doesn't (despite the manual presenting the option). Has that changed? Also, I noticed that it will do sample rate conversion if you load a file with high-def sample rate into an orchestra with sr=44100 with diskin. Is this a high-precision conversion, or should I perhaps do that in audacity?

Mike


On Mon, Apr 25, 2016 at 12:27 AM, Michael Mossey <michaelmossey@gmail.com> wrote:
Yes, I've working for a week on software that fills out csd templates, and can be quickly configured to try different things. My goal is to find the clearest demonstrations of each technique, then render demonstration wavs and put them and the csds on my web page for all to try. It will probably be another week or longer before it's all ready, but I will let you know.

Mike


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

Date2016-04-25 10:15
FromJohn
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts

I think dither is implemented.

==John

Sent from TypeApp

On 25 Apr 2016, at 08:34, Michael Mossey <michaelmossey@GMAIL.COM> wrote:
By the way, ten years ago I asked if csound does dither, and I was told it doesn't (despite the manual presenting the option). Has that changed? Also, I noticed that it will do sample rate conversion if you load a file with high-def sample rate into an orchestra with sr=44100 with diskin. Is this a high-precision conversion, or should I perhaps do that in audacity?

Mike


On Mon, Apr 25, 2016 at 12:27 AM, Michael Mossey <michaelmossey@gmail.com> wrote:
Yes, I've working for a week on software that fills out csd templates, and can be quickly configured to try different things. My goal is to find the clearest demonstrations of each technique, then render demonstration wavs and put them and the csds on my web page for all to try. It will probably be another week or longer before it's all ready, but I will let you know.

Mike


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

Date2016-04-25 10:48
FromVictor Lazzarini
SubjectRe: request ideas for avoiding clash of harmonics or digital artifacts
I see it in the source code.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 25 Apr 2016, at 10:15, John  wrote:
> 
> I think dither is implemented.
> 
> ==John
> 
> Sent from TypeApp
> 
> 
> On 25 Apr 2016, at 08:34, Michael Mossey  wrote:
> By the way, ten years ago I asked if csound does dither, and I was told it doesn't (despite the manual presenting the option). Has that changed? Also, I noticed that it will do sample rate conversion if you load a file with high-def sample rate into an orchestra with sr=44100 with diskin. Is this a high-precision conversion, or should I perhaps do that in audacity?
> 
> Mike
> 
> 
> On Mon, Apr 25, 2016 at 12:27 AM, Michael Mossey  wrote: 
> Yes, I've working for a week on software that fills out csd templates, and can be quickly configured to try different things. My goal is to find the clearest demonstrations of each technique, then render demonstration wavs and put them and the csds on my web page for all to try. It will probably be another week or longer before it's all ready, but I will let you know.
> 
> Mike
> 
> 
> 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