Arpeggiator improvements - #1198
Conversation
# Conflicts: # src/deluge/gui/views/automation_view.cpp
…nteresting patterns
|
The arpeggiator mode pad is a waste now - could you make it work like unison, where pressing once does note direction (starting from off) and pressing a second time does octave direction? |
| return ArpOctaveMode::UP; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
These can/should be replaced with EnumStringMap I think, should provide some code size savings (see src/deluge/model/mod_controllable/filters/filter_config.cpp for an example of how to use these). They can live in arpeggiator.cpp as static functions too, so functions.cpp doesn't expand forever.
There was a problem hiding this comment.
I specify different names for OLED and 7SEG so probably not a good fit this EnumStringMap
There was a problem hiding this comment.
I'm working on converting params to use the enumStringMap as a bigger refactor, don't worry about it for now
| #include "gui/menu_item/unpatched_param.h" | ||
| #include "gui/ui/sound_editor.h" | ||
|
|
||
| namespace deluge::gui::menu_item::arpeggiator { |
There was a problem hiding this comment.
Instead of 3 separate classes, this, RatchetProbability, and SequenceLength could be a single class deluge:gui::menu_item::unpatched_param::Arpeggiator (in deluge/gui/menu_item/unpatched_param).
There was a problem hiding this comment.
but they are different parameters, how are they supposed to be the same class?
There was a problem hiding this comment.
The specific parameter to edit is a constructor parameter.
There was a problem hiding this comment.
I see other params inheriting from public UnpatchedParam and they are in different folders and classes. I think I don't understand what you mean
There was a problem hiding this comment.
All three of these classes are identical (you're just over riding isRelevant) and the param id is passed in the constructor
| uint32_t gateThreshold = activeInstrumentClip->arpeggiatorGate + 2147483648; | ||
| uint32_t ratchetProbability = activeInstrumentClip->arpeggiatorRatchetProbability + 2147483648; | ||
| uint32_t ratchetAmount = activeInstrumentClip->arpeggiatorRatchetAmount + 2147483648; | ||
| uint32_t sequenceLength = | ||
| (((int64_t)activeInstrumentClip->arpeggiatorSequenceLength + 2147483648) * kMaxMenuValue + 2147483648) | ||
| >> 32; |
There was a problem hiding this comment.
| uint32_t gateThreshold = activeInstrumentClip->arpeggiatorGate + 2147483648; | |
| uint32_t ratchetProbability = activeInstrumentClip->arpeggiatorRatchetProbability + 2147483648; | |
| uint32_t ratchetAmount = activeInstrumentClip->arpeggiatorRatchetAmount + 2147483648; | |
| uint32_t sequenceLength = | |
| (((int64_t)activeInstrumentClip->arpeggiatorSequenceLength + 2147483648) * kMaxMenuValue + 2147483648) | |
| >> 32; | |
| uint32_t gateThreshold = activeInstrumentClip->arpeggiatorGate + 2147483648U; | |
| uint32_t ratchetProbability = activeInstrumentClip->arpeggiatorRatchetProbability + 2147483648U; | |
| uint32_t ratchetAmount = activeInstrumentClip->arpeggiatorRatchetAmount + 2147483648U; | |
| uint32_t sequenceLength = | |
| (((int64_t)activeInstrumentClip->arpeggiatorSequenceLength + 2147483648) * kMaxMenuValue + 2147483648U) | |
| >> 32; |
I think these calculations can overflow otherwise? It's unclear how gateThreshold was working before.
There was a problem hiding this comment.
The gateThreshold line has been like that from the beginnings so I just did the same with my new parameters. I haven't experienced any buggy behavior even setting parameter values from minimum to maximum values
|
@sapphire-arches I pushed some changes for some comments of your feedback |
- Have the ratcheted step include the possibility to have no ratchets, so even at 100% probability we still get steps with no ratchets - Crash on new song when accessing Preset modes (pad shortcut) - Make ratchet notes not increment sequence index
|
@sapphire-arches I'm merging and opening an issue with the minor tweaks needed - I want user feedback on this |
* Initial commit * Work in progress * Fixed bug * Changed labels * Refactor ratchet chance to ratchet probability * Disable arp ratchets for drums * Change param name * Fix param reading * Format * wip * Added octave mode direction parameter do add more options to create interesting patterns * New params (wip) * lots of improvements * Disable ratchets for midi clips for now.. * Fix compile * Removed unused menu option * Hack to disable midi clips ratcheting till i fix the gate issue * format * Add flag so when settings change, force a restart of the arpeggiator sequence * Added PresetMode and now CUSTOM takes you to octavemode and octavemode to notemode * format * Format * Refactor * Updated docs * updated doc * Feedback from sapphire-arches * Misc bugfixing - Have the ratcheted step include the possibility to have no ratchets, so even at 100% probability we still get steps with no ratchets - Crash on new song when accessing Preset modes (pad shortcut) - Make ratchet notes not increment sequence index * Missing param * Fixed bug: new ratchet params not able to be learned to golden knobs * Enable “Sequence Length” for kit rows and update docs * Fixed Sequence Length for arpeggios of 1 note * Better arp menu order * Updated Docs
* Initial commit * Work in progress * Fixed bug * Changed labels * Refactor ratchet chance to ratchet probability * Disable arp ratchets for drums * Change param name * Fix param reading * Format * wip * Added octave mode direction parameter do add more options to create interesting patterns * New params (wip) * lots of improvements * Disable ratchets for midi clips for now.. * Fix compile * Removed unused menu option * Hack to disable midi clips ratcheting till i fix the gate issue * format * Add flag so when settings change, force a restart of the arpeggiator sequence * Added PresetMode and now CUSTOM takes you to octavemode and octavemode to notemode * format * Format * Refactor * Updated docs * updated doc * Feedback from sapphire-arches * Misc bugfixing - Have the ratcheted step include the possibility to have no ratchets, so even at 100% probability we still get steps with no ratchets - Crash on new song when accessing Preset modes (pad shortcut) - Make ratchet notes not increment sequence index * Missing param * Fixed bug: new ratchet params not able to be learned to golden knobs * Enable “Sequence Length” for kit rows and update docs * Fixed Sequence Length for arpeggios of 1 note * Better arp menu order * Updated Docs
Added new features to the arpeggiator (Note: Ratchets are currently available only for Synth clips, but expected to be
extended to Midi clips and Kit rows in the future). The new features include:
1. Splitted the old
Modesetting into separate settingsMode(Off or Arpeggiator)Octave Mode(Up, Down,Up&Down, Alternate or Random) and
Note Mode(Up, Down, Up&Down, AsPlayed or Random) settings, so you can setupindividually how octaves are walked and how notes are walked in the sequence.
2. The
Modepad shortcut is now anArp presetshortcut, which will update the new 3 settings all at once:-
Offwill disable arpeggiator.-
Upwill setup Mode toArpeggiator, Octave Mode toUpand Note Mode toUp.-
Downwill setup Mode toArpeggiator, Octave Mode toDownand Note Mode toDown.-
Bothwill setup Mode toArpeggiator, Octave Mode toAlternateand Note Mode toUp.-
Randomwill setup Mode toArpeggiator, Octave Mode toRandomand Note Mode toRandom.-
Customwill setup Mode toArpeggiator, and enter a submenu to let you edit Octave Mode and Note Mode.3. Mode (MODE):
-
Offdisables the arpeggiator.-
Arpeggiator(ARP) enables the arpeggiator.4. Octave Modes (OMOD):
-
Up(UP) will walk the octaves up.-
Down(DOWN) will walk the octaves down.-
Up & Down(UPDN) will walk the octaves up and down, repeating the highest and lowest octaves.-
Alternate(ALT) will walk the octaves up, and then down reversing the Notes pattern (withoutrepeating notes). Tip: Octave Mode set to Alternate and Note Mode set to Up is equivalent to
the old
Bothmode.-
Random(RAND) will choose a random octave every time the Notes pattern has played.Tip: Set also Note Mode to Random to have the equivalent to the old
Randommode.5. Note Modes (NMOD):
-
Up(UP) will walk the notes up.-
Down(DOWN) will walk the notes down. Tip: this mode also works in conjunction with Octave ModeAlternate, which will walk all the notes and octaves all the way down, and then up reversing it.
-
Up & Down(UPDN) will walk the notes up and down, repeating the highest and lowest notes.-
As played(PLAY) will walk the notes in the same order that they were played. Tip: this modealso works in conjunction with Octave Mode Alternate, which will walk all the notes and octaves
all the way up (with notes as played), and then down reversing the order of played notes.
-
Random(RAND) will choose a random note each time. If the Octave Mode is set to somethingdifferent than Random, then the pattern will play, in the same octave, the same number of random
notes as notes are in the held chord and then move to a different scale based on the Octave Mode.
Tip: Set also Octave Mode to Random to have the equivalent to the old
Randommode.6.
Sequence Length(LENG) (unpatchet parameter, assignable to golden knobs):- If set to zero, the arpeggiator pattern will play fully.
- If set to a value higher than zero, the pattern will play up to the set number of notes, and then
reset itself to start from the beginning.
7. Ratcheting: There are two new parameters (unpatched, assignable to golden knobs), to control how notes
are ratcheted. A ratchet is when a note repeats itself several time in the same time interval that the
original note has to play.
-
Ratchet Amount(RATC): this will set the maximum number of ratchets that an arpeggiator stepcould have (each step will randomize the number of ratchet notes between 1 and max value).
- From values 0 to 4, no ratchet notes
- From 5 to 19, up to 2 ratchet notes
- From 20 to 34, up to 4 ratchet notes
- From 35 to 50, up to 8 ratchet notes
-
Ratchet Probability(RPRO): this sets how likely a step is to be ratcheted- Being 0 (0%), no ratchets at all
- And 50 (100%), all notes will evaluate to be ratcheted.
Follow-up ideas/improvements for later (out of scope for this PR):