Comments (7)
Hi @wildcat510
Thanks for reporting! 👍
But, as far as I know, this is the expected output. For example, "D2" transposed by a "7M" is "C#3"... The same can be applied to "E2" transposed by a "6M" or a "7M". In fact, "E2 major" is exactly the scale you obtained.
Am I missing something?
Regards,
Dani
from tonal.
A major 7th above D2 is C#2 in the same register— otherwise, we would be missing an entire note from the first octave of the scale. C major is correct because a major 7th above C2 is B2 in the same octave. If I'm transposing a C scale (or any scale) in octave register 2 to another key, the whole scale should stay in the same octave register unless I'm using the wrong method for transposing keys. All scales should be played linearly, steps 1 through 7, not steps 1-6 and then 7 an octave higher, or 1-5 with 6 and 7 and octave higher as this leaves the scale registers disjointed and incomplete. After all, in common practice scales are played 1-2-3-4-5-6-7 in the same octave. If you want supporting audio to demonstrate I can provide.
So just like myscale.map(Tonal.transpose('C2'));
produces ["C2", "D2", "E2", "F2", "G2", "A2", "B2"]
, a uniform linear scale played from scale degree 1 to 7, I would expect the same of other keys.
Unless I'm missing something. Is this the right way to go about transposing scales as an entire unit to a different key?
from tonal.
The cutoff for register number is always C no matter what key you're in. C# above D2 is higher than the C that follows D2 so it's in the 3rd register. C#2 is the note below D2
from tonal.
So is there any way I can have scales in keys other than C laid out in a register theoretically consistent with the same way a musician would notate and play it? What is the reason for the cutoff at C if it produces scales inconsistent with common practice?
from tonal.
Hi!
Yes, I think @mrjacobbloom is right here. In western music theory we use always C as the cutoff registry.
Another way to think about it is using interval sizes. For example, 7M is 11 semitones up. That's exactly the distance from D2 to C#3 (and the distance from D2 to C#2 is 1 semitone down).
I don't understand very well your explanation, @wildcat510 but It would help to have some external references or resources.
Anyway, you can always use pitch classes (note names without octave number) to avoid this problem:
["1P", "2M", "3M", "4P", "5P", "6M", "7M"].map(Tonal.transpose("D")) // => ["D", "E", "F#", "G", "A", "B", "C#"]
And you can use Tonal.Note.props
to coerce to an octave: scale.map(note => Tonal.Note.props({ oct: 2 }, note))
or, if you are sure they are all pitch classes, a simple string concatenation: scale.map(note => note + "2")
Hope it helps
Regards
Dani
from tonal.
Looks like I misunderstood the transpose function's application. Concatenating pitch classes works.
Thanks guys!
-Nate
from tonal.
Great! I'm going to close this issue, but feel free to reopen if something is not clear.
from tonal.
Related Issues (20)
- tonaljs/key melodic minor chord HOT 3
- How to transpose note along scale based on interval (across octaves)? HOT 1
- Scale.detect() is producing incorrect results when using a tonic outside the list of provided notes HOT 1
- Chord.get cannot parse `G6add9` HOT 8
- `Scale.scaleNotes` returns an array instead of a pcset. HOT 2
- Cannot import into React Native Expo app HOT 1
- Can create localization? HOT 2
- Importing Mode from mode module call back error in browser environment HOT 1
- Natural notes (sign) HOT 2
- Missing import "Named" when using with Angular HOT 2
- Chord.get throws exception on some strings
- Exact versions HOT 6
- Broken link in README. `pitch-notation-abc` is now `abc-notation`
- Chord to leadsheet notation
- Chord detection inconsistency HOT 2
- Edge case with Interval, possibly note octave designation HOT 1
- Scale.get suggestions HOT 1
- note.height id note defined in various README files
- @tonaljs/note Note.distance does not exist
- [Feature request] Unicode symbol list HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tonal.