not sure
This commit is contained in:
parent
560398fefb
commit
80ed37298b
73 changed files with 3619 additions and 1295 deletions
|
|
@ -1,5 +1,9 @@
|
|||
import { VibePreset } from '../vibes';
|
||||
import { GardenAudioChord, GardenAudioVibeProfile } from './garden-audio-config';
|
||||
import {
|
||||
GardenAudioChord,
|
||||
gardenAudioConfig,
|
||||
GardenAudioVibeProfile,
|
||||
} from './garden-audio-config';
|
||||
|
||||
export const getVibeProfile = (vibe: VibePreset): GardenAudioVibeProfile => vibe.audio;
|
||||
|
||||
|
|
@ -8,10 +12,14 @@ export const getChordIntervals = (
|
|||
openVoicing: boolean
|
||||
): Array<number> => {
|
||||
if (openVoicing) {
|
||||
return chord.quality === 'major' ? [0, 7, 12, 16] : [0, 7, 12, 15];
|
||||
return chord.quality === 'major'
|
||||
? gardenAudioConfig.generativePiano.chordVoicings.majorOpen
|
||||
: gardenAudioConfig.generativePiano.chordVoicings.minorOpen;
|
||||
}
|
||||
|
||||
return chord.quality === 'major' ? [0, 4, 7, 12, 16] : [0, 3, 7, 12, 15];
|
||||
return chord.quality === 'major'
|
||||
? gardenAudioConfig.generativePiano.chordVoicings.majorClosed
|
||||
: gardenAudioConfig.generativePiano.chordVoicings.minorClosed;
|
||||
};
|
||||
|
||||
export const degreeToSemitone = (
|
||||
|
|
@ -21,5 +29,7 @@ export const degreeToSemitone = (
|
|||
const scaleIndex =
|
||||
((degree % profile.scale.length) + profile.scale.length) % profile.scale.length;
|
||||
const octave = Math.floor(degree / profile.scale.length);
|
||||
return profile.scale[scaleIndex] + octave * 12;
|
||||
return (
|
||||
profile.scale[scaleIndex] + octave * gardenAudioConfig.piano.pitchSemitonesPerOctave
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue