mirror of
https://github.com/ScrelliCopter/VGM-Tools
synced 2025-02-21 04:09:25 +11:00
wavetable stuff
This commit is contained in:
18
common/waveserum.py
Normal file
18
common/waveserum.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# waveserum.py -- Serum comment chunk support
|
||||
# (C) 2023 a dinosaur (zlib)
|
||||
|
||||
from enum import Enum
|
||||
from common.wavewriter import WaveCommentChunk
|
||||
|
||||
|
||||
class SerumWavetableInterpolation(Enum):
|
||||
NONE = 0
|
||||
LINEAR_XFADE = 1
|
||||
SPECTRAL_MORPH = 2
|
||||
|
||||
|
||||
class WaveSerumCommentChunk(WaveCommentChunk):
|
||||
def __init__(self, size: int, mode: SerumWavetableInterpolation, factory=False):
|
||||
comment = f"<!>{size: <4} {mode.value}{'1' if factory else '0'}000000"
|
||||
comment += " wavetable (www.xferrecords.com)"
|
||||
super().__init__(comment.encode("ascii"))
|
||||
Reference in New Issue
Block a user