Portamento
Closed this issue · 0 comments
Pently has met these objections, in the order of their being solved:
- "I can't use Pently because it's not packaged." --DRW
Solved in December 2015 by documenting its API and adding tools for an MML dialect. - "I can't use Pently because the rest of my team uses FamiTracker." --DRW, Doug Fraker
Solved by NovaSquirrel in ft2pently. - "I can't use Pently because it doesn't support portamento." --Doug Fraker, Greg Caldwell
This remains unsolved.
Portamento was previously held up by two things. The first was whether to represent pitch change rate as period, frequency, or log frequency. I want to keep a pattern sounding reasonable when transposed and keep my options open for porting Pently to environments that use frequency instead of period, such as the Super NES S-DSP. But with a recent refactor of vibrato to represent the pitch change as an explicit fraction of a semitone, log frequency has become the clear way forward.
The other was how to handle the dynamic range of portamento. I've seen tracker compositions with pitch slides of multiple semitones per frame, and I've seen others that take 30 frames to move one semitone. I also want to throw in behavior similar to that of the Roland TB-303 bass sequencer, whose portamento uses a low-pass filter in the log frequency domain to make arrival time independent of distance to the target note as well. I guess I can make three kinds of portamento rate, some logarithmic.
- Constant whole semitone rate: 0-15 whole semitones per frame
- Constant fractional rate: Fractional rates of 1/256 semitone per
frame times 4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, or 384 - TB-303 style proportional rate: Speed in each frame is distance to
target pitch divided by 2, 4, 8, 16, 32, 64, 128, or 256
This will require at least three new variables for each channel: note current pitch whole number, note current pitch fraction, and portamento rate setting.