x42 / fat1.lv2

Fons Adriaensen's AT1 -- Autotune LV2 plugin
http://x42-plugins.com/x42/x42-autotune
GNU General Public License v2.0
73 stars 16 forks source link

Request: microtonal support beyond 12-notes-per-octave #9

Open wolftune opened 5 years ago

wolftune commented 5 years ago

This is not a trivial request, but it would be ideal to be able to set an arbitrary number of pitches. It could just be a table / list. It would be ideal to support many input formats such as ratio, frequency, cents, etc. but I think if it only supported cents that would be the one option that would be most universal. Ideally, it might just be a support for importing scala files.

x42 commented 5 years ago

Some auto-tuner supporting scala files would indeed be very nice to have! That would however have to be a different project.

One of the main features of fat1.lv2 is that it supports MIDI input. you can play a melody and re-tune live. That only works with 12TET (granted there's a MIDI Tuning standard, but I expect that's not what you want).

While processing may be similar, and re-use some code, control and interaction will be vastly different to fat2.lv2, as would be session-state.


I might also not be the right person for the task: In general I try to keep plugins as simple as possible, with as few controls as reasonable, and minimize the interaction needed to achieve a given mix result. A plugin that just reads a .scl file would fall in that category.

But for everything that requires complex interaction, like "support many input formats such as ratio, frequency, cents", I highly recommend to use a flexible tool. Maybe csound or supercollider. If you spend time doing maths, a music programming language is a lot more appropriate too.

wolftune commented 5 years ago

That makes sense, but actually the simplest thing (geez, I haven't tested if this is already possible) is to simply use pitch-bend from the MIDI input. That would support a wide range of other tools that output pitch-bent MIDI to accomplish various pitches. For optimal support, it would just need to accept both pitch-bend signals and have a setting for the width of the pitch bend (some tools set it to +/- 1 to get better resolution than the default of 2)

x42 commented 5 years ago

The problem is that MIDI leaves the range of a pitch-bend undefined. it depends on the instrument.

There is a variant of the plugin "Autotune (microtonal)" that allows to re-tune each note +/- 1 semitone. It's still 12 notes/octave, and octave independent, but micro-tuning can change dynamically (host-autoamation).

wolftune commented 5 years ago

I was referring to the "(microtonal)" varient. Surely just now you meant 1¢ right? If it retunes by semitones, it's not microtonal at all (and would be very weird to just decide that all Cs should be Es or something).

The dynamic change you mean is that the CC message controlling the microtones has to be sent? So, like a program would need to translate pitch-bend into a CC message routed to the specific pitch? Sounds complex.

What I was saying is that all your program needs to support pitch-bend is to (A) recognize it and use it for the pitch while (B) having a user-set pitch-bend range. As long as I know that the instrument I'm playing assumes +/- 1 semitone for its pitch-bend range and the Autotune is set that way too, then it will output matching pitches.

x42 commented 5 years ago

Surely just now you meant 1¢ right?

I meant up to +/-1 semitone. e.g. a G can be returned to anything between F# and Ab. The granularity itself not limited.

What I was saying is that all your program needs to support pitch-bend is to (A) recognize it

note a bad idea. meanwhile you could automate the main tuning (440Hz) or bind that control to a pitch-bend message to the same effect.

x42 commented 5 years ago

today's git (v0.5.5-6 7f9c9ea) adds support for pitch-bend. The bend-range is configurable (hidden ctrl port, default 2 semi-tones) and applies to all notes, same as the "offset" control.

x42 commented 5 years ago

The dynamic change you mean is that the CC message controlling the microtones has to be sent

They're automatable plugin-parameters at host's control. Most Plugin hosts do allow to bind CC controls to parameters.

wolftune commented 5 years ago

Thanks!! The pitch-bend applying to all notes is fine, since this only really works on monophonic audio sources anyway. This is superb, I could play my Tonal Plexus microtonal keyboard and have it control the tuned pitch of a monophonic input (such as singing). Hooray!

I just need to test it. I haven't compiled the plugins myself though. I hope the update can soon get into the updated KXStudio repos, that would be easiest.

x42 commented 5 years ago

I'll tag a release soon, I expect it'll hit kxstudio on the next "Linux audio release day" (Oct 15th).

In a couple of hours there'll be a nightly build available at https://x42-plugins.com/x42/x42-autotune You could unzip and copy the plugin to $HOME/.lv2/fat1.lv2/