Replies: 1 comment
-
import {Scale, Range} from 'tonal';
const scale = Scale.degrees('c4 major');
Range.numeric([1, 20]).map(scale); // =>
// => ["C4", "D4", "E4", "F4", "G4", "A4", "B4", "C5", "D5", "E5", "F5", "G5", "A5", "B5", "C6", "D6", "E6", "F6", "G6", "A6"] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there! First off- you all are amazing for making such an incredible library!!
So, I have a genereated array of notes in
C minor
, i.e.['F4', 'G4', 'Bb4', 'Eb5', 'D5', 'C5']
I want to loop over them and randomly transpose some of them through the scale:
I've tried a lot of different ways to get this working and I'm certain that I'm missing something obvious 😅. For example, this abomination was one of many attempts but doesn't preserve the right octave and breaks if the interval is negative:
The scale I'm using is always 1 of 4 options
C [minor | major | minor pentatonic | major pentatonic]
My main problem is that
scale.notes
only returns 1 octave, but my notes span multiple octaves in the scale.Is there a proper way to transpose notes along a scale based on a random interval?
Beta Was this translation helpful? Give feedback.
All reactions