mirror of
https://github.com/ScrelliCopter/VGM-Tools
synced 2025-02-21 04:09:25 +11:00
19 lines
532 B
Python
19 lines
532 B
Python
# 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"))
|