Arpeggiator overhaul
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Some issues with the arpeggiator and the note sorting algorithms.
If you play an arpeggio over one note only, things generally work fine. There is the issue with occasionally dropped notes but if you use the function to skip notes and only arpeggiate over one note at a time, there is a chance that you will experience not a single glitch. If however you choose to arpeggiate over a chord, then you will most likely bump into a couple of the following issues.
---
### Bug fixes/Basic functionality
- [ ] Skipped notes. Sometimes notes are skipped. (_see picture below_)
Possibly related issue: https://github.com/LMMS/lmms/issues/2606
- [x] Extra notes. Sometimes an extra note is played at the end. Such an extra note can be the same as the actual note intended, increasing its volume. (_see picture below_)
Fixed in: c39690d8e029c926880353475a5092abd445fe9a
Picture showing notes disappeared and extra notes added (as duplicates under the ordinary ones making them look bigger in this picture).
[arpagain-01.mmp.zip](https://github.com/LMMS/lmms/files/4708108/arpagain-01.mmp.zip)

- [x] The notes are only sorted after position and not after key. This is apparent in the arpeggiator when you're trying to arpeggiate over more than one key in Sort Mode. It's difficult to get the notes to follow a defined route. The common way is to start from the lowest note and then play the notes in order.
Fixed in: 81966fa1a68293a5dfa37408da993bc95ac8402d
- [x] Sort mode. All notes are playing at the beginning of the notes. This is a regression from 1.1 and was introduced in 6650dd356dbdd08739ad69153b0c7020e39787b9.
Fixed in 2d583db990385506bff7020f4b4109976af5835f
- [x] Sort mode. If the envelopes are off, the notes that should be silent are playing as ordinary notes while waiting for their turn. Solving this by using the same hack as the 'skip' algorithm as it had the same issue. Set as master note.
Fixed in 6da87379b4b5e69561a424ea13e604c7f077526c
---
### Internal changes
- [ ] Sorting notes is made both in `Pattern::addNote(...)` and in `Pattern::rearrangeAllNotes()`. The former is triggered on key 'on' and the latter on key 'off' but also works more generally on actions in the PianoRoll. The sort in `Pattern::addNote(...)` may thus be unnecessary. I've tested to drop this code and it seem to work just fine. Notes recorded through Midi keyboard are sorted only through Pattern::addNote so some rework seem to be needed to use `Pattern::rearrangeAllNotes()`.
Suggest: Wontfix.
- [ ] Pressing an existing note in the Piano Roll plays it back. When you release the key this triggers a note sort via `Pattern::rearrangeAllNotes():` the same way as a drag/shift action. This even though nothing really has changed to the pattern. It may be a non issue as the extra cpu cycles involved doesn't appear to be screaming high.
---
### Proposed functions
- [ ] Strict sync. Follow the quantized positions and don't play notes on key 'on'.
- [ ] Templates. Building templates in the Piano Roll and/or import Groove Templates.
- [ ] Convert a pattern played by the arpeggiator to notes in piano roll.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.