LMMS / LMMS/lmms

Piano Roll, when recording, it (sometimes) plays the note twice

Open
#6,277 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
10.4k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
7

Description

### Bug Summary

When recording from MIDI devices on Piano Roll, sometimes I can **hear the same note twice**. It appears to be a random event, but I can reproduce it using a simple MIDI script.

#### Steps to reproduce

1. Create an empty project, and **add an instrument** (for example, an *AudioFileProcessor* with a kick sound as a sample).
2. Set the instrument **MIDI input** to your testing device (or launch the following script and use it as tester).
3. Open a Clip on Piano Roll, and **start recording**.

Script to test behavior:
```python
#!/usr/bin/env python3

import mido
import time

note = 69
port = mido.open_output(name="TEST", virtual=True)
on = mido.Message("note_on", note=note, velocity=127)
off = mido.Message("note_off", note=note, velocity=0)

while True:
print(".", end="", flush=True)

port.send(on)
time.sleep(5 / 1000)
port.send(off)

time.sleep(1)
```

#### Expected behavior

When a note is sent to the instrument, you **always** must hear it only once (not repeated). No arpeggiator, sequencer or any other effect used.

#### Actual behavior

Sometimes, you can hear the same note twice (with a very short delay between both *sounds*). In the Piano Roll, there is only one note recorded.

#### Screencast

https://user-images.githubusercontent.com/4654094/149574646-91a36c8b-0e0f-425a-b8b5-13ec5dad4e7c.mp4

#### Affected LMMS versions

* Version 1.3.0-alpha.1.206+g5a4dbf4cc (Linux/x86_64, Qt 5.12.8, GCC 9.3.0) on Ubuntu 20.04 / 21.04

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Piano Roll recording flow and MIDI input behavior described in the issue, then reproduce it using the provided Python/mido script and an AudioFileProcessor instrument. Compare the audible playback with the single note shown in the Piano Roll. Done means each sent note is heard exactly once without an arpeggiator, sequencer, or other effect.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.