Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Kit-level arpeggiator #3349

Conversation

soymonitus
Copy link
Contributor

The idea is to make some of the arpeggiator options available for kits when affect entire is on. That will make the note Ons and note Offs sent to the kit, or read from the sequencer to be passed first by an arpeggiator module that will decide when to send those note ons/offs to the noteRows themselves. What does that mean? That you could have the arpeggiator for the kit row also ON and have two levels of arpeggiation (you can go crazy..)

After checking which parameters can be used for kit affect-entire this is what I had to OMIT:
(everything related to changing pitch)

  • Chord Polyphony, Chord probability
  • Octaves
  • Octave mode
  • Octave Spread
  • Reverse probability

So it means that we have available for kit affect entire:

  • Note mode
  • Step repeat
  • Rhythm
  • Sequence Length
  • Gate spread
  • Velocity spread
  • RaTCHETS
  • Note prob
  • Bass prob

@soymonitus soymonitus marked this pull request as draft February 8, 2025 19:00
@soymonitus soymonitus closed this Feb 8, 2025
@soymonitus soymonitus deleted the monitus/kit_arpeggiator branch February 8, 2025 19:03
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy has made some suggestions. Please note that they are machine-generated, and you should review them carefully before applying to avoid introducing bugs.

There were too many comments to post at once. Showing the first 25 out of 88. Check the log or trigger a new build to see more.

&& !soundEditor.editingNonAudioDrumRow();
}
void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: result of a data() call may not be null terminated, provide size information to the callee to prevent potential issues [bugprone-suspicious-stringview-data-usage]

		label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
                                                                                        ^

l10n::getView(STRING_FOR_AS_PLAYED), //<
l10n::getView(STRING_FOR_PATTERN), //<
};
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [readability-else-after-return]

Suggested change
}
return {
l10n::getView(STRING_FOR_UP), //<
l10n::getView(STRING_FOR_DOWN), //<
l10n::getView(STRING_FOR_UP_DOWN), //<
l10n::getView(STRING_FOR_RANDOM), //<
l10n::getView(STRING_FOR_WALK1), //<
l10n::getView(STRING_FOR_WALK2), //<
l10n::getView(STRING_FOR_WALK3), //<
l10n::getView(STRING_FOR_AS_PLAYED), //<
l10n::getView(STRING_FOR_PATTERN), //<
};

l10n::getView(STRING_FOR_ALTERNATE), //<
l10n::getView(STRING_FOR_RANDOM), //<
};
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [readability-else-after-return]

Suggested change
}
return {
l10n::getView(STRING_FOR_UP), //<
l10n::getView(STRING_FOR_DOWN), //<
l10n::getView(STRING_FOR_UP_DOWN), //<
l10n::getView(STRING_FOR_ALTERNATE), //<
l10n::getView(STRING_FOR_RANDOM), //<
};

return !soundEditor.editingGateDrumRow() && !soundEditor.editingKitAffectEntire();
}
void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: result of a data() call may not be null terminated, provide size information to the callee to prevent potential issues [bugprone-suspicious-stringview-data-usage]

		label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
                                                                                        ^

@@ -40,6 +40,10 @@ class RandomizerLock final : public Selection {
};
}

void getColumnLabel(StringBuf& label) override {
label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: result of a data() call may not be null terminated, provide size information to the callee to prevent potential issues [bugprone-suspicious-stringview-data-usage]

		label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
                                                                                        ^

@@ -95,6 +94,7 @@ extern deluge::gui::menu_item::Submenu* parentsForSoundShortcuts[kDisplayWidth][
extern deluge::gui::menu_item::Submenu* parentsForAudioShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parentsForSongShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parentsForKitGlobalFXShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parentsForMidiOrCVParamShortcuts[kDisplayWidth][kDisplayHeight];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: invalid case style for variable 'parentsForMidiOrCVParamShortcuts' [readability-identifier-naming]

Suggested change
extern deluge::gui::menu_item::Submenu* parentsForMidiOrCVParamShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parents_for_midi_or_cv_param_shortcuts[kDisplayWidth][kDisplayHeight];

@@ -95,6 +94,7 @@ extern deluge::gui::menu_item::Submenu* parentsForSoundShortcuts[kDisplayWidth][
extern deluge::gui::menu_item::Submenu* parentsForAudioShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parentsForSongShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parentsForKitGlobalFXShortcuts[kDisplayWidth][kDisplayHeight];
extern deluge::gui::menu_item::Submenu* parentsForMidiOrCVParamShortcuts[kDisplayWidth][kDisplayHeight];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: static variable 'parentsForMidiOrCVParamShortcuts' may be dynamically initialized in this header file [bugprone-dynamic-static-initializers]

extern deluge::gui::menu_item::Submenu* parentsForMidiOrCVParamShortcuts[kDisplayWidth][kDisplayHeight];
                                        ^

@@ -527,8 +527,8 @@ void AudioClip::sampleZoneChanged(ModelStackWithTimelineCounter const* modelStac

int32_t priorityRating = 1; // probably better fix this...

voiceSample->sampleZoneChanged(&guide, ((Sample*)sampleHolder.audioFile), MarkerType::END,
getLoopingType(modelStack), priorityRating, true);
voiceSample->sampleZoneChanged(&guide, ((Sample*)sampleHolder.audioFile), sampleControls.isReversed(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use C-style cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-cstyle-cast]

Suggested change
voiceSample->sampleZoneChanged(&guide, ((Sample*)sampleHolder.audioFile), sampleControls.isReversed(),
dynamic_cast<Sample*>()

@@ -780,7 +780,7 @@ LoopType AudioClip::getLoopingType(ModelStackWithTimelineCounter const* modelSta
// end-point is set to beyond the waveform's length).

bool shouldLoop =
(sampleControls.reversed || sampleHolder.endPos <= ((Sample*)sampleHolder.audioFile)->lengthInSamples)
(sampleControls.isReversed() || sampleHolder.endPos <= ((Sample*)sampleHolder.audioFile)->lengthInSamples)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use C-style cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-cstyle-cast]

Suggested change
(sampleControls.isReversed() || sampleHolder.endPos <= ((Sample*)sampleHolder.audioFile)->lengthInSamples)
dynamic_cast<Sample*>()

@@ -2281,6 +2282,9 @@ Error InstrumentClip::setAudioInstrument(Instrument* newInstrument, Song* song,
if (newInstrument->type == OutputType::SYNTH) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: repeated branch body in conditional chain [bugprone-branch-clone]

                                                ^
Additional context

src/deluge/model/clip/instrument_clip.cpp:2284: end of the original

^

src/deluge/model/clip/instrument_clip.cpp:2284: clone 1 starts here

                                                   ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant