LMMS / lmms

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

Play whole sample once pressed #2255

Open LocoMatt opened 9 years ago

LocoMatt commented 9 years ago

Hello, some time ago I noticed that bnb editor uses special short note that once played plays whole sound. I'm not into using bnb editor and I prefer to use AFP in song editor. Usually fitting note length to sample length is annoying. Well, it is possible to add this "note" to normal piano roll (selector normal/"bnb note")? Or maybe add additional option in AFP - like - play whole sample once pressed?

tresf commented 9 years ago

@LocoMatt duplicate of #1592 I believe.

LocoMatt commented 9 years ago

@tresf Well I'm not sure what did they mean but it seems that they can't play whole sample in bnb editor. I just want to propose one shot playback for song editor. bnb In the picture you can see 1st normal note that is as long as sample is, 2nd is copied form bnb editor (plays whole sound) and 3rd is just a piece of full sound. I would like to see this 2nd note in pianoroll without necessity of copying it form editor. Eventually add an option like this to AFP but it looks like more job to do (I think both things need a lot of work but we arleady have one of them inside lmms)

musikBear commented 9 years ago

uhoh -this one interest me tremendously! I have already proposed a similar enhancement There are several important things here:

That would create a sample-tracker!! +! It would be an absolute stunning addition to lmms Lmms would have sony-acid functionality! Real loop-sampler! I would love that <3

grejppi commented 9 years ago

@musikBear 2074 Please.

musikBear commented 9 years ago

:p sure must have slipped under my finger

michaelgregorius commented 9 years ago

I think the best idea would be to get rid of these special short notes or no-length-notes and to implement a solution in the AFP as was also proposed by @LocoMatt. Something like an option "Stop sound on note-off" or similar.

The behavior might be as follows:

This is also how other DAWs and synthesizers implement it. The instrument gets a stream of MIDI messages from the DAW and it is up to the instrument to decide how to interpret these messages. In general this means that the behavior is configured in the instruments and not encoded in some arcane global way in the MIDI notes which is not really discoverable by the user.

However, I am not even sure whether the MIDI events themselves make their way into the instruments in LMMS. If I remember correctly there is some global code which starts and ends notes using the abstract instrument interfaces (NoteHandle, NotePlayHandle, etc.).

All in all I think that following the no-length-note path any further will only lead to more strange code and more pain in the future.

tresf commented 9 years ago

Marking this as the replacement to #1592 because it encompass the enhancement as a whole, rather than for a particular instrument plugin.