Skip to content

Commit 363959b

Browse files
committed
Added optional string-specific maximum stops
1 parent d160bd6 commit 363959b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/string-fingerings/fingerings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function* stopsForString<TString extends InstrumentString>(
8383
return
8484
}
8585

86-
if (stopIndex > instrument.stops) {
86+
if (stopIndex > (instrumentString.stops ?? instrument.stops)) {
8787
console.debug(`${noteName(noteNumber)} is too high to stop for ${instrumentString.name} string`)
8888
}
8989
else {

packages/string-fingerings/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export interface InstrumentString {
2222
openNote: number
2323
/** Additional open strings, as a MIDI number (for low range extensions) */
2424
additionalOpenNotes?: number[]
25+
/** Maximum number of semitones that can be stopped over the open string */
26+
stops?: number
2527
}
2628

2729
/** Represent a string instrument */

0 commit comments

Comments
 (0)