Author Topic: Random Variation detuner  (Read 2906 times)

Offline a-lin

  • Active artist
  • *
  • Posts: 15
    • http://modarchive.org/index.php?request=view_profile&query=82910
Random Variation detuner
« on: August 04, 2010, 15:35:43 »
Hi,

I'd like to add a Random Variation (similar to the existing volume, pan and filter) to slightly detune an instrument randomly. One could perhaps obtain a similar effect using randomly very fine portamento up or down, I tried that but the portamento of the IT format is too coarse and it does not lead to the desirable effect.

The point is to create a chorus-like effect when notes overlap. I'm actually willing to code it myself (I've already managed to compile the code).

But before I do anything (understanding the code is gonna keep me busy for a while anyway), I'd like to know what you think about that, any suggestion, critics, etc, is very welcome.
A-Lin

Offline Paul Legovitch

  • Workaholic artist
  • ***
  • Posts: 145
    • http://legovitch.blogspot.com
Random Variation detuner
« Reply #1 on: August 04, 2010, 15:58:51 »
There are fine (EFx - FFx) and extra fine (EEx - FEx) portamento effects in IT format (as described in the note properties dialog).
The detune effect has been used a lot in IT modules, I suggest you read this recent topic (very informative) :
http://forum.openmpt.org/index.php?topic=4021.0

Not that I'm against such a feature, it could be interesting, but it's very doable without it :wink:

EDIT : If extra fine portamento is still too coarse for you, maybe you're using a high amount of tick per row (Axx). Sliding effects are applied on every ticks (but the first), so the less ticks per row, the better in your case. If I'm correct, if you use the Modern tempo mode, you can set this value to A01 without changing the resulting tempo.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,114
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Random Variation detuner
« Reply #2 on: August 04, 2010, 16:45:03 »
Quote from: "Paul Legovitch"
There are fine (EFx - FFx) and extra fine (EEx - FEx) portamento effects in IT format (as described in the note properties dialog).

You could use this as an argument for throwing out volume swing and pan swing (and while we're at it, cutoff swing and resonance swing) as well, though. Also, a-lin has just mentioned that this is not sufficient, and I have to admit that it's also rather tiresome.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Paul Legovitch

  • Workaholic artist
  • ***
  • Posts: 145
    • http://legovitch.blogspot.com
Random Variation detuner
« Reply #3 on: August 04, 2010, 19:52:24 »
you're right, and as I said :
Quote from: "Paul Legovitch"
Not that I'm against such a feature

I'm totally for it, if done right ! :)

So, to ellaborate on this feature :

Theoretically FE1 = note-frequency*2^(1/768) which is +1/64 semi-tone.
That's why I was thinking, FE1 is far from coarse, but actually the frequency of the chorus-like effect is dependent on the note you play :
Code: [Select]
note-frequency * (2^(1/768)-1)
So for a A4 at 440 Hz, you will have a chorus with a frequency of 440*9.029426*10^-4 = 0.39729...Hz, so a period around 2.517 seconds (not very fast).
It will be twice as slow on A3 but twice as fast on A5, etc.

So you're probably right, on higher notes even FE1 might be too coarse, meaning that the chorus will go too fast.

So if you aim for a consistent chorus/detune effect accross all notes of the keyboard, and if I'm not mistaken, then the random variation applied should be an addition to the frequency, from 0 to + 5Hz max for example , so that your slider would directly reflect the range of the chorus frequency (from 0 to + 5Hz).

Now, how are we gonna use this random variation ?
Obviously to make it work you still have to play two notes at a time : one with the variation, one without. But then doesn't it mean that you will need 2 versions of the same instrument (one with random pitch checked, and one without) ?
It's definitely not as simple as the other random variations that are instantly useful and hearable. To get a real instant detune effect, then this option could also automatically trigger 2 voices of the same instrument (but is it even possible ?)

Offline Harbinger

  • Extreme artist
  • *****
  • Posts: 1,136
  • Gender: Male
  • Operating System: Windows XP
Random Variation detuner
« Reply #4 on: August 04, 2010, 22:00:22 »
Pitch variation would give a "realer" sound to solo string instruments, electric guitars, and "sliding" wind instruments like trombones. I'm all for this idea!

Offline a-lin

  • Active artist
  • *
  • Posts: 15
    • http://modarchive.org/index.php?request=view_profile&query=82910
Random Variation detuner
« Reply #5 on: August 06, 2010, 18:57:52 »
Quote from: "Paul Legovitch"

So if you aim for a consistent chorus/detune effect accross all notes of the keyboard, and if I'm not mistaken, then the random variation applied should be an addition to the frequency, from 0 to + 5Hz max for example , so that your slider would directly reflect the range of the chorus frequency (from 0 to + 5Hz).


Interesting! Although the problem then w.r.t pitch detuning one looses accuracy in the bass vs amplitude in the high. Perhaps both options could be offered, detuning as +/- freq or as +/- pitch fraction.

Quote from: "Paul Legovitch"

Now, how are we gonna use this random variation ?
Obviously to make it work you still have to play two notes at a time : one with the variation, one without. But then doesn't it mean that you will need 2 versions of the same instrument (one with random pitch checked, and one without) ?


I don't think 2 notes should be triggered. I see many uses involving one instrument, one note at a time, randomly detuned. For instance when playing the same note consecutively (or some arpeggio) using ANN. For a chorus over a single instrument one way could be to just play the same randomly detuned instrument on 2 tracks.

That random detuning feature is on my YAMAHA TG-55, I used it for my home cooked piano patch (which you can often find sampled in my mods) and it really adds a lot of "naturalness".
A-Lin

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,114
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Random Variation detuner
« Reply #6 on: August 06, 2010, 19:18:13 »
Quote from: "a-lin"
detuning as +/- freq

Well, for me that sounds like going back to non-linear note slides, and that sounds horrible to me. :)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.