Initial commit
This commit is contained in:
commit
7790114cf8
9
01_start.ksy
Normal file
9
01_start.ksy
Normal file
|
@ -0,0 +1,9 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
seq: {}
|
||||
instances: {}
|
||||
types: {}
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
19
02_preamble.ksy
Normal file
19
02_preamble.ksy
Normal file
|
@ -0,0 +1,19 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
encoding: ascii
|
||||
endian: le
|
||||
seq:
|
||||
- id: magic
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: wave_str
|
||||
type: str
|
||||
size: 4
|
||||
instances: {}
|
||||
types: {}
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
31
03_sections.ksy
Normal file
31
03_sections.ksy
Normal file
|
@ -0,0 +1,31 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
encoding: ascii
|
||||
endian: le
|
||||
seq:
|
||||
- id: magic
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: wave_str
|
||||
type: str
|
||||
size: 4
|
||||
- id: sections
|
||||
type: section
|
||||
repeat: eos
|
||||
instances: {}
|
||||
types:
|
||||
section:
|
||||
seq:
|
||||
- id: name
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: content
|
||||
size: size
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
50
04_fmt.ksy
Normal file
50
04_fmt.ksy
Normal file
|
@ -0,0 +1,50 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
encoding: ascii
|
||||
endian: le
|
||||
seq:
|
||||
- id: magic
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: wave_str
|
||||
type: str
|
||||
size: 4
|
||||
- id: sections
|
||||
type: section
|
||||
repeat: eos
|
||||
instances: {}
|
||||
types:
|
||||
section:
|
||||
seq:
|
||||
- id: name
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: content
|
||||
size: size
|
||||
type:
|
||||
switch-on: name
|
||||
cases:
|
||||
'"fmt "': fmt
|
||||
fmt:
|
||||
seq:
|
||||
- id: type
|
||||
type: u2
|
||||
- id: channels
|
||||
type: u2
|
||||
- id: samplerate
|
||||
type: u4
|
||||
- id: datarate
|
||||
type: u4
|
||||
doc: Might also be datarate per channel
|
||||
- id: bytes_per_sample
|
||||
type: u2
|
||||
- id: bits_per_unit
|
||||
type: u2
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
74
05_data.ksy
Normal file
74
05_data.ksy
Normal file
|
@ -0,0 +1,74 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
encoding: ascii
|
||||
endian: le
|
||||
seq:
|
||||
- id: magic
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: wave_str
|
||||
type: str
|
||||
size: 4
|
||||
- id: sections
|
||||
type: section
|
||||
repeat: eos
|
||||
instances: {}
|
||||
types:
|
||||
section:
|
||||
seq:
|
||||
- id: name
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: content
|
||||
size: size
|
||||
type:
|
||||
switch-on: name
|
||||
cases:
|
||||
'"fmt "': fmt
|
||||
'"data"': data
|
||||
fmt:
|
||||
seq:
|
||||
- id: type
|
||||
type: u2
|
||||
- id: channels
|
||||
type: u2
|
||||
- id: samplerate
|
||||
type: u4
|
||||
- id: datarate
|
||||
type: u4
|
||||
doc: Might also be datarate per channel
|
||||
- id: bytes_per_sample
|
||||
type: u2
|
||||
- id: bits_per_unit
|
||||
type: u2
|
||||
instances:
|
||||
combined_type:
|
||||
value: type * 100 + bits_per_unit
|
||||
data:
|
||||
seq:
|
||||
- id: content
|
||||
type: sample
|
||||
repeat: eos
|
||||
types:
|
||||
sample:
|
||||
seq:
|
||||
- id: data
|
||||
type:
|
||||
switch-on: _root.sections[0].content.\
|
||||
as<fmt>.combined_type
|
||||
cases:
|
||||
332: f4
|
||||
108: u1
|
||||
116: s2
|
||||
132: s4
|
||||
repeat: expr
|
||||
repeat-expr: _root.sections[0].content.\
|
||||
as<fmt>.channels
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
90
06_fact_peak.ksy
Normal file
90
06_fact_peak.ksy
Normal file
|
@ -0,0 +1,90 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
encoding: ascii
|
||||
endian: le
|
||||
seq:
|
||||
- id: magic
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: wave_str
|
||||
type: str
|
||||
size: 4
|
||||
- id: sections
|
||||
type: section
|
||||
repeat: eos
|
||||
instances: {}
|
||||
types:
|
||||
section:
|
||||
seq:
|
||||
- id: name
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: content
|
||||
size: size
|
||||
type:
|
||||
switch-on: name
|
||||
cases:
|
||||
'"fmt "': fmt
|
||||
'"data"': data
|
||||
'"fact"': fact
|
||||
'"PEAK"': peak
|
||||
fmt:
|
||||
seq:
|
||||
- id: type
|
||||
type: u2
|
||||
- id: channels
|
||||
type: u2
|
||||
- id: samplerate
|
||||
type: u4
|
||||
- id: datarate
|
||||
type: u4
|
||||
doc: Might also be datarate per channel
|
||||
- id: bytes_per_sample
|
||||
type: u2
|
||||
- id: bits_per_unit
|
||||
type: u2
|
||||
instances:
|
||||
combined_type:
|
||||
value: type * 100 + bits_per_unit
|
||||
data:
|
||||
seq:
|
||||
- id: content
|
||||
type: sample
|
||||
repeat: eos
|
||||
types:
|
||||
sample:
|
||||
seq:
|
||||
- id: data
|
||||
type:
|
||||
switch-on: _root.sections[0].content.\
|
||||
as<fmt>.combined_type
|
||||
cases:
|
||||
332: f4
|
||||
108: u1
|
||||
116: s2
|
||||
132: s4
|
||||
repeat: expr
|
||||
repeat-expr: _root.sections[0].content.\
|
||||
as<fmt>.channels
|
||||
fact:
|
||||
seq:
|
||||
- id: samples
|
||||
type: u4
|
||||
peak:
|
||||
seq:
|
||||
- id: unknown_0
|
||||
type: u4
|
||||
- id: timestamp
|
||||
type: u4
|
||||
- id: peak
|
||||
type: f4
|
||||
- id: index
|
||||
type: u4
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
110
07_list.ksy
Normal file
110
07_list.ksy
Normal file
|
@ -0,0 +1,110 @@
|
|||
meta:
|
||||
id: wav
|
||||
file-extension: wav
|
||||
encoding: ascii
|
||||
endian: le
|
||||
seq:
|
||||
- id: magic
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: wave_str
|
||||
type: str
|
||||
size: 4
|
||||
- id: sections
|
||||
type: section
|
||||
repeat: eos
|
||||
instances: {}
|
||||
types:
|
||||
section:
|
||||
seq:
|
||||
- id: name
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: content
|
||||
size: size
|
||||
type:
|
||||
switch-on: name
|
||||
cases:
|
||||
'"fmt "': fmt
|
||||
'"data"': data
|
||||
'"fact"': fact
|
||||
'"PEAK"': peak
|
||||
'"LIST"': list
|
||||
fmt:
|
||||
seq:
|
||||
- id: type
|
||||
type: u2
|
||||
- id: channels
|
||||
type: u2
|
||||
- id: samplerate
|
||||
type: u4
|
||||
- id: datarate
|
||||
type: u4
|
||||
doc: Might also be datarate per channel
|
||||
- id: bytes_per_sample
|
||||
type: u2
|
||||
- id: bits_per_unit
|
||||
type: u2
|
||||
instances:
|
||||
combined_type:
|
||||
value: type * 100 + bits_per_unit
|
||||
data:
|
||||
seq:
|
||||
- id: content
|
||||
type: sample
|
||||
repeat: eos
|
||||
types:
|
||||
sample:
|
||||
seq:
|
||||
- id: data
|
||||
type:
|
||||
switch-on: _root.sections[0].content.\
|
||||
as<fmt>.combined_type
|
||||
cases:
|
||||
332: f4
|
||||
108: u1
|
||||
116: s2
|
||||
132: s4
|
||||
repeat: expr
|
||||
repeat-expr: _root.sections[0].content.\
|
||||
as<fmt>.channels
|
||||
fact:
|
||||
seq:
|
||||
- id: samples
|
||||
type: u4
|
||||
peak:
|
||||
seq:
|
||||
- id: unknown_0
|
||||
type: u4
|
||||
- id: timestamp
|
||||
type: u4
|
||||
- id: peak
|
||||
type: f4
|
||||
- id: index
|
||||
type: u4
|
||||
list:
|
||||
seq:
|
||||
- id: info_str
|
||||
type: str
|
||||
size: 4
|
||||
- id: contents
|
||||
repeat: eos
|
||||
type: content
|
||||
types:
|
||||
content:
|
||||
seq:
|
||||
- id: name
|
||||
type: str
|
||||
size: 4
|
||||
- id: size
|
||||
type: u4
|
||||
- id: content
|
||||
type: str
|
||||
size: size
|
||||
enums: {}
|
||||
doc: Hello, world
|
||||
doc-ref: https://example.com
|
8
README.md
Normal file
8
README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Kaitai Struct Workshop
|
||||
|
||||
## Links:
|
||||
|
||||
- [kaitai.io](https://kaitai.io)
|
||||
- [User Guide](https://doc.kaitai.io/user_guide.html)
|
||||
- [Quick Start](https://kaitai.io/#quick-start)
|
||||
- [Tutorial video](https://vimeo.com/495432528)
|
BIN
wav_files/f32-mono.wav
Normal file
BIN
wav_files/f32-mono.wav
Normal file
Binary file not shown.
BIN
wav_files/s16-mono.wav
Normal file
BIN
wav_files/s16-mono.wav
Normal file
Binary file not shown.
BIN
wav_files/s8-stereo.wav
Normal file
BIN
wav_files/s8-stereo.wav
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user