strudel
strudel copied to clipboard
Tonal MIDI is C4-based notation while Tidal is C3 I think.
Reading through Tidal docs, the default base-pitch of a sample is C3 which is also supposed to be middle C (note 60). It appears to me that the Tonal package operates with C4 as 60 and this means that some things are off by one octave.
In the case of the base-pitch example here, the unspecified base-pitch for gtr produces a different result than when specified as 'c3'. My reading of the docs suggests that this is a bug.
If Strudel adopts/adheres-to the C3 convention (which is the more common one imho), then one would need to uniformly add 12 to all note-numbers coming out of Tonal. Perhaps ideally the convention could be a configuration option for Tonal. A quick glance at the webaudio/sampler code shows calls to core/utils.js:toMidi which appears to produce octaves starting at 1. The sampler code corrects for this by subtracting 36 (3 octaves) which seems about right I think.