This commit is contained in:
parent
6bc125be1c
commit
ed5a4379db
76 changed files with 1418 additions and 988 deletions
|
|
@ -196,7 +196,8 @@ export class GenerativePianoEngine {
|
|||
|
||||
if (
|
||||
this.isWaitingForGestureAccent &&
|
||||
now - this.lastGestureAccentAt >= generativePianoTuning.gestureAccentMinIntervalSeconds
|
||||
now - this.lastGestureAccentAt >=
|
||||
generativePianoTuning.gestureAccentMinIntervalSeconds
|
||||
) {
|
||||
this.recordTouchDown({
|
||||
vibe,
|
||||
|
|
@ -554,7 +555,9 @@ export class GenerativePianoEngine {
|
|||
const chordIntervals = getChordIntervals(chord, false);
|
||||
const degrees = this.rotate(
|
||||
pool.scaleDegrees,
|
||||
Math.round(strength * generativePianoTuning.gestureAccent.rotationStrengthMultiplier)
|
||||
Math.round(
|
||||
strength * generativePianoTuning.gestureAccent.rotationStrengthMultiplier
|
||||
)
|
||||
);
|
||||
|
||||
const midi = this.chooseMidi(
|
||||
|
|
@ -705,7 +708,9 @@ export class GenerativePianoEngine {
|
|||
);
|
||||
layer.motifOffsets.push(this.getMotifOffset(strength));
|
||||
if (layer.motifOffsets.length > generativePianoTuning.brushMotifMaxSteps) {
|
||||
layer.motifOffsets = layer.motifOffsets.slice(-generativePianoTuning.brushMotifMaxSteps);
|
||||
layer.motifOffsets = layer.motifOffsets.slice(
|
||||
-generativePianoTuning.brushMotifMaxSteps
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -789,7 +794,9 @@ export class GenerativePianoEngine {
|
|||
const chordIntervals = getChordIntervals(chord, false);
|
||||
const rootMidi = profile.rootMidi + chord.rootOffset;
|
||||
const useChordTone =
|
||||
this.brushStreamNoteIndex % generativePianoTuning.brushStream.chordToneEverySteps === 0;
|
||||
this.brushStreamNoteIndex %
|
||||
generativePianoTuning.brushStream.chordToneEverySteps ===
|
||||
0;
|
||||
const source = useChordTone
|
||||
? {
|
||||
baseMidi: rootMidi,
|
||||
|
|
@ -897,7 +904,8 @@ export class GenerativePianoEngine {
|
|||
layer.energy *
|
||||
this.getBrushPhraseFade(layer, startTime) *
|
||||
(generativePianoTuning.brushPhrase.layerIntensityBase +
|
||||
layer.maniaAmount * generativePianoTuning.brushPhrase.layerIntensityManiaWeight),
|
||||
layer.maniaAmount *
|
||||
generativePianoTuning.brushPhrase.layerIntensityManiaWeight),
|
||||
}));
|
||||
const dominant = layerStates.reduce<{
|
||||
layer: BrushPhraseLayer;
|
||||
|
|
@ -1073,7 +1081,8 @@ export class GenerativePianoEngine {
|
|||
}
|
||||
|
||||
return (
|
||||
barIndex % generativePianoTuning.supportBarSpacing === generativePianoTuning.supportBarOffset
|
||||
barIndex % generativePianoTuning.supportBarSpacing ===
|
||||
generativePianoTuning.supportBarOffset
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -1136,7 +1145,8 @@ export class GenerativePianoEngine {
|
|||
): number {
|
||||
const midiLift =
|
||||
clamp01(
|
||||
(midi - generativePianoTuning.lowpass.midiBase) / generativePianoTuning.lowpass.midiRange
|
||||
(midi - generativePianoTuning.lowpass.midiBase) /
|
||||
generativePianoTuning.lowpass.midiRange
|
||||
) * generativePianoTuning.lowpass.midiLiftHz;
|
||||
return clamp(
|
||||
this.config.piano.lowpassHz *
|
||||
|
|
|
|||
Loading…
Reference in a new issue