LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.15k stars 1.01k forks source link

Cannot record pitch automation with MIDI joystick #12

Closed gzankevich closed 10 years ago

gzankevich commented 10 years ago

I could no see a way to record pitch automation with a joystick.

I tried:

System: LMMS 0.4.15 Arch Linux x64 Korg MicroKontrol

diizy commented 10 years ago

Mislabeled - this is not a bug, it's more of a feature request

artao commented 10 years ago

+25 billion !!! And not just pitch-wheel and mod-wheel, but ALL the knobs available for automation control. .. And not only controllable via joystick, but via external MIDI device .... Also recordable simple by moving any given knob in the interface with the mouse.

Please!! This really is an essential feature. Having to draw automation envelopes by hand rather destroys any performance spontaneity.

Thanks! =D

diizy commented 10 years ago

It's already on the TODO list.

tobydox commented 10 years ago

We have it in the old master branch already - see

If somebody volunteers for porting them to the current master branch, that feature would be available soon!

diizy commented 10 years ago

On 05/04/2014 07:13 PM, Tobias Doerffel wrote:

We have it in the old master branch already - see

If somebody volunteers for porting them to the current master branch, that feature would be available soon!

I remember trying it in the old master branch but IIRC it wasn't very functional yet... at least I remember I couldn't get it to work. Might be some extra work needed to make it work?

Also I didn't much like the way it was implemented in the old master, there was just checkboxes in the main toolbar for enabling automation recording, which is IMO a bit troublesome approach... if you enable the checkbox, will all automation patterns switch to record mode, or how will it know which ones you want to record... will you then inadvertently overwrite patterns you don't want to record to... I think a better approach might be something like what's (although non-functional) in current sampletracks, where you can switch individual patterns/tracks to record instead of play...

diizy commented 10 years ago

Also another problem: that implementation seems to be designed to only work with midi-controllers, so someone without midi-controllers (I presume that's quite a lot of LMMS users) will have to play with external virtual MIDI controllers, which is a very clunky solution.

I think a more generic approach built-in to the automationpattern class itself, which allows recording by either midi controllers OR tweaking the UI knobs itself, would be much better. Maybe we can somehow add a switch to AutomationPattern that causes it to instead of "playing back" automation to instead read and record automation from the first control its connected to? That way it wouldn't matter what way the automation would be input to the knob - you could even record LFOs or peak controllers into automation patterns... much more flexible.

@tobydox, do you think this would be possible to implement? I think it should be... wherever we have the part that checks for if an AutomationPattern is muted, just add a check for if it's in a "recording" state, and then add code that "reverses the dataflow"... from the control to the automation instead of the other way around.

diizy commented 10 years ago

Sorry for the multiple posts... but I think it might be possible to adapt the existing code to work in a way I described... I might look into it at some point (might take a while though as I'll be quite busy next week).

tobydox commented 10 years ago

Yes I think it would work that way. Basically the arm/unarm-functionality in the mentioned commits at least provides this kind of flag we could use for an improved implementation. We wouldn't need the checkboxes at the top.

diizy commented 10 years ago

On 05/04/2014 08:09 PM, Tobias Doerffel wrote:

Yes I think it would work that way. Basically the arm/unarm-functionality in the mentioned commits at least provides this kind of flag we could use for an improved implementation. We wouldn't need the checkboxes at the top.

@tobydox, I think this might actually be much simpler to implement than what is done in the commits mentioned... I don't think we need a separate new "recorder" class to do this.

I'm looking at the code now, and it seems to me that we could simply add a flag "m_isRecording" (or something) to AutomationPattern, and make this switchable from the context menu in AutomationPatternView.

Then just modify processMidiTime() in AutomationPattern to check for m_isRecording, if false, do what it does now (set the value of the control), if true, do the reverse - read value from control and set the value in pattern. processMidiTime() is in turn called by the AutomationTrack's play() function, so this should theoretically work.

I'm going to try this out... there are probably some caveats or problems I'll run into, but it's at least worth trying...

diizy commented 10 years ago

OMG it works.

It was this simple all along?!

Wow. It really works! I'm currently recording automation by moving the kicker's vol knob by hand!

diizy commented 10 years ago

Now I'm recording a very neat sinewave pattern from a LFO controller... this is fun!

artao commented 10 years ago

SWEEEET!

diizy commented 10 years ago

This can be closed now, as automation recording has been implemented.