ws-audio2: music/ptm (PolyTracker): it family, MOD letters with S3M fine slides, note slides, delta 8 / 16-bit samples; engine flags.panLaw = ft2 (square-root panning)
ops/MusicOps: accept modules of the other tracker formats by their engine family (Tracker.family), a one-line backward-compatible change.
This commit is contained in:
1 parent
48b4b4cc4e
commit
60544a3a77
9 files changed
+409
-4
No files matched your search
@@ -221,6 +221,7 @@ function Player.new(m: any, sampleRate: number, opts: any): any
|
||||
autoReset = flags.autoReset or false,
|
||||
st2Tempo = flags.st2Tempo or false,
|
||||
oktSlides = flags.oktSlides or false,
|
||||
ft2Pan = flags.panLaw == "ft2",
|
||||
ord = 0,
|
||||
row = 0,
|
||||
tick = 0,
|
||||
@@ -1905,6 +1906,10 @@ local function updateVoice(st: any, v: any)
|
||||
local g = vol * st.master
|
||||
if v.surround then
|
||||
v.tl, v.tr = g * 0.5, -g * 0.5
|
||||
elseif st.ft2Pan then
|
||||
-- FT2's square-root pan law (OpenMPT's CompatibleFT2 mix levels), pan at most 255
|
||||
local p = min(pan, 255)
|
||||
v.tl, v.tr = g * math.sqrt((256 - p) / 256), g * math.sqrt(p / 256)
|
||||
else
|
||||
v.tl, v.tr = g * (256 - pan) / 256, g * pan / 256
|
||||
end
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
-- periods = "amiga" (ProTracker period table + PAL clock, as MOD) | "hz" (periods are frequencies in
|
||||
-- Hz: 669, FAR; slides move hzSlide Hz per unit, tone portamento hzSlide * hzTonePorta),
|
||||
-- fastPortas (slides on tick 0 too), autoTonePorta (a tone portamento keeps running on later rows),
|
||||
-- autoReset (669: any effect stops the auto slides), st2Tempo (S3M family A: Scream Tracker 2 tempo) }
|
||||
-- autoReset (669: any effect stops the auto slides), st2Tempo (S3M family A: Scream Tracker 2 tempo),
|
||||
-- oktSlides (Oktalyzer note slides), panLaw = "ft2" (square-root panning, OpenMPT's FT2 mix levels) }
|
||||
-- channelPan { 0..256 per channel (128 centre; 512 = surround); MOD: 64 / 192 (Amiga L R R L at half width,
|
||||
-- as OpenMPT plays it; set 0 / 256 or render with stereoSeparation = 200 for hard panning) }, channelVolume { 0..64 }, channelMute { bool }
|
||||
-- patterns { Pattern } (pattern n at patterns[n + 1]); Pattern = { rows, data }: data holds rows * channels
|
||||
|
||||
Reference in new issue
Block a user