5 个版本
0.2.3 | 2021年1月3日 |
---|---|
0.2.2 | 2021年1月2日 |
0.2.1 | 2020年12月27日 |
0.2.0 | 2020年12月27日 |
0.1.0 | 2020年10月15日 |
#627 in 音频
42KB
716 行
vsrs
用于为 Volca Sample 生成样本流的命令行工具
使用配置文件,您可以配置要使用的样本,将它们放在哪个索引中,以及是否压缩样本。您还可以使用 .alldata 文件生成带有工厂预设样本的流。
该工具输出一个 .wav
文件,该文件可以用于将数据传输到 Volca Sample。有关传输过程的详细信息,请参阅 将 syrostream 传输到您的 volca sample
安装
您需要安装 Rust,有关安装说明,请参阅 https://rust-lang.net.cn/tools/install。
cargo install vsrs
运行
加载配置文件
vsrs load example.ron
使用 .alldata 文件恢复出厂设置。文件可以在 https://github.com/korginc/volcasample/tree/master/alldata 找到
vsrs reset all_sample_preset.alldata
要从命令行播放 .wav
文件,您可以在 Linux 上使用 aplay
,或在 macOS 上使用 afplay
。 警告:不要通过扬声器播放,确保您已正确设置音频以首先播放到 volca!
注意事项
- 在加载新样本之前,使用
all_sample_empty.alldata
清除样本内存是一种好习惯,否则出现内存满错误的风险更高。
实际例子
有关配置文件示例,请查看 contrib 目录。
配置格式
支持的配置格式
RON
// example.ron
#![enable(implicit_some)]
VolcaSample(
// optional, valid values are 8-16
default_compression: 16,
// map which supports keys in the range 0-99
samples: {
// Put kick.wav at sample index 0, and compress it to a bit depth of 8
0: Sample((
// the file path is relative to the location of the configuration file
file: "kick.wav",
// optional, valid values are 8-16
compression: 8,
)),
// Erase the sample at index 1
1: Erase,
},
// sets the default part setting for the reverb function
// optional, on or off (off if not specified)
default_part_reverb: on,
// map of sequence patterns, valid keys are 0-9
patterns: {
0: (
// map of pattern parts, valid keys are 0-9
parts: {
0: (
// the sample to use for this part, valid values are 0-99
sample: 0,
// sequence steps, 1 = on, 0 = off
steps: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
// part toggle options, all optional
loop: on,
reverb: off,
reverse: on,
motion: on,
mute: off,
// part parameters, all optional
level: 127, // 0-127 (127)
pan: 64, // 1-127 (64=center) (64)
speed: 64, // semitone = 40-88 (64=center) (64), continuous = 129-255 (192=center)
amp_eg_attack: 64, // 0-127 (0)
amp_eg_decay: 64, // 0-127 (127)
pitch_eg_int: 64, // 1-127 (64=center) (64)
pitch_eg_attack: 64, // 0-127 (0)
pitch_eg_decay: 64, // 0-127 (127)
starting_point: 64, // 0-127 (0)
length: 64, // 0-127 (127)
hi_cut: 64, // 0-127 (127)
// motion sequences for the part, optional
motion_sequences: (
// valid values: 0-127
level_start: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
level_end: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
// valid values: 1-127
pan_start: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
pan_end: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
// valid values: semitone = 40-88, continuous = 129-255
speed_start: [40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85],
speed_end: [129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249],
// valid values: 0-127
amp_eg_attack: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
amp_eg_decay: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
// valid values: 1-127
pitch_eg_int: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
// valid values: 0-127
pitch_eg_attack: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
pitch_eg_decay: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
start_point: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
length: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
hi_cut: [1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120],
),
),
},
),
},
)
JSON
有关值更详细的信息,请参阅 RON 部分。
{
"default_compression": 16,
"samples": {
"0": {
"Sample": {
"file": "kick.wav",
"compression": 8
}
},
"1": "Erase"
},
"default_part_reverb": "on",
"patterns": {
"0": {
"parts": {
"0": {
"sample": 0,
"steps": [ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ],
"motion": "off",
"loop": "on",
"reverb": "off",
"reverse": "on",
"mute": "off",
"level": 127,
"pan": 64,
"speed": 64,
"amp_eg_attack": 64,
"amp_eg_decay": 64,
"pitch_eg_int": 64,
"pitch_eg_attack": 64,
"pitch_eg_decay": 64,
"starting_point": 64,
"length": 64,
"hi_cut": 64,
"motion_sequences": {
"level_start": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"level_end": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"pan_start": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"pan_end": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"speed_start": [ 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85 ],
"speed_end": [ 129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249 ],
"amp_eg_attack": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"amp_eg_decay": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"pitch_eg_int": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"pitch_eg_attack": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"pitch_eg_decay": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"start_point": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"length": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ],
"hi_cut": [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
}
}
}
}
}
}
YAML
有关值更详细的信息,请参阅 RON 部分。
default_compression: 16
samples:
0:
Sample:
file: kick.wav
compression: 8
1: Erase
default_part_reverb: on
patterns:
0:
parts:
0:
sample: 0
steps: [ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ]
motion: off
loop: on
reverb: off
reverse: on
mute: off
level: 127
pan: 64
speed: 64
amp_eg_attack: 64
amp_eg_decay: 64
pitch_eg_int: 64
pitch_eg_attack: 64
pitch_eg_decay: 64
starting_point: 64
length: 64
hi_cut: 64
motion_sequences:
level_start: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
level_end: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
pan_start: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
pan_end: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
speed_start: [ 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85 ]
speed_end: [ 129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249 ]
amp_eg_attack: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
amp_eg_decay: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
pitch_eg_int: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
pitch_eg_attack: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
pitch_eg_decay: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
start_point: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
length: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
hi_cut: [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 ]
依赖关系
~4.5–7.5MB
~131K SLoC