first version of blip
This commit is contained in:
parent
9363be8254
commit
5577a05191
|
@ -0,0 +1,18 @@
|
|||
use crate::note::Note;
|
||||
|
||||
/// thanks to Rumple_Frumpkins from Bitsy Talk for his help in figuring out the blip format.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Blip {
|
||||
id: String,
|
||||
notes: Vec<Note>,
|
||||
name: Option<String>,
|
||||
/// Attack (ms), Decay (ms), Sustain (level: 1-15), Hold (sustain duration, ms), Release (ms)
|
||||
envelope: [u8; 5],
|
||||
/// first value is milliseconds per note;
|
||||
/// second value is a modifier to the first note (add or subtract milliseconds)
|
||||
beat: [i16; 2],
|
||||
/// I think this is probably pulse width. apparently the potential values are P2, P4 and P8.
|
||||
square: String,
|
||||
/// Notes can sound repeatedly, or just once as the blip fades out.
|
||||
repeat: bool,
|
||||
}
|
Loading…
Reference in New Issue