You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently, playing samples tonally is quite cumbersome unless they are recorded at some standard pitch (C seems to be a common choice). what if we could tag sample files with a base pitch, have SuperDirt read that information and make it automatically repitch the samples to match incoming notes?
in fact i have already implemented this :) here is how it works:
pitch metadata is added to WAV files in the form of MIDI unity note / MIDI pitch fraction fields of a smpl chunk, using a utility such as my pitcheon
SuperDirt obtains the pitch metadata by parsing Soundfile.readHeaderAsString1
for events containing a tune argument with value 1, frequency and sample duration are scaled relative to the obtained pitch metadata (tune defaults to 0, preserving the old behavior)
or, from the musician's perspective:
i have a bunch of one-shot samples recorded at wildly mismatched pitches; i do d1 $ n "<0 1 2 3 4>*8" # s "mysamples" and it sounds terrible!
i run pitcheon on my samples
i restart SuperDirt, do d1 $ n "<0 1 2 3 4>*8" # s "mysamples" # pF "tune" 1, everything plays in a beautiful consonance of C, audience erupts into applause, i am booked for numerous high-paying gigs
...anyway, would you be interested in upstreaming this feature? my implementation probably has room for improvement but i would be happy to work out the details in a PR.
Footnotes
this string is basically a log written by libsndfile. it would be nicer to access the raw data, not only for performance and regex-matching-ugly reasons but because libsndfile does some questionable math on the pitch info which i have to undo. ↩
The text was updated successfully, but these errors were encountered:
currently, playing samples tonally is quite cumbersome unless they are recorded at some standard pitch (C seems to be a common choice). what if we could tag sample files with a base pitch, have SuperDirt read that information and make it automatically repitch the samples to match incoming notes?
in fact i have already implemented this :) here is how it works:
smpl
chunk, using a utility such as my pitcheonSoundfile.readHeaderAsString
1tune
argument with value 1, frequency and sample duration are scaled relative to the obtained pitch metadata (tune
defaults to 0, preserving the old behavior)or, from the musician's perspective:
d1 $ n "<0 1 2 3 4>*8" # s "mysamples"
and it sounds terrible!d1 $ n "<0 1 2 3 4>*8" # s "mysamples" # pF "tune" 1
, everything plays in a beautiful consonance of C, audience erupts into applause, i am booked for numerous high-paying gigs...anyway, would you be interested in upstreaming this feature? my implementation probably has room for improvement but i would be happy to work out the details in a PR.
Footnotes
this string is basically a log written by libsndfile. it would be nicer to access the raw data, not only for performance and regex-matching-ugly reasons but because libsndfile does some questionable math on the pitch info which i have to undo. ↩
The text was updated successfully, but these errors were encountered: