diff --git a/4klang.go b/4klang.go index af22de6..3cf8140 100644 --- a/4klang.go +++ b/4klang.go @@ -320,7 +320,7 @@ func read4klangVCO(vals [15]byte, version int) []Unit { func read4klangVCF(vals [15]byte, _ int) []Unit { flags := vals[2] - var stereo, lowpass, bandpass, highpass, neghighpass int + var stereo, lowpass, bandpass, highpass int if flags&0x01 == 0x01 { lowpass = 1 } @@ -332,7 +332,7 @@ func read4klangVCF(vals [15]byte, _ int) []Unit { } if flags&0x08 == 0x08 { lowpass = 1 - neghighpass = 1 + highpass = -1 } if flags&0x10 == 0x10 { stereo = 1 @@ -340,14 +340,12 @@ func read4klangVCF(vals [15]byte, _ int) []Unit { return []Unit{{ Type: "filter", Parameters: map[string]int{ - "stereo": stereo, - "frequency": int(vals[0]), - "resonance": int(vals[1]), - "lowpass": lowpass, - "bandpass": bandpass, - "highpass": highpass, - "negbandpass": 0, - "neghighpass": neghighpass, + "stereo": stereo, + "frequency": int(vals[0]), + "resonance": int(vals[1]), + "lowpass": lowpass, + "bandpass": bandpass, + "highpass": highpass, }}, } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ffcec1..5d071d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Added +- Signal rail that visualizes what happens in the stack, shown on the left side + of each unit in the rack. +- The parameters are now displayed in a grid as knobs, with units of the + instrument going from the top to the bottom. Bezier lines are used to indicate + which sends modulate which ports. ([#173][i173]) - Tabbing works more consistently, with widgets placed in a "tree", and plain Tab moves to the next widget on the same level or more shallow in the tree, while ctrl-Tab moves to next widget, regardless of its depth. This allows the @@ -104,6 +109,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ([#156][i156]) ### Changed +- Send amount defaults to 64 = 0.0 ([#178][i178]) +- BREAKING CHANGE: the negbandpass and neghighpass parameters of the filter unit + were removed. Setting bandpass or highpass to -1 achieves now the same end + result. Setting both negbandpass and bandpass to 1 was previously a no-op. Old + patch and instrument files are converted to the new format when loaded, but + newer Sointu files should not be compiled with an old version of + sointu-compile. - The maximum number of delaylines in the native synth was increased to 128, with slight increase in memory usage ([#155][i155]) - The numeric updown widget has a new appearance. @@ -342,7 +354,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [i166]: https://github.com/vsariola/sointu/issues/166 [i168]: https://github.com/vsariola/sointu/issues/168 [i170]: https://github.com/vsariola/sointu/issues/170 +[i173]: https://github.com/vsariola/sointu/issues/173 [i176]: https://github.com/vsariola/sointu/issues/176 +[i178]: https://github.com/vsariola/sointu/issues/178 [i186]: https://github.com/vsariola/sointu/issues/186 [i192]: https://github.com/vsariola/sointu/issues/192 [i196]: https://github.com/vsariola/sointu/issues/196 diff --git a/examples/patches/physics_girl_st.yml b/examples/patches/physics_girl_st.yml index b5d4d66..048edf9 100644 --- a/examples/patches/physics_girl_st.yml +++ b/examples/patches/physics_girl_st.yml @@ -49,7 +49,7 @@ patch: parameters: {stereo: 0} - type: filter id: 10 - parameters: {bandpass: 0, frequency: 0, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 58, stereo: 0} + parameters: {bandpass: 0, frequency: 0, highpass: 0, lowpass: 1, resonance: 58, stereo: 0} - type: delay id: 4 parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, pregain: 40, stereo: 0} @@ -87,7 +87,7 @@ patch: parameters: {color: 59, detune: 73, gain: 35, phase: 26, shape: 70, stereo: 0, transpose: 57, type: 2, unison: 3} - type: filter id: 31 - parameters: {bandpass: 0, frequency: 37, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 60, stereo: 0} + parameters: {bandpass: 0, frequency: 37, highpass: 0, lowpass: 1, resonance: 60, stereo: 0} - type: mulp id: 24 parameters: {stereo: 0} @@ -198,7 +198,7 @@ patch: parameters: {panning: 64, stereo: 0} - type: filter id: 76 - parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 1} + parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, resonance: 64, stereo: 1} - type: outaux id: 73 parameters: {auxgain: 64, outgain: 64, stereo: 1} diff --git a/go.mod b/go.mod index c944cbc..4d8d6f0 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.24.0 require ( gioui.org v0.8.1-0.20250624114559-c3ce484b5e80 - gioui.org/x v0.7.1 + gioui.org/x v0.8.1 github.com/Masterminds/sprig v2.22.0+incompatible github.com/ebitengine/oto/v3 v3.3.0 github.com/viterin/vek v0.4.2 @@ -23,6 +23,7 @@ require ( git.wow.st/gmp/jni v0.0.0-20210610011705-34026c7e22d0 // indirect github.com/Masterminds/goutils v1.1.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect + github.com/andybalholm/stroke v0.0.0-20221221101821-bd29b49d73f0 // indirect github.com/chewxy/math32 v1.11.1 // indirect github.com/ebitengine/purego v0.8.0 // indirect github.com/go-text/typesetting v0.3.0 // indirect diff --git a/go.sum b/go.sum index d759b18..2abb866 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,8 @@ gioui.org/shader v1.0.8 h1:6ks0o/A+b0ne7RzEqRZK5f4Gboz2CfG+mVliciy6+qA= gioui.org/shader v1.0.8/go.mod h1:mWdiME581d/kV7/iEhLmUgUK5iZ09XR5XpduXzbePVM= gioui.org/x v0.7.1 h1:7bnQHsV7qB36tIUit2WDcUx4Cnmo+6T9I38B9brLQ7o= gioui.org/x v0.7.1/go.mod h1:5CzZ64oFpOaqb2kaMvj+QEr5T3nVuLKD0LizLH32ii0= +gioui.org/x v0.8.1 h1:Q2wumEOfjz3XfRa3TEi6w7dq8+cxV8zsYK8xXQkrCRk= +gioui.org/x v0.8.1/go.mod h1:v2g60aiZtIVR7lNFXZ123+U0kijJeOChODSuqr7MFSI= git.wow.st/gmp/jni v0.0.0-20210610011705-34026c7e22d0 h1:bGG/g4ypjrCJoSvFrP5hafr9PPB5aw8SjcOWWila7ZI= git.wow.st/gmp/jni v0.0.0-20210610011705-34026c7e22d0/go.mod h1:+axXBRUTIDlCeE73IKeD/os7LoEnTKdkp8/gQOFjqyo= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= @@ -17,6 +19,8 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/andybalholm/stroke v0.0.0-20221221101821-bd29b49d73f0 h1:uF5Q/hWnDU1XZeT6CsrRSxHLroUSEYYO3kgES+yd+So= +github.com/andybalholm/stroke v0.0.0-20221221101821-bd29b49d73f0/go.mod h1:ccdDYaY5+gO+cbnQdFxEXqfy0RkoV25H3jLXUDNM3wg= github.com/chewxy/math32 v1.11.1 h1:b7PGHlp8KjylDoU8RrcEsRuGZhJuz8haxnKfuMMRqy8= github.com/chewxy/math32 v1.11.1/go.mod h1:dOB2rcuFrCn6UHrze36WSLVPKtzPMRAQvBvUwkSsLqs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= diff --git a/patch.go b/patch.go index c30f7c6..92894b4 100644 --- a/patch.go +++ b/patch.go @@ -6,6 +6,8 @@ import ( "math" "sort" "strconv" + + "gopkg.in/yaml.v3" ) type ( @@ -39,7 +41,7 @@ type ( // an oscillator, unit.Type == "oscillator" and unit.Parameters["attack"] // could be 64. Most parameters are either limites to 0 and 1 (e.g. stereo // parameters) or between 0 and 128, inclusive. - Parameters map[string]int `yaml:",flow"` + Parameters ParamMap `yaml:",flow"` // VarArgs is a list containing the variable number arguments that some // units require, most notably the DELAY units. For example, for a DELAY @@ -57,16 +59,26 @@ type ( Comment string `yaml:",omitempty"` } + ParamMap map[string]int + // UnitParameter documents one parameter that an unit takes UnitParameter struct { Name string // thould be found with this name in the Unit.Parameters map MinValue int // minimum value of the parameter, inclusive MaxValue int // maximum value of the parameter, inclusive + Neutral int // neutral value of the parameter CanSet bool // if this parameter can be set before hand i.e. through the gui CanModulate bool // if this parameter can be modulated i.e. has a port number in "send" unit DisplayFunc UnitParameterDisplayFunc } + // StackUse documents how a unit will affect the signal stack. + StackUse struct { + Inputs [][]int // Inputs documents which inputs contribute to which outputs. len(Inputs) is the number of inputs. Each input can contribute to multiple outputs, so its a slice. + Modifies []bool // Modifies documents which of the (mixed) inputs are actually modified by the unit + NumOutputs int // NumOutputs is the number of outputs produced by the unit. This is used to determine how many outputs are needed for the unit. + } + UnitParameterDisplayFunc func(int) (value string, unit string) ) @@ -83,7 +95,7 @@ var UnitTypes = map[string]([]UnitParameter){ "xch": []UnitParameter{{Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}}, "distort": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "drive", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}}, + {Name: "drive", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true}}, "hold": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, {Name: "holdfreq", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}}, @@ -98,20 +110,18 @@ var UnitTypes = map[string]([]UnitParameter){ {Name: "invgain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}}, "dbgain": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "decibels", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(40 * (float64(v)/64 - 1)), "dB" }}}, + {Name: "decibels", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(40 * (float64(v)/64 - 1)), "dB" }}}, "filter": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, {Name: "frequency", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: filterFrequencyDispFunc}, {Name: "resonance", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, {Name: "lowpass", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "bandpass", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "highpass", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "negbandpass", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "neghighpass", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}}, + {Name: "bandpass", MinValue: -1, MaxValue: 1, CanSet: true, CanModulate: false}, + {Name: "highpass", MinValue: -1, MaxValue: 1, CanSet: true, CanModulate: false}}, "clip": []UnitParameter{{Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}}, "pan": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "panning", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}}, + {Name: "panning", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true}}, "delay": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, {Name: "pregain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, @@ -145,8 +155,8 @@ var UnitTypes = map[string]([]UnitParameter){ {Name: "channel", MinValue: 0, MaxValue: 6, CanSet: true, CanModulate: false, DisplayFunc: arrDispFunc(channelNames[:])}}, "send": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "amount", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(float64(v)/64 - 1), "" }}, - {Name: "voice", MinValue: 0, MaxValue: 32, CanSet: true, CanModulate: false}, + {Name: "amount", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(float64(v)/64 - 1), "" }}, + {Name: "voice", MinValue: 0, MaxValue: 32, CanSet: true, CanModulate: false, DisplayFunc: sendVoiceDispFunc}, {Name: "target", MinValue: 0, MaxValue: math.MaxInt32, CanSet: true, CanModulate: false}, {Name: "port", MinValue: 0, MaxValue: 7, CanSet: true, CanModulate: false}, {Name: "sendpop", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}}, @@ -159,15 +169,15 @@ var UnitTypes = map[string]([]UnitParameter){ {Name: "gain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}}, "noise": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "shape", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, + {Name: "shape", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true}, {Name: "gain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}}, "oscillator": []UnitParameter{ {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, - {Name: "transpose", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: oscillatorTransposeDispFunc}, - {Name: "detune", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(float64(v-64) / 64), "st" }}, + {Name: "transpose", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: oscillatorTransposeDispFunc}, + {Name: "detune", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(float64(v-64) / 64), "st" }}, {Name: "phase", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, {Name: "color", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, - {Name: "shape", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, + {Name: "shape", MinValue: 0, Neutral: 64, MaxValue: 128, CanSet: true, CanModulate: true}, {Name: "gain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, {Name: "frequency", MinValue: 0, MaxValue: -1, CanSet: false, CanModulate: true}, {Name: "type", MinValue: int(Sine), MaxValue: int(Sample), CanSet: true, CanModulate: false, DisplayFunc: arrDispFunc(oscTypes[:])}, @@ -189,6 +199,30 @@ var UnitTypes = map[string]([]UnitParameter){ "sync": []UnitParameter{}, } +// compile errors if interface is not implemented. +var _ yaml.Unmarshaler = &ParamMap{} + +func (a *ParamMap) UnmarshalYAML(value *yaml.Node) error { + var m map[string]int + if err := value.Decode(&m); err != nil { + return err + } + // Backwards compatibility hack: if the patch was saved with an older + // version of Sointu, it might have used the negbandpass and neghighpass + // parameters, which now correspond to having bandpass as value -1 and + // highpass as value -1. + if n, ok := m["negbandpass"]; ok { + m["bandpass"] = m["bandpass"] - n + delete(m, "negbandpass") + } + if n, ok := m["neghighpass"]; ok { + m["highpass"] = m["highpass"] - n + delete(m, "neghighpass") + } + *a = m + return nil +} + var channelNames = [...]string{"left", "right", "aux1 left", "aux1 right", "aux2 left", "aux2 right", "aux3 left", "aux3 right"} var noteTrackingNames = [...]string{"fixed", "pitch", "BPM"} var oscTypes = [...]string{"sine", "trisaw", "pulse", "gate", "sample"} @@ -231,12 +265,17 @@ func compressorTimeDispFunc(v int) (string, string) { func oscillatorTransposeDispFunc(v int) (string, string) { relvalue := v - 64 - octaves := relvalue / 12 - semitones := relvalue % 12 - if semitones == 0 { - return strconv.Itoa(octaves), "oct" + if relvalue%12 == 0 { + return strconv.Itoa(relvalue / 12), "oct" } - return strconv.Itoa(semitones), "st" + return strconv.Itoa(relvalue), "st" +} + +func sendVoiceDispFunc(v int) (string, string) { + if v == 0 { + return "default", "" + } + return strconv.Itoa(v), "" } func engineeringTime(sec float64) (string, string) { @@ -304,6 +343,103 @@ func (u *Unit) Copy() Unit { return Unit{Type: u.Type, Parameters: parameters, VarArgs: varArgs, ID: u.ID, Disabled: u.Disabled, Comment: u.Comment} } +var stackUseSource = [2]StackUse{ + {Inputs: [][]int{}, Modifies: []bool{true}, NumOutputs: 1}, // mono + {Inputs: [][]int{}, Modifies: []bool{true, true}, NumOutputs: 2}, // stereo +} +var stackUseSink = [2]StackUse{ + {Inputs: [][]int{{0}}, Modifies: []bool{true}, NumOutputs: 0}, // mono + {Inputs: [][]int{{0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 0}, // stereo +} +var stackUseEffect = [2]StackUse{ + {Inputs: [][]int{{0}}, Modifies: []bool{true}, NumOutputs: 1}, // mono + {Inputs: [][]int{{0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 2}, // stereo +} +var stackUseMonoStereo = map[string][2]StackUse{ + "add": { + {Inputs: [][]int{{0, 1}, {1}}, Modifies: []bool{false, true}, NumOutputs: 2}, + {Inputs: [][]int{{0, 2}, {1, 3}, {2}, {3}}, Modifies: []bool{false, false, true, true}, NumOutputs: 4}, + }, + "mul": { + {Inputs: [][]int{{0, 1}, {1}}, Modifies: []bool{false, true}, NumOutputs: 2}, + {Inputs: [][]int{{0, 2}, {1, 3}, {2}, {3}}, Modifies: []bool{false, false, true, true}, NumOutputs: 4}, + }, + "addp": { + {Inputs: [][]int{{0}, {0}}, Modifies: []bool{true}, NumOutputs: 1}, + {Inputs: [][]int{{0}, {1}, {0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 2}, + }, + "mulp": { + {Inputs: [][]int{{0}, {0}}, Modifies: []bool{true}, NumOutputs: 1}, + {Inputs: [][]int{{0}, {1}, {0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 2}, + }, + "xch": { + {Inputs: [][]int{{1}, {0}}, Modifies: []bool{false, false}, NumOutputs: 2}, + {Inputs: [][]int{{2}, {3}, {0}, {1}}, Modifies: []bool{false, false, false, false}, NumOutputs: 4}, + }, + "push": { + {Inputs: [][]int{{0, 1}}, Modifies: []bool{false, false}, NumOutputs: 2}, + {Inputs: [][]int{{0, 2}, {1, 3}}, Modifies: []bool{false, false, false, false}, NumOutputs: 4}, + }, + "pop": stackUseSink, + "envelope": stackUseSource, + "oscillator": stackUseSource, + "noise": stackUseSource, + "loadnote": stackUseSource, + "loadval": stackUseSource, + "receive": stackUseSource, + "in": stackUseSource, + "out": stackUseSink, + "outaux": stackUseSink, + "aux": stackUseSink, + "distort": stackUseEffect, + "hold": stackUseEffect, + "crush": stackUseEffect, + "gain": stackUseEffect, + "invgain": stackUseEffect, + "dbgain": stackUseEffect, + "filter": stackUseEffect, + "clip": stackUseEffect, + "delay": stackUseEffect, + "compressor": { + {Inputs: [][]int{{0, 1}}, Modifies: []bool{false, true}, NumOutputs: 2}, // mono + {Inputs: [][]int{{0, 2, 3}, {1, 2, 3}}, Modifies: []bool{false, false, true, true}, NumOutputs: 4}, // stereo + }, + "pan": { + {Inputs: [][]int{{0, 1}}, Modifies: []bool{true, true}, NumOutputs: 2}, // mono + {Inputs: [][]int{{0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 2}, // mono + }, + "speed": { + {Inputs: [][]int{{0}}, Modifies: []bool{true}, NumOutputs: 0}, + {}, + }, + "sync": { + {Inputs: [][]int{{0}}, Modifies: []bool{false}, NumOutputs: 0}, + {}, + }, +} +var stackUseSendNoPop = [2]StackUse{ + {Inputs: [][]int{{0}}, Modifies: []bool{true}, NumOutputs: 1}, + {Inputs: [][]int{{0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 2}, +} +var stackUseSendPop = [2]StackUse{ + {Inputs: [][]int{{0}}, Modifies: []bool{true}, NumOutputs: 0}, // mono + {Inputs: [][]int{{0}, {1}}, Modifies: []bool{true, true}, NumOutputs: 0}, // stereo +} + +func (u *Unit) StackUse() StackUse { + if u.Disabled { + return StackUse{} + } + if u.Type == "send" { + // "send" unit is special, it has a different stack use depending on sendpop + if u.Parameters["sendpop"] == 0 { + return stackUseSendNoPop[u.Parameters["stereo"]] + } + return stackUseSendPop[u.Parameters["stereo"]] + } + return stackUseMonoStereo[u.Type][u.Parameters["stereo"]] +} + // StackChange returns how this unit will affect the signal stack. "pop" and // "addp" and such will consume the topmost signal, and thus return -1 (or -2, // if the unit is a stereo unit). On the other hand, "oscillator" and "envelope" @@ -311,40 +447,15 @@ func (u *Unit) Copy() Unit { // unit). Effects that just change the topmost signal and will not change the // number of signals on the stack and thus return 0. func (u *Unit) StackChange() int { - if u.Disabled { - return 0 - } - switch u.Type { - case "addp", "mulp", "pop", "out", "outaux", "aux": - return -1 - u.Parameters["stereo"] - case "envelope", "oscillator", "push", "noise", "receive", "loadnote", "loadval", "in", "compressor": - return 1 + u.Parameters["stereo"] - case "pan": - return 1 - u.Parameters["stereo"] - case "speed": - return -1 - case "send": - return (-1 - u.Parameters["stereo"]) * u.Parameters["sendpop"] - } - return 0 + s := u.StackUse() + return s.NumOutputs - len(s.Inputs) } // StackNeed returns the number of signals that should be on the stack before // this unit is executed. Used to prevent stack underflow. Units producing // signals do not care what is on the stack before and will return 0. func (u *Unit) StackNeed() int { - if u.Disabled { - return 0 - } - switch u.Type { - case "", "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in": - return 0 - case "mulp", "mul", "add", "addp", "xch": - return 2 * (1 + u.Parameters["stereo"]) - case "speed": - return 1 - } - return 1 + u.Parameters["stereo"] + return len(u.StackUse().Inputs) } // Copy makes a deep copy of an Instrument @@ -465,19 +576,19 @@ func (p Patch) FindUnit(id int) (instrIndex int, unitIndex int, err error) { return 0, 0, fmt.Errorf("could not find a unit with id %v", id) } -func FindParamForModulationPort(unitName string, index int) (UnitParameter, bool) { +func FindParamForModulationPort(unitName string, index int) (up UnitParameter, upIndex int, ok bool) { unitType, ok := UnitTypes[unitName] if !ok { - return UnitParameter{}, false + return UnitParameter{}, 0, false } - for _, param := range unitType { + for i, param := range unitType { if !param.CanModulate { continue } if index == 0 { - return param, true + return param, i, true } index-- } - return UnitParameter{}, false + return UnitParameter{}, 0, false } diff --git a/tests/test_delay_notetracking.yml b/tests/test_delay_notetracking.yml index 01342d9..2981036 100644 --- a/tests/test_delay_notetracking.yml +++ b/tests/test_delay_notetracking.yml @@ -19,12 +19,12 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 1, frequency: 32, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} - type: delay parameters: {damp: 16, dry: 128, feedback: 128, notetracking: 1, pregain: 128, stereo: 0} varargs: [10787] - type: filter - parameters: {bandpass: 1, frequency: 24, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 24, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} - type: mulp parameters: {stereo: 0} - type: pan diff --git a/tests/test_delay_notetracking_modulation.yml b/tests/test_delay_notetracking_modulation.yml index 9e8e99b..137ee6d 100644 --- a/tests/test_delay_notetracking_modulation.yml +++ b/tests/test_delay_notetracking_modulation.yml @@ -19,7 +19,7 @@ patch: parameters: {gain: 64, shape: 64, stereo: 0} - type: filter id: 12 - parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: delay id: 11 parameters: {damp: 0, dry: 71, feedback: 114, notetracking: 1, pregain: 128, stereo: 0} diff --git a/tests/test_filter_band.yml b/tests/test_filter_band.yml index c37d66d..b2c64ff 100644 --- a/tests/test_filter_band.yml +++ b/tests/test_filter_band.yml @@ -17,7 +17,7 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, resonance: 64, stereo: 0} - type: pan parameters: {panning: 64, stereo: 0} - type: out diff --git a/tests/test_filter_freqmod.yml b/tests/test_filter_freqmod.yml index 895601d..3797f94 100644 --- a/tests/test_filter_freqmod.yml +++ b/tests/test_filter_freqmod.yml @@ -17,7 +17,7 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, resonance: 64, stereo: 0} id: 1 - type: pan parameters: {panning: 64, stereo: 0} diff --git a/tests/test_filter_high.yml b/tests/test_filter_high.yml index 2931a90..00155a5 100644 --- a/tests/test_filter_high.yml +++ b/tests/test_filter_high.yml @@ -17,7 +17,7 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 0, frequency: 32, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 32, highpass: 1, lowpass: 0, resonance: 64, stereo: 0} - type: pan parameters: {panning: 64, stereo: 0} - type: out diff --git a/tests/test_filter_low.yml b/tests/test_filter_low.yml index 0f75f52..4229546 100644 --- a/tests/test_filter_low.yml +++ b/tests/test_filter_low.yml @@ -17,7 +17,7 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, resonance: 64, stereo: 0} - type: pan parameters: {panning: 64, stereo: 0} - type: out diff --git a/tests/test_filter_peak.yml b/tests/test_filter_peak.yml index d3e190b..addf09e 100644 --- a/tests/test_filter_peak.yml +++ b/tests/test_filter_peak.yml @@ -17,7 +17,7 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 32, highpass: -1, lowpass: 1, resonance: 64, stereo: 0} - type: pan parameters: {panning: 64, stereo: 0} - type: out diff --git a/tests/test_filter_resmod.yml b/tests/test_filter_resmod.yml index a967164..3909b3f 100644 --- a/tests/test_filter_resmod.yml +++ b/tests/test_filter_resmod.yml @@ -17,7 +17,7 @@ patch: - type: mulp parameters: {stereo: 0} - type: filter - parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, resonance: 64, stereo: 0} id: 1 - type: pan parameters: {panning: 64, stereo: 0} diff --git a/tests/test_filter_stereo.yml b/tests/test_filter_stereo.yml index 6ba4be4..dbb3b1d 100644 --- a/tests/test_filter_stereo.yml +++ b/tests/test_filter_stereo.yml @@ -19,6 +19,6 @@ patch: - type: pan parameters: {panning: 64, stereo: 0} - type: filter - parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 1} + parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, resonance: 64, stereo: 1} - type: out parameters: {gain: 128, stereo: 1} diff --git a/tracker/action.go b/tracker/action.go index 6faf6a7..9a30337 100644 --- a/tracker/action.go +++ b/tracker/action.go @@ -93,6 +93,16 @@ type ( *Model } ShowLicense Model + + ChooseSendSource struct { + ID int + *Model + } + ChooseSendTarget struct { + ID int + Port int + *Model + } ) // Action methods @@ -298,8 +308,7 @@ func (m *Undo) Do() { m.d = m.undoStack[len(m.undoStack)-1] m.undoStack = m.undoStack[:len(m.undoStack)-1] m.prevUndoKind = "" - (*Model)(m).updateDerivedScoreData() - (*Model)(m).updateDerivedPatchData() + (*Model)(m).updateDeriveData(SongChange) TrySend(m.broker.ToPlayer, any(m.d.Song.Copy())) } @@ -316,30 +325,29 @@ func (m *Redo) Do() { m.d = m.redoStack[len(m.redoStack)-1] m.redoStack = m.redoStack[:len(m.redoStack)-1] m.prevUndoKind = "" - (*Model)(m).updateDerivedScoreData() - (*Model)(m).updateDerivedPatchData() + (*Model)(m).updateDeriveData(SongChange) TrySend(m.broker.ToPlayer, any(m.d.Song.Copy())) } // AddSemiTone func (m *Model) AddSemitone() Action { return MakeEnabledAction((*AddSemitone)(m)) } -func (m *AddSemitone) Do() { Table{(*Notes)(m)}.Add(1) } +func (m *AddSemitone) Do() { Table{(*Notes)(m)}.Add(1, false) } // SubtractSemitone func (m *Model) SubtractSemitone() Action { return MakeEnabledAction((*SubtractSemitone)(m)) } -func (m *SubtractSemitone) Do() { Table{(*Notes)(m)}.Add(-1) } +func (m *SubtractSemitone) Do() { Table{(*Notes)(m)}.Add(-1, false) } // AddOctave func (m *Model) AddOctave() Action { return MakeEnabledAction((*AddOctave)(m)) } -func (m *AddOctave) Do() { Table{(*Notes)(m)}.Add(12) } +func (m *AddOctave) Do() { Table{(*Notes)(m)}.Add(1, true) } // SubtractOctave func (m *Model) SubtractOctave() Action { return MakeEnabledAction((*SubtractOctave)(m)) } -func (m *SubtractOctave) Do() { Table{(*Notes)(m)}.Add(-12) } +func (m *SubtractOctave) Do() { Table{(*Notes)(m)}.Add(-1, true) } // EditNoteOff @@ -517,6 +525,44 @@ func (d DeleteOrderRow) Do() { m.d.Cursor2.OrderRow = m.d.Cursor.OrderRow } +// ChooseSendSource + +func (m *Model) IsChoosingSendTarget() bool { + return m.d.SendSource > 0 +} + +func (m *Model) ChooseSendSource(id int) Action { + return MakeEnabledAction(ChooseSendSource{ID: id, Model: m}) +} +func (s ChooseSendSource) Do() { + defer (*Model)(s.Model).change("ChooseSendSource", NoChange, MinorChange)() + if s.Model.d.SendSource == s.ID { + s.Model.d.SendSource = 0 // unselect + return + } + s.Model.d.SendSource = s.ID +} + +// ChooseSendTarget + +func (m *Model) ChooseSendTarget(id int, port int) Action { + return MakeEnabledAction(ChooseSendTarget{ID: id, Port: port, Model: m}) +} +func (s ChooseSendTarget) Do() { + defer (*Model)(s.Model).change("ChooseSendTarget", SongChange, MinorChange)() + sourceID := (*Model)(s.Model).d.SendSource + s.d.SendSource = 0 + if sourceID <= 0 || s.ID <= 0 || s.Port < 0 || s.Port > 7 { + return + } + si, su, err := s.d.Song.Patch.FindUnit(sourceID) + if err != nil { + return + } + s.d.Song.Patch[si].Units[su].Parameters["target"] = s.ID + s.d.Song.Patch[si].Units[su].Parameters["port"] = s.Port +} + // NewSong func (m *Model) NewSong() Action { return MakeEnabledAction((*NewSong)(m)) } diff --git a/tracker/derived.go b/tracker/derived.go index 1c4b789..457ce0e 100644 --- a/tracker/derived.go +++ b/tracker/derived.go @@ -2,235 +2,175 @@ package tracker import ( "fmt" - "iter" - "slices" "github.com/vsariola/sointu" ) type ( + Rail struct { + PassThrough int + Send bool + StackUse sointu.StackUse + } + + Wire struct { + From int + FromSet bool + To Point + ToSet bool + Hint string + Highlight bool + } + + RailError struct { + InstrIndex, UnitIndex int + Err error + } + // derivedModelData contains useful information derived from the modelData, // cached for performance and/or easy access. This needs to be updated when // corresponding part of the model changes. derivedModelData struct { // map Unit by ID, other entities by their respective index - forUnit map[int]derivedForUnit - forTrack []derivedForTrack - forPattern []derivedForPattern + patch []derivedInstrument + tracks []derivedTrack + railError RailError } - derivedForUnit struct { - unit sointu.Unit - instrument sointu.Instrument - instrumentIndex int - unitIndex int - - // map param by Name - forParameter map[string]derivedForParameter + derivedInstrument struct { + wires []Wire + rails []Rail + railWidth int + params [][]Parameter + paramsWidth int } - derivedForParameter struct { - sendTooltip string - sendSources []sendSourceData - } - - sendSourceData struct { - unitId int - paramName string - amount int - instrumentIndex int - instrumentName string - } - - derivedForTrack struct { - instrumentRange []int - tracksWithSameInstrument []int - title string - } - - derivedForPattern struct { - useCount []int + derivedTrack struct { + title string + patternUseCounts []int } ) -// public access functions +// public methods to access the derived data -func (m *Model) UnitInfo(id int) (instrName string, units []sointu.Unit, unitIndex int, ok bool) { - fu, ok := m.derived.forUnit[id] - return fu.instrument.Name, fu.instrument.Units, fu.unitIndex, ok +func (s *Model) RailError() RailError { return s.derived.railError } + +func (s *Model) RailWidth() int { + i := s.d.InstrIndex + if i < 0 || i >= len(s.derived.patch) { + return 0 + } + return s.derived.patch[i].railWidth } -func (m *Model) UnitHintInfo(id int) (instrIndex int, unitType string, ok bool) { - fu, ok := m.derived.forUnit[id] - return fu.instrumentIndex, fu.unit.Type, ok -} - -func (m *Model) ParameterInfo(unitId int, paramName string) (tooltip string, ok bool) { - du, ok1 := m.derived.forUnit[unitId] - if !ok1 { - return "", false +func (m *Model) Wires(yield func(wire Wire) bool) { + i := m.d.InstrIndex + if i < 0 || i >= len(m.derived.patch) { + return } - dp, ok2 := du.forParameter[paramName] - if !ok2 { - return "", false + for _, wire := range m.derived.patch[i].wires { + wire.Highlight = (wire.FromSet && m.d.UnitIndex == wire.From) || (wire.ToSet && m.d.UnitIndex == wire.To.Y && m.d.ParamIndex == wire.To.X) + if !yield(wire) { + return + } } - return dp.sendTooltip, len(dp.sendSources) > 0 } func (m *Model) TrackTitle(index int) string { - if index < 0 || index >= len(m.derived.forTrack) { + if index < 0 || index >= len(m.derived.tracks) { return "" } - return m.derived.forTrack[index].title + return m.derived.tracks[index].title } func (m *Model) PatternUnique(track, pat int) bool { - if track < 0 || track >= len(m.derived.forPattern) { + if track < 0 || track >= len(m.derived.tracks) { return false } - forPattern := m.derived.forPattern[track] - if pat < 0 || pat >= len(forPattern.useCount) { + if pat < 0 || pat >= len(m.derived.tracks[track].patternUseCounts) { return false } - return forPattern.useCount[pat] == 1 + return m.derived.tracks[track].patternUseCounts[pat] <= 1 } -// public getters with further model information +func (e *RailError) Error() string { return e.Err.Error() } -func (m *Model) TracksWithSameInstrumentAsCurrent() []int { - currentTrack := m.d.Cursor.Track - if currentTrack >= len(m.derived.forTrack) { - return nil - } - return m.derived.forTrack[currentTrack].tracksWithSameInstrument -} - -func (m *Model) CountNextTracksForCurrentInstrument() int { - currentTrack := m.d.Cursor.Track - count := 0 - for t := range m.TracksWithSameInstrumentAsCurrent() { - if t > currentTrack { - count++ - } - } - return count -} +func (s *Rail) StackAfter() int { return s.PassThrough + s.StackUse.NumOutputs } // init / update methods -func (m *Model) initDerivedData() { - m.derived = derivedModelData{ - forUnit: make(map[int]derivedForUnit), - forTrack: make([]derivedForTrack, 0), - forPattern: make([]derivedForPattern, 0), +func (m *Model) updateDeriveData(changeType ChangeType) { + setSliceLength(&m.derived.tracks, len(m.d.Song.Score.Tracks)) + if changeType&ScoreChange != 0 { + for index, track := range m.d.Song.Score.Tracks { + m.derived.tracks[index].patternUseCounts = m.buildPatternUseCounts(track) + } } - m.updateDerivedScoreData() - m.updateDerivedPatchData() -} - -func (m *Model) updateDerivedScoreData() { - m.derived.forTrack = m.derived.forTrack[:0] - m.derived.forPattern = m.derived.forPattern[:0] - for index, track := range m.d.Song.Score.Tracks { - firstInstr, lastInstr, _ := m.instrumentRangeFor(index) - m.derived.forTrack = append( - m.derived.forTrack, - derivedForTrack{ - instrumentRange: []int{firstInstr, lastInstr}, - tracksWithSameInstrument: slices.Collect(m.tracksWithSameInstrument(index)), - title: m.buildTrackTitle(index), - }, - ) - m.derived.forPattern = append( - m.derived.forPattern, - derivedForPattern{ - useCount: m.calcPatternUseCounts(track), - }, - ) + if changeType&ScoreChange != 0 || changeType&PatchChange != 0 { + for index := range m.d.Song.Score.Tracks { + m.derived.tracks[index].title = m.buildTrackTitle(index) + } + } + setSliceLength(&m.derived.patch, len(m.d.Song.Patch)) + if changeType&PatchChange != 0 { + m.updateParams() + m.updateRails() + m.updateWires() } } -func (m *Model) updateDerivedPatchData() { - clear(m.derived.forUnit) +func (m *Model) updateParams() { for i, instr := range m.d.Song.Patch { - for u, unit := range instr.Units { - m.derived.forUnit[unit.ID] = derivedForUnit{ - unit: unit, - unitIndex: u, - instrument: instr, - instrumentIndex: i, - forParameter: make(map[string]derivedForParameter), - } - m.updateDerivedParameterData(unit) + setSliceLength(&m.derived.patch[i].params, len(instr.Units)) + paramsWidth := 0 + for u := range instr.Units { + p := m.deriveParams(&instr.Units[u], m.derived.patch[i].params[u]) + m.derived.patch[i].params[u] = p + paramsWidth = max(paramsWidth, len(p)) } + m.derived.patch[i].paramsWidth = paramsWidth } } -func (m *Model) updateDerivedParameterData(unit sointu.Unit) { - fu := m.derived.forUnit[unit.ID] - for name := range fu.unit.Parameters { - sendSources := slices.Collect(m.collectSendSources(unit, name)) - fu.forParameter[name] = derivedForParameter{ - sendSources: sendSources, - sendTooltip: m.buildSendTargetTooltip(fu.instrumentIndex, sendSources), +func (m *Model) deriveParams(unit *sointu.Unit, ret []Parameter) []Parameter { + ret = ret[:0] // reset the slice + unitType, ok := sointu.UnitTypes[unit.Type] + if !ok { + return ret + } + portIndex := 0 + for i, up := range unitType { + if !up.CanSet && !up.CanModulate { + continue // skip parameters that cannot be set or modulated + } + if unit.Type == "oscillator" && unit.Parameters["type"] != sointu.Sample && (up.Name == "samplestart" || up.Name == "loopstart" || up.Name == "looplength") { + continue // don't show the sample related params unless necessary + } + if unit.Type == "send" && up.Name == "port" { + continue + } + q := 0 + if up.CanModulate { + portIndex++ + q = portIndex + } + ret = append(ret, Parameter{m: m, unit: unit, up: &unitType[i], vtable: &namedParameter{}, port: q}) + } + if unit.Type == "oscillator" && unit.Parameters["type"] == sointu.Sample { + ret = append(ret, Parameter{m: m, unit: unit, vtable: &gmDlsEntryParameter{}}) + } + if unit.Type == "delay" { + if unit.Parameters["stereo"] == 1 && len(unit.VarArgs)%2 == 1 { + unit.VarArgs = append(unit.VarArgs, 1) + } + ret = append(ret, + Parameter{m: m, unit: unit, vtable: &reverbParameter{}}, + Parameter{m: m, unit: unit, vtable: &delayLinesParameter{}}) + for i := range unit.VarArgs { + ret = append(ret, Parameter{m: m, unit: unit, index: i, vtable: &delayTimeParameter{}}) } } -} - -// internals... - -func (m *Model) collectSendSources(unit sointu.Unit, paramName string) iter.Seq[sendSourceData] { - return func(yield func(sendSourceData) bool) { - for i, instr := range m.d.Song.Patch { - for _, u := range instr.Units { - if u.Type != "send" { - continue - } - targetId, ok := u.Parameters["target"] - if !ok || targetId != unit.ID { - continue - } - port := u.Parameters["port"] - unitParam, ok := sointu.FindParamForModulationPort(unit.Type, port) - if !ok || unitParam.Name != paramName { - continue - } - sourceData := sendSourceData{ - unitId: u.ID, - paramName: paramName, - instrumentIndex: i, - instrumentName: instr.Name, - amount: u.Parameters["amount"], - } - if !yield(sourceData) { - return - } - } - } - } -} - -func (m *Model) buildSendTargetTooltip(ownInstrIndex int, sendSources []sendSourceData) string { - if len(sendSources) == 0 { - return "" - } - amounts := "" - for _, sendSource := range sendSources { - sourceInfo := "" - if sendSource.instrumentIndex != ownInstrIndex { - sourceInfo = fmt.Sprintf(" from \"%s\"", sendSource.instrumentName) - } - if amounts == "" { - amounts = fmt.Sprintf("x %d%s", sendSource.amount, sourceInfo) - } else { - amounts = fmt.Sprintf("%s, x %d%s", amounts, sendSource.amount, sourceInfo) - } - } - count := "1 send" - if len(sendSources) > 1 { - count = fmt.Sprintf("%d sends", len(sendSources)) - } - return fmt.Sprintf("%s [%s]", count, amounts) + return ret } func (m *Model) instrumentRangeFor(trackIndex int) (int, int, error) { @@ -251,86 +191,166 @@ func (m *Model) instrumentRangeFor(trackIndex int) (int, int, error) { return firstIndex, lastIndex, nil } -func (m *Model) buildTrackTitle(track int) (title string) { - title = "?" +func (m *Model) buildTrackTitle(track int) string { if track < 0 || track >= len(m.d.Song.Score.Tracks) { - return + return "?" } firstIndex, lastIndex, err := m.instrumentRangeFor(track) if err != nil { - return + return "?" } switch diff := lastIndex - firstIndex; diff { case 0: - title = m.d.Song.Patch[firstIndex].Name + return nilIsQuestionMark(m.d.Song.Patch[firstIndex].Name) + case 1: + return fmt.Sprintf("%s/%s", + nilIsQuestionMark(m.d.Song.Patch[firstIndex].Name), + nilIsQuestionMark(m.d.Song.Patch[firstIndex+1].Name)) default: - n1 := m.d.Song.Patch[firstIndex].Name - n2 := m.d.Song.Patch[firstIndex+1].Name - if len(n1) > 0 { - n1 = string(n1[0]) - } else { - n1 = "?" - } - if len(n2) > 0 { - n2 = string(n2[0]) - } else { - n2 = "?" - } - if diff > 1 { - title = n1 + "/" + n2 + "..." - } else { - title = n1 + "/" + n2 - } - } - return -} - -func (m *Model) instrumentForTrack(trackIndex int) (int, bool) { - voiceIndex := m.d.Song.Score.FirstVoiceForTrack(trackIndex) - instrument, err := m.d.Song.Patch.InstrumentForVoice(voiceIndex) - return instrument, err == nil -} - -func (m *Model) tracksWithSameInstrument(trackIndex int) iter.Seq[int] { - return func(yield func(int) bool) { - - currentInstrument, currentExists := m.instrumentForTrack(trackIndex) - if !currentExists { - return - } - - for i := 0; i < len(m.d.Song.Score.Tracks); i++ { - instrument, exists := m.instrumentForTrack(i) - if !exists { - return - } - if instrument != currentInstrument { - continue - } - if !yield(i) { - return - } - } + return fmt.Sprintf("%s/%s/...", + nilIsQuestionMark(m.d.Song.Patch[firstIndex].Name), + nilIsQuestionMark(m.d.Song.Patch[firstIndex+1].Name)) } } -func (m *Model) calcPatternUseCounts(track sointu.Track) []int { - result := make([]int, len(m.d.Song.Score.Tracks)) - for j := range result { - result[j] = 0 +func nilIsQuestionMark(s string) string { + if len(s) == 0 { + return "?" } - for j := 0; j < m.d.Song.Score.Length; j++ { - if j >= len(track.Order) { - break + return s +} + +func (m *Model) buildPatternUseCounts(track sointu.Track) []int { + result := make([]int, 0, len(track.Patterns)) + for j := range min(len(track.Order), m.d.Song.Score.Length) { + if p := track.Order[j]; p >= 0 { + for len(result) <= p { + result = append(result, 0) + } + result[p]++ } - p := track.Order[j] - for len(result) <= p { - result = append(result, 0) - } - if p < 0 { - continue - } - result[p]++ } return result } + +func (m *Model) updateRails() { + type stackElem struct{ instr, unit int } + scratchArray := [32]stackElem{} + scratch := scratchArray[:0] + m.derived.railError = RailError{} + for i, instr := range m.d.Song.Patch { + setSliceLength(&m.derived.patch[i].rails, len(instr.Units)) + start := len(scratch) + maxWidth := 0 + for u, unit := range instr.Units { + stackUse := unit.StackUse() + numInputs := len(stackUse.Inputs) + if len(scratch) < numInputs { + if m.derived.railError == (RailError{}) { + m.derived.railError = RailError{ + InstrIndex: i, + UnitIndex: u, + Err: fmt.Errorf("%s unit in instrument %d / %s needs %d inputs, but got only %d", unit.Type, i, instr.Name, numInputs, len(scratch)), + } + } + scratch = scratch[:0] + } else { + scratch = scratch[:len(scratch)-numInputs] + } + m.derived.patch[i].rails[u] = Rail{ + PassThrough: len(scratch), + StackUse: stackUse, + Send: !unit.Disabled && unit.Type == "send", + } + maxWidth = max(maxWidth, len(scratch)+max(len(stackUse.Inputs), stackUse.NumOutputs)) + for range stackUse.NumOutputs { + scratch = append(scratch, stackElem{instr: i, unit: u}) + } + } + m.derived.patch[i].railWidth = maxWidth + diff := len(scratch) - start + if instr.NumVoices > 1 && diff != 0 { + if diff < 0 { + morepop := (instr.NumVoices - 1) * diff + if morepop > len(scratch) { + if m.derived.railError == (RailError{}) { + m.derived.railError = RailError{ + InstrIndex: i, + UnitIndex: -1, + Err: fmt.Errorf("each voice of instrument %d / %s consumes %d signals, but there was not enough signals available", i, instr.Name, -diff), + } + } + scratch = scratch[:0] + } else { + scratch = scratch[:len(scratch)-morepop] + } + } else { + for range (instr.NumVoices - 1) * diff { + scratch = append(scratch, scratch[len(scratch)-diff]) + } + } + } + } + if len(scratch) > 0 && m.derived.railError == (RailError{}) { + patch := m.d.Song.Patch + m.derived.railError = RailError{ + InstrIndex: scratch[0].instr, + UnitIndex: scratch[0].unit, + Err: fmt.Errorf("instrument %d / %s unit %d / %s leaves a signal on stack", scratch[0].instr, patch[scratch[0].instr].Name, scratch[0].unit, patch[scratch[0].instr].Units[scratch[0].unit].Type), + } + } + if m.derived.railError.Err != nil { + m.Alerts().AddNamed("RailError", m.derived.railError.Error(), Error) + } +} + +func (m *Model) updateWires() { + for i := range m.d.Song.Patch { + m.derived.patch[i].wires = m.derived.patch[i].wires[:0] // reset the wires + } + for i, instr := range m.d.Song.Patch { + for u, unit := range instr.Units { + if unit.Disabled || unit.Type != "send" { + continue + } + tI, tU, err := m.d.Song.Patch.FindUnit(unit.Parameters["target"]) + if err != nil { + continue + } + up, tX, ok := sointu.FindParamForModulationPort(m.d.Song.Patch[tI].Units[tU].Type, unit.Parameters["port"]) + if !ok { + continue + } + if tI == i { + // local send + m.derived.patch[i].wires = append(m.derived.patch[i].wires, Wire{ + From: u, + FromSet: true, + To: Point{X: tX, Y: tU}, + ToSet: true, + }) + } else { + // remote send + m.derived.patch[i].wires = append(m.derived.patch[i].wires, Wire{ + From: u, + FromSet: true, + Hint: fmt.Sprintf("To instrument #%d (%s), unit #%d (%s), port %s", tI, m.d.Song.Patch[tI].Name, tU, m.d.Song.Patch[tI].Units[tU].Type, up.Name), + }) + toPt := Point{X: tX, Y: tU} + hint := fmt.Sprintf("From instrument #%d (%s), send #%d", i, m.d.Song.Patch[i].Name, u) + for i, w := range m.derived.patch[tI].wires { + if !w.FromSet && w.ToSet && w.To == toPt { + m.derived.patch[tI].wires[i].Hint += "; " + hint + goto skipAppend + } + } + m.derived.patch[tI].wires = append(m.derived.patch[tI].wires, Wire{ + To: toPt, + ToSet: true, + Hint: hint, + }) + skipAppend: + } + } + } +} diff --git a/tracker/gioui/draglist.go b/tracker/gioui/draglist.go index 3725021..92f891f 100644 --- a/tracker/gioui/draglist.go +++ b/tracker/gioui/draglist.go @@ -111,6 +111,8 @@ func (s FilledDragListStyle) Layout(gtx C, element, bg func(gtx C, i int) D) D { case key.FocusEvent: if !ke.Focus { s.dragList.TrackerList.SetSelected2(s.dragList.TrackerList.Selected()) + } else { + s.dragList.EnsureVisible(s.dragList.TrackerList.Selected()) } case key.Event: if ke.State != key.Press { diff --git a/tracker/gioui/keybindings.yml b/tracker/gioui/keybindings.yml index 20e257c..4b0281d 100644 --- a/tracker/gioui/keybindings.yml +++ b/tracker/gioui/keybindings.yml @@ -93,3 +93,6 @@ - { key: "P", action: "Note28" } - { key: "+", action: "Increase" } - { key: "-", action: "Decrease" } +- { key: "+", shortcut: true, action: "IncreaseMore" } # increase a large step +- { key: "-", shortcut: true, action: "DecreaseMore" } # decrease a large step + diff --git a/tracker/gioui/order_editor.go b/tracker/gioui/order_editor.go index 6e7caa6..e4731ec 100644 --- a/tracker/gioui/order_editor.go +++ b/tracker/gioui/order_editor.go @@ -120,7 +120,9 @@ func (oe *OrderEditor) Layout(gtx C) D { table := FilledScrollTable(t.Theme, oe.scrollTable) table.ColumnTitleHeight = orderTitleHeight - return table.Layout(gtx, cell, colTitle, rowTitle, nil, rowTitleBg) + return Surface{Gray: 24, Focus: oe.scrollTable.TreeFocused(gtx)}.Layout(gtx, func(gtx C) D { + return table.Layout(gtx, cell, colTitle, rowTitle, nil, rowTitleBg) + }) } func (oe *OrderEditor) handleEvents(gtx C, t *Tracker) { diff --git a/tracker/gioui/param.go b/tracker/gioui/param.go new file mode 100644 index 0000000..e8ea94d --- /dev/null +++ b/tracker/gioui/param.go @@ -0,0 +1,428 @@ +package gioui + +import ( + "image" + "image/color" + "math" + "strconv" + + "gioui.org/f32" + "gioui.org/gesture" + "gioui.org/io/event" + "gioui.org/io/key" + "gioui.org/io/pointer" + "gioui.org/layout" + "gioui.org/op" + "gioui.org/op/clip" + "gioui.org/op/paint" + "gioui.org/unit" + "gioui.org/x/stroke" + "github.com/vsariola/sointu/tracker" + "golang.org/x/exp/shiny/materialdesign/icons" +) + +type ( + ParamState struct { + drag gesture.Drag + dragStartPt f32.Point // used to calculate the drag amount + dragStartVal int + tipArea TipArea + click gesture.Click + clickable Clickable + } + + ParamWidget struct { + Parameter tracker.Parameter + State *ParamState + Theme *Theme + Focus bool + Disabled bool + } + + PortStyle struct { + Diameter unit.Dp + StrokeWidth unit.Dp + Color color.NRGBA + } + + PortWidget struct { + Theme *Theme + Style *PortStyle + State *ParamState + } + + KnobStyle struct { + Diameter unit.Dp + StrokeWidth unit.Dp + Bg color.NRGBA + Pos struct { + Color color.NRGBA + Bg color.NRGBA + } + Neg struct { + Color color.NRGBA + Bg color.NRGBA + } + Indicator struct { + Color color.NRGBA + Width unit.Dp + InnerDiam unit.Dp + OuterDiam unit.Dp + } + Value LabelStyle + Title LabelStyle + } + + KnobWidget struct { + Theme *Theme + Value tracker.Parameter + State *ParamState + Style *KnobStyle + Hint string + Scroll bool + } + + SwitchStyle struct { + Neutral struct { + Fg color.NRGBA + Bg color.NRGBA + } + Pos struct { + Fg color.NRGBA + Bg color.NRGBA + } + Neg struct { + Fg color.NRGBA + Bg color.NRGBA + } + Width unit.Dp + Height unit.Dp + Outline unit.Dp + Handle unit.Dp + Icon unit.Dp + } + + SwitchWidget struct { + Theme *Theme + Value tracker.Parameter + State *ParamState + Style *SwitchStyle + Hint string + Scroll bool + Disabled bool + } +) + +// ParamState + +func Param(Parameter tracker.Parameter, th *Theme, paramWidget *ParamState, focus, disabled bool) ParamWidget { + return ParamWidget{ + Theme: th, + State: paramWidget, + Parameter: Parameter, + Focus: focus, + Disabled: disabled, + } +} + +func (p ParamWidget) Layout(gtx C) D { + title := Label(p.Theme, &p.Theme.UnitEditor.Name, p.Parameter.Name()) + t := TrackerFromContext(gtx) + widget := func(gtx C) D { + if port, ok := p.Parameter.Port(); t.IsChoosingSendTarget() && ok { + for p.State.clickable.Clicked(gtx) { + t.ChooseSendTarget(p.Parameter.UnitID(), port).Do() + } + k := Port(p.Theme, p.State) + return k.Layout(gtx) + } + switch p.Parameter.Type() { + case tracker.IntegerParameter: + k := Knob(p.Parameter, p.Theme, p.State, p.Parameter.Hint().Label, p.Focus, p.Disabled) + return k.Layout(gtx) + case tracker.BoolParameter: + s := Switch(p.Parameter, p.Theme, p.State, p.Parameter.Hint().Label, p.Focus, p.Disabled) + return s.Layout(gtx) + case tracker.IDParameter: + for p.State.clickable.Clicked(gtx) { + t.ChooseSendSource(p.Parameter.UnitID()).Do() + } + btn := Btn(t.Theme, &t.Theme.Button.Text, &p.State.clickable, "Set", p.Parameter.Hint().Label) + if p.Disabled { + btn.Style = &t.Theme.Button.Disabled + } + return btn.Layout(gtx) + } + if _, ok := p.Parameter.Port(); ok { + k := Port(p.Theme, p.State) + return k.Layout(gtx) + } + return D{} + } + title.Layout(gtx) + layout.Center.Layout(gtx, widget) + return D{Size: image.Pt(gtx.Constraints.Max.X, gtx.Constraints.Max.Y)} +} + +func (s *ParamState) update(gtx C, param tracker.Parameter, scroll bool) { + for { + p, ok := s.drag.Update(gtx.Metric, gtx.Source, gesture.Both) + if !ok { + break + } + switch p.Kind { + case pointer.Press: + s.dragStartPt = p.Position + s.dragStartVal = param.Value() + case pointer.Drag: + // update the value based on the drag amount + m := param.Range() + d := p.Position.Sub(s.dragStartPt) + amount := float32(d.X-d.Y) / float32(gtx.Dp(128)) + newValue := int(float32(s.dragStartVal) + amount*float32(m.Max-m.Min)) + param.SetValue(newValue) + s.tipArea.Appear(gtx.Now) + } + } + for { + g, ok := s.click.Update(gtx.Source) + if !ok { + break + } + if g.Kind == gesture.KindClick && g.NumClicks > 1 { + param.Reset() + } + } + for scroll { + e, ok := gtx.Event(pointer.Filter{ + Target: s, + Kinds: pointer.Scroll, + ScrollY: pointer.ScrollRange{Min: -1e6, Max: 1e6}, + }) + if !ok { + break + } + if ev, ok := e.(pointer.Event); ok && ev.Kind == pointer.Scroll { + delta := -int(math.Min(math.Max(float64(ev.Scroll.Y), -1), 1)) + param.Add(delta, ev.Modifiers.Contain(key.ModShortcut)) + s.tipArea.Appear(gtx.Now) + } + } +} + +// KnobWidget + +func Knob(v tracker.Parameter, th *Theme, state *ParamState, hint string, scroll, disabled bool) KnobWidget { + ret := KnobWidget{ + Theme: th, + Value: v, + State: state, + Style: &th.Knob, + Hint: hint, + Scroll: scroll, + } + if disabled { + ret.Style = &th.DisabledKnob + } + return ret +} + +func (k *KnobWidget) Layout(gtx C) D { + k.State.update(gtx, k.Value, k.Scroll) + knob := func(gtx C) D { + m := k.Value.Range() + amount := float32(k.Value.Value()-m.Min) / float32(m.Max-m.Min) + sw := gtx.Dp(k.Style.StrokeWidth) + d := gtx.Dp(k.Style.Diameter) + defer clip.Rect(image.Rectangle{Max: image.Pt(d, d)}).Push(gtx.Ops).Pop() + event.Op(gtx.Ops, k.State) + k.State.drag.Add(gtx.Ops) + k.State.click.Add(gtx.Ops) + middle := float32(k.Value.Neutral()-m.Min) / float32(m.Max-m.Min) + pos := max(amount, middle) + neg := min(amount, middle) + if middle > 0 { + k.strokeKnobArc(gtx, k.Style.Neg.Bg, sw, d, 0, neg) + } + if middle < 1 { + k.strokeKnobArc(gtx, k.Style.Pos.Bg, sw, d, pos, 1) + } + if pos > middle { + k.strokeKnobArc(gtx, k.Style.Pos.Color, sw, d, middle, pos) + } + if neg < middle { + k.strokeKnobArc(gtx, k.Style.Neg.Color, sw, d, neg, middle) + } + k.strokeIndicator(gtx, amount) + return D{Size: image.Pt(d, d)} + } + label := Label(k.Theme, &k.Style.Value, strconv.Itoa(k.Value.Value())) + w := func(gtx C) D { + return layout.Stack{Alignment: layout.Center}.Layout(gtx, + layout.Stacked(knob), + layout.Stacked(label.Layout)) + } + if k.Hint != "" { + c := gtx.Constraints + gtx.Constraints.Max = image.Pt(1e6, 1e6) + return k.State.tipArea.Layout(gtx, Tooltip(k.Theme, k.Hint), func(gtx C) D { + gtx.Constraints = c + return w(gtx) + }) + } + return w(gtx) +} + +func (k *KnobWidget) strokeKnobArc(gtx C, color color.NRGBA, strokeWidth, diameter int, start, end float32) { + rad := float32(diameter) / 2 + end = min(max(end, 0), 1) + if end <= 0 { + return + } + startAngle := float64((start*8 + 1) / 10 * 2 * math.Pi) + deltaAngle := (end - start) * 8 * math.Pi / 5 + center := f32.Point{X: rad, Y: rad} + r2 := rad - float32(strokeWidth)/2 + startPt := f32.Point{X: rad - r2*float32(math.Sin(startAngle)), Y: rad + r2*float32(math.Cos(startAngle))} + segments := [...]stroke.Segment{ + stroke.MoveTo(startPt), + stroke.ArcTo(center, deltaAngle), + } + s := stroke.Stroke{ + Path: stroke.Path{Segments: segments[:]}, + Width: float32(strokeWidth), + Cap: stroke.FlatCap, + } + paint.FillShape(gtx.Ops, color, s.Op(gtx.Ops)) +} + +func (k *KnobWidget) strokeIndicator(gtx C, amount float32) { + innerRad := float32(gtx.Dp(k.Style.Indicator.InnerDiam)) / 2 + outerRad := float32(gtx.Dp(k.Style.Indicator.OuterDiam)) / 2 + center := float32(gtx.Dp(k.Style.Diameter)) / 2 + angle := (float64(amount)*8 + 1) / 10 * 2 * math.Pi + start := f32.Point{ + X: center - innerRad*float32(math.Sin(angle)), + Y: center + innerRad*float32(math.Cos(angle)), + } + end := f32.Point{ + X: center - outerRad*float32(math.Sin(angle)), + Y: center + outerRad*float32(math.Cos(angle)), + } + segments := [...]stroke.Segment{ + stroke.MoveTo(start), + stroke.LineTo(end), + } + s := stroke.Stroke{ + Path: stroke.Path{Segments: segments[:]}, + Width: float32(k.Style.Indicator.Width), + Cap: stroke.FlatCap, + } + paint.FillShape(gtx.Ops, k.Style.Indicator.Color, s.Op(gtx.Ops)) +} + +// SwitchWidget + +func Switch(v tracker.Parameter, th *Theme, state *ParamState, hint string, scroll, disabled bool) SwitchWidget { + return SwitchWidget{ + Theme: th, + Value: v, + State: state, + Style: &th.Switch, + Hint: hint, + Scroll: scroll, + Disabled: disabled, + } +} + +func (s *SwitchWidget) Layout(gtx C) D { + s.State.update(gtx, s.Value, s.Scroll) + width := gtx.Dp(s.Style.Width) + height := gtx.Dp(s.Style.Height) + var fg, bg color.NRGBA + o := 0 + switch { + case s.Disabled || s.Value.Value() == 0: + fg = s.Style.Neutral.Fg + bg = s.Style.Neutral.Bg + o = gtx.Dp(s.Style.Outline) + case s.Value.Value() < 0: + fg = s.Style.Neg.Fg + bg = s.Style.Neg.Bg + case s.Value.Value() > 0: + fg = s.Style.Pos.Fg + bg = s.Style.Pos.Bg + } + r := min(width, height) / 2 + fillRoundRect := func(ops *op.Ops, rect image.Rectangle, r int, c color.NRGBA) { + defer clip.UniformRRect(rect, r).Push(ops).Pop() + paint.ColorOp{Color: c}.Add(ops) + paint.PaintOp{}.Add(ops) + } + if o > 0 { + fillRoundRect(gtx.Ops, image.Rect(0, 0, width, height), r, fg) + } + fillRoundRect(gtx.Ops, image.Rect(o, o, width-o, height-o), r-o, bg) + a := r + b := width - r + p := a + (b-a)*(s.Value.Value()-s.Value.Range().Min)/(s.Value.Range().Max-s.Value.Range().Min) + circle := func(x, y, r int) clip.Op { + b := image.Rectangle{ + Min: image.Pt(x-r, y-r), + Max: image.Pt(x+r, y+r), + } + return clip.Ellipse(b).Op(gtx.Ops) + } + paint.FillShape(gtx.Ops, fg, circle(p, height/2, gtx.Dp(s.Style.Handle)/2)) + defer clip.Rect(image.Rectangle{Max: image.Pt(width, height)}).Push(gtx.Ops).Pop() + event.Op(gtx.Ops, s.State) + s.State.drag.Add(gtx.Ops) + s.State.click.Add(gtx.Ops) + icon := icons.NavigationClose + if s.Value.Range().Min < 0 { + if s.Value.Value() < 0 { + icon = icons.ImageExposureNeg1 + } else if s.Value.Value() > 0 { + icon = icons.ImageExposurePlus1 + } + } else if s.Value.Value() > 0 { + icon = icons.NavigationCheck + } + w := s.Theme.Icon(icon) + i := gtx.Dp(s.Style.Icon) + defer op.Offset(image.Pt(p-i/2, (height-i)/2)).Push(gtx.Ops).Pop() + gtx.Constraints = layout.Exact(image.Pt(i, i)) + w.Layout(gtx, bg) + return D{Size: image.Pt(width, height)} +} + +// + +func Port(t *Theme, p *ParamState) PortWidget { + return PortWidget{Theme: t, Style: &t.Port, State: p} +} + +func (p *PortWidget) Layout(gtx C) D { + return p.State.clickable.layout(p.State, gtx, func(gtx C) D { + d := gtx.Dp(p.Style.Diameter) + defer clip.Rect(image.Rectangle{Max: image.Pt(d, d)}).Push(gtx.Ops).Pop() + p.strokeCircle(gtx) + return D{Size: image.Pt(d, d)} + }) +} + +func (p *PortWidget) strokeCircle(gtx C) { + sw := float32(gtx.Dp(p.Style.StrokeWidth)) + d := float32(gtx.Dp(p.Style.Diameter)) + rad := d / 2 + center := f32.Point{X: rad, Y: rad} + var path clip.Path + path.Begin(gtx.Ops) + path.MoveTo(f32.Pt(sw/2, rad)) + path.ArcTo(center, center, float32(math.Pi*2)) + paint.FillShape(gtx.Ops, p.Style.Color, + clip.Stroke{ + Path: path.End(), + Width: sw, + }.Op()) +} diff --git a/tracker/gioui/patch_panel.go b/tracker/gioui/patch_panel.go index 8e9063b..5bc0a2b 100644 --- a/tracker/gioui/patch_panel.go +++ b/tracker/gioui/patch_panel.go @@ -2,7 +2,6 @@ package gioui import ( "bytes" - "fmt" "image" "image/color" "io" @@ -371,79 +370,45 @@ func MakeUnitList(m *tracker.Model) UnitList { func (ul *UnitList) Layout(gtx C) D { t := TrackerFromContext(gtx) ul.update(gtx, t) - var units [256]tracker.UnitListItem - for i, item := range (*tracker.Units)(t.Model).Iterate { - if i >= 256 { - break - } - units[i] = item - } - count := min(ul.dragList.TrackerList.Count(), 256) element := func(gtx C, i int) D { gtx.Constraints.Max.Y = gtx.Dp(20) gtx.Constraints.Min.Y = gtx.Constraints.Max.Y - if i < 0 || i > 255 { - return layout.Dimensions{Size: gtx.Constraints.Min} - } - u := units[i] + u := t.Units().Item(i) editorStyle := t.Theme.InstrumentEditor.UnitList.Name - if u.Disabled { + signalError := t.RailError() + switch { + case u.Disabled: editorStyle = t.Theme.InstrumentEditor.UnitList.NameDisabled - } - stackText := strconv.FormatInt(int64(u.StackAfter), 10) - if u.StackNeed > u.StackBefore { + case signalError.Err != nil && signalError.UnitIndex == i: editorStyle.Color = t.Theme.InstrumentEditor.UnitList.Error - (*tracker.Alerts)(t.Model).AddNamed("UnitNeedsInputs", fmt.Sprintf("%v needs at least %v input signals, got %v", u.Type, u.StackNeed, u.StackBefore), tracker.Error) - } else if i == count-1 && u.StackAfter != 0 { - editorStyle.Color = t.Theme.InstrumentEditor.UnitList.Warning - (*tracker.Alerts)(t.Model).AddNamed("InstrumentLeavesSignals", fmt.Sprintf("Instrument leaves %v signal(s) on the stack", u.StackAfter), tracker.Warning) } - stackLabel := Label(t.Theme, &t.Theme.InstrumentEditor.UnitList.Stack, stackText) - rightMargin := layout.Inset{Right: unit.Dp(10)} - return layout.Flex{Axis: layout.Horizontal}.Layout(gtx, - layout.Rigid(func(gtx C) D { - if i == ul.dragList.TrackerList.Selected() { - defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() - str := t.Model.UnitSearch() - for ev := ul.searchEditor.Update(gtx, str); ev != EditorEventNone; ev = ul.searchEditor.Update(gtx, str) { - if ev == EditorEventSubmit { - if str.Value() != "" { - for _, n := range sointu.UnitNames { - if strings.HasPrefix(n, str.Value()) { - t.Units().SetSelectedType(n) - break - } - } - } else { - t.Units().SetSelectedType("") - } - } - ul.dragList.Focus() - t.UnitSearching().SetValue(false) - } - return ul.searchEditor.Layout(gtx, str, t.Theme, &editorStyle, "---") - } else { - text := u.Type - if text == "" { - text = "---" - } - l := editorStyle.AsLabelStyle() - return Label(t.Theme, &l, text).Layout(gtx) + unitName := func(gtx C) D { + if i == ul.dragList.TrackerList.Selected() { + defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() + return ul.searchEditor.Layout(gtx, t.Model.UnitSearch(), t.Theme, &editorStyle, "---") + } else { + text := u.Type + if text == "" { + text = "---" } - }), - layout.Flexed(1, func(gtx C) D { - unitNameLabel := Label(t.Theme, &t.Theme.InstrumentEditor.UnitList.Comment, u.Comment) - inset := layout.Inset{Left: unit.Dp(5)} - return inset.Layout(gtx, unitNameLabel.Layout) - }), - layout.Rigid(func(gtx C) D { - return rightMargin.Layout(gtx, stackLabel.Layout) - }), + l := editorStyle.AsLabelStyle() + return Label(t.Theme, &l, text).Layout(gtx) + } + } + stackText := strconv.FormatInt(int64(u.Signals.StackAfter()), 10) + commentLabel := Label(t.Theme, &t.Theme.InstrumentEditor.UnitList.Comment, u.Comment) + stackLabel := Label(t.Theme, &t.Theme.InstrumentEditor.UnitList.Stack, stackText) + return layout.Flex{Axis: layout.Horizontal}.Layout(gtx, + layout.Rigid(unitName), + layout.Rigid(layout.Spacer{Width: 5}.Layout), + layout.Flexed(1, commentLabel.Layout), + layout.Rigid(stackLabel.Layout), + layout.Rigid(layout.Spacer{Width: 10}.Layout), ) } defer op.Offset(image.Point{}).Push(gtx.Ops).Pop() unitList := FilledDragList(t.Theme, ul.dragList) - return Surface{Gray: 30, Focus: t.PatchPanel.TreeFocused(gtx)}.Layout(gtx, func(gtx C) D { + surface := func(gtx C) D { return layout.Stack{Alignment: layout.SE}.Layout(gtx, layout.Expanded(func(gtx C) D { defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() @@ -458,7 +423,8 @@ func (ul *UnitList) Layout(gtx C) D { return margin.Layout(gtx, addUnitBtn.Layout) }), ) - }) + } + return Surface{Gray: 30, Focus: t.PatchPanel.TreeFocused(gtx)}.Layout(gtx, surface) } func (ul *UnitList) update(gtx C, t *Tracker) { @@ -478,7 +444,7 @@ func (ul *UnitList) update(gtx C, t *Tracker) { if e, ok := event.(key.Event); ok && e.State == key.Press { switch e.Name { case key.NameRightArrow: - t.PatchPanel.unitEditor.sliderList.Focus() + t.PatchPanel.unitEditor.paramTable.RowTitleList.Focus() case key.NameDeleteBackward: t.Units().SetSelectedType("") t.UnitSearching().SetValue(true) @@ -490,6 +456,23 @@ func (ul *UnitList) update(gtx C, t *Tracker) { } } } + str := t.Model.UnitSearch() + for ev := ul.searchEditor.Update(gtx, str); ev != EditorEventNone; ev = ul.searchEditor.Update(gtx, str) { + if ev == EditorEventSubmit { + if str.Value() != "" { + for _, n := range sointu.UnitNames { + if strings.HasPrefix(n, str.Value()) { + t.Units().SetSelectedType(n) + break + } + } + } else { + t.Units().SetSelectedType("") + } + } + ul.dragList.Focus() + t.UnitSearching().SetValue(false) + } } func (ul *UnitList) Tags(curLevel int, yield TagYieldFunc) bool { diff --git a/tracker/gioui/scroll_table.go b/tracker/gioui/scroll_table.go index 695e9d4..1f37640 100644 --- a/tracker/gioui/scroll_table.go +++ b/tracker/gioui/scroll_table.go @@ -62,7 +62,7 @@ func NewScrollTable(table tracker.Table, vertList, horizList tracker.List) *Scro } for k, a := range keyBindingMap { switch a { - case "Copy", "Paste", "Cut", "Increase", "Decrease": + case "Copy", "Paste", "Cut", "Increase", "Decrease", "IncreaseMore", "DecreaseMore": ret.eventFilters = append(ret.eventFilters, key.Filter{Focus: ret, Name: k.Name, Required: k.Modifiers}) } } @@ -117,18 +117,18 @@ func (s ScrollTableStyle) Layout(gtx C, element func(gtx C, x, y int) D, colTitl p := image.Pt(gtx.Dp(s.RowTitleWidth), gtx.Dp(s.ColumnTitleHeight)) s.handleEvents(gtx, p) - return Surface{Gray: 24, Focus: s.ScrollTable.TreeFocused(gtx)}.Layout(gtx, func(gtx C) D { - defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() - dims := gtx.Constraints.Max - s.layoutColTitles(gtx, p, colTitle, colTitleBg) - s.layoutRowTitles(gtx, p, rowTitle, rowTitleBg) - defer op.Offset(p).Push(gtx.Ops).Pop() - gtx.Constraints = layout.Exact(image.Pt(gtx.Constraints.Max.X-p.X, gtx.Constraints.Max.Y-p.Y)) - s.layoutTable(gtx, element) - s.RowTitleStyle.LayoutScrollBar(gtx) - s.ColTitleStyle.LayoutScrollBar(gtx) - return D{Size: dims} - }) + //return Surface{Gray: 24, Focus: s.ScrollTable.TreeFocused(gtx)}.Layout(gtx, func(gtx C) D { + defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() + dims := gtx.Constraints.Max + s.layoutColTitles(gtx, p, colTitle, colTitleBg) + s.layoutRowTitles(gtx, p, rowTitle, rowTitleBg) + defer op.Offset(p).Push(gtx.Ops).Pop() + gtx.Constraints = layout.Exact(image.Pt(gtx.Constraints.Max.X-p.X, gtx.Constraints.Max.Y-p.Y)) + s.layoutTable(gtx, element) + s.RowTitleStyle.LayoutScrollBar(gtx) + s.ColTitleStyle.LayoutScrollBar(gtx) + return D{Size: dims} + //}) } func (s *ScrollTableStyle) handleEvents(gtx layout.Context, p image.Point) { @@ -176,12 +176,17 @@ func (s *ScrollTableStyle) handleEvents(gtx layout.Context, p image.Point) { } case key.Event: if e.State == key.Press { - s.ScrollTable.command(gtx, e) + s.ScrollTable.command(gtx, e, p) } case transfer.DataEvent: if b, err := io.ReadAll(e.Open()); err == nil { s.ScrollTable.Table.Paste(b) } + case key.FocusEvent: + if e.Focus { + s.ScrollTable.ColTitleList.EnsureVisible(s.ScrollTable.Table.Cursor().X) + s.ScrollTable.RowTitleList.EnsureVisible(s.ScrollTable.Table.Cursor().Y) + } } } @@ -250,7 +255,7 @@ func (s *ScrollTableStyle) layoutColTitles(gtx C, p image.Point, fg, bg func(gtx s.ColTitleStyle.Layout(gtx, fg, bg) } -func (s *ScrollTable) command(gtx C, e key.Event) { +func (s *ScrollTable) command(gtx C, e key.Event, p image.Point) { stepX := 1 stepY := 1 if e.Modifiers.Contain(key.ModAlt) { @@ -265,13 +270,13 @@ func (s *ScrollTable) command(gtx C, e key.Event) { s.Table.Clear() return case key.NameUpArrow: - if !s.Table.MoveCursor(0, -stepY) && stepY == 1 { + if !s.Table.MoveCursor(0, -stepY) && stepY == 1 && p.Y > 0 { s.ColTitleList.Focus() } case key.NameDownArrow: s.Table.MoveCursor(0, stepY) case key.NameLeftArrow: - if !s.Table.MoveCursor(-stepX, 0) && stepX == 1 { + if !s.Table.MoveCursor(-stepX, 0) && stepX == 1 && p.X > 0 { s.RowTitleList.Focus() } case key.NameRightArrow: @@ -300,11 +305,11 @@ func (s *ScrollTable) command(gtx C, e key.Event) { case "Paste": gtx.Execute(clipboard.ReadCmd{Tag: s}) return - case "Increase": - s.Table.Add(1) + case "Increase", "IncreaseMore": + s.Table.Add(1, a == "IncreaseMore") return - case "Decrease": - s.Table.Add(-1) + case "Decrease", "DecreaseMore": + s.Table.Add(-1, a == "DecreaseMore") return } } diff --git a/tracker/gioui/signal_rail.go b/tracker/gioui/signal_rail.go new file mode 100644 index 0000000..a91f149 --- /dev/null +++ b/tracker/gioui/signal_rail.go @@ -0,0 +1,106 @@ +package gioui + +import ( + "image" + "image/color" + "math" + + "gioui.org/f32" + "gioui.org/op/clip" + "gioui.org/op/paint" + "gioui.org/unit" + "github.com/vsariola/sointu/tracker" +) + +const maxSignalsDrawn = 16 + +type ( + RailStyle struct { + Color color.NRGBA + LineWidth unit.Dp + SignalWidth unit.Dp + PortDiameter unit.Dp + PortColor color.NRGBA + } + + RailWidget struct { + Style *RailStyle + Signal tracker.Rail + Height unit.Dp + } +) + +func Rail(th *Theme, signal tracker.Rail) RailWidget { + return RailWidget{ + Style: &th.SignalRail, + Signal: signal, + Height: th.UnitEditor.Height, + } +} + +func (s RailWidget) Layout(gtx C) D { + sw := gtx.Dp(s.Style.SignalWidth) + h := gtx.Dp(s.Height) + if s.Signal.PassThrough == 0 && len(s.Signal.StackUse.Inputs) == 0 && s.Signal.StackUse.NumOutputs == 0 { + return D{Size: image.Pt(sw, h)} + } + lw := gtx.Dp(s.Style.LineWidth) + pd := gtx.Dp(s.Style.PortDiameter) + center := sw / 2 + var path clip.Path + path.Begin(gtx.Ops) + // Draw pass through signals + for i := range min(maxSignalsDrawn, s.Signal.PassThrough) { + x := float32(i*sw + center) + path.MoveTo(f32.Pt(x, 0)) + path.LineTo(f32.Pt(x, float32(h))) + } + // Draw the routing of input signals + for i := range min(len(s.Signal.StackUse.Inputs), maxSignalsDrawn-s.Signal.PassThrough) { + input := s.Signal.StackUse.Inputs[i] + x1 := float32((i+s.Signal.PassThrough)*sw + center) + for _, link := range input { + x2 := float32((link+s.Signal.PassThrough)*sw + center) + path.MoveTo(f32.Pt(x1, 0)) + path.LineTo(f32.Pt(x2, float32(h/2))) + } + } + if s.Signal.Send { + for i := range min(len(s.Signal.StackUse.Inputs), maxSignalsDrawn-s.Signal.PassThrough) { + d := gtx.Dp(8) + from := f32.Pt(float32((i+s.Signal.PassThrough)*sw+center), float32(h/2)) + to := f32.Pt(float32(gtx.Constraints.Max.X), float32(h)-float32(d)) + ctrl := f32.Pt(from.X, to.Y) + path.MoveTo(from) + path.QuadTo(ctrl, to) + } + } + // Draw the routing of output signals + for i := range min(s.Signal.StackUse.NumOutputs, maxSignalsDrawn-s.Signal.PassThrough) { + x := float32((i+s.Signal.PassThrough)*sw + center) + path.MoveTo(f32.Pt(x, float32(h/2))) + path.LineTo(f32.Pt(x, float32(h))) + } + // Signal paths finished + paint.FillShape(gtx.Ops, s.Style.Color, + clip.Stroke{ + Path: path.End(), + Width: float32(lw), + }.Op()) + // Draw the circles on signals that get modified + var circle clip.Path + circle.Begin(gtx.Ops) + for i := range min(len(s.Signal.StackUse.Modifies), maxSignalsDrawn-s.Signal.PassThrough) { + if !s.Signal.StackUse.Modifies[i] { + continue + } + f := f32.Pt(float32((i+s.Signal.PassThrough)*sw+center), float32(h/2)) + circle.MoveTo(f32.Pt(f.X-float32(pd/2), float32(h/2))) + circle.ArcTo(f, f, float32(2*math.Pi)) + } + p := clip.Outline{Path: circle.End()}.Op().Push(gtx.Ops) + paint.ColorOp{Color: s.Style.PortColor}.Add(gtx.Ops) + paint.PaintOp{}.Add(gtx.Ops) + p.Pop() + return D{Size: image.Pt(sw, h)} +} diff --git a/tracker/gioui/theme.go b/tracker/gioui/theme.go index b511c6c..4b5f788 100644 --- a/tracker/gioui/theme.go +++ b/tracker/gioui/theme.go @@ -5,6 +5,7 @@ import ( "image/color" "gioui.org/text" + "gioui.org/unit" "gioui.org/widget" "gioui.org/widget/material" "golang.org/x/exp/shiny/materialdesign/icons" @@ -84,11 +85,23 @@ type Theme struct { } } UnitEditor struct { - Hint LabelStyle + Name LabelStyle Chooser LabelStyle - ParameterName LabelStyle - InvalidParam color.NRGBA - SendTarget color.NRGBA + Hint LabelStyle + WireColor color.NRGBA + WireHint LabelStyle + WireHighlight color.NRGBA + Width unit.Dp + Height unit.Dp + RackComment LabelStyle + UnitList struct { + LabelWidth unit.Dp + Name LabelStyle + Disabled LabelStyle + Error color.NRGBA + } + Error color.NRGBA + Divider color.NRGBA } Cursor CursorStyle Selection CursorStyle @@ -100,8 +113,13 @@ type Theme struct { Menu PopupStyle Dialog PopupStyle } - Split SplitStyle - ScrollBar ScrollBarStyle + Split SplitStyle + ScrollBar ScrollBarStyle + Knob KnobStyle + DisabledKnob KnobStyle + Switch SwitchStyle + SignalRail RailStyle + Port PortStyle // iconCache is used to cache the icons created from iconvg data iconCache map[*byte]*widget.Icon diff --git a/tracker/gioui/theme.yml b/tracker/gioui/theme.yml index ad328d7..4c89fdc 100644 --- a/tracker/gioui/theme.yml +++ b/tracker/gioui/theme.yml @@ -178,12 +178,6 @@ instrumenteditor: disabled: { textsize: 12, color: *disabled } warning: *warningcolor error: *errorcolor -uniteditor: - hint: { textsize: 16, color: *highemphasis, shadowcolor: *black } - chooser: { textsize: 12, color: *white, shadowcolor: *black } - parametername: { textsize: 16, color: *white, shadowcolor: *black } - invalidparam: { r: 120, g: 120, b: 120, a: 190 } - sendtarget: { r: 120, g: 120, b: 210, a: 255 } cursor: active: { r: 100, g: 140, b: 255, a: 48 } activealt: { r: 255, g: 100, b: 140, a: 48 } @@ -211,3 +205,62 @@ dialog: textinset: { top: 12, bottom: 12, left: 20, right: 20 } buttons: *textbutton split: { bar: 10, minsize1: 180, minsize2: 180 } +uniteditor: + hint: { textsize: 16, color: *highemphasis, shadowcolor: *black } + chooser: { textsize: 12, color: *white, shadowcolor: *black } + name: + { textsize: 12, alignment: 2, color: *highemphasis, shadowcolor: *black } + wirecolor: *secondarycolor + wirehighlight: *white + wirehint: { textsize: 12, color: *disabled, shadowcolor: *black } + width: 60 + height: 70 + unitlist: + labelwidth: 16 + name: { textsize: 12, color: *white, alignment: 2 } + disabled: + { textsize: 12, color: *disabled, font: { style: 1 }, alignment: 2 } + error: *errorcolor + divider: { r: 255, g: 255, b: 255, a: 5 } + rackcomment: { textsize: 16, color: *mediumemphasis, shadowcolor: *black } +knob: + diameter: 36 + value: { textsize: 12, color: *highemphasis } + strokewidth: 4 + bg: { r: 40, g: 40, b: 40, a: 255 } + pos: { color: *primarycolor, bg: { r: 51, g: 36, b: 54, a: 255 } } + neg: { color: *secondarycolor, bg: { r: 32, g: 55, b: 58, a: 255 } } + indicator: { color: *white, width: 2, innerdiam: 24, outerdiam: 36 } +disabledknob: + diameter: 36 + value: { textsize: 12, color: { r: 147, g: 143, b: 153, a: 255 }} + strokewidth: 4 + bg: { r: 40, g: 40, b: 40, a: 255 } + pos: { color: { r: 147, g: 143, b: 153, a: 255 }, bg: { r: 54, g: 52, b: 59, a: 255 } } + neg: { color: { r: 147, g: 143, b: 153, a: 255 }, bg: { r: 54, g: 52, b: 59, a: 255 } } + indicator: { color: { r: 147, g: 143, b: 153, a: 255 }, width: 2, innerdiam: 24, outerdiam: 36 } +signalrail: + color: *secondarycolor + signalwidth: 10 + linewidth: 2 + portdiameter: 8 + portcolor: *primarycolor +port: + diameter: 36 + strokewidth: 4 + color: { r: 32, g: 55, b: 58, a: 255 } +switch: + width: 36 + height: 20 + handle: 16 + neutral: + fg: { r: 147, g: 143, b: 153, a: 255 } + bg: { r: 54, g: 52, b: 59, a: 255 } + pos: + fg: *white + bg: { r: 125, g: 87, b: 128, a: 255 } + neg: + fg: *white + bg: { r: 70, g: 128, b: 131, a: 255 } + icon: 10 + outline: 1 diff --git a/tracker/gioui/unit_editor.go b/tracker/gioui/unit_editor.go index 8d33c89..25067ec 100644 --- a/tracker/gioui/unit_editor.go +++ b/tracker/gioui/unit_editor.go @@ -2,47 +2,46 @@ package gioui import ( "bytes" - "fmt" "image" + "image/color" "io" "math" + "time" + "gioui.org/f32" "gioui.org/io/clipboard" - "gioui.org/io/event" "gioui.org/io/key" - "gioui.org/io/pointer" "gioui.org/layout" + "gioui.org/op" "gioui.org/op/clip" + "gioui.org/op/paint" "gioui.org/text" - "gioui.org/unit" - "gioui.org/widget" - "gioui.org/widget/material" - "gioui.org/x/component" - "github.com/vsariola/sointu" "github.com/vsariola/sointu/tracker" "golang.org/x/exp/shiny/materialdesign/icons" "golang.org/x/text/cases" "golang.org/x/text/language" ) -type UnitEditor struct { - sliderList *DragList - searchList *DragList - Parameters []*ParameterWidget - DeleteUnitBtn *Clickable - CopyUnitBtn *Clickable - ClearUnitBtn *Clickable - DisableUnitBtn *Clickable - SelectTypeBtn *Clickable - commentEditor *Editor - caser cases.Caser +type ( + UnitEditor struct { + paramTable *ScrollTable + searchList *DragList + Parameters [][]*ParamState + DeleteUnitBtn *Clickable + CopyUnitBtn *Clickable + ClearUnitBtn *Clickable + DisableUnitBtn *Clickable + SelectTypeBtn *Clickable + commentEditor *Editor + caser cases.Caser - copyHint string - disableUnitHint string - enableUnitHint string + copyHint string + disableUnitHint string + enableUnitHint string - searching tracker.Bool -} + searching tracker.Bool + } +) func NewUnitEditor(m *tracker.Model) *UnitEditor { ret := &UnitEditor{ @@ -52,7 +51,7 @@ func NewUnitEditor(m *tracker.Model) *UnitEditor { CopyUnitBtn: new(Clickable), SelectTypeBtn: new(Clickable), commentEditor: NewEditor(true, true, text.Start), - sliderList: NewDragList(m.Params().List(), layout.Vertical), + paramTable: NewScrollTable(m.Params().Table(), m.ParamVertList().List(), m.Units().List()), searchList: NewDragList(m.SearchResults().List(), layout.Vertical), searching: m.UnitSearching(), } @@ -66,8 +65,7 @@ func NewUnitEditor(m *tracker.Model) *UnitEditor { func (pe *UnitEditor) Layout(gtx C) D { t := TrackerFromContext(gtx) pe.update(gtx, t) - defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() - editorFunc := pe.layoutSliders + editorFunc := pe.layoutRack if pe.showingChooser() { editorFunc = pe.layoutUnitTypeChooser } @@ -80,7 +78,7 @@ func (pe *UnitEditor) Layout(gtx C) D { } func (pe *UnitEditor) showingChooser() bool { - return pe.searching.Value() || pe.sliderList.TrackerList.Count() == 0 + return pe.searching.Value() } func (pe *UnitEditor) update(gtx C, t *Tracker) { @@ -96,46 +94,82 @@ func (pe *UnitEditor) update(gtx C, t *Tracker) { for pe.commentEditor.Update(gtx, t.UnitComment()) != EditorEventNone { t.FocusPrev(gtx, false) } + for pe.ClearUnitBtn.Clicked(gtx) { + t.ClearUnit().Do() + t.UnitSearch().SetValue("") + t.UnitSearching().SetValue(true) + pe.searchList.Focus() + } for { e, ok := gtx.Event( key.Filter{Focus: pe.searchList, Name: key.NameEnter}, key.Filter{Focus: pe.searchList, Name: key.NameReturn}, + key.Filter{Focus: pe.searchList, Name: key.NameEscape}, ) if !ok { break } if e, ok := e.(key.Event); ok && e.State == key.Press { - pe.ChooseUnitType(t) + switch e.Name { + case key.NameEscape: + t.UnitSearching().SetValue(false) + pe.paramTable.RowTitleList.Focus() + case key.NameEnter, key.NameReturn: + pe.ChooseUnitType(t) + } } } for { e, ok := gtx.Event( - key.Filter{Focus: pe.sliderList, Name: key.NameLeftArrow, Optional: key.ModShift}, - key.Filter{Focus: pe.sliderList, Name: key.NameRightArrow, Optional: key.ModShift}, - key.Filter{Focus: pe.sliderList, Name: key.NameDeleteBackward}, - key.Filter{Focus: pe.sliderList, Name: key.NameDeleteForward}, + key.Filter{Focus: pe.paramTable, Name: key.NameLeftArrow, Required: key.ModShift, Optional: key.ModShortcut}, + key.Filter{Focus: pe.paramTable, Name: key.NameRightArrow, Required: key.ModShift, Optional: key.ModShortcut}, + key.Filter{Focus: pe.paramTable, Name: key.NameDeleteBackward}, + key.Filter{Focus: pe.paramTable, Name: key.NameDeleteForward}, ) if !ok { break } if e, ok := e.(key.Event); ok && e.State == key.Press { - params := t.Model.Params() - item := params.SelectedItem() switch e.Name { case key.NameLeftArrow: - if e.Modifiers.Contain(key.ModShift) { - item.SetValue(item.Value() - item.LargeStep()) - } else { - item.SetValue(item.Value() - 1) - } + t.Model.Params().Table().Add(-1, e.Modifiers.Contain(key.ModShortcut)) case key.NameRightArrow: - if e.Modifiers.Contain(key.ModShift) { - item.SetValue(item.Value() + item.LargeStep()) - } else { - item.SetValue(item.Value() + 1) - } + t.Model.Params().Table().Add(1, e.Modifiers.Contain(key.ModShortcut)) case key.NameDeleteBackward, key.NameDeleteForward: - item.Reset() + t.Model.Params().Table().Clear() + } + c := t.Model.Params().Cursor() + if c.X >= 0 && c.Y >= 0 && c.Y < len(pe.Parameters) && c.X < len(pe.Parameters[c.Y]) { + ta := &pe.Parameters[c.Y][c.X].tipArea + ta.Appear(gtx.Now) + ta.Exit.SetTarget(gtx.Now.Add(ta.ExitDuration)) + } + } + } + for { + e, ok := gtx.Event( + key.Filter{Focus: pe.paramTable.RowTitleList, Name: key.NameEnter}, + key.Filter{Focus: pe.paramTable.RowTitleList, Name: key.NameReturn}, + key.Filter{Focus: pe.paramTable.RowTitleList, Name: key.NameLeftArrow}, + key.Filter{Focus: pe.paramTable.RowTitleList, Name: key.NameDeleteBackward}, + ) + if !ok { + break + } + if e, ok := e.(key.Event); ok && e.State == key.Press { + switch e.Name { + case key.NameLeftArrow: + t.PatchPanel.unitList.dragList.Focus() + case key.NameDeleteBackward: + t.ClearUnit().Do() + t.UnitSearch().SetValue("") + t.UnitSearching().SetValue(true) + pe.searchList.Focus() + case key.NameEnter, key.NameReturn: + t.Model.AddUnit(e.Modifiers.Contain(key.ModCtrl)).Do() + t.UnitSearch().SetValue("") + t.UnitSearching().SetValue(true) + pe.searchList.Focus() } } } @@ -144,67 +178,237 @@ func (pe *UnitEditor) update(gtx C, t *Tracker) { func (pe *UnitEditor) ChooseUnitType(t *Tracker) { if ut, ok := t.SearchResults().Item(pe.searchList.TrackerList.Selected()); ok { t.Units().SetSelectedType(ut) - t.PatchPanel.unitList.dragList.Focus() + pe.paramTable.RowTitleList.Focus() } } -func (pe *UnitEditor) layoutSliders(gtx C) D { +func (pe *UnitEditor) layoutRack(gtx C) D { + defer clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Push(gtx.Ops).Pop() t := TrackerFromContext(gtx) - numItems := pe.sliderList.TrackerList.Count() // create enough parameter widget to match the number of parameters - for len(pe.Parameters) < numItems { - pe.Parameters = append(pe.Parameters, new(ParameterWidget)) + width := pe.paramTable.Table.Width() + for len(pe.Parameters) < pe.paramTable.Table.Height() { + pe.Parameters = append(pe.Parameters, make([]*ParamState, 0)) } - - index := 0 - for param := range t.Model.Params().Iterate { - pe.Parameters[index].Parameter = param - index++ + cellWidth := gtx.Dp(t.Theme.UnitEditor.Width) + cellHeight := gtx.Dp(t.Theme.UnitEditor.Height) + rowTitleLabelWidth := gtx.Dp(t.Theme.UnitEditor.UnitList.LabelWidth) + rowTitleSignalWidth := gtx.Dp(t.Theme.SignalRail.SignalWidth) * t.RailWidth() + rowTitleWidth := rowTitleLabelWidth + rowTitleSignalWidth + signalError := t.RailError() + columnTitleHeight := gtx.Dp(0) + for i := range pe.Parameters { + for len(pe.Parameters[i]) < width { + pe.Parameters[i] = append(pe.Parameters[i], &ParamState{tipArea: TipArea{ExitDuration: time.Second * 2}}) + } } - element := func(gtx C, index int) D { - if index < 0 || index >= numItems { + coltitle := func(gtx C, x int) D { + return D{Size: image.Pt(cellWidth, columnTitleHeight)} + } + rowtitle := func(gtx C, y int) D { + if y < 0 || y >= len(pe.Parameters) { return D{} } - paramStyle := t.ParamStyle(t.Theme, pe.Parameters[index]) - paramStyle.Focus = pe.sliderList.TrackerList.Selected() == index - dims := paramStyle.Layout(gtx) - return D{Size: image.Pt(gtx.Constraints.Max.X, dims.Size.Y)} + item := t.Units().Item(y) + sr := Rail(t.Theme, item.Signals) + label := Label(t.Theme, &t.Theme.UnitEditor.UnitList.Name, item.Type) + switch { + case item.Disabled: + label.LabelStyle = t.Theme.UnitEditor.UnitList.Disabled + case signalError.Err != nil && signalError.UnitIndex == y: + label.Color = t.Theme.UnitEditor.UnitList.Error + } + gtx.Constraints = layout.Exact(image.Pt(rowTitleWidth, cellHeight)) + sr.Layout(gtx) + defer op.Affine(f32.Affine2D{}.Rotate(f32.Pt(0, 0), -90*math.Pi/180).Offset(f32.Point{X: float32(rowTitleSignalWidth), Y: float32(cellHeight)})).Push(gtx.Ops).Pop() + gtx.Constraints = layout.Exact(image.Pt(cellHeight, rowTitleLabelWidth)) + label.Layout(gtx) + return D{Size: image.Pt(rowTitleWidth, cellHeight)} } + cursor := t.Model.Params().Cursor() + cell := func(gtx C, x, y int) D { + gtx.Constraints = layout.Exact(image.Pt(cellWidth, cellHeight)) + point := tracker.Point{X: x, Y: y} + if y < 0 || y >= len(pe.Parameters) || x < 0 || x >= len(pe.Parameters[y]) { + return D{} + } + selection := pe.paramTable.Table.Range() + if selection.Contains(point) { + color := t.Theme.Selection.Inactive + if gtx.Focused(pe.paramTable) { + color = t.Theme.Selection.Active + } + if point == cursor { + color = t.Theme.Cursor.Inactive + if gtx.Focused(pe.paramTable) { + color = t.Theme.Cursor.Active + } + } + paint.FillShape(gtx.Ops, color, clip.Rect{Min: image.Pt(0, 0), Max: image.Pt(gtx.Constraints.Min.X, gtx.Constraints.Min.Y)}.Op()) + } - fdl := FilledDragList(t.Theme, pe.sliderList) - dims := fdl.Layout(gtx, element, nil) - gtx.Constraints = layout.Exact(dims.Size) - fdl.LayoutScrollBar(gtx) + param := t.Model.Params().Item(point) + paramStyle := Param(param, t.Theme, pe.Parameters[y][x], pe.paramTable.Table.Cursor() == point, t.Units().Item(y).Disabled) + paramStyle.Layout(gtx) + comment := t.Units().Item(y).Comment + if comment != "" && x == t.Model.Params().RowWidth(y) { + label := Label(t.Theme, &t.Theme.UnitEditor.RackComment, comment) + return layout.W.Layout(gtx, func(gtx C) D { + gtx.Constraints.Max.X = 1e6 + gtx.Constraints.Min.Y = 0 + return label.Layout(gtx) + }) + } + return D{Size: image.Pt(gtx.Constraints.Max.X, gtx.Constraints.Max.Y)} + } + table := FilledScrollTable(t.Theme, pe.paramTable) + table.RowTitleWidth = gtx.Metric.PxToDp(rowTitleWidth) + table.ColumnTitleHeight = 0 + table.CellWidth = t.Theme.UnitEditor.Width + table.CellHeight = t.Theme.UnitEditor.Height + pe.drawBackGround(gtx) + pe.drawSignals(gtx, rowTitleWidth) + dims := table.Layout(gtx, cell, coltitle, rowtitle, nil, nil) return dims } +func (pe *UnitEditor) drawSignals(gtx C, rowTitleWidth int) { + t := TrackerFromContext(gtx) + colP := pe.paramTable.ColTitleList.List.Position + rowP := pe.paramTable.RowTitleList.List.Position + p := image.Pt(rowTitleWidth, 0) + defer op.Offset(p).Push(gtx.Ops).Pop() + gtx.Constraints.Max = gtx.Constraints.Max.Sub(p) + defer clip.Rect(image.Rectangle{Max: gtx.Constraints.Max}).Push(gtx.Ops).Pop() + defer op.Offset(image.Pt(-colP.Offset, -rowP.Offset)).Push(gtx.Ops).Pop() + for wire := range t.Wires { + clr := t.Theme.UnitEditor.WireColor + if wire.Highlight { + clr = t.Theme.UnitEditor.WireHighlight + } + switch { + case wire.FromSet && !wire.ToSet: + pe.drawRemoteSendSignal(gtx, wire, colP.First, rowP.First) + case !wire.FromSet && wire.ToSet: + pe.drawRemoteReceiveSignal(gtx, wire, colP.First, rowP.First, clr) + case wire.FromSet && wire.ToSet: + pe.drawSignal(gtx, wire, colP.First, rowP.First, clr) + } + } +} + +func (pe *UnitEditor) drawBackGround(gtx C) { + t := TrackerFromContext(gtx) + rowP := pe.paramTable.RowTitleList.List.Position + defer op.Offset(image.Pt(0, -rowP.Offset)).Push(gtx.Ops).Pop() + for range pe.paramTable.RowTitleList.List.Position.Count + 1 { + paint.FillShape(gtx.Ops, t.Theme.UnitEditor.Divider, clip.Rect{Max: image.Pt(gtx.Constraints.Max.X, 1)}.Op()) + op.Offset(image.Pt(0, gtx.Dp(t.Theme.UnitEditor.Height))).Add(gtx.Ops) + } +} + +func (pe *UnitEditor) drawRemoteSendSignal(gtx C, wire tracker.Wire, col, row int) { + sy := wire.From - row + t := TrackerFromContext(gtx) + defer op.Offset(image.Pt(gtx.Dp(5), (sy+1)*gtx.Dp(t.Theme.UnitEditor.Height)-gtx.Dp(16))).Push(gtx.Ops).Pop() + Label(t.Theme, &t.Theme.UnitEditor.WireHint, wire.Hint).Layout(gtx) +} + +func (pe *UnitEditor) drawRemoteReceiveSignal(gtx C, wire tracker.Wire, col, row int, clr color.NRGBA) { + ex := wire.To.X - col + ey := wire.To.Y - row + t := TrackerFromContext(gtx) + width := float32(gtx.Dp(t.Theme.UnitEditor.Width)) + height := float32(gtx.Dp(t.Theme.UnitEditor.Height)) + topLeft := f32.Pt(float32(ex)*width, float32(ey)*height) + center := topLeft.Add(f32.Pt(width/2, height/2)) + c := float32(gtx.Dp(t.Theme.Knob.Diameter)) / 2 / float32(math.Sqrt2) + from := f32.Pt(c, c).Add(center) + q := c + c1 := f32.Pt(c+q, c+q).Add(center) + o := float32(gtx.Dp(8)) + c2 := f32.Pt(width-q, height-o).Add(topLeft) + to := f32.Pt(width, height-o).Add(topLeft) + var path clip.Path + path.Begin(gtx.Ops) + path.MoveTo(from) + path.CubeTo(c1, c2, to) + paint.FillShape(gtx.Ops, clr, + clip.Stroke{ + Path: path.End(), + Width: float32(gtx.Dp(t.Theme.SignalRail.LineWidth)), + }.Op()) + defer op.Offset(image.Pt((ex+1)*gtx.Dp(t.Theme.UnitEditor.Width)+gtx.Dp(5), (ey+1)*gtx.Dp(t.Theme.UnitEditor.Height)-gtx.Dp(16))).Push(gtx.Ops).Pop() + Label(t.Theme, &t.Theme.UnitEditor.WireHint, wire.Hint).Layout(gtx) +} + +func (pe *UnitEditor) drawSignal(gtx C, wire tracker.Wire, col, row int, clr color.NRGBA) { + sy := wire.From - row + ex := wire.To.X - col + ey := wire.To.Y - row + t := TrackerFromContext(gtx) + diam := gtx.Dp(t.Theme.Knob.Diameter) + c := float32(diam) / 2 / float32(math.Sqrt2) + width := float32(gtx.Dp(t.Theme.UnitEditor.Width)) + height := float32(gtx.Dp(t.Theme.UnitEditor.Height)) + from := f32.Pt(0, float32((sy+1)*gtx.Dp(t.Theme.UnitEditor.Height))-float32(gtx.Dp(8))) + corner := f32.Pt(1, 1) + if ex > 0 { + corner.X = -corner.X + } + if sy < ey { + corner.Y = -corner.Y + } + topLeft := f32.Pt(float32(ex)*width, float32(ey)*height) + center := topLeft.Add(f32.Pt(width/2, height/2)) + to := mulVec(corner, f32.Pt(c, c)).Add(center) + p2 := mulVec(corner, f32.Pt(width/2, height/2)).Add(center) + p1 := f32.Pt(p2.X, float32((sy+1)*gtx.Dp(t.Theme.UnitEditor.Height))) + if sy > ey { + p1 = f32.Pt(p2.X, (float32(sy)+0.5)*float32(gtx.Dp(t.Theme.UnitEditor.Height))+float32(diam)/2) + } + k := float32(width) / 4 + p2Tan := mulVec(corner, f32.Pt(-k, -k)) + p1Tan := f32.Pt(k, p2Tan.Y) + fromTan := f32.Pt(k, 0) + var path clip.Path + path.Begin(gtx.Ops) + path.MoveTo(from) + path.CubeTo(from.Add(fromTan), p1.Sub(p1Tan), p1) + path.CubeTo(p1.Add(p1Tan), p2, to) + paint.FillShape(gtx.Ops, clr, + clip.Stroke{ + Path: path.End(), + Width: float32(gtx.Dp(t.Theme.SignalRail.LineWidth)), + }.Op()) +} + +func mulVec(a, b f32.Point) f32.Point { + return f32.Pt(a.X*b.X, a.Y*b.Y) +} + func (pe *UnitEditor) layoutFooter(gtx C) D { t := TrackerFromContext(gtx) - st := t.Units().SelectedType() text := "Choose unit type" - if st != "" { - text = pe.caser.String(st) + if !t.UnitSearching().Value() { + text = pe.caser.String(t.Units().SelectedType()) } hintText := Label(t.Theme, &t.Theme.UnitEditor.Hint, text) deleteUnitBtn := ActionIconBtn(t.DeleteUnit(), t.Theme, pe.DeleteUnitBtn, icons.ActionDelete, "Delete unit (Ctrl+Backspace)") copyUnitBtn := IconBtn(t.Theme, &t.Theme.IconButton.Enabled, pe.CopyUnitBtn, icons.ContentContentCopy, pe.copyHint) disableUnitBtn := ToggleIconBtn(t.UnitDisabled(), t.Theme, pe.DisableUnitBtn, icons.AVVolumeUp, icons.AVVolumeOff, pe.disableUnitHint, pe.enableUnitHint) - w := layout.Spacer{Width: t.Theme.IconButton.Enabled.Size}.Layout - if st != "" { - clearUnitBtn := ActionIconBtn(t.ClearUnit(), t.Theme, pe.ClearUnitBtn, icons.ContentClear, "Clear unit") - w = clearUnitBtn.Layout - } + clearUnitBtn := IconBtn(t.Theme, &t.Theme.IconButton.Enabled, pe.ClearUnitBtn, icons.ContentClear, "Clear unit") return layout.Flex{Axis: layout.Horizontal, Alignment: layout.Middle}.Layout(gtx, layout.Rigid(deleteUnitBtn.Layout), layout.Rigid(copyUnitBtn.Layout), layout.Rigid(disableUnitBtn.Layout), - layout.Rigid(w), + layout.Rigid(clearUnitBtn.Layout), layout.Rigid(func(gtx C) D { - gtx.Constraints.Min.X = gtx.Dp(120) + gtx.Constraints.Min.X = gtx.Dp(130) return hintText.Layout(gtx) }), layout.Flexed(1, func(gtx C) D { - return pe.commentEditor.Layout(gtx, t.UnitComment(), t.Theme, &t.Theme.InstrumentEditor.UnitComment, "---") + return pe.commentEditor.Layout(gtx, t.UnitComment(), t.Theme, &t.Theme.InstrumentEditor.UnitComment, "Comment") }), ) } @@ -234,173 +438,8 @@ func (pe *UnitEditor) layoutUnitTypeChooser(gtx C) D { } func (t *UnitEditor) Tags(level int, yield TagYieldFunc) bool { - widget := t.sliderList if t.showingChooser() { - widget = t.searchList + return yield(level, t.searchList) && yield(level+1, &t.commentEditor.widgetEditor) } - return yield(level, widget) && yield(level+1, &t.commentEditor.widgetEditor) -} - -type ParameterWidget struct { - floatWidget widget.Float - boolWidget widget.Bool - instrBtn Clickable - instrMenu MenuState - unitBtn Clickable - unitMenu MenuState - Parameter tracker.Parameter - tipArea TipArea -} - -type ParameterStyle struct { - tracker *Tracker - w *ParameterWidget - Theme *Theme - SendTargetTheme *material.Theme - Focus bool -} - -func (t *Tracker) ParamStyle(th *Theme, paramWidget *ParameterWidget) ParameterStyle { - sendTargetTheme := th.Material.WithPalette(material.Palette{ - Bg: th.Material.Bg, - Fg: th.UnitEditor.SendTarget, - ContrastBg: th.Material.ContrastBg, - ContrastFg: th.Material.ContrastFg, - }) - return ParameterStyle{ - tracker: t, // TODO: we need this to pull the instrument names for ID style parameters, find out another way - Theme: th, - SendTargetTheme: &sendTargetTheme, - w: paramWidget, - } -} - -func (p ParameterStyle) Layout(gtx C) D { - info, infoOk := p.w.Parameter.Info() - return layout.Flex{Axis: layout.Horizontal, Alignment: layout.Middle}.Layout(gtx, - layout.Rigid(func(gtx C) D { - gtx.Constraints.Min.X = gtx.Dp(unit.Dp(110)) - return layout.E.Layout(gtx, Label(p.Theme, &p.Theme.UnitEditor.ParameterName, p.w.Parameter.Name()).Layout) - }), - layout.Rigid(func(gtx C) D { - switch p.w.Parameter.Type() { - case tracker.IntegerParameter: - for p.Focus { - e, ok := gtx.Event(pointer.Filter{ - Target: &p.w.floatWidget, - Kinds: pointer.Scroll, - ScrollY: pointer.ScrollRange{Min: -1e6, Max: 1e6}, - }) - if !ok { - break - } - if ev, ok := e.(pointer.Event); ok && ev.Kind == pointer.Scroll { - delta := math.Min(math.Max(float64(ev.Scroll.Y), -1), 1) - p.w.Parameter.SetValue(p.w.Parameter.Value() - int(delta)) - } - } - gtx.Constraints.Min.X = gtx.Dp(unit.Dp(200)) - gtx.Constraints.Min.Y = gtx.Dp(unit.Dp(40)) - ra := p.w.Parameter.Range() - if !p.w.floatWidget.Dragging() { - p.w.floatWidget.Value = (float32(p.w.Parameter.Value()) - float32(ra.Min)) / float32(ra.Max-ra.Min) - } - sliderStyle := material.Slider(&p.Theme.Material, &p.w.floatWidget) - if infoOk { - sliderStyle.Color = p.Theme.UnitEditor.SendTarget - } - r := image.Rectangle{Max: gtx.Constraints.Min} - defer clip.Rect(r).Push(gtx.Ops).Pop() - defer pointer.PassOp{}.Push(gtx.Ops).Pop() - if p.Focus { - event.Op(gtx.Ops, &p.w.floatWidget) - } - dims := sliderStyle.Layout(gtx) - p.w.Parameter.SetValue(int(p.w.floatWidget.Value*float32(ra.Max-ra.Min) + float32(ra.Min) + 0.5)) - return dims - case tracker.BoolParameter: - gtx.Constraints.Min.X = gtx.Dp(unit.Dp(60)) - gtx.Constraints.Min.Y = gtx.Dp(unit.Dp(40)) - ra := p.w.Parameter.Range() - p.w.boolWidget.Value = p.w.Parameter.Value() > ra.Min - boolStyle := material.Switch(&p.Theme.Material, &p.w.boolWidget, "Toggle boolean parameter") - boolStyle.Color.Disabled = p.Theme.Material.Fg - defer pointer.PassOp{}.Push(gtx.Ops).Pop() - dims := layout.Center.Layout(gtx, boolStyle.Layout) - if p.w.boolWidget.Value { - p.w.Parameter.SetValue(ra.Max) - } else { - p.w.Parameter.SetValue(ra.Min) - } - return dims - case tracker.IDParameter: - gtx.Constraints.Min.X = gtx.Dp(unit.Dp(200)) - gtx.Constraints.Min.Y = gtx.Dp(unit.Dp(40)) - instrItems := make([]ActionMenuItem, p.tracker.Instruments().Count()) - for i := range instrItems { - i := i - name, _, _, _ := p.tracker.Instruments().Item(i) - instrItems[i].Text = name - instrItems[i].Icon = icons.NavigationChevronRight - instrItems[i].Action = tracker.MakeEnabledAction((tracker.DoFunc)(func() { - if id, ok := p.tracker.Instruments().FirstID(i); ok { - p.w.Parameter.SetValue(id) - } - })) - } - var unitItems []ActionMenuItem - instrName := "" - unitName := "" - targetInstrName, units, targetUnitIndex, ok := p.tracker.UnitInfo(p.w.Parameter.Value()) - if ok { - instrName = targetInstrName - unitName = buildUnitLabel(targetUnitIndex, units[targetUnitIndex]) - unitItems = make([]ActionMenuItem, len(units)) - for j, unit := range units { - id := unit.ID - unitItems[j].Text = buildUnitLabel(j, unit) - unitItems[j].Icon = icons.NavigationChevronRight - unitItems[j].Action = tracker.MakeEnabledAction((tracker.DoFunc)(func() { - p.w.Parameter.SetValue(id) - })) - } - } - defer pointer.PassOp{}.Push(gtx.Ops).Pop() - instrBtn := MenuBtn(p.tracker.Theme, &p.w.instrMenu, &p.w.instrBtn, instrName) - unitBtn := MenuBtn(p.tracker.Theme, &p.w.unitMenu, &p.w.unitBtn, unitName) - return layout.Flex{Axis: layout.Horizontal}.Layout(gtx, - layout.Rigid(func(gtx C) D { - return instrBtn.Layout(gtx, instrItems...) - }), - layout.Rigid(func(gtx C) D { - return unitBtn.Layout(gtx, unitItems...) - }), - ) - } - return D{} - }), - layout.Rigid(func(gtx C) D { - if p.w.Parameter.Type() != tracker.IDParameter { - hint := p.w.Parameter.Hint() - label := Label(p.tracker.Theme, &p.tracker.Theme.UnitEditor.Hint, hint.Label) - if !hint.Valid { - label.Color = p.tracker.Theme.UnitEditor.InvalidParam - } - if info == "" { - return label.Layout(gtx) - } - tooltip := component.PlatformTooltip(p.SendTargetTheme, info) - return p.w.tipArea.Layout(gtx, tooltip, label.Layout) - } - return D{} - }), - ) -} - -func buildUnitLabel(index int, u sointu.Unit) string { - text := u.Type - if u.Comment != "" { - text = fmt.Sprintf("%s \"%s\"", text, u.Comment) - } - return fmt.Sprintf("%d: %s", index, text) + return yield(level+1, t.paramTable.RowTitleList) && yield(level, t.paramTable) && yield(level+1, &t.commentEditor.widgetEditor) } diff --git a/tracker/list.go b/tracker/list.go index f410830..ac7314c 100644 --- a/tracker/list.go +++ b/tracker/list.go @@ -36,9 +36,9 @@ type ( } UnitListItem struct { - Type, Comment string - Disabled bool - StackNeed, StackBefore, StackAfter int + Type, Comment string + Disabled bool + Signals Rail } // Range is used to represent a range [Start,End) of integers @@ -299,24 +299,21 @@ func (m *Units) SetSelectedType(t string) { m.d.Song.Patch[m.d.InstrIndex].Units[m.d.UnitIndex].ID = oldUnit.ID // keep the ID of the replaced unit } -func (v *Units) Iterate(yield UnitYieldFunc) { - if v.d.InstrIndex < 0 || v.d.InstrIndex >= len(v.d.Song.Patch) { - return +func (v *Units) Item(index int) UnitListItem { + i := v.d.InstrIndex + if i < 0 || i >= len(v.d.Song.Patch) || index < 0 || index >= v.Count() { + return UnitListItem{} } - stackBefore := 0 - for i, unit := range v.d.Song.Patch[v.d.InstrIndex].Units { - stackAfter := stackBefore + unit.StackChange() - if !yield(i, UnitListItem{ - Type: unit.Type, - Comment: unit.Comment, - Disabled: unit.Disabled, - StackNeed: unit.StackNeed(), - StackBefore: stackBefore, - StackAfter: stackAfter, - }) { - break - } - stackBefore = stackAfter + unit := v.d.Song.Patch[v.d.InstrIndex].Units[index] + signals := Rail{} + if i >= 0 && i < len(v.derived.patch) && index >= 0 && index < len(v.derived.patch[i].rails) { + signals = v.derived.patch[i].rails[index] + } + return UnitListItem{ + Type: unit.Type, + Comment: unit.Comment, + Disabled: unit.Disabled, + Signals: signals, } } diff --git a/tracker/model.go b/tracker/model.go index 0f8d493..f012ff5 100644 --- a/tracker/model.go +++ b/tracker/model.go @@ -35,6 +35,7 @@ type ( ChangedSinceSave bool RecoveryFilePath string ChangedSinceRecovery bool + SendSource int } Model struct { @@ -189,7 +190,7 @@ func NewModel(broker *Broker, synther sointu.Synther, midiContext MIDIContext, r } TrySend(broker.ToPlayer, any(m.d.Song.Copy())) // we should be non-blocking in the constructor m.signalAnalyzer = NewScopeModel(broker, m.d.Song.BPM) - m.initDerivedData() + m.updateDeriveData(SongChange) return m } @@ -223,7 +224,6 @@ func (m *Model) change(kind string, t ChangeType, severity ChangeSeverity) func( if m.changeType&ScoreChange != 0 { m.d.Cursor.SongPos = m.d.Song.Score.Clamp(m.d.Cursor.SongPos) m.d.Cursor2.SongPos = m.d.Song.Score.Clamp(m.d.Cursor2.SongPos) - m.updateDerivedScoreData() TrySend(m.broker.ToPlayer, any(m.d.Song.Score.Copy())) } if m.changeType&PatchChange != 0 { @@ -239,7 +239,7 @@ func (m *Model) change(kind string, t ChangeType, severity ChangeSeverity) func( m.d.UnitIndex2 = clamp(m.d.UnitIndex2, 0, unitCount-1) m.d.UnitSearching = false // if we change anything in the patch, reset the unit searching m.d.UnitSearchString = "" - m.updateDerivedPatchData() + m.d.SendSource = 0 TrySend(m.broker.ToPlayer, any(m.d.Song.Patch.Copy())) } if m.changeType&BPMChange != 0 { @@ -249,6 +249,7 @@ func (m *Model) change(kind string, t ChangeType, severity ChangeSeverity) func( if m.changeType&RowsPerBeatChange != 0 { TrySend(m.broker.ToPlayer, any(RowsPerBeatMsg{m.d.Song.RowsPerBeat})) } + m.updateDeriveData(m.changeType) m.undoSkipCounter++ var limit int switch m.changeSeverity { @@ -329,7 +330,7 @@ func (m *Model) UnmarshalRecovery(bytes []byte) { } m.d.ChangedSinceRecovery = false TrySend(m.broker.ToPlayer, any(m.d.Song.Copy())) - m.initDerivedData() + m.updateDeriveData(SongChange) } func (m *Model) ProcessMsg(msg MsgToModel) { diff --git a/tracker/model_test.go b/tracker/model_test.go index dccc2f0..e639814 100644 --- a/tracker/model_test.go +++ b/tracker/model_test.go @@ -239,7 +239,7 @@ func (s *modelFuzzState) IterateTable(name string, table tracker.Table, yield fu table.Fill(seed % 16) }) yield(name+".Add", func(p string, t *testing.T) { - table.Add(seed % 16) + table.Add((seed>>1)%16, seed%2 == 0) }) } diff --git a/tracker/params.go b/tracker/params.go index adb005a..4003ae1 100644 --- a/tracker/params.go +++ b/tracker/params.go @@ -8,6 +8,7 @@ import ( "github.com/vsariola/sointu" "github.com/vsariola/sointu/vm" + "gopkg.in/yaml.v3" ) type ( @@ -20,6 +21,7 @@ type ( up *sointu.UnitParameter index int vtable parameterVtable + port int } parameterVtable interface { @@ -29,12 +31,13 @@ type ( Type(*Parameter) ParameterType Name(*Parameter) string Hint(*Parameter) ParameterHint - Info(*Parameter) (string, bool) // additional info for the parameter, used to display send targets - LargeStep(*Parameter) int Reset(*Parameter) + RoundToGrid(*Parameter, int, bool) int } - Params Model + Params Model + ParamVertList Model + // different parameter vtables to handle different types of parameters. // Casting struct{} to interface does not cause allocations. namedParameter struct{} @@ -54,7 +57,8 @@ type ( ) const ( - IntegerParameter ParameterType = iota + NoParameter ParameterType = iota + IntegerParameter BoolParameter IDParameter ) @@ -67,6 +71,12 @@ func (p *Parameter) Value() int { } return p.vtable.Value(p) } +func (p *Parameter) Port() (int, bool) { + if p.port <= 0 { + return 0, false + } + return p.port - 1, true +} func (p *Parameter) SetValue(value int) bool { if p.vtable == nil { return false @@ -78,15 +88,35 @@ func (p *Parameter) SetValue(value int) bool { } return p.vtable.SetValue(p, value) } +func (p *Parameter) Add(delta int, snapToGrid bool) bool { + if p.vtable == nil { + return false + } + newVal := p.Value() + delta + if snapToGrid && p.vtable != nil { + newVal = p.vtable.RoundToGrid(p, newVal, delta > 0) + } + return p.SetValue(newVal) +} + func (p *Parameter) Range() IntRange { if p.vtable == nil { return IntRange{} } return p.vtable.Range(p) } +func (p *Parameter) Neutral() int { + if p.vtable == nil { + return 0 + } + if p.up != nil { + return p.up.Neutral + } + return 0 +} func (p *Parameter) Type() ParameterType { if p.vtable == nil { - return IntegerParameter + return NoParameter } return p.vtable.Type(p) } @@ -102,97 +132,172 @@ func (p *Parameter) Hint() ParameterHint { } return p.vtable.Hint(p) } -func (p *Parameter) Info() (string, bool) { - if p.vtable == nil { - return "", false - } - return p.vtable.Info(p) -} -func (p *Parameter) LargeStep() int { - if p.vtable == nil { - return 1 - } - return p.vtable.LargeStep(p) -} func (p *Parameter) Reset() { if p.vtable == nil { return } p.vtable.Reset(p) } +func (p *Parameter) UnitID() int { + if p.unit == nil { + return 0 + } + return p.unit.ID +} + +// + +func (m *Model) ParamVertList() *ParamVertList { return (*ParamVertList)(m) } +func (pt *ParamVertList) List() List { return List{pt} } +func (pt *ParamVertList) Selected() int { return pt.d.ParamIndex } +func (pt *ParamVertList) Selected2() int { return pt.d.ParamIndex } +func (pt *ParamVertList) SetSelected(index int) { pt.d.ParamIndex = index } +func (pt *ParamVertList) SetSelected2(index int) {} +func (pt *ParamVertList) Count() int { return (*Params)(pt).Width() } // Model and Params methods -func (m *Model) Params() *Params { return (*Params)(m) } -func (pl *Params) List() List { return List{pl} } -func (pl *Params) Selected() int { return pl.d.ParamIndex } -func (pl *Params) Selected2() int { return pl.Selected() } -func (pl *Params) SetSelected(value int) { pl.d.ParamIndex = max(min(value, pl.Count()-1), 0) } -func (pl *Params) SetSelected2(value int) {} - -func (pl *Params) Count() int { - count := 0 - for range pl.Iterate { - count++ - } - return count +func (m *Model) Params() *Params { return (*Params)(m) } +func (pt *Params) Table() Table { return Table{pt} } +func (pt *Params) Cursor() Point { return Point{pt.d.ParamIndex, pt.d.UnitIndex} } +func (pt *Params) Cursor2() Point { return Point{pt.d.ParamIndex, pt.d.UnitIndex2} } +func (pt *Params) SetCursor(p Point) { + pt.d.ParamIndex = max(min(p.X, pt.Width()-1), 0) + pt.d.UnitIndex = max(min(p.Y, pt.Height()-1), 0) } - -func (pl *Params) SelectedItem() (ret Parameter) { - index := pl.Selected() - for param := range pl.Iterate { - if index == 0 { - ret = param - } - index-- - } - return +func (pt *Params) SetCursor2(p Point) { + pt.d.ParamIndex = max(min(p.X, pt.Width()-1), 0) + pt.d.UnitIndex2 = max(min(p.Y, pt.Height()-1), 0) } - -func (pl *Params) Iterate(yield ParamYieldFunc) { - if pl.d.InstrIndex < 0 || pl.d.InstrIndex >= len(pl.d.Song.Patch) { - return +func (pt *Params) Width() int { + if pt.d.InstrIndex < 0 || pt.d.InstrIndex >= len(pt.derived.patch) { + return 0 } - if pl.d.UnitIndex < 0 || pl.d.UnitIndex >= len(pl.d.Song.Patch[pl.d.InstrIndex].Units) { - return + // TODO: we hack the +1 so that we always have one extra cell to draw the + // comments. Refactor the gioui side so that we can specify the width and + // height regardless of the underlying table size + return pt.derived.patch[pt.d.InstrIndex].paramsWidth + 1 +} +func (pt *Params) RowWidth(y int) int { + if pt.d.InstrIndex < 0 || pt.d.InstrIndex >= len(pt.derived.patch) || y < 0 || y >= len(pt.derived.patch[pt.d.InstrIndex].params) { + return 0 } - unit := &pl.d.Song.Patch[pl.d.InstrIndex].Units[pl.d.UnitIndex] - unitType, ok := sointu.UnitTypes[unit.Type] - if !ok { - return + return len(pt.derived.patch[pt.d.InstrIndex].params[y]) +} +func (pt *Params) Height() int { return (*Model)(pt).Units().Count() } +func (pt *Params) MoveCursor(dx, dy int) (ok bool) { + p := pt.Cursor() + p.X += dx + p.Y += dy + pt.SetCursor(p) + return p == pt.Cursor() +} +func (pt *Params) Item(p Point) Parameter { + if pt.d.InstrIndex < 0 || pt.d.InstrIndex >= len(pt.derived.patch) || p.Y < 0 || p.Y >= len(pt.derived.patch[pt.d.InstrIndex].params) || p.X < 0 || p.X >= len(pt.derived.patch[pt.d.InstrIndex].params[p.Y]) { + return Parameter{} } - for i, up := range unitType { - if !up.CanSet { - continue - } - if unit.Type == "oscillator" && unit.Parameters["type"] != sointu.Sample && (up.Name == "samplestart" || up.Name == "loopstart" || up.Name == "looplength") { - continue // don't show the sample related params unless necessary - } - if !yield(Parameter{m: (*Model)(pl), unit: unit, up: &unitType[i], vtable: &namedParameter{}}) { - return - } - } - if unit.Type == "oscillator" && unit.Parameters["type"] == sointu.Sample { - if !yield(Parameter{m: (*Model)(pl), unit: unit, vtable: &gmDlsEntryParameter{}}) { - return - } - } - if unit.Type == "delay" { - if unit.Parameters["stereo"] == 1 && len(unit.VarArgs)%2 == 1 { - unit.VarArgs = append(unit.VarArgs, 1) - } - if !yield(Parameter{m: (*Model)(pl), unit: unit, vtable: &reverbParameter{}}) { - return - } - if !yield(Parameter{m: (*Model)(pl), unit: unit, vtable: &delayLinesParameter{}}) { - return - } - for i := range unit.VarArgs { - if !yield(Parameter{m: (*Model)(pl), unit: unit, index: i, vtable: &delayTimeParameter{}}) { - return + return pt.derived.patch[pt.d.InstrIndex].params[p.Y][p.X] +} +func (pt *Params) clear(p Point) { + q := pt.Item(p) + q.Reset() +} +func (pt *Params) set(p Point, value int) { + q := pt.Item(p) + q.SetValue(value) +} +func (pt *Params) add(rect Rect, delta int, largeStep bool) (ok bool) { + for y := rect.TopLeft.Y; y <= rect.BottomRight.Y; y++ { + for x := rect.TopLeft.X; x <= rect.BottomRight.X; x++ { + p := Point{x, y} + q := pt.Item(p) + if !q.Add(delta, largeStep) { + return false } } } + return true +} + +type paramsTable struct { + Params [][]int `yaml:",flow"` +} + +func (pt *Params) marshal(rect Rect) (data []byte, ok bool) { + width := rect.BottomRight.X - rect.TopLeft.X + 1 + height := rect.BottomRight.Y - rect.TopLeft.Y + 1 + var table = paramsTable{Params: make([][]int, 0, width)} + for x := 0; x < width; x++ { + table.Params = append(table.Params, make([]int, 0, rect.BottomRight.Y-rect.TopLeft.Y+1)) + for y := 0; y < height; y++ { + p := pt.Item(Point{x + rect.TopLeft.X, y + rect.TopLeft.Y}) + table.Params[x] = append(table.Params[x], p.Value()) + } + } + ret, err := yaml.Marshal(table) + if err != nil { + return nil, false + } + return ret, true +} +func (pt *Params) unmarshal(data []byte) (paramsTable, bool) { + var table paramsTable + yaml.Unmarshal(data, &table) + if len(table.Params) == 0 { + return paramsTable{}, false + } + for i := 0; i < len(table.Params); i++ { + if len(table.Params[i]) > 0 { + return table, true + } + } + return paramsTable{}, false +} + +func (pt *Params) unmarshalAtCursor(data []byte) (ret bool) { + table, ok := pt.unmarshal(data) + if !ok { + return false + } + for i := 0; i < len(table.Params); i++ { + for j, q := range table.Params[i] { + x := i + pt.Cursor().X + y := j + pt.Cursor().Y + p := pt.Item(Point{x, y}) + ret = p.SetValue(q) || ret + } + } + return ret +} +func (pt *Params) unmarshalRange(rect Rect, data []byte) (ret bool) { + table, ok := pt.unmarshal(data) + if !ok { + return false + } + if len(table.Params) == 0 || len(table.Params[0]) == 0 { + return false + } + width := rect.BottomRight.X - rect.TopLeft.X + 1 + height := rect.BottomRight.Y - rect.TopLeft.Y + 1 + if len(table.Params) < width { + return false + } + for x := 0; x < width; x++ { + for y := 0; y < height; y++ { + if len(table.Params[0]) < height { + return false + } + p := pt.Item(Point{x + rect.TopLeft.X, y + rect.TopLeft.Y}) + ret = p.SetValue(table.Params[x][y]) || ret + } + } + return ret +} +func (pt *Params) change(kind string, severity ChangeSeverity) func() { + return (*Model)(pt).change(kind, PatchChange, severity) +} +func (pt *Params) cancel() { + pt.changeCancel = true } // namedParameter vtable @@ -207,15 +312,21 @@ func (n *namedParameter) Range(p *Parameter) IntRange { return IntRange{Min: p.up.MinValue, Max: p.up.MaxValue} } func (n *namedParameter) Type(p *Parameter) ParameterType { + if p.up == nil || !p.up.CanSet { + return NoParameter + } if p.unit.Type == "send" && p.up.Name == "target" { return IDParameter } - if p.up.MinValue == 0 && p.up.MaxValue == 1 { + if p.up.MinValue >= -1 && p.up.MaxValue <= 1 { return BoolParameter } return IntegerParameter } func (n *namedParameter) Name(p *Parameter) string { + if p.up.Name == "notetracking" { + return "tracking" // notetracking does not fit in the UI + } return p.up.Name } func (n *namedParameter) Hint(p *Parameter) ParameterHint { @@ -223,39 +334,15 @@ func (n *namedParameter) Hint(p *Parameter) ParameterHint { label := strconv.Itoa(val) if p.up.DisplayFunc != nil { valueInUnits, units := p.up.DisplayFunc(val) - label = fmt.Sprintf("%d / %s %s", val, valueInUnits, units) - } - if p.unit.Type == "send" { - instrIndex, targetType, ok := p.m.UnitHintInfo(p.unit.Parameters["target"]) - if p.up.Name == "voice" && val == 0 { - if ok && instrIndex != p.m.d.InstrIndex { - label = "all" - } else { - label = "self" - } - } - if p.up.Name == "port" { - if !ok { - return ParameterHint{label, false} - } - portList := sointu.Ports[targetType] - if val < 0 || val >= len(portList) { - return ParameterHint{label, false} - } - label = portList[val] - } + label = fmt.Sprintf("%s %s", valueInUnits, units) } return ParameterHint{label, true} } -func (n *namedParameter) Info(p *Parameter) (string, bool) { - sendInfo, ok := p.m.ParameterInfo(p.unit.ID, p.up.Name) - return sendInfo, ok -} -func (n *namedParameter) LargeStep(p *Parameter) int { +func (n *namedParameter) RoundToGrid(p *Parameter, val int, up bool) int { if p.up.Name == "transpose" { - return 12 + return roundToGrid(val-64, 12, up) + 64 } - return 16 + return roundToGrid(val, 16, up) } func (n *namedParameter) Reset(p *Parameter) { v, ok := defaultUnits[p.unit.Type].Parameters[p.up.Name] @@ -301,22 +388,36 @@ func (g *gmDlsEntryParameter) Name(p *Parameter) string { return "sample" } func (g *gmDlsEntryParameter) Hint(p *Parameter) ParameterHint { - label := "0 / custom" + label := "custom" if v := g.Value(p); v > 0 { - label = fmt.Sprintf("%v / %v", v, GmDlsEntries[v-1].Name) + label = GmDlsEntries[v-1].Name } return ParameterHint{label, true} } -func (g *gmDlsEntryParameter) Info(p *Parameter) (string, bool) { - return "", false -} -func (g *gmDlsEntryParameter) LargeStep(p *Parameter) int { - return 16 +func (g *gmDlsEntryParameter) RoundToGrid(p *Parameter, val int, up bool) int { + return roundToGrid(val, 16, up) } func (g *gmDlsEntryParameter) Reset(p *Parameter) {} // delayTimeParameter vtable +var delayNoteTrackGrid, delayBpmTrackGrid []int + +func init() { + for st := -30; st <= 30; st++ { + gridVal := int(math.Exp2(float64(st)/12)*10787 + 0.5) + delayNoteTrackGrid = append(delayNoteTrackGrid, gridVal) + } + for i := 0; i < 16; i++ { + delayBpmTrackGrid = append(delayBpmTrackGrid, 1<= len(p.unit.VarArgs) { return 1 @@ -334,23 +435,17 @@ func (d *delayTimeParameter) Range(p *Parameter) IntRange { } return IntRange{Min: 1, Max: 65535} } -func (d *delayTimeParameter) Type(p *Parameter) ParameterType { - return IntegerParameter -} -func (d *delayTimeParameter) Name(p *Parameter) string { - return "delaytime" -} func (d *delayTimeParameter) Hint(p *Parameter) ParameterHint { val := d.Value(p) var text string switch p.unit.Parameters["notetracking"] { default: case 0: - text = fmt.Sprintf("%v / %.3f rows", val, float32(val)/float32(p.m.d.Song.SamplesPerRow())) + text = fmt.Sprintf("%.3f rows", float32(val)/float32(p.m.d.Song.SamplesPerRow())) case 1: relPitch := float64(val) / 10787 semitones := -math.Log2(relPitch) * 12 - text = fmt.Sprintf("%v / %.3f st", val, semitones) + text = fmt.Sprintf("%.3f st", semitones) case 2: k := 0 v := val @@ -372,7 +467,7 @@ func (d *delayTimeParameter) Hint(p *Parameter) ParameterHint { text = fmt.Sprintf(" (1/%d dotted)", 1<<(5-k)) } } - text = fmt.Sprintf("%v / %.3f beats%s", val, float32(val)/48.0, text) + text = fmt.Sprintf("%.3f beats%s", float32(val)/48.0, text) } if p.unit.Parameters["stereo"] == 1 { if p.index < len(p.unit.VarArgs)/2 { @@ -383,11 +478,15 @@ func (d *delayTimeParameter) Hint(p *Parameter) ParameterHint { } return ParameterHint{text, true} } -func (d *delayTimeParameter) Info(p *Parameter) (string, bool) { - return "", false -} -func (d *delayTimeParameter) LargeStep(p *Parameter) int { - return 16 +func (d *delayTimeParameter) RoundToGrid(p *Parameter, val int, up bool) int { + switch p.unit.Parameters["notetracking"] { + default: + return roundToGrid(val, 16, up) + case 1: + return roundToSliceGrid(val, delayNoteTrackGrid, up) + case 2: + return roundToSliceGrid(val, delayBpmTrackGrid, up) + } } func (d *delayTimeParameter) Reset(p *Parameter) {} @@ -412,21 +511,13 @@ func (d *delayLinesParameter) SetValue(p *Parameter, v int) bool { p.unit.VarArgs = p.unit.VarArgs[:targetLines] return true } -func (d *delayLinesParameter) Range(p *Parameter) IntRange { - return IntRange{Min: 1, Max: 32} -} -func (d *delayLinesParameter) Type(p *Parameter) ParameterType { - return IntegerParameter -} -func (d *delayLinesParameter) Name(p *Parameter) string { - return "delaylines" -} +func (d *delayLinesParameter) Range(p *Parameter) IntRange { return IntRange{Min: 1, Max: 32} } +func (d *delayLinesParameter) Type(p *Parameter) ParameterType { return IntegerParameter } +func (d *delayLinesParameter) Name(p *Parameter) string { return "delaylines" } +func (r *delayLinesParameter) RoundToGrid(p *Parameter, val int, up bool) int { return val } func (d *delayLinesParameter) Hint(p *Parameter) ParameterHint { return ParameterHint{strconv.Itoa(d.Value(p)), true} } -func (d *delayLinesParameter) Info(p *Parameter) (string, bool) { - return "", false -} func (d *delayLinesParameter) LargeStep(p *Parameter) int { return 4 } @@ -452,27 +543,51 @@ func (r *reverbParameter) SetValue(p *Parameter, v int) bool { copy(p.unit.VarArgs, entry.varArgs) return true } -func (r *reverbParameter) Range(p *Parameter) IntRange { - return IntRange{Min: 0, Max: len(reverbs)} -} -func (r *reverbParameter) Type(p *Parameter) ParameterType { - return IntegerParameter -} -func (r *reverbParameter) Name(p *Parameter) string { - return "reverb" -} +func (r *reverbParameter) Range(p *Parameter) IntRange { return IntRange{Min: 0, Max: len(reverbs)} } +func (r *reverbParameter) Type(p *Parameter) ParameterType { return IntegerParameter } +func (r *reverbParameter) Name(p *Parameter) string { return "reverb" } +func (r *reverbParameter) RoundToGrid(p *Parameter, val int, up bool) int { return val } +func (r *reverbParameter) Reset(p *Parameter) {} func (r *reverbParameter) Hint(p *Parameter) ParameterHint { i := r.Value(p) - label := "0 / custom" + label := "custom" if i > 0 { - label = fmt.Sprintf("%v / %v", i, reverbs[i-1].name) + label = reverbs[i-1].name } return ParameterHint{label, true} } -func (r *reverbParameter) Info(p *Parameter) (string, bool) { - return "", false + +func roundToGrid(value, grid int, up bool) int { + if up { + return value + mod(-value, grid) + } + return value - mod(value, grid) } -func (r *reverbParameter) LargeStep(p *Parameter) int { - return 1 + +func mod(a, b int) int { + m := a % b + if a < 0 && b < 0 { + m -= b + } + if a < 0 && b > 0 { + m += b + } + return m +} + +func roundToSliceGrid(value int, grid []int, up bool) int { + if up { + for _, v := range grid { + if value < v { + return v + } + } + } else { + for i := len(grid) - 1; i >= 0; i-- { + if value > grid[i] { + return grid[i] + } + } + } + return value } -func (r *reverbParameter) Reset(p *Parameter) {} diff --git a/tracker/presets.go b/tracker/presets.go index beed73d..94e0be6 100644 --- a/tracker/presets.go +++ b/tracker/presets.go @@ -66,7 +66,7 @@ var defaultUnits = map[string]sointu.Unit{ "clip": {Type: "clip", Parameters: map[string]int{"stereo": 0}}, "hold": {Type: "hold", Parameters: map[string]int{"stereo": 0, "holdfreq": 64}}, "distort": {Type: "distort", Parameters: map[string]int{"stereo": 0, "drive": 64}}, - "filter": {Type: "filter", Parameters: map[string]int{"stereo": 0, "frequency": 64, "resonance": 64, "lowpass": 1, "bandpass": 0, "highpass": 0, "negbandpass": 0, "neghighpass": 0}}, + "filter": {Type: "filter", Parameters: map[string]int{"stereo": 0, "frequency": 64, "resonance": 64, "lowpass": 1, "bandpass": 0, "highpass": 0}}, "out": {Type: "out", Parameters: map[string]int{"stereo": 1, "gain": 64}}, "outaux": {Type: "outaux", Parameters: map[string]int{"stereo": 1, "outgain": 64, "auxgain": 64}}, "aux": {Type: "aux", Parameters: map[string]int{"stereo": 1, "gain": 64, "channel": 2}}, @@ -76,7 +76,7 @@ var defaultUnits = map[string]sointu.Unit{ "in": {Type: "in", Parameters: map[string]int{"stereo": 1, "channel": 2}}, "speed": {Type: "speed", Parameters: map[string]int{}}, "compressor": {Type: "compressor", Parameters: map[string]int{"stereo": 0, "attack": 64, "release": 64, "invgain": 64, "threshold": 64, "ratio": 64}}, - "send": {Type: "send", Parameters: map[string]int{"stereo": 0, "amount": 128, "voice": 0, "unit": 0, "port": 0, "sendpop": 1}}, + "send": {Type: "send", Parameters: map[string]int{"stereo": 0, "amount": 64, "voice": 0, "unit": 0, "port": 0, "sendpop": 1}}, "sync": {Type: "sync", Parameters: map[string]int{}}, } @@ -157,6 +157,7 @@ func (m LoadPreset) Do() { m.d.Song.Patch = append(m.d.Song.Patch, defaultInstrument.Copy()) } newInstr := instrumentPresets[m.Index].Copy() + newInstr.NumVoices = clamp(m.d.Song.Patch[m.d.InstrIndex].NumVoices, 1, vm.MAX_VOICES) m.Model.assignUnitIDs(newInstr.Units) m.d.Song.Patch[m.d.InstrIndex] = newInstr } diff --git a/tracker/presets/BA/bass-adam.yml b/tracker/presets/BA/bass-adam.yml index 7716552..f240241 100644 --- a/tracker/presets/BA/bass-adam.yml +++ b/tracker/presets/BA/bass-adam.yml @@ -25,10 +25,10 @@ units: parameters: {stereo: 0} - type: filter id: 221 - parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} - type: filter id: 1 - parameters: {bandpass: 0, frequency: 25, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 104, stereo: 0} + parameters: {bandpass: 0, frequency: 25, highpass: 0, lowpass: 1, resonance: 104, stereo: 0} - type: pan id: 222 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/BA/bass-punch.yml b/tracker/presets/BA/bass-punch.yml index 657100c..9a0341a 100644 --- a/tracker/presets/BA/bass-punch.yml +++ b/tracker/presets/BA/bass-punch.yml @@ -1,12 +1,9 @@ -name: BassPunch +name: bass-punch numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 64, gain: 55, release: 76, stereo: 0, sustain: 64} - - type: send - id: 2 - parameters: {amount: 112, port: 4, sendpop: 0, target: 1} + - id: 216 + parameters: {} + comment: Main oscillators - type: oscillator id: 3 parameters: {color: 64, detune: 64, gain: 106, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 52, type: 2} @@ -16,6 +13,21 @@ units: - type: addp id: 5 parameters: {stereo: 0} + - id: 217 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 64, gain: 55, release: 76, stereo: 0, sustain: 64} + - type: send + id: 2 + parameters: {amount: 112, port: 4, sendpop: 0, target: 1} + - type: mulp + id: 12 + parameters: {stereo: 0} + - id: 218 + parameters: {} + comment: Effects & output - type: envelope id: 6 parameters: {attack: 0, decay: 70, gain: 128, release: 70, stereo: 0, sustain: 18} @@ -27,13 +39,10 @@ units: parameters: {amount: 96, port: 0, sendpop: 1, target: 11} - type: filter id: 10 - parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 74, stereo: 0} + parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, resonance: 74, stereo: 0} - type: filter id: 11 - parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: mulp - id: 12 - parameters: {stereo: 0} + parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 14 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/BA/bass.yml b/tracker/presets/BA/bass.yml index 0cca19d..7eabe45 100644 --- a/tracker/presets/BA/bass.yml +++ b/tracker/presets/BA/bass.yml @@ -1,18 +1,9 @@ name: bass numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 32, decay: 64, gain: 64, release: 64, stereo: 0, sustain: 64} - - type: send - id: 2 - parameters: {amount: 120, port: 4, sendpop: 0, target: 1} - - type: oscillator - id: 3 - parameters: {color: 80, detune: 64, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 2} - - type: oscillator - id: 4 - parameters: {color: 96, detune: 72, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 1} + - id: 218 + parameters: {} + comment: Modulations - type: oscillator id: 5 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 90, stereo: 0, transpose: 32, type: 0} @@ -22,18 +13,39 @@ units: - type: send id: 38 parameters: {amount: 60, port: 1, sendpop: 1, target: 4} + - id: 219 + parameters: {} + comment: Main oscillators + - type: oscillator + id: 3 + parameters: {color: 80, detune: 64, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 2} + - type: oscillator + id: 4 + parameters: {color: 96, detune: 72, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 1} - type: addp id: 40 parameters: {stereo: 0} + - id: 220 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 32, decay: 64, gain: 64, release: 64, stereo: 0, sustain: 64} + - type: send + id: 2 + parameters: {amount: 120, port: 4, sendpop: 0, target: 1} - type: mulp id: 217 parameters: {stereo: 0} + - id: 221 + parameters: {} + comment: Effects & output - type: filter id: 11 - parameters: {bandpass: 0, frequency: 18, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 18, highpass: -1, lowpass: 1, resonance: 64, stereo: 0} - type: filter id: 12 - parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 48, stereo: 0} + parameters: {bandpass: 0, frequency: 32, highpass: 0, lowpass: 1, resonance: 48, stereo: 0} - type: distort id: 13 parameters: {drive: 88, stereo: 0} diff --git a/tracker/presets/BA/dark.yml b/tracker/presets/BA/dark.yml index 60e1f63..f79bc20 100644 --- a/tracker/presets/BA/dark.yml +++ b/tracker/presets/BA/dark.yml @@ -1,30 +1,42 @@ name: dark numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 64, gain: 128, release: 64, stereo: 0, sustain: 64} - - type: oscillator - id: 2 - parameters: {color: 64, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 2} + - id: 184 + parameters: {} + comment: Modulations - type: oscillator id: 3 parameters: {color: 128, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 52, type: 0} - type: send id: 4 parameters: {amount: 96, port: 3, sendpop: 1, target: 6} + - id: 185 + parameters: {} + comment: Main oscillators - type: oscillator id: 6 parameters: {color: 64, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 127, stereo: 0, transpose: 40, type: 1} + - type: oscillator + id: 2 + parameters: {color: 64, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 2} - type: mulp id: 181 parameters: {stereo: 0} - - type: filter - id: 182 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 48, stereo: 0} + - id: 186 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 64, gain: 128, release: 64, stereo: 0, sustain: 64} - type: mulp id: 183 parameters: {stereo: 0} + - id: 187 + parameters: {} + comment: Effects & output + - type: filter + id: 182 + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 48, stereo: 0} - type: pan id: 10 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/BA/deepness.yml b/tracker/presets/BA/deepness.yml index ef99ca9..c5e736e 100644 --- a/tracker/presets/BA/deepness.yml +++ b/tracker/presets/BA/deepness.yml @@ -1,21 +1,24 @@ name: deepness numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 32, gain: 128, release: 64, stereo: 0, sustain: 112} + - id: 217 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 128, detune: 64, gain: 117, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 0} - - type: send - id: 3 - parameters: {amount: 112, port: 2, sendpop: 0, target: 211} - type: send id: 4 parameters: {amount: 112, port: 3, sendpop: 0, target: 212} - type: send id: 5 - parameters: {amount: 40, port: 3, sendpop: 1, target: 213} + parameters: {amount: 40, port: 3, sendpop: 0, target: 213} + - type: send + id: 3 + parameters: {amount: 112, port: 2, sendpop: 1, target: 211} + - id: 216 + parameters: {} + comment: Main oscillators - type: oscillator id: 211 parameters: {color: 64, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -31,22 +34,31 @@ units: - type: addp id: 11 parameters: {stereo: 0} - - type: filter - id: 12 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 88, stereo: 0} - - type: filter - id: 13 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 88, stereo: 0} + - id: 215 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 32, gain: 128, release: 64, stereo: 0, sustain: 112} - type: mulp id: 14 parameters: {stereo: 0} + - id: 214 + parameters: {} + comment: Effects & output + - type: filter + id: 12 + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 88, stereo: 0} + - type: filter + id: 13 + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 88, stereo: 0} + - type: delay + id: 16 + parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} + varargs: [32] - type: pan id: 15 parameters: {panning: 64, stereo: 0} - - type: delay - id: 16 - parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 1} - varargs: [32, 32] - type: outaux id: 20 parameters: {auxgain: 22, outgain: 21, stereo: 1} diff --git a/tracker/presets/BA/House Bass Organ.yml b/tracker/presets/BA/house-bass-organ.yml similarity index 79% rename from tracker/presets/BA/House Bass Organ.yml rename to tracker/presets/BA/house-bass-organ.yml index da34092..9901e6b 100644 --- a/tracker/presets/BA/House Bass Organ.yml +++ b/tracker/presets/BA/house-bass-organ.yml @@ -1,6 +1,9 @@ -name: House Bass Organ -numvoices: 2 +name: house-bass-organ +numvoices: 1 units: + - id: 231 + parameters: {} + comment: Main oscillators & envelope - type: envelope id: 207 parameters: {attack: 37, decay: 74, gain: 78, release: 44, stereo: 0, sustain: 49} @@ -16,15 +19,27 @@ units: - type: mulp id: 209 parameters: {stereo: 0} + - id: 232 + parameters: {} + comment: Effects + - type: envelope + id: 220 + parameters: {attack: 0, decay: 72, gain: 76, release: 45, stereo: 0, sustain: 47} + - type: send + id: 217 + parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 218, voice: 0} - type: filter id: 218 - parameters: {bandpass: 0, frequency: 0, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 0, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: filter id: 219 - parameters: {bandpass: 0, frequency: 66, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 66, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: distort id: 215 parameters: {drive: 86, stereo: 0} + - id: 233 + parameters: {} + comment: Noise - type: envelope id: 221 parameters: {attack: 32, decay: 53, gain: 64, release: 5, stereo: 0, sustain: 0} @@ -34,12 +49,21 @@ units: - type: mulp id: 223 parameters: {stereo: 0} + - type: loadnote + id: 226 + parameters: {stereo: 0} + - type: send + id: 227 + parameters: {amount: 54, port: 0, sendpop: 1, stereo: 0, target: 225, voice: 0} - type: filter id: 225 - parameters: {bandpass: 0, frequency: 71, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 81, stereo: 0} + parameters: {bandpass: -1, frequency: 71, highpass: 0, lowpass: 1, resonance: 81, stereo: 0} - type: addp id: 224 parameters: {stereo: 0} + - id: 234 + parameters: {} + comment: Effects & output - type: distort id: 228 parameters: {drive: 67, stereo: 0} @@ -55,15 +79,3 @@ units: - type: outaux id: 212 parameters: {auxgain: 29, outgain: 69, stereo: 1} - - type: envelope - id: 220 - parameters: {attack: 0, decay: 72, gain: 76, release: 45, stereo: 0, sustain: 47} - - type: send - id: 217 - parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0} - - type: loadnote - id: 226 - parameters: {stereo: 0} - - type: send - id: 227 - parameters: {amount: 54, port: 0, sendpop: 1, stereo: 0, target: 225, unit: 0, voice: 0} diff --git a/tracker/presets/BA/mid bass.yml b/tracker/presets/BA/mid-bass.yml similarity index 79% rename from tracker/presets/BA/mid bass.yml rename to tracker/presets/BA/mid-bass.yml index 5024ffe..837a50d 100644 --- a/tracker/presets/BA/mid bass.yml +++ b/tracker/presets/BA/mid-bass.yml @@ -1,15 +1,9 @@ -name: Mid Bass +name: mid-bass numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 72, gain: 128, release: 16, stereo: 0, sustain: 0} - - type: send - id: 2 - parameters: {amount: 88, port: 0, sendpop: 0, target: 13} - - type: distort - id: 3 - parameters: {drive: 16, stereo: 0} + - id: 68 + parameters: {} + comment: Modulations - type: noise id: 5 parameters: {gain: 128, shape: 64, stereo: 0} @@ -22,6 +16,9 @@ units: - type: send id: 67 parameters: {amount: 74, port: 0, sendpop: 1, target: 14} + - id: 69 + parameters: {} + comment: Main oscillators - type: oscillator id: 10 parameters: {color: 64, detune: 62, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 2} @@ -31,15 +28,33 @@ units: - type: addp id: 12 parameters: {stereo: 0} - - type: filter - id: 13 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + - id: 70 + parameters: {} + comment: Filters - type: filter id: 14 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 64, stereo: 0} + - type: filter + id: 13 + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - id: 71 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 72, gain: 128, release: 16, stereo: 0, sustain: 0} + - type: send + id: 2 + parameters: {amount: 88, port: 0, sendpop: 0, target: 13} + - type: distort + id: 3 + parameters: {drive: 16, stereo: 0} - type: mulp id: 15 parameters: {stereo: 0} + - id: 72 + parameters: {} + comment: Effects & output - type: delay id: 16 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/BA/not-from-this-world.yml b/tracker/presets/BA/not-from-this-world.yml index fe48ad0..fe8200a 100644 --- a/tracker/presets/BA/not-from-this-world.yml +++ b/tracker/presets/BA/not-from-this-world.yml @@ -1,18 +1,9 @@ name: not-from-this-world numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 88, gain: 128, release: 6, stereo: 0, sustain: 128} - - type: oscillator - id: 2 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 88, shape: 64, stereo: 0, transpose: 17, type: 0} - - type: send - id: 3 - parameters: {amount: 72, port: 0, sendpop: 0, target: 13} - - type: send - id: 4 - parameters: {amount: 48, port: 0, sendpop: 1, target: 15} + - id: 208 + parameters: {} + comment: Main oscillators - type: oscillator id: 6 parameters: {color: 56, detune: 67, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 40, type: 1} @@ -31,27 +22,48 @@ units: - type: mulp id: 11 parameters: {stereo: 0} + - id: 207 + parameters: {} + comment: Modulated filters + - type: oscillator + id: 2 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 88, shape: 64, stereo: 0, transpose: 17, type: 0} + - type: send + id: 3 + parameters: {amount: 72, port: 0, sendpop: 0, target: 13} + - type: send + id: 4 + parameters: {amount: 48, port: 0, sendpop: 1, target: 15} - type: push id: 12 parameters: {stereo: 0} - type: filter id: 13 - parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, resonance: 64, stereo: 0} - type: xch id: 14 parameters: {stereo: 0} - type: filter id: 15 - parameters: {bandpass: 1, frequency: 96, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 79, stereo: 0} + parameters: {bandpass: 1, frequency: 96, highpass: 0, lowpass: 0, resonance: 79, stereo: 0} - type: addp id: 16 parameters: {stereo: 0} - type: filter id: 17 - parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 37, stereo: 0} + parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, resonance: 37, stereo: 0} + - id: 206 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 88, gain: 128, release: 6, stereo: 0, sustain: 128} - type: mulp id: 18 parameters: {stereo: 0} + - id: 205 + parameters: {} + comment: Effects & output - type: pan id: 19 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/BA/SlapBass.yml b/tracker/presets/BA/slap-bass.yml similarity index 62% rename from tracker/presets/BA/SlapBass.yml rename to tracker/presets/BA/slap-bass.yml index 5070d7d..fd5cddf 100644 --- a/tracker/presets/BA/SlapBass.yml +++ b/tracker/presets/BA/slap-bass.yml @@ -1,18 +1,21 @@ -name: SlapBass +name: slap-bass numvoices: 1 units: + - id: 1066 + parameters: {} + comment: Modulations - type: envelope id: 1059 - parameters: {attack: 12, channel: 2, decay: 71, gain: 128, release: 74, stereo: 1, sustain: 40} - - type: send - id: 200 - parameters: {amount: 95, damp: 64, dry: 128, feedback: 125, notetracking: 0, port: 0, pregain: 40, sendpop: 0, stereo: 1, target: 170} + parameters: {attack: 12, decay: 71, gain: 128, release: 74, stereo: 1, sustain: 40} - type: send id: 30 - parameters: {amount: 37, gain: 128, port: 3, sendpop: 1, stereo: 1, target: 400, voice: 0} - - type: envelope - id: 21 - parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77} + parameters: {amount: 37, port: 3, sendpop: 0, stereo: 1, target: 400, voice: 0} + - type: send + id: 200 + parameters: {amount: 95, port: 0, sendpop: 1, stereo: 1, target: 170} + - id: 1065 + parameters: {} + comment: Main oscillators - type: oscillator id: 400 parameters: {color: 116, detune: 64, gain: 128, lfo: 0, phase: 80, shape: 84, stereo: 0, transpose: 64, type: 0, unison: 2} @@ -27,19 +30,28 @@ units: parameters: {color: 67, detune: 64, gain: 128, looplength: 905, loopstart: 6513, phase: 0, samplestart: 1252819, shape: 105, stereo: 0, transpose: 93, type: 4, unison: 0} - type: filter id: 1035 - parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 100, stereo: 0} + parameters: {bandpass: 0, frequency: 50, highpass: -1, lowpass: 1, resonance: 100, stereo: 0} - type: addp id: 1032 parameters: {stereo: 0} + - id: 1064 + parameters: {} + comment: Main envelope + - type: envelope + id: 21 + parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77} - type: mulp id: 22 parameters: {stereo: 0} + - id: 1063 + parameters: {} + comment: Filters & output - type: filter id: 170 - parameters: {bandpass: 0, frequency: 28, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 65, stereo: 0} + parameters: {bandpass: 0, frequency: 28, highpass: 0, lowpass: 1, resonance: 65, stereo: 0} - type: filter id: 1062 - parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: -1, frequency: 57, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 18 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/Kick.yml b/tracker/presets/DR/Kick.yml index cd49ee5..b5c7941 100644 --- a/tracker/presets/DR/Kick.yml +++ b/tracker/presets/DR/Kick.yml @@ -1,66 +1,70 @@ -name: Kick +name: kick comment: 'Suggested note: C-3' -numvoices: 2 +numvoices: 1 units: - - type: envelope - id: 261 - parameters: {attack: 16, decay: 51, gain: 128, release: 59, stereo: 0, sustain: 0} + - id: 296 + parameters: {} + comment: Tick - type: noise id: 269 parameters: {gain: 103, shape: 128, stereo: 0} - type: send id: 268 - parameters: {amount: 81, port: 0, sendpop: 1, stereo: 0, target: 262, unit: 0, voice: 0} + parameters: {amount: 81, port: 0, sendpop: 1, stereo: 0, target: 262, voice: 0} + - type: envelope + id: 261 + parameters: {attack: 16, decay: 51, gain: 128, release: 59, stereo: 0, sustain: 0} - type: oscillator id: 262 parameters: {color: 128, detune: 64, gain: 128, phase: 0, shape: 64, stereo: 0, transpose: 57, type: 0} - type: filter id: 281 - parameters: {bandpass: 0, frequency: 81, highpass: 1, lowpass: 0, negbandpass: 1, neghighpass: 0, resonance: 102, stereo: 0} + parameters: {bandpass: -1, frequency: 81, highpass: 1, lowpass: 0, resonance: 102, stereo: 0} - type: mulp id: 263 parameters: {stereo: 0} - - id: 285 + - id: 297 parameters: {} + comment: Pitch drop - type: envelope id: 280 parameters: {attack: 39, decay: 64, gain: 99, release: 14, stereo: 0, sustain: 4} - type: send id: 284 - parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} - - id: 286 - parameters: {} + parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - type: noise id: 275 parameters: {gain: 31, shape: 61, stereo: 0} - type: send id: 276 - parameters: {amount: 86, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} - - type: envelope - id: 274 - parameters: {attack: 39, decay: 69, gain: 60, release: 42, stereo: 0, sustain: 1} + parameters: {amount: 86, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} + - id: 285 + parameters: {} + comment: Body & tail - type: oscillator id: 277 parameters: {color: 128, detune: 64, gain: 128, phase: 0, shape: 64, stereo: 0, transpose: 45, type: 0} - type: filter id: 283 - parameters: {bandpass: 0, frequency: 13, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 13, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} - type: filter id: 287 - parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 108, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: envelope + id: 274 + parameters: {attack: 39, decay: 69, gain: 60, release: 42, stereo: 0, sustain: 1} - type: mulp id: 279 parameters: {stereo: 0} - type: addp id: 271 parameters: {stereo: 0} + - id: 295 + parameters: {} + comment: Output - type: pan id: 294 parameters: {panning: 64, stereo: 0} - - type: delay - id: 272 - parameters: {damp: 23, dry: 128, feedback: 0, notetracking: 0, pregain: 48, stereo: 1} - varargs: [1, 1395] - type: outaux id: 266 parameters: {auxgain: 0, outgain: 86, stereo: 1} diff --git a/tracker/presets/DR/clap edm.yml b/tracker/presets/DR/clap-edm.yml similarity index 78% rename from tracker/presets/DR/clap edm.yml rename to tracker/presets/DR/clap-edm.yml index 671e89f..72097a6 100644 --- a/tracker/presets/DR/clap edm.yml +++ b/tracker/presets/DR/clap-edm.yml @@ -1,19 +1,19 @@ -name: clap edm +name: clap-edm numvoices: 1 units: - type: envelope id: 14 - parameters: {attack: 0, decay: 66, gain: 128, panning: 64, release: 0, stereo: 0, sustain: 0} + parameters: {attack: 0, decay: 66, gain: 128, release: 0, stereo: 0, sustain: 0} - type: delay id: 15 - parameters: {auxgain: 64, damp: 0, dry: 0, feedback: 66, notetracking: 0, outgain: 64, pregain: 128, stereo: 0} + parameters: {damp: 0, dry: 0, feedback: 66, notetracking: 0, pregain: 128, stereo: 0} varargs: [1047, 693] - type: noise id: 16 parameters: {gain: 65, shape: 128, stereo: 0} - type: filter id: 39 - parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 66, stereo: 0} + parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 0, resonance: 66, stereo: 0} - type: mulp id: 17 parameters: {stereo: 0} @@ -29,7 +29,7 @@ units: parameters: {gain: 128, shape: 79, stereo: 0} - type: filter id: 23 - parameters: {bandpass: 1, frequency: 43, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 43, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: mulp id: 21 parameters: {stereo: 0} diff --git a/tracker/presets/DR/clap.yml b/tracker/presets/DR/clap.yml index 1178c57..a4cbf78 100644 --- a/tracker/presets/DR/clap.yml +++ b/tracker/presets/DR/clap.yml @@ -51,7 +51,7 @@ units: parameters: {drive: 89, stereo: 0} - type: filter id: 5 - parameters: {bandpass: 1, frequency: 46, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 46, stereo: 0} + parameters: {bandpass: 1, frequency: 46, highpass: -1, lowpass: 1, resonance: 46, stereo: 0} - type: pan id: 175 parameters: {panning: 73, stereo: 0} diff --git a/tracker/presets/DR/Crash909.yml b/tracker/presets/DR/crash-909.yml similarity index 70% rename from tracker/presets/DR/Crash909.yml rename to tracker/presets/DR/crash-909.yml index 7d8743b..b152b81 100644 --- a/tracker/presets/DR/Crash909.yml +++ b/tracker/presets/DR/crash-909.yml @@ -1,6 +1,6 @@ -name: Crash909 +name: crash-909 comment: Use range C-4 to G-4 -numvoices: 2 +numvoices: 1 units: - type: envelope id: 1 @@ -13,7 +13,7 @@ units: parameters: {stereo: 1} - type: pan id: 5 - parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 50, pregain: 40, stereo: 1} + parameters: {panning: 50, stereo: 1} - type: outaux id: 6 - parameters: {auxgain: 21, outgain: 70, panning: 64, stereo: 1} + parameters: {auxgain: 21, outgain: 70, stereo: 1} diff --git a/tracker/presets/DR/hihat closed.yml b/tracker/presets/DR/hihat-closed.yml similarity index 70% rename from tracker/presets/DR/hihat closed.yml rename to tracker/presets/DR/hihat-closed.yml index 512847e..e78a2b7 100644 --- a/tracker/presets/DR/hihat closed.yml +++ b/tracker/presets/DR/hihat-closed.yml @@ -1,4 +1,4 @@ -name: hihat closed +name: hihat-closed numvoices: 1 units: - type: envelope @@ -18,10 +18,10 @@ units: parameters: {stereo: 0} - type: filter id: 15 - parameters: {bandpass: 0, frequency: 67, highpass: 0, lowpass: 0, negbandpass: 1, neghighpass: 1, resonance: 95, stereo: 0} + parameters: {bandpass: -1, frequency: 67, highpass: -1, lowpass: 0, resonance: 95, stereo: 0} - type: filter id: 4 - parameters: {bandpass: 0, frequency: 109, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 55, stereo: 0} + parameters: {bandpass: -1, frequency: 109, highpass: 0, lowpass: 1, resonance: 55, stereo: 0} - type: pan id: 5 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/Hihat generator.yml b/tracker/presets/DR/hihat-generator.yml similarity index 69% rename from tracker/presets/DR/Hihat generator.yml rename to tracker/presets/DR/hihat-generator.yml index e79fd8f..315d391 100644 --- a/tracker/presets/DR/Hihat generator.yml +++ b/tracker/presets/DR/hihat-generator.yml @@ -1,10 +1,13 @@ -name: hihat open +name: hihat-generator comment: | Closed hihat: Atk 8 + Dec 60 Open hihat: Atk8 + Dec75 Shaker: Atk55 + Dec60 -numvoices: 2 +numvoices: 1 units: + - id: 333 + parameters: {} + comment: Main envelopes - type: envelope id: 1 parameters: {attack: 7, decay: 60, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -14,27 +17,36 @@ units: - type: mulp id: 332 parameters: {stereo: 0} + - id: 334 + parameters: {} + comment: Noise - type: noise id: 2 parameters: {gain: 63, shape: 52, stereo: 0} - type: mulp id: 15 parameters: {stereo: 0} + - id: 335 + parameters: {} + comment: Modulated filters + - type: noise + id: 10 + parameters: {gain: 31, shape: 50, stereo: 0} + - type: send + id: 11 + parameters: {amount: 51, port: 0, sendpop: 1, stereo: 0, target: 12, voice: 0} - type: filter id: 12 - parameters: {bandpass: 0, frequency: 110, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 110, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} - type: filter id: 331 - parameters: {bandpass: 0, frequency: 94, highpass: 0, lowpass: 0, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: -1, frequency: 94, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} + - id: 336 + parameters: {} + comment: Output - type: pan id: 5 parameters: {panning: 64, stereo: 0} - type: outaux id: 6 parameters: {auxgain: 0, outgain: 59, stereo: 1} - - type: noise - id: 10 - parameters: {gain: 31, shape: 50, stereo: 0} - - type: send - id: 11 - parameters: {amount: 51, port: 0, sendpop: 1, stereo: 0, target: 12, unit: 0, voice: 0} diff --git a/tracker/presets/DR/Open hihat (sampl).yml b/tracker/presets/DR/hihat-open-sample.yml similarity index 95% rename from tracker/presets/DR/Open hihat (sampl).yml rename to tracker/presets/DR/hihat-open-sample.yml index ff9ae71..1d8dfc5 100644 --- a/tracker/presets/DR/Open hihat (sampl).yml +++ b/tracker/presets/DR/hihat-open-sample.yml @@ -1,4 +1,4 @@ -name: Open hihat +name: hihat-open-sample numvoices: 1 units: - type: envelope diff --git a/tracker/presets/DR/hihat open.yml b/tracker/presets/DR/hihat-open.yml similarity index 68% rename from tracker/presets/DR/hihat open.yml rename to tracker/presets/DR/hihat-open.yml index af7240e..4ddb2e4 100644 --- a/tracker/presets/DR/hihat open.yml +++ b/tracker/presets/DR/hihat-open.yml @@ -1,6 +1,9 @@ -name: Hihat Open -numvoices: 2 +name: hihat-open +numvoices: 1 units: + - id: 19 + parameters: {} + comment: Main envelopes - type: envelope id: 1 parameters: {attack: 12, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -10,29 +13,39 @@ units: - type: addp id: 14 parameters: {stereo: 0} + - id: 20 + parameters: {} + comment: Noise - type: noise id: 2 parameters: {gain: 63, shape: 52, stereo: 0} - type: mulp id: 15 parameters: {stereo: 0} + - id: 18 + parameters: {} + comment: Modulated filters + - type: noise + id: 10 + parameters: {gain: 9, shape: 65, stereo: 0} + - type: hold + id: 16 + parameters: {holdfreq: 0, stereo: 0} + - type: send + id: 11 + parameters: {amount: 42, port: 0, sendpop: 1, stereo: 0, target: 4, voice: 0} - type: filter id: 4 - parameters: {bandpass: 1, frequency: 120, highpass: 1, lowpass: 0, negbandpass: 1, neghighpass: 0, resonance: 104, stereo: 0} + parameters: {bandpass: 0, frequency: 120, highpass: 1, lowpass: 0, resonance: 104, stereo: 0} - type: filter id: 12 - parameters: {bandpass: 0, frequency: 119, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 119, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - id: 17 + parameters: {} + comment: Output - type: pan id: 5 parameters: {panning: 64, stereo: 0} - type: outaux id: 6 parameters: {auxgain: 0, outgain: 59, stereo: 1} - - type: noise - id: 10 - parameters: {gain: 9, shape: 65, stereo: 0} - - type: hold - parameters: {holdfreq: 0, stereo: 0} - - type: send - id: 11 - parameters: {amount: 42, port: 0, sendpop: 1, stereo: 0, target: 4, unit: 0, voice: 0} diff --git a/tracker/presets/DR/hihat (sample).yml b/tracker/presets/DR/hihat-sample.yml similarity index 96% rename from tracker/presets/DR/hihat (sample).yml rename to tracker/presets/DR/hihat-sample.yml index 355c3b0..d9b1e88 100644 --- a/tracker/presets/DR/hihat (sample).yml +++ b/tracker/presets/DR/hihat-sample.yml @@ -1,4 +1,4 @@ -name: hihat (sample) +name: hihat-sample numvoices: 1 units: - type: envelope diff --git a/tracker/presets/DR/kick test b/tracker/presets/DR/kick test deleted file mode 100644 index d56b94e..0000000 --- a/tracker/presets/DR/kick test +++ /dev/null @@ -1,39 +0,0 @@ -name: Instr -numvoices: 1 -units: - - type: oscillator - id: 2 - parameters: {color: 0, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 48, stereo: 0, transpose: 76, type: 1, unison: 0} - - type: send - id: 21 - parameters: {amount: 78, port: 0, sendpop: 0, stereo: 0, target: 12, unit: 0, voice: 0} - - type: send - id: 22 - parameters: {amount: 86, port: 4, sendpop: 1, stereo: 0, target: 12, unit: 0, voice: 0} - - type: envelope - id: 1 - parameters: {attack: 8, decay: 73, gain: 64, release: 0, stereo: 0, sustain: 0} - - type: oscillator - id: 12 - parameters: {color: 128, detune: 62, gain: 128, phase: 0, shape: 60, stereo: 0, transpose: 46, type: 0, unison: 0} - - type: mulp - id: 14 - parameters: {stereo: 0} - - type: envelope - id: 18 - parameters: {attack: 64, decay: 64, gain: 64, release: 64, stereo: 0, sustain: 64} - - type: noise - id: 20 - parameters: {gain: 64, shape: 64, stereo: 0} - - type: mulp - id: 19 - parameters: {stereo: 0} - - type: addp - id: 23 - parameters: {stereo: 0} - - type: pan - id: 5 - parameters: {panning: 64, stereo: 0} - - type: outaux - id: 6 - parameters: {auxgain: 0, outgain: 64, stereo: 1} diff --git a/tracker/presets/DR/Kick 2.yml b/tracker/presets/DR/kick-2.yml similarity index 61% rename from tracker/presets/DR/Kick 2.yml rename to tracker/presets/DR/kick-2.yml index 8280923..f1034e5 100644 --- a/tracker/presets/DR/Kick 2.yml +++ b/tracker/presets/DR/kick-2.yml @@ -1,63 +1,67 @@ -name: Kick +name: kick-2 comment: 'Suggested note: C-3' -numvoices: 2 +numvoices: 1 units: + - id: 296 + parameters: {} + comment: Tick + - type: noise + id: 269 + parameters: {gain: 128, shape: 74, stereo: 0} + - type: send + id: 268 + parameters: {amount: 81, port: 0, sendpop: 1, stereo: 0, target: 262, voice: 0} + - type: oscillator + id: 262 + parameters: {color: 128, detune: 64, gain: 128, phase: 0, shape: 76, stereo: 0, transpose: 64, type: 0} + - type: filter + id: 281 + parameters: {bandpass: 1, frequency: 86, highpass: -1, lowpass: 0, resonance: 54, stereo: 0} - type: envelope id: 261 parameters: {attack: 16, decay: 51, gain: 128, release: 59, stereo: 0, sustain: 0} - - type: noise - id: 269 - parameters: {color: 64, detune: 64, gain: 128, phase: 0, shape: 74, stereo: 0, transpose: 64, type: 0} - - type: send - id: 268 - parameters: {amount: 81, port: 0, sendpop: 1, stereo: 0, target: 262, unit: 0, voice: 0} - - type: oscillator - id: 262 - parameters: {color: 128, damp: 0, detune: 64, dry: 128, feedback: 96, gain: 128, notetracking: 2, phase: 0, pregain: 40, shape: 76, stereo: 0, transpose: 64, type: 0} - - type: filter - id: 281 - parameters: {bandpass: 1, frequency: 86, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 1, panning: 64, resonance: 54, stereo: 0} - type: mulp id: 263 - parameters: {auxgain: 64, outgain: 64, stereo: 0} - - id: 285 + parameters: {stereo: 0} + - id: 286 parameters: {} + comment: Pitch drop - type: envelope id: 280 parameters: {attack: 39, decay: 64, gain: 99, release: 14, stereo: 0, sustain: 4} - type: send id: 284 - parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} - - id: 286 - parameters: {} + parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - type: noise id: 275 parameters: {gain: 33, shape: 80, stereo: 0} - type: send id: 276 - parameters: {amount: 86, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} - - type: envelope - id: 274 - parameters: {attack: 39, decay: 69, gain: 60, release: 42, stereo: 0, sustain: 1} + parameters: {amount: 86, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} + - id: 297 + parameters: {} + comment: Body & tail - type: oscillator id: 277 parameters: {color: 128, detune: 64, gain: 110, phase: 0, shape: 64, stereo: 0, transpose: 45, type: 0} - type: filter id: 283 - parameters: {bandpass: 0, frequency: 17, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 98, stereo: 0} + parameters: {bandpass: 0, frequency: 17, highpass: -1, lowpass: 1, resonance: 98, stereo: 0} + - type: envelope + id: 274 + parameters: {attack: 39, decay: 69, gain: 60, release: 42, stereo: 0, sustain: 1} - type: mulp id: 279 parameters: {stereo: 0} - type: addp id: 271 parameters: {stereo: 0} + - id: 295 + parameters: {} + comment: Output - type: pan id: 294 parameters: {panning: 64, stereo: 0} - - type: delay - id: 272 - parameters: {damp: 23, dry: 128, feedback: 0, notetracking: 0, pregain: 35, stereo: 1} - varargs: [1, 1395] - type: outaux id: 266 parameters: {auxgain: 0, outgain: 123, stereo: 1} diff --git a/tracker/presets/DR/Kick 3.yml b/tracker/presets/DR/kick-3.yml similarity index 74% rename from tracker/presets/DR/Kick 3.yml rename to tracker/presets/DR/kick-3.yml index 173074a..ac7265c 100644 --- a/tracker/presets/DR/Kick 3.yml +++ b/tracker/presets/DR/kick-3.yml @@ -1,27 +1,31 @@ -name: Kick 3 +name: kick-3 comment: 'Suggested note: C-3' -numvoices: 2 +numvoices: 1 units: + - id: 336 + parameters: {} + comment: Tick + - type: noise + id: 269 + parameters: {gain: 128, shape: 73, stereo: 0} + - type: filter + id: 333 + parameters: {bandpass: 1, frequency: 59, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} - type: envelope id: 261 parameters: {attack: 0, decay: 48, gain: 65, release: 0, stereo: 0, sustain: 0} - - type: noise - id: 269 - parameters: {color: 64, detune: 64, gain: 128, phase: 0, shape: 73, stereo: 0, transpose: 64, type: 0} - - type: filter - id: 333 - parameters: {bandpass: 1, frequency: 59, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - type: mulp id: 263 - parameters: {auxgain: 64, outgain: 64, stereo: 0} - - id: 285 + parameters: {stereo: 0} + - id: 286 parameters: {} + comment: Pitch drop - type: noise id: 275 parameters: {gain: 103, shape: 31, stereo: 0} - type: send id: 276 - parameters: {amount: 79, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} + parameters: {amount: 79, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - type: envelope id: 280 parameters: {attack: 0, decay: 67, gain: 90, release: 0, stereo: 0, sustain: 0} @@ -33,32 +37,31 @@ units: parameters: {stereo: 0} - type: send id: 284 - parameters: {amount: 73, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} - - id: 286 + parameters: {amount: 73, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} + - id: 285 parameters: {} - - type: envelope - id: 274 - parameters: {attack: 0, decay: 73, gain: 117, release: 0, stereo: 0, sustain: 0} + comment: Body & tail - type: oscillator id: 277 parameters: {color: 128, detune: 64, gain: 128, phase: 0, shape: 74, stereo: 0, transpose: 41, type: 0} - type: filter id: 283 - parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 54, stereo: 0} + parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 0, resonance: 54, stereo: 0} + - type: envelope + id: 274 + parameters: {attack: 0, decay: 73, gain: 117, release: 0, stereo: 0, sustain: 0} - type: mulp id: 279 parameters: {stereo: 0} - type: addp id: 271 parameters: {stereo: 0} + - id: 337 + parameters: {} + comment: Output - type: pan id: 294 parameters: {panning: 64, stereo: 0} - - type: delay - id: 272 - parameters: {damp: 23, dry: 128, feedback: 0, notetracking: 0, pregain: 35, stereo: 1} - varargs: [1, 1395] - disabled: true - type: outaux id: 266 parameters: {auxgain: 0, outgain: 65, stereo: 1} diff --git a/tracker/presets/DR/Kick 4.yml b/tracker/presets/DR/kick-4.yml similarity index 74% rename from tracker/presets/DR/Kick 4.yml rename to tracker/presets/DR/kick-4.yml index e5f5da4..72d3d3f 100644 --- a/tracker/presets/DR/Kick 4.yml +++ b/tracker/presets/DR/kick-4.yml @@ -1,27 +1,31 @@ -name: Kick 3 +name: kick-4 comment: 'Suggested note: C-3' -numvoices: 2 +numvoices: 1 units: + - id: 339 + parameters: {} + comment: Tick + - type: noise + id: 269 + parameters: {gain: 128, shape: 70, stereo: 0} + - type: filter + id: 333 + parameters: {bandpass: 1, frequency: 41, highpass: 0, lowpass: 0, resonance: 78, stereo: 0} - type: envelope id: 261 parameters: {attack: 0, decay: 51, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: noise - id: 269 - parameters: {color: 64, detune: 64, gain: 128, phase: 0, shape: 70, stereo: 0, transpose: 64, type: 0} - - type: filter - id: 333 - parameters: {bandpass: 1, frequency: 41, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 78, stereo: 0} - type: mulp id: 263 - parameters: {auxgain: 64, outgain: 64, stereo: 0} + parameters: {stereo: 0} - id: 285 parameters: {} + comment: Pitch drop - type: noise id: 275 parameters: {gain: 64, shape: 12, stereo: 0} - type: send id: 276 - parameters: {amount: 84, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} + parameters: {amount: 84, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - type: envelope id: 280 parameters: {attack: 0, decay: 64, gain: 83, release: 0, stereo: 0, sustain: 0} @@ -33,18 +37,19 @@ units: parameters: {stereo: 0} - type: send id: 284 - parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} + parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - id: 286 parameters: {} - - type: envelope - id: 274 - parameters: {attack: 41, decay: 69, gain: 65, release: 0, stereo: 0, sustain: 0} + comment: Body & tail - type: oscillator id: 277 parameters: {color: 128, detune: 64, gain: 128, phase: 0, shape: 64, stereo: 0, transpose: 42, type: 0} - type: filter id: 283 - parameters: {bandpass: 0, frequency: 14, highpass: 0, lowpass: 0, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: -1, frequency: 14, highpass: -1, lowpass: 0, resonance: 128, stereo: 0} + - type: envelope + id: 274 + parameters: {attack: 41, decay: 69, gain: 65, release: 0, stereo: 0, sustain: 0} - type: mulp id: 279 parameters: {stereo: 0} @@ -54,9 +59,12 @@ units: - type: addp id: 271 parameters: {stereo: 0} + - id: 338 + parameters: {} + comment: Output - type: filter id: 337 - parameters: {bandpass: 1, frequency: 10, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 10, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 294 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/Kick 5.yml b/tracker/presets/DR/kick-5.yml similarity index 82% rename from tracker/presets/DR/Kick 5.yml rename to tracker/presets/DR/kick-5.yml index b016bf3..f0fa276 100644 --- a/tracker/presets/DR/Kick 5.yml +++ b/tracker/presets/DR/kick-5.yml @@ -1,27 +1,16 @@ -name: Kick 5 +name: kick-5 comment: 'Suggested note: C-3' -numvoices: 2 +numvoices: 1 units: - - type: envelope - id: 261 - parameters: {attack: 0, decay: 51, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: noise - id: 269 - parameters: {color: 64, detune: 64, gain: 128, phase: 0, shape: 108, stereo: 0, transpose: 64, type: 0} - - type: filter - id: 333 - parameters: {bandpass: 1, frequency: 50, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: mulp - id: 263 - parameters: {auxgain: 64, outgain: 64, stereo: 0} - id: 285 parameters: {} + comment: Pitch drop - type: noise id: 275 parameters: {gain: 92, shape: 33, stereo: 0} - type: send id: 276 - parameters: {amount: 77, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} + parameters: {amount: 77, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - type: envelope id: 280 parameters: {attack: 0, decay: 63, gain: 90, release: 0, stereo: 0, sustain: 0} @@ -33,9 +22,16 @@ units: parameters: {stereo: 0} - type: send id: 284 - parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, unit: 0, voice: 0} + parameters: {amount: 75, port: 0, sendpop: 1, stereo: 0, target: 277, voice: 0} - id: 286 parameters: {} + comment: Body & tail + - type: oscillator + id: 277 + parameters: {color: 128, detune: 64, gain: 104, phase: 0, shape: 64, stereo: 0, transpose: 46, type: 0} + - type: filter + id: 283 + parameters: {bandpass: 1, frequency: 10, highpass: 1, lowpass: 0, resonance: 39, stereo: 0} - type: envelope id: 274 parameters: {attack: 48, decay: 74, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -45,18 +41,30 @@ units: - type: mulp id: 337 parameters: {stereo: 0} - - type: oscillator - id: 277 - parameters: {color: 128, detune: 64, gain: 104, phase: 0, shape: 64, stereo: 0, transpose: 46, type: 0} - - type: filter - id: 283 - parameters: {bandpass: 1, frequency: 10, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 39, stereo: 0} - type: mulp id: 279 parameters: {stereo: 0} + - id: 339 + parameters: {} + comment: Tick + - type: envelope + id: 261 + parameters: {attack: 0, decay: 51, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: noise + id: 269 + parameters: {gain: 128, shape: 108, stereo: 0} + - type: filter + id: 333 + parameters: {bandpass: 1, frequency: 50, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} + - type: mulp + id: 263 + parameters: {stereo: 0} - type: addp id: 271 parameters: {stereo: 0} + - id: 338 + parameters: {} + comment: Output - type: pan id: 294 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/kick 6.yml b/tracker/presets/DR/kick-6.yml similarity index 81% rename from tracker/presets/DR/kick 6.yml rename to tracker/presets/DR/kick-6.yml index 4b0914f..60da1de 100644 --- a/tracker/presets/DR/kick 6.yml +++ b/tracker/presets/DR/kick-6.yml @@ -1,54 +1,60 @@ -name: kick test +name: kick-6 numvoices: 1 units: - - type: oscillator - id: 2 - parameters: {color: 0, detune: 64, gain: 80, lfo: 1, phase: 0, shape: 35, stereo: 0, transpose: 72, type: 1, unison: 1} - - type: send - id: 21 - parameters: {amount: 78, port: 0, sendpop: 1, stereo: 0, target: 12, unit: 0, voice: 0} - - type: oscillator - id: 24 - parameters: {color: 0, detune: 64, gain: 59, lfo: 1, phase: 0, shape: 88, stereo: 0, transpose: 64, type: 1, unison: 1} - - type: send - id: 22 - parameters: {amount: 89, port: 4, sendpop: 1, stereo: 0, target: 12, unit: 0, voice: 0} - - type: envelope - id: 1 - parameters: {attack: 0, decay: 72, gain: 64, release: 0, stereo: 0, sustain: 0} - - type: oscillator - id: 12 - parameters: {color: 128, detune: 71, gain: 67, phase: 0, shape: 64, stereo: 0, transpose: 46, type: 0, unison: 2} - - type: mulp - id: 23 - parameters: {stereo: 0} - - type: filter - id: 25 - parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 36, stereo: 0} - id: 33 parameters: {} - - type: envelope - id: 26 - parameters: {attack: 0, decay: 48, gain: 125, release: 0, stereo: 0, sustain: 0} + comment: Tick - type: noise id: 29 parameters: {gain: 125, shape: 51, stereo: 0} - type: filter id: 32 - parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} + - type: envelope + id: 26 + parameters: {attack: 0, decay: 48, gain: 125, release: 0, stereo: 0, sustain: 0} - type: mulp id: 28 parameters: {stereo: 0} + - id: 35 + parameters: {} + comment: Modulations + - type: oscillator + id: 24 + parameters: {color: 0, detune: 64, gain: 59, lfo: 1, phase: 0, shape: 88, stereo: 0, transpose: 64, type: 1, unison: 1} + - type: send + id: 22 + parameters: {amount: 89, port: 4, sendpop: 1, stereo: 0, target: 12, voice: 0} + - type: oscillator + id: 2 + parameters: {color: 0, detune: 64, gain: 80, lfo: 1, phase: 0, shape: 35, stereo: 0, transpose: 72, type: 1, unison: 1} + - type: send + id: 21 + parameters: {amount: 78, port: 0, sendpop: 1, stereo: 0, target: 12, voice: 0} + - id: 36 + parameters: {} + comment: Body & tail + - type: oscillator + id: 12 + parameters: {color: 128, detune: 71, gain: 67, phase: 0, shape: 64, stereo: 0, transpose: 46, type: 0, unison: 2} + - type: envelope + id: 1 + parameters: {attack: 0, decay: 72, gain: 64, release: 0, stereo: 0, sustain: 0} + - type: mulp + id: 23 + parameters: {stereo: 0} + - type: filter + id: 25 + parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 0, resonance: 36, stereo: 0} - type: addp id: 30 parameters: {stereo: 0} + - id: 34 + parameters: {} + comment: Output - type: pan id: 5 parameters: {panning: 64, stereo: 0} - - type: delay - id: 31 - parameters: {damp: 0, dry: 123, feedback: 0, notetracking: 0, pregain: 34, stereo: 0} - varargs: [1, 350] - type: outaux id: 6 parameters: {auxgain: 0, outgain: 64, stereo: 1} diff --git a/tracker/presets/DR/kick edm 2.yml b/tracker/presets/DR/kick-edm-2.yml similarity index 76% rename from tracker/presets/DR/kick edm 2.yml rename to tracker/presets/DR/kick-edm-2.yml index 0355b5d..0158c75 100644 --- a/tracker/presets/DR/kick edm 2.yml +++ b/tracker/presets/DR/kick-edm-2.yml @@ -1,40 +1,52 @@ -name: kick edm +name: kick-edm-2 comment: A#2 numvoices: 1 units: - - type: envelope - id: 105 - parameters: {attack: 0, channel: 2, decay: 71, gain: 55, release: 0, stereo: 0, sustain: 0} - - type: oscillator - id: 106 - parameters: {color: 128, detune: 69, gain: 128, lfo: 0, phase: 64, shape: 80, stereo: 0, transpose: 70, type: 0, unison: 3} - - type: mulp - id: 129 - parameters: {stereo: 0} - - type: envelope - id: 110 - parameters: {attack: 0, decay: 74, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: oscillator - id: 128 - parameters: {color: 59, detune: 64, gain: 80, looplength: 1, loopstart: 1034, phase: 0, samplestart: 741926, shape: 69, stereo: 0, transpose: 76, type: 4} - - type: filter - id: 113 - parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: mulp - id: 10 - parameters: {stereo: 0} - - type: addp - id: 127 - parameters: {stereo: 0} - - type: pan - id: 114 - parameters: {panning: 64, stereo: 0} - - type: outaux - id: 118 - parameters: {auxgain: 0, outgain: 78, stereo: 1} + - id: 130 + parameters: {} + comment: Pitch drop - type: envelope id: 119 parameters: {attack: 75, decay: 0, gain: 128, release: 0, stereo: 0, sustain: 128} - type: send id: 122 parameters: {amount: 40, port: 0, sendpop: 1, target: 106} + - id: 131 + parameters: {} + comment: Body & tail + - type: oscillator + id: 106 + parameters: {color: 128, detune: 69, gain: 128, lfo: 0, phase: 64, shape: 80, stereo: 0, transpose: 70, type: 0, unison: 3} + - type: envelope + id: 105 + parameters: {attack: 0, decay: 71, gain: 55, release: 0, stereo: 0, sustain: 0} + - type: mulp + id: 129 + parameters: {stereo: 0} + - id: 132 + parameters: {} + comment: Tick + - type: oscillator + id: 128 + parameters: {color: 59, detune: 64, gain: 80, looplength: 1, loopstart: 1034, phase: 0, samplestart: 741926, shape: 69, stereo: 0, transpose: 76, type: 4} + - type: filter + id: 113 + parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - type: envelope + id: 110 + parameters: {attack: 0, decay: 74, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: mulp + id: 10 + parameters: {stereo: 0} + - type: addp + id: 127 + parameters: {stereo: 0} + - id: 133 + parameters: {} + comment: Output + - type: pan + id: 114 + parameters: {panning: 64, stereo: 0} + - type: outaux + id: 118 + parameters: {auxgain: 0, outgain: 78, stereo: 1} diff --git a/tracker/presets/DR/kick edm.yml b/tracker/presets/DR/kick-edm.yml similarity index 70% rename from tracker/presets/DR/kick edm.yml rename to tracker/presets/DR/kick-edm.yml index 145d050..0686fb8 100644 --- a/tracker/presets/DR/kick edm.yml +++ b/tracker/presets/DR/kick-edm.yml @@ -1,55 +1,10 @@ -name: kick edm +name: kick-edm comment: A#2 numvoices: 1 units: - - type: envelope - id: 105 - parameters: {attack: 29, channel: 2, decay: 65, gain: 71, release: 0, stereo: 0, sustain: 0} - - type: oscillator - id: 106 - parameters: {color: 115, detune: 64, gain: 54, lfo: 0, phase: 42, shape: 114, stereo: 0, transpose: 88, type: 1, unison: 1} - - type: distort - id: 107 - parameters: {drive: 69, stereo: 0} - - type: mulp - id: 126 - parameters: {stereo: 0} - - type: envelope - id: 110 - parameters: {attack: 0, decay: 43, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: noise - id: 111 - parameters: {gain: 102, shape: 84, stereo: 0} - - type: filter - id: 112 - parameters: {bandpass: 0, frequency: 124, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 41, stereo: 0} - - type: filter - id: 113 - parameters: {bandpass: 0, frequency: 84, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 87, stereo: 0} - - type: mulp - id: 10 - parameters: {stereo: 0} - - type: addp - id: 127 - parameters: {stereo: 0} - - type: filter - id: 12 - parameters: {bandpass: 0, frequency: 14, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 75, stereo: 0} - - type: filter - id: 13 - parameters: {bandpass: 0, frequency: 53, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: filter - id: 14 - parameters: {bandpass: 0, frequency: 7, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 76, stereo: 0} - - type: filter - id: 15 - parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 54, stereo: 0} - - type: pan - id: 114 - parameters: {panning: 64, stereo: 0} - - type: outaux - id: 118 - parameters: {auxgain: 0, outgain: 78, stereo: 1} + - id: 128 + parameters: {} + comment: Pitch drop - type: envelope id: 119 parameters: {attack: 71, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 74} @@ -62,3 +17,63 @@ units: - type: send id: 122 parameters: {amount: 0, port: 0, sendpop: 1, target: 106} + - id: 129 + parameters: {} + comment: Body & tail + - type: envelope + id: 105 + parameters: {attack: 29, decay: 65, gain: 71, release: 0, stereo: 0, sustain: 0} + - type: oscillator + id: 106 + parameters: {color: 115, detune: 64, gain: 54, lfo: 0, phase: 42, shape: 114, stereo: 0, transpose: 88, type: 1, unison: 1} + - type: distort + id: 107 + parameters: {drive: 69, stereo: 0} + - type: mulp + id: 126 + parameters: {stereo: 0} + - id: 130 + parameters: {} + comment: Tick + - type: envelope + id: 110 + parameters: {attack: 0, decay: 43, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: noise + id: 111 + parameters: {gain: 102, shape: 84, stereo: 0} + - type: filter + id: 112 + parameters: {bandpass: 0, frequency: 124, highpass: -1, lowpass: 1, resonance: 41, stereo: 0} + - type: filter + id: 113 + parameters: {bandpass: 0, frequency: 84, highpass: 0, lowpass: 1, resonance: 87, stereo: 0} + - type: mulp + id: 10 + parameters: {stereo: 0} + - type: addp + id: 127 + parameters: {stereo: 0} + - id: 131 + parameters: {} + comment: Filters + - type: filter + id: 12 + parameters: {bandpass: 0, frequency: 14, highpass: -1, lowpass: 1, resonance: 75, stereo: 0} + - type: filter + id: 13 + parameters: {bandpass: 0, frequency: 53, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 14 + parameters: {bandpass: 0, frequency: 7, highpass: 1, lowpass: 0, resonance: 76, stereo: 0} + - type: filter + id: 15 + parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, resonance: 54, stereo: 0} + - id: 132 + parameters: {} + comment: Output + - type: pan + id: 114 + parameters: {panning: 64, stereo: 0} + - type: outaux + id: 118 + parameters: {auxgain: 0, outgain: 78, stereo: 1} diff --git a/tracker/presets/DR/Kick (sample).yml b/tracker/presets/DR/kick-sample.yml similarity index 70% rename from tracker/presets/DR/Kick (sample).yml rename to tracker/presets/DR/kick-sample.yml index 259dfdd..5956746 100644 --- a/tracker/presets/DR/Kick (sample).yml +++ b/tracker/presets/DR/kick-sample.yml @@ -1,4 +1,4 @@ -name: Kick +name: kick-sample numvoices: 1 units: - type: envelope @@ -12,10 +12,10 @@ units: parameters: {stereo: 0} - type: filter id: 1042 - parameters: {bandpass: 0, frequency: 10, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 57, stereo: 0} + parameters: {bandpass: 0, frequency: 10, highpass: -1, lowpass: 1, resonance: 57, stereo: 0} - type: filter id: 1043 - parameters: {bandpass: 1, frequency: 70, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 23, stereo: 0} + parameters: {bandpass: 1, frequency: 70, highpass: -1, lowpass: 1, resonance: 23, stereo: 0} - type: pan id: 1040 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/rimshot.yml b/tracker/presets/DR/rimshot.yml index 3c54f59..e813100 100644 --- a/tracker/presets/DR/rimshot.yml +++ b/tracker/presets/DR/rimshot.yml @@ -1,32 +1,84 @@ -name: Rimshot +name: rimshot numvoices: 1 units: + - id: 3021 + parameters: {} + comment: Modulations + - type: envelope + id: 3002 + parameters: {attack: 0, decay: 48, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: send + id: 3003 + parameters: {amount: 107, port: 0, sendpop: 0, target: 3005} + - type: send + id: 3004 + parameters: {amount: 80, port: 0, sendpop: 1, target: 3006} + - id: 3022 + parameters: {} + comment: Main oscillators + - type: oscillator + id: 3005 + parameters: {color: 128, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 32, stereo: 0, transpose: 64, type: 0} + - type: oscillator + id: 3006 + parameters: {color: 128, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 80, stereo: 0, transpose: 64, type: 0} + - type: addp + id: 3010 + parameters: {stereo: 0} + - id: 3023 + parameters: {} + comment: Noise + - type: noise + id: 3007 + parameters: {gain: 48, shape: 47, stereo: 0} + - type: filter + id: 3008 + parameters: {bandpass: 1, frequency: 86, highpass: 0, lowpass: 1, resonance: 59, stereo: 0} + - type: filter + id: 3009 + parameters: {bandpass: 1, frequency: 56, highpass: 1, lowpass: 1, resonance: 4, stereo: 0} + - type: addp + id: 3011 + parameters: {stereo: 0} + - type: distort + id: 3012 + parameters: {drive: 76, stereo: 0} + - id: 3024 + parameters: {} + comment: Main envelope - type: envelope id: 3000 parameters: {attack: 0, decay: 76, gain: 51, release: 74, stereo: 0, sustain: 0} - type: send - parameters: {amount: 128, port: 4, sendpop: 0, target: 3000} - - type: envelope parameters: {attack: 0, decay: 48, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: send parameters: {amount: 107, port: 0, sendpop: 0, target: 3001} - - type: send - parameters: {amount: 80, port: 0, sendpop: 1, target: 3002} - - type: oscillator id: 3001 - parameters: {color: 128, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 32, stereo: 0, transpose: 64, type: 0} - - type: oscillator - id: 3002 - parameters: {color: 128, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 80, stereo: 0, transpose: 64, type: 0} - - type: noise parameters: {gain: 48, shape: 47, stereo: 0} - - type: filter parameters: {bandpass: 1, frequency: 86, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 59, stereo: 0} - - type: filter parameters: {bandpass: 1, frequency: 56, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 4, stereo: 0} - - type: addp parameters: {stereo: 0} - - type: addp parameters: {stereo: 0} - - type: distort parameters: {drive: 76, stereo: 0} - - type: mulp parameters: {stereo: 0} - - type: dbgain parameters: {decibels: 37, stereo: 0} - - type: compressor parameters: {attack: 46, invgain: 114, ratio: 110, release: 49, stereo: 0, threshold: 62} - - type: mulp parameters: {stereo: 0} - - type: filter parameters: {bandpass: 0, frequency: 39, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 17, stereo: 0} - - type: filter parameters: {bandpass: 0, frequency: 48, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: pan parameters: {panning: 64, stereo: 0} - - type: outaux parameters: {auxgain: 0, outgain: 48, stereo: 1} + parameters: {amount: 128, port: 4, sendpop: 0, stereo: 0, target: 3000} + - type: mulp + id: 3013 + parameters: {stereo: 0} + - id: 3025 + parameters: {} + comment: Effects + - type: dbgain + id: 3014 + parameters: {decibels: 37, stereo: 0} + - type: compressor + id: 3015 + parameters: {attack: 46, invgain: 114, ratio: 110, release: 49, stereo: 0, threshold: 64} + - type: mulp + id: 3016 + parameters: {stereo: 0} + - type: filter + id: 3017 + parameters: {bandpass: 0, frequency: 39, highpass: 1, lowpass: 0, resonance: 17, stereo: 0} + - type: filter + id: 3018 + parameters: {bandpass: 0, frequency: 48, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} + - id: 3026 + parameters: {} + comment: Output + - type: pan + id: 3019 + parameters: {panning: 64, stereo: 0} + - type: outaux + id: 3020 + parameters: {auxgain: 0, outgain: 48, stereo: 1} diff --git a/tracker/presets/DR/snare 2.yml b/tracker/presets/DR/snare-2.yml similarity index 89% rename from tracker/presets/DR/snare 2.yml rename to tracker/presets/DR/snare-2.yml index 5461153..f0939ee 100644 --- a/tracker/presets/DR/snare 2.yml +++ b/tracker/presets/DR/snare-2.yml @@ -1,7 +1,10 @@ -name: snare +name: snare-2 comment: 'suggested note: E-4' numvoices: 1 units: + - id: 340 + parameters: {} + comment: Tom - type: envelope id: 288 parameters: {attack: 0, decay: 53, gain: 64, release: 0, stereo: 0, sustain: 0} @@ -11,14 +14,13 @@ units: - type: mulp id: 305 parameters: {stereo: 0} - - id: 338 - parameters: {} - type: delay id: 309 parameters: {damp: 59, dry: 128, feedback: 90, notetracking: 0, pregain: 80, stereo: 0} varargs: [235] - id: 329 parameters: {} + comment: Snare - type: envelope id: 313 parameters: {attack: 0, decay: 68, gain: 73, release: 0, stereo: 0, sustain: 0} @@ -33,12 +35,13 @@ units: parameters: {drive: 10, stereo: 0} - type: filter id: 339 - parameters: {bandpass: 0, frequency: 60, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 60, highpass: -1, lowpass: 0, resonance: 128, stereo: 0} - type: addp id: 316 parameters: {stereo: 0} - id: 328 parameters: {} + comment: Effects & output - type: pan id: 292 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/snare (adam).yml b/tracker/presets/DR/snare-adam.yml similarity index 76% rename from tracker/presets/DR/snare (adam).yml rename to tracker/presets/DR/snare-adam.yml index fc459a3..d31fc61 100644 --- a/tracker/presets/DR/snare (adam).yml +++ b/tracker/presets/DR/snare-adam.yml @@ -1,4 +1,4 @@ -name: Snare (Adam) +name: snare-adam comment: | Author: pestis/bC!. Suggested note: F#3. Originally from: 4k intro Adam. @@ -13,45 +13,73 @@ comment: | Envelope-distort-send: Quickly drop the pitch of the tom from high to neutral. numvoices: 1 units: + - id: 31 + parameters: {} + comment: Pitch drop - type: envelope + id: 28 + parameters: {attack: 0, decay: 60, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: distort + id: 29 + parameters: {drive: 5, stereo: 0} + - type: send + id: 30 + parameters: {amount: 90, port: 0, sendpop: 1, stereo: 0, target: 1, voice: 0} + - id: 32 + parameters: {} + comment: Tom + - type: envelope + id: 10 parameters: {attack: 32, decay: 60, gain: 128, release: 0, stereo: 0, sustain: 0} - type: oscillator id: 1 parameters: {color: 64, detune: 64, gain: 128, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} - type: mulp + id: 11 parameters: {stereo: 0} - - parameters: {} + - id: 12 + parameters: {} + comment: Snare - type: envelope + id: 13 parameters: {attack: 32, decay: 64, gain: 64, release: 66, stereo: 0, sustain: 0} - type: distort + id: 14 parameters: {drive: 32, stereo: 0} - type: noise + id: 15 parameters: {gain: 64, shape: 64, stereo: 0} - type: mulp + id: 16 parameters: {stereo: 0} - type: filter - parameters: {bandpass: 0, frequency: 106, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + id: 17 + parameters: {bandpass: 0, frequency: 106, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} - type: addp + id: 18 parameters: {stereo: 0} - - parameters: {} + - id: 19 + parameters: {} + comment: Effects - type: distort + id: 20 parameters: {drive: 112, stereo: 0} - type: delay - parameters: {count: 8, damp: 0, delay: 1, dry: 128, feedback: 40, notetracking: 0, pregain: 24, stereo: 0} + id: 21 + parameters: {damp: 0, dry: 128, feedback: 40, notetracking: 0, pregain: 24, stereo: 0} varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618] - type: compressor + id: 22 parameters: {attack: 51, invgain: 64, ratio: 112, release: 49, stereo: 0, threshold: 64} - type: mulp + id: 23 parameters: {stereo: 0} - - parameters: {} + - id: 24 + parameters: {} + comment: Output - type: pan + id: 25 parameters: {panning: 68, stereo: 0} - type: outaux + id: 26 parameters: {auxgain: 0, outgain: 64, stereo: 1} - - parameters: {} - - type: envelope - parameters: {attack: 0, decay: 60, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: distort - parameters: {drive: 5, stereo: 0} - - type: send - parameters: {amount: 90, port: 0, sendpop: 1, stereo: 0, target: 1, unit: 0, voice: 0} diff --git a/tracker/presets/DR/snare edm 2.yml b/tracker/presets/DR/snare-edm-2.yml similarity index 68% rename from tracker/presets/DR/snare edm 2.yml rename to tracker/presets/DR/snare-edm-2.yml index fa0b2eb..d8abaa0 100644 --- a/tracker/presets/DR/snare edm 2.yml +++ b/tracker/presets/DR/snare-edm-2.yml @@ -1,7 +1,19 @@ -name: snare edm 2 +name: snare-edm-2 comment: 'Suggested range: E-4' -numvoices: 2 +numvoices: 1 units: + - id: 339 + parameters: {} + comment: Pitch drop + - type: envelope + id: 233 + parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: send + id: 234 + parameters: {amount: 70, port: 0, sendpop: 1, target: 218} + - id: 340 + parameters: {} + comment: Tom - type: envelope id: 217 parameters: {attack: 22, decay: 64, gain: 38, release: 0, stereo: 0, sustain: 0} @@ -13,55 +25,31 @@ units: parameters: {drive: 82, stereo: 0} - type: mulp id: 221 - parameters: {panning: 64, stereo: 0} + parameters: {stereo: 0} + - id: 341 + parameters: {} + comment: Snare - type: envelope id: 222 - parameters: {attack: 0, auxgain: 64, decay: 68, gain: 70, outgain: 64, release: 0, stereo: 0, sustain: 0} + parameters: {attack: 0, decay: 68, gain: 70, release: 0, stereo: 0, sustain: 0} - type: noise id: 223 parameters: {gain: 31, shape: 12, stereo: 0} - type: mulp id: 224 parameters: {stereo: 0} - - type: filter - id: 201 - parameters: {bandpass: 0, frequency: 97, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} - type: filter id: 225 - parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 108, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 201 + parameters: {bandpass: 0, frequency: 97, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} - type: addp id: 226 parameters: {stereo: 0} - - type: filter - id: 202 - parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} - - type: filter - id: 227 - parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 98, stereo: 0} - - type: filter - id: 228 - parameters: {bandpass: 0, frequency: 15, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: filter - id: 229 - parameters: {bandpass: 0, frequency: 40, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 74, stereo: 0} - - type: filter - id: 230 - parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 42, stereo: 0} - - type: distort - id: 338 - parameters: {drive: 88, stereo: 0} - - type: pan - id: 231 - parameters: {panning: 59, stereo: 0} - - type: outaux - id: 232 - parameters: {auxgain: 7, outgain: 60, stereo: 1} - - type: envelope - id: 233 - parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: send - id: 234 - parameters: {amount: 70, port: 0, sendpop: 1, target: 218} + - id: 342 + parameters: {} + comment: Modulations - type: envelope id: 235 parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -74,3 +62,33 @@ units: - type: send id: 238 parameters: {amount: 26, port: 0, sendpop: 1, target: 202} + - id: 343 + parameters: {} + comment: Filters + - type: filter + id: 202 + parameters: {bandpass: 0, frequency: 100, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 227 + parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, resonance: 98, stereo: 0} + - type: filter + id: 228 + parameters: {bandpass: 0, frequency: 15, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 229 + parameters: {bandpass: 0, frequency: 40, highpass: 1, lowpass: 1, resonance: 74, stereo: 0} + - type: filter + id: 230 + parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 0, resonance: 42, stereo: 0} + - id: 344 + parameters: {} + comment: Distort & output + - type: distort + id: 338 + parameters: {drive: 88, stereo: 0} + - type: pan + id: 231 + parameters: {panning: 59, stereo: 0} + - type: outaux + id: 232 + parameters: {auxgain: 7, outgain: 60, stereo: 1} diff --git a/tracker/presets/DR/snare edm 3.yml b/tracker/presets/DR/snare-edm-3.yml similarity index 70% rename from tracker/presets/DR/snare edm 3.yml rename to tracker/presets/DR/snare-edm-3.yml index ef702a4..12ecfaf 100644 --- a/tracker/presets/DR/snare edm 3.yml +++ b/tracker/presets/DR/snare-edm-3.yml @@ -1,7 +1,19 @@ -name: snare edm 3 +name: snare-edm-3 comment: 'Suggested range: E-4' -numvoices: 2 +numvoices: 1 units: + - id: 341 + parameters: {} + comment: Pitch drop + - type: envelope + id: 233 + parameters: {attack: 37, decay: 47, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: send + id: 234 + parameters: {amount: 69, port: 0, sendpop: 1, target: 218} + - id: 342 + parameters: {} + comment: Tom - type: envelope id: 217 parameters: {attack: 0, decay: 65, gain: 33, release: 0, stereo: 0, sustain: 0} @@ -13,10 +25,13 @@ units: parameters: {drive: 74, stereo: 0} - type: mulp id: 221 - parameters: {panning: 64, stereo: 0} + parameters: {stereo: 0} + - id: 343 + parameters: {} + comment: Snare - type: envelope id: 222 - parameters: {attack: 0, auxgain: 64, decay: 69, gain: 54, outgain: 64, release: 0, stereo: 0, sustain: 0} + parameters: {attack: 0, decay: 69, gain: 54, release: 0, stereo: 0, sustain: 0} - type: noise id: 223 parameters: {gain: 22, shape: 14, stereo: 0} @@ -25,37 +40,16 @@ units: parameters: {stereo: 0} - type: filter id: 201 - parameters: {bandpass: 0, frequency: 80, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 98, stereo: 0} + parameters: {bandpass: 0, frequency: 80, highpass: -1, lowpass: 1, resonance: 98, stereo: 0} - type: filter id: 225 - parameters: {bandpass: 0, frequency: 120, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: -1, frequency: 120, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: addp id: 226 parameters: {stereo: 0} - - type: filter - id: 202 - parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 95, stereo: 0} - - type: distort - id: 338 - parameters: {drive: 112, stereo: 0} - - type: compressor - id: 339 - parameters: {attack: 51, invgain: 58, ratio: 42, release: 63, stereo: 0, threshold: 15} - - type: mulp - id: 340 - parameters: {stereo: 0} - - type: pan - id: 231 - parameters: {panning: 59, stereo: 0} - - type: outaux - id: 232 - parameters: {auxgain: 0, outgain: 75, stereo: 1} - - type: envelope - id: 233 - parameters: {attack: 37, decay: 47, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: send - id: 234 - parameters: {amount: 69, port: 0, sendpop: 1, target: 218} + - id: 346 + parameters: {} + comment: Modulations - type: envelope id: 235 parameters: {attack: 53, decay: 58, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -68,3 +62,27 @@ units: - type: send id: 238 parameters: {amount: 32, port: 0, sendpop: 1, target: 202} + - id: 344 + parameters: {} + comment: Effects + - type: filter + id: 202 + parameters: {bandpass: 0, frequency: 50, highpass: -1, lowpass: 1, resonance: 95, stereo: 0} + - type: distort + id: 338 + parameters: {drive: 112, stereo: 0} + - type: compressor + id: 339 + parameters: {attack: 51, invgain: 58, ratio: 42, release: 63, stereo: 0, threshold: 15} + - type: mulp + id: 340 + parameters: {stereo: 0} + - id: 345 + parameters: {} + comment: Output + - type: pan + id: 231 + parameters: {panning: 59, stereo: 0} + - type: outaux + id: 232 + parameters: {auxgain: 0, outgain: 75, stereo: 1} diff --git a/tracker/presets/DR/snare edm.yml b/tracker/presets/DR/snare-edm.yml similarity index 66% rename from tracker/presets/DR/snare edm.yml rename to tracker/presets/DR/snare-edm.yml index 6dbdf23..45f9269 100644 --- a/tracker/presets/DR/snare edm.yml +++ b/tracker/presets/DR/snare-edm.yml @@ -1,7 +1,19 @@ -name: snare edm +name: snare-edm comment: 'Suggested range: E-4' -numvoices: 2 +numvoices: 1 units: + - id: 241 + parameters: {} + comment: Pitch drop + - type: envelope + id: 233 + parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0} + - type: send + id: 234 + parameters: {amount: 70, port: 0, sendpop: 1, target: 218} + - id: 239 + parameters: {} + comment: Tom - type: envelope id: 217 parameters: {attack: 22, decay: 64, gain: 38, release: 0, stereo: 0, sustain: 0} @@ -13,61 +25,61 @@ units: parameters: {drive: 78, stereo: 0} - type: mulp id: 221 - parameters: {panning: 64, stereo: 0} + parameters: {stereo: 0} + - id: 240 + parameters: {} + comment: Snare - type: envelope id: 222 - parameters: {attack: 0, auxgain: 64, decay: 68, gain: 70, outgain: 64, release: 0, stereo: 0, sustain: 0} + parameters: {attack: 0, decay: 68, gain: 70, release: 0, stereo: 0, sustain: 0} - type: noise id: 223 parameters: {gain: 31, shape: 12, stereo: 0} - type: mulp id: 224 parameters: {stereo: 0} - - type: filter - id: 201 - parameters: {bandpass: 0, frequency: 97, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} - - type: filter - id: 225 - parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} - - type: addp - id: 226 - parameters: {stereo: 0} - - type: filter - id: 202 - parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} - - type: filter - id: 227 - parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 98, stereo: 0} - - type: filter - id: 228 - parameters: {bandpass: 0, frequency: 15, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: filter - id: 229 - parameters: {bandpass: 0, frequency: 40, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 74, stereo: 0} - - type: filter - id: 230 - parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 42, stereo: 0} - - type: pan - id: 231 - parameters: {panning: 59, stereo: 0} - - type: outaux - id: 232 - parameters: {auxgain: 8, outgain: 128, stereo: 1} - - type: envelope - id: 233 - parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0} - - type: send - id: 234 - parameters: {amount: 70, port: 0, sendpop: 1, target: 218} - type: envelope id: 235 parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0} - type: send id: 236 parameters: {amount: 19, port: 0, sendpop: 1, target: 201} + - type: filter + id: 201 + parameters: {bandpass: 0, frequency: 97, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 225 + parameters: {bandpass: 0, frequency: 108, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: addp + id: 226 + parameters: {stereo: 0} + - id: 242 + parameters: {} + comment: Filtering - type: envelope id: 237 parameters: {attack: 54, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 70} - type: send id: 238 parameters: {amount: 26, port: 0, sendpop: 1, target: 202} + - type: filter + id: 202 + parameters: {bandpass: 0, frequency: 100, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 227 + parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, resonance: 98, stereo: 0} + - type: filter + id: 229 + parameters: {bandpass: 0, frequency: 40, highpass: 1, lowpass: 1, resonance: 74, stereo: 0} + - type: filter + id: 230 + parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 0, resonance: 42, stereo: 0} + - id: 243 + parameters: {} + comment: Output + - type: pan + id: 231 + parameters: {panning: 59, stereo: 0} + - type: outaux + id: 232 + parameters: {auxgain: 8, outgain: 128, stereo: 1} diff --git a/tracker/presets/DR/snare edm 2 (sample-st).yml b/tracker/presets/DR/snare-sample-st.yml similarity index 51% rename from tracker/presets/DR/snare edm 2 (sample-st).yml rename to tracker/presets/DR/snare-sample-st.yml index 743e964..d55cb2c 100644 --- a/tracker/presets/DR/snare edm 2 (sample-st).yml +++ b/tracker/presets/DR/snare-sample-st.yml @@ -1,43 +1,52 @@ -name: snare edm 2 +name: snare-sample-st comment: 'Suggested range: E-2 to C-3' numvoices: 1 units: + - id: 217 + parameters: {} + comment: Tom - type: envelope + id: 10 parameters: {attack: 14, decay: 68, gain: 110, release: 0, stereo: 0, sustain: 0} - type: oscillator id: 200 parameters: {color: 48, detune: 52, gain: 53, lfo: 0, looplength: 1, loopstart: 4276, phase: 0, samplestart: 560606, shape: 81, stereo: 0, transpose: 76, type: 4} - - parameters: {} - type: mulp - parameters: {panning: 64, stereo: 0} + id: 202 + parameters: {stereo: 0} + - id: 216 + parameters: {} + comment: Snare - type: envelope - parameters: {attack: 0, auxgain: 64, decay: 68, gain: 83, outgain: 64, release: 0, stereo: 0, sustain: 0} + id: 203 + parameters: {attack: 0, decay: 68, gain: 83, release: 0, stereo: 0, sustain: 0} - type: noise + id: 204 parameters: {gain: 39, shape: 2, stereo: 0} - type: mulp + id: 205 parameters: {stereo: 0} - - type: filter - id: 201 - parameters: {bandpass: 0, frequency: 110, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} - - type: filter - parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 112, stereo: 0} - - type: addp - parameters: {stereo: 0} - - type: pan - parameters: {panning: 59, stereo: 0} - - type: outaux - parameters: {auxgain: 8, outgain: 128, stereo: 1} - - type: envelope - parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0} - disabled: true - - type: send - parameters: {amount: 70, port: 0, sendpop: 1, target: 200} - disabled: true - type: envelope + id: 213 parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0} - type: send - parameters: {amount: 19, port: 0, sendpop: 1, target: 201} - - type: envelope - parameters: {attack: 54, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 70} - - type: send - parameters: {amount: 26, port: 0, sendpop: 1, target: 202} + id: 214 + parameters: {amount: 19, port: 0, sendpop: 1, target: 206} + - type: filter + id: 206 + parameters: {bandpass: 0, frequency: 110, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - type: filter + id: 207 + parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, resonance: 112, stereo: 0} + - type: addp + id: 208 + parameters: {stereo: 0} + - id: 215 + parameters: {} + comment: Output + - type: pan + id: 209 + parameters: {panning: 59, stereo: 0} + - type: outaux + id: 210 + parameters: {auxgain: 8, outgain: 128, stereo: 1} diff --git a/tracker/presets/DR/snare edm 2 (sample).yml b/tracker/presets/DR/snare-sample.yml similarity index 74% rename from tracker/presets/DR/snare edm 2 (sample).yml rename to tracker/presets/DR/snare-sample.yml index 6f0c9a3..181ae1e 100644 --- a/tracker/presets/DR/snare edm 2 (sample).yml +++ b/tracker/presets/DR/snare-sample.yml @@ -1,7 +1,10 @@ -name: snare edm 2 (sample) +name: snare-sample comment: 'Suggested range: E-2 to C-3' numvoices: 1 units: + - id: 311 + parameters: {} + comment: Tom - type: envelope id: 301 parameters: {attack: 0, decay: 66, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -13,10 +16,13 @@ units: parameters: {drive: 100, stereo: 0} - type: mulp id: 303 - parameters: {panning: 64, stereo: 0} + parameters: {stereo: 0} + - id: 312 + parameters: {} + comment: Snare - type: envelope id: 304 - parameters: {attack: 0, auxgain: 64, decay: 67, gain: 100, outgain: 64, release: 0, stereo: 0, sustain: 0} + parameters: {attack: 0, decay: 67, gain: 100, release: 0, stereo: 0, sustain: 0} - type: noise id: 305 parameters: {gain: 128, shape: 8, stereo: 0} @@ -26,6 +32,9 @@ units: - type: addp id: 308 parameters: {stereo: 0} + - id: 313 + parameters: {} + comment: Output - type: pan id: 309 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/snare.yml b/tracker/presets/DR/snare.yml index 1d2e65f..61a2e40 100644 --- a/tracker/presets/DR/snare.yml +++ b/tracker/presets/DR/snare.yml @@ -1,7 +1,10 @@ -name: Snare 2 +name: snare comment: 'suggested note: E-4' numvoices: 1 units: + - id: 334 + parameters: {} + comment: Tom - type: envelope id: 288 parameters: {attack: 0, decay: 53, gain: 64, release: 0, stereo: 0, sustain: 0} @@ -11,14 +14,13 @@ units: - type: mulp id: 305 parameters: {stereo: 0} - - id: 334 - parameters: {} - type: delay id: 309 parameters: {damp: 80, dry: 128, feedback: 86, notetracking: 0, pregain: 99, stereo: 0} varargs: [229] - id: 329 parameters: {} + comment: Snare - type: envelope id: 313 parameters: {attack: 0, decay: 70, gain: 63, release: 0, stereo: 0, sustain: 0} @@ -33,12 +35,13 @@ units: parameters: {drive: 11, stereo: 0} - type: filter id: 333 - parameters: {bandpass: 1, frequency: 86, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 86, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} - type: addp id: 316 parameters: {stereo: 0} - id: 328 parameters: {} + comment: Effects & output - type: pan id: 292 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/DR/DiscoTom.yml b/tracker/presets/DR/tom-disco.yml similarity index 64% rename from tracker/presets/DR/DiscoTom.yml rename to tracker/presets/DR/tom-disco.yml index 8132a3c..1350ac5 100644 --- a/tracker/presets/DR/DiscoTom.yml +++ b/tracker/presets/DR/tom-disco.yml @@ -1,5 +1,5 @@ -name: DiscoTom -numvoices: 2 +name: tom-disco +numvoices: 1 units: - type: envelope id: 1 @@ -12,15 +12,15 @@ units: parameters: {stereo: 1} - type: pan id: 5 - parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 63, pregain: 40, stereo: 1} + parameters: {panning: 63, stereo: 1} - type: outaux id: 6 - parameters: {auxgain: 7, outgain: 67, panning: 64, stereo: 1} + parameters: {auxgain: 7, outgain: 67, stereo: 1} - id: 12 parameters: {} - type: envelope id: 10 - parameters: {attack: 37, auxgain: 64, decay: 81, gain: 80, outgain: 64, release: 54, stereo: 0, sustain: 16} + parameters: {attack: 37, decay: 81, gain: 80, release: 54, stereo: 0, sustain: 16} - type: send id: 11 - parameters: {amount: 84, port: 0, sendpop: 1, stereo: 0, target: 2, unit: 0, voice: 0} + parameters: {amount: 84, port: 0, sendpop: 1, stereo: 0, target: 2, voice: 0} diff --git a/tracker/presets/KEYS/clavi.yml b/tracker/presets/KEYS/clavi.yml index ee47a8f..bb356dc 100644 --- a/tracker/presets/KEYS/clavi.yml +++ b/tracker/presets/KEYS/clavi.yml @@ -1,21 +1,21 @@ -name: Clavi -numvoices: 8 +name: clavi +numvoices: 1 units: - type: envelope - id: 1 + id: 225 parameters: {attack: 0, decay: 62, gain: 77, release: 52, stereo: 1, sustain: 66} - type: oscillator - id: 2 + id: 226 parameters: {color: 64, detune: 68, gain: 67, looplength: 84, loopstart: 290, phase: 0, samplestart: 401297, shape: 90, stereo: 1, transpose: 76, type: 4, unison: 3} - type: mulp - id: 3 + id: 227 parameters: {stereo: 1} - type: pan - id: 5 - parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 1} + id: 228 + parameters: {panning: 64, stereo: 1} - type: filter id: 1058 - parameters: {bandpass: 0, frequency: 96, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, panning: 64, resonance: 128, stereo: 1} + parameters: {bandpass: -1, frequency: 96, highpass: -1, lowpass: 1, resonance: 128, stereo: 1} - type: outaux - id: 6 - parameters: {auxgain: 15, outgain: 54, panning: 64, stereo: 1} + id: 1059 + parameters: {auxgain: 15, outgain: 54, stereo: 1} diff --git a/tracker/presets/KEYS/lullaby.yml b/tracker/presets/KEYS/lullaby.yml index ff8aaf5..8ed2a49 100644 --- a/tracker/presets/KEYS/lullaby.yml +++ b/tracker/presets/KEYS/lullaby.yml @@ -1,5 +1,5 @@ name: lullaby -numvoices: 4 +numvoices: 1 units: - type: envelope id: 1 diff --git a/tracker/presets/KEYS/lullaby2.yml b/tracker/presets/KEYS/lullaby2.yml index 87254c9..c7db1c8 100644 --- a/tracker/presets/KEYS/lullaby2.yml +++ b/tracker/presets/KEYS/lullaby2.yml @@ -1,5 +1,5 @@ -name: KEYS Lullaby2 -numvoices: 4 +name: lullaby2 +numvoices: 1 units: - type: envelope id: 1 diff --git a/tracker/presets/KEYS/minorium.yml b/tracker/presets/KEYS/minorium.yml index 381a00f..f912660 100644 --- a/tracker/presets/KEYS/minorium.yml +++ b/tracker/presets/KEYS/minorium.yml @@ -1,51 +1,57 @@ name: minorium numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 64, gain: 128, release: 48, stereo: 0, sustain: 88} + - id: 244 + parameters: {} + comment: Modulations + - type: oscillator + id: 5 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 8, type: 0} + - type: send + id: 238 + parameters: {amount: 68, port: 1, sendpop: 0, target: 12} + - type: send + id: 6 + parameters: {amount: 32, port: 0, sendpop: 0, target: 13} + - type: send + id: 239 + parameters: {amount: 88, port: 0, sendpop: 1, target: 15} - type: oscillator id: 2 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 16, type: 0} - type: send id: 3 parameters: {amount: 48, port: 0, sendpop: 1, target: 241} - - type: oscillator - id: 5 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 8, type: 0} - - type: send - id: 6 - parameters: {amount: 32, port: 0, sendpop: 0, target: 13} - - type: send - id: 238 - parameters: {amount: 68, port: 1, sendpop: 0, target: 12} - - type: send - id: 239 - parameters: {amount: 88, port: 0, sendpop: 1, target: 15} - - type: oscillator - id: 240 - parameters: {color: 16, detune: 64, gain: 72, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 67, type: 1} - - type: filter - id: 241 - parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + - id: 245 + parameters: {} + comment: Main oscillators - type: oscillator id: 12 parameters: {color: 16, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 71, type: 1} - type: filter id: 13 - parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: oscillator id: 14 parameters: {color: 16, detune: 64, gain: 96, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} - type: filter id: 15 - parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - type: oscillator + id: 240 + parameters: {color: 16, detune: 64, gain: 72, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 67, type: 1} + - type: filter + id: 241 + parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: addp id: 16 parameters: {stereo: 0} - type: addp id: 17 parameters: {stereo: 0} + - id: 246 + parameters: {} + comment: Filter - type: envelope id: 18 parameters: {attack: 88, decay: 88, gain: 128, release: 96, stereo: 0, sustain: 96} @@ -54,10 +60,19 @@ units: parameters: {amount: 88, port: 0, sendpop: 1, target: 21} - type: filter id: 21 - parameters: {bandpass: 0, frequency: 32, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 16, stereo: 0} + parameters: {bandpass: 0, frequency: 32, highpass: 1, lowpass: 1, resonance: 16, stereo: 0} + - id: 242 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 64, gain: 128, release: 48, stereo: 0, sustain: 88} - type: mulp id: 22 parameters: {stereo: 0} + - id: 243 + parameters: {} + comment: Delay & output - type: delay id: 23 parameters: {damp: 128, dry: 96, feedback: 48, notetracking: 2, pregain: 48, stereo: 0} diff --git a/tracker/presets/KEYS/organ.yml b/tracker/presets/KEYS/organ.yml index 2b501e1..cb40781 100644 --- a/tracker/presets/KEYS/organ.yml +++ b/tracker/presets/KEYS/organ.yml @@ -1,12 +1,15 @@ name: organ -numvoices: 4 +numvoices: 1 units: + - id: 248 + parameters: {} + comment: Sine-wave body - type: envelope id: 228 parameters: {attack: 5, decay: 79, gain: 128, release: 37, stereo: 0, sustain: 79} - type: oscillator id: 208 - parameters: {color: 64, detune: 64, gain: 55, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 0, unison: 3} + parameters: {color: 64, detune: 64, gain: 128, phase: 114, shape: 64, stereo: 0, transpose: 64, type: 0, unison: 0} - type: mul id: 229 parameters: {stereo: 0} @@ -27,6 +30,7 @@ units: parameters: {stereo: 0} - id: 233 parameters: {} + comment: Snap - type: envelope id: 234 parameters: {attack: 37, decay: 79, gain: 128, release: 63, stereo: 0, sustain: 79} @@ -54,23 +58,27 @@ units: - type: mulp id: 242 parameters: {stereo: 0} - - id: 243 - parameters: {} - type: addp id: 244 parameters: {stereo: 0} + - id: 243 + parameters: {} + comment: Filter & output - type: filter id: 245 - parameters: {bandpass: 1, frequency: 0, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 0, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 211 parameters: {panning: 64, stereo: 0} - type: outaux id: 212 parameters: {auxgain: 9, outgain: 25, stereo: 1} + - id: 249 + parameters: {} + comment: Filter modulation - type: envelope id: 246 parameters: {attack: 0, decay: 76, gain: 83, release: 54, stereo: 0, sustain: 47} - type: send id: 247 - parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 245, unit: 0, voice: 0} + parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 245, voice: 0} diff --git a/tracker/presets/KEYS/piano2.yml b/tracker/presets/KEYS/piano2.yml index 9896d44..6caa4ab 100644 --- a/tracker/presets/KEYS/piano2.yml +++ b/tracker/presets/KEYS/piano2.yml @@ -18,14 +18,14 @@ units: parameters: {stereo: 0} - type: filter id: 6 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: delay id: 60 parameters: {damp: 8, dry: 64, feedback: 127, notetracking: 1, pregain: 64, stereo: 0} varargs: [10787] - type: filter id: 61 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: mulp id: 62 parameters: {stereo: 0} diff --git a/tracker/presets/KEYS/rhodes.yml b/tracker/presets/KEYS/rhodes.yml index fc502f0..a415df1 100644 --- a/tracker/presets/KEYS/rhodes.yml +++ b/tracker/presets/KEYS/rhodes.yml @@ -1,36 +1,48 @@ -name: KEYS Rhodes -numvoices: 8 +name: rhodes +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 23, decay: 84, gain: 63, release: 64, stereo: 1, sustain: 58} - - type: send - id: 182 - parameters: {amount: 87, port: 0, sendpop: 0, stereo: 0, target: 175, unit: 0, voice: 0} + - id: 183 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 64, detune: 64, gain: 70, lfo: 0, phase: 64, shape: 43, stereo: 1, transpose: 64, type: 0, unison: 0} - type: send id: 3 parameters: {amount: 90, port: 2, sendpop: 1, stereo: 1, target: 5} + - id: 184 + parameters: {} + comment: Envelope & osc + - type: envelope + id: 1 + parameters: {attack: 23, decay: 84, gain: 63, release: 64, stereo: 0, sustain: 58} + - type: send + id: 182 + parameters: {amount: 87, port: 0, sendpop: 0, stereo: 0, target: 175, voice: 0} - type: oscillator id: 5 - parameters: {color: 128, detune: 64, gain: 78, lfo: 0, phase: 92, shape: 64, stereo: 1, transpose: 64, type: 0, unison: 0} + parameters: {color: 128, detune: 64, gain: 78, lfo: 0, phase: 92, shape: 64, stereo: 0, transpose: 64, type: 0, unison: 0} - type: mulp id: 6 - parameters: {stereo: 1} + parameters: {stereo: 0} + - id: 185 + parameters: {} + comment: Filter & output - type: filter id: 175 - parameters: {bandpass: 0, frequency: 38, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 111, stereo: 1} + parameters: {bandpass: 0, frequency: 38, highpass: 0, lowpass: 1, resonance: 111, stereo: 0} + - type: pan + id: 176 + parameters: {panning: 64, stereo: 0} + - type: outaux + id: 177 + parameters: {auxgain: 0, outgain: 63, stereo: 1} + - id: 186 + parameters: {} + comment: Panning modulation - type: oscillator id: 180 parameters: {color: 128, detune: 64, gain: 33, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 63, type: 0, unison: 0} - type: send id: 181 - parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 176, unit: 0, voice: 0} - - type: pan - id: 176 - parameters: {panning: 64, stereo: 1} - - type: outaux - id: 177 - parameters: {auxgain: 0, outgain: 63, stereo: 1} + parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 176, voice: 0} diff --git a/tracker/presets/LEAD/Flute.yml b/tracker/presets/LEAD/Flute.yml index 22d8c5b..c6a290e 100644 --- a/tracker/presets/LEAD/Flute.yml +++ b/tracker/presets/LEAD/Flute.yml @@ -1,63 +1,9 @@ -name: Flute +name: flute numvoices: 1 units: - - type: envelope - id: 51 - parameters: {attack: 2, decay: 52, gain: 128, release: 65, stereo: 1, sustain: 48} - - type: oscillator - id: 57 - parameters: {color: 72, detune: 64, gain: 91, looplength: 80, loopstart: 1948, phase: 0, samplestart: 577066, shape: 54, stereo: 1, transpose: 63, type: 4, unison: 0} - - type: hold - id: 205 - parameters: {holdfreq: 80, stereo: 1} - - type: filter - id: 201 - parameters: {bandpass: 1, frequency: 52, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1} - - type: mulp - id: 53 - parameters: {stereo: 1} - - type: envelope - id: 206 - parameters: {attack: 57, decay: 64, gain: 64, release: 64, stereo: 0, sustain: 64} - - type: noise - id: 207 - parameters: {gain: 20, shape: 16, stereo: 0} - - type: mulp - id: 208 - parameters: {stereo: 0} - - type: filter - id: 219 - parameters: {bandpass: 1, frequency: 90, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 117, stereo: 0} - - type: addp - id: 216 - parameters: {stereo: 0} - - type: xch - id: 217 - parameters: {stereo: 0} - - type: envelope - id: 214 - parameters: {attack: 57, decay: 64, gain: 64, release: 64, stereo: 0, sustain: 64} - - type: noise - id: 210 - parameters: {gain: 20, shape: 10, stereo: 0} - - type: mulp - id: 215 - parameters: {stereo: 0} - - type: filter - id: 218 - parameters: {bandpass: 1, frequency: 91, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - - type: addp - id: 209 - parameters: {stereo: 0} - - type: filter - id: 220 - parameters: {bandpass: 1, frequency: 77, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1} - - type: pan - id: 55 - parameters: {panning: 73, stereo: 1} - - type: outaux - id: 56 - parameters: {auxgain: 77, outgain: 114, stereo: 1} + - id: 221 + parameters: {} + comment: Modulations - type: envelope id: 61 parameters: {attack: 86, decay: 48, gain: 93, release: 0, stereo: 0, sustain: 72} @@ -69,4 +15,52 @@ units: parameters: {stereo: 0} - type: send id: 63 - parameters: {amount: 89, port: 1, sendpop: 1, stereo: 0, target: 57, unit: 0, voice: 0} + parameters: {amount: 89, port: 1, sendpop: 1, stereo: 0, target: 57, voice: 0} + - id: 222 + parameters: {} + comment: Main oscillator + - type: oscillator + id: 57 + parameters: {color: 72, detune: 64, gain: 91, looplength: 80, loopstart: 1948, phase: 0, samplestart: 577066, shape: 54, stereo: 1, transpose: 63, type: 4, unison: 0} + - type: hold + id: 205 + parameters: {holdfreq: 80, stereo: 1} + - type: filter + id: 201 + parameters: {bandpass: 1, frequency: 52, highpass: 1, lowpass: 0, resonance: 128, stereo: 1} + - id: 223 + parameters: {} + comment: Main envelope + - type: envelope + id: 51 + parameters: {attack: 2, decay: 52, gain: 128, release: 65, stereo: 1, sustain: 48} + - type: mulp + id: 53 + parameters: {stereo: 1} + - id: 224 + parameters: {} + comment: Noise + - type: envelope + id: 206 + parameters: {attack: 57, decay: 64, gain: 64, release: 64, stereo: 1, sustain: 64} + - type: noise + id: 207 + parameters: {gain: 20, shape: 16, stereo: 1} + - type: mulp + id: 208 + parameters: {stereo: 1} + - type: filter + id: 219 + parameters: {bandpass: 1, frequency: 90, highpass: 0, lowpass: 0, resonance: 117, stereo: 1} + - type: addp + id: 216 + parameters: {stereo: 1} + - type: filter + id: 220 + parameters: {bandpass: 1, frequency: 77, highpass: 0, lowpass: 1, resonance: 128, stereo: 1} + - type: pan + id: 55 + parameters: {panning: 75, stereo: 1} + - type: outaux + id: 56 + parameters: {auxgain: 77, outgain: 114, stereo: 1} diff --git a/tracker/presets/LEAD/Jarresque.yml b/tracker/presets/LEAD/Jarresque.yml index 8a047bf..30f9578 100644 --- a/tracker/presets/LEAD/Jarresque.yml +++ b/tracker/presets/LEAD/Jarresque.yml @@ -1,33 +1,39 @@ -name: Jarresque +name: jarresque numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 80, decay: 128, gain: 67, release: 80, stereo: 0, sustain: 128} + - id: 242 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 64, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 16, type: 1} - type: send - id: 3 - parameters: {amount: 80, port: 0, sendpop: 0, target: 14} + id: 5 + parameters: {amount: 58, port: 1, sendpop: 0, target: 10} - type: send id: 4 parameters: {amount: 48, port: 0, sendpop: 0, target: 10} - type: send - id: 5 - parameters: {amount: 58, port: 1, sendpop: 1, target: 10} + id: 3 + parameters: {amount: 80, port: 0, sendpop: 1, target: 14} + - id: 241 + parameters: {} + comment: Modulated noise + - type: noise + id: 237 + parameters: {gain: 16, shape: 64, stereo: 0} + - type: filter + id: 10 + parameters: {bandpass: 1, frequency: 69, highpass: 0, lowpass: 0, resonance: 57, stereo: 0} + - id: 240 + parameters: {} + comment: Main oscillators - type: oscillator id: 235 parameters: {color: 3, detune: 73, gain: 63, lfo: 0, phase: 0, shape: 98, stereo: 0, transpose: 52, type: 1, unison: 1} - type: oscillator id: 236 parameters: {color: 57, detune: 60, gain: 38, lfo: 0, phase: 17, shape: 71, stereo: 0, transpose: 71, type: 1} - - type: noise - id: 237 - parameters: {gain: 16, shape: 64, stereo: 0} - - type: filter - id: 10 - parameters: {bandpass: 1, frequency: 69, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 57, stereo: 0} - type: addp id: 11 parameters: {stereo: 0} @@ -39,19 +45,28 @@ units: parameters: {stereo: 0} - type: filter id: 14 - parameters: {bandpass: 1, frequency: 57, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 57, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} - type: xch id: 15 parameters: {stereo: 0} - type: filter id: 16 - parameters: {bandpass: 1, frequency: 93, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 93, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} - type: addp id: 17 parameters: {stereo: 0} + - id: 239 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 80, decay: 128, gain: 67, release: 80, stereo: 0, sustain: 128} - type: mulp id: 18 parameters: {stereo: 0} + - id: 238 + parameters: {} + comment: Delay & output - type: delay id: 19 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 51, stereo: 0} diff --git a/tracker/presets/LEAD/Morpher.yml b/tracker/presets/LEAD/Morpher.yml index 7a11315..0db02ed 100644 --- a/tracker/presets/LEAD/Morpher.yml +++ b/tracker/presets/LEAD/Morpher.yml @@ -1,24 +1,9 @@ -name: LEAD Morpher -numvoices: 3 +name: morpher +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 25, decay: 82, gain: 128, release: 64, stereo: 0, sustain: 103} - - type: oscillator - id: 2 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 96, shape: 64, stereo: 0, transpose: 40, type: 0} - - type: send - id: 3 - parameters: {amount: 46, port: 0, sendpop: 1, target: 15} - - type: oscillator - id: 5 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 86, shape: 64, stereo: 0, transpose: 33, type: 0} - - type: send - id: 6 - parameters: {amount: 80, port: 0, sendpop: 0, target: 17} - - type: send - id: 229 - parameters: {amount: 80, port: 3, sendpop: 1, target: 231} + - id: 235 + parameters: {} + comment: Main oscillators - type: oscillator id: 231 parameters: {color: 69, detune: 74, gain: 57, lfo: 0, phase: 0, shape: 128, stereo: 0, transpose: 64, type: 2, unison: 3} @@ -28,27 +13,54 @@ units: - type: addp id: 13 parameters: {stereo: 0} + - id: 236 + parameters: {} + comment: Modulated filters - type: push id: 14 parameters: {stereo: 0} + - type: oscillator + id: 5 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 86, shape: 64, stereo: 0, transpose: 33, type: 0} + - type: send + id: 229 + parameters: {amount: 80, port: 3, sendpop: 0, target: 231} + - type: send + id: 6 + parameters: {amount: 80, port: 0, sendpop: 1, target: 17} - type: filter - id: 15 - parameters: {bandpass: 1, frequency: 90, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + id: 17 + parameters: {bandpass: 1, frequency: 78, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: xch id: 16 parameters: {stereo: 0} + - type: oscillator + id: 2 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 96, shape: 64, stereo: 0, transpose: 40, type: 0} + - type: send + id: 3 + parameters: {amount: 46, port: 0, sendpop: 1, target: 15} - type: filter - id: 17 - parameters: {bandpass: 1, frequency: 78, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + id: 15 + parameters: {bandpass: 1, frequency: 90, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} - type: addp id: 18 parameters: {stereo: 0} - type: filter id: 20 - parameters: {bandpass: 0, frequency: 93, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 93, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - id: 237 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 25, decay: 82, gain: 128, release: 64, stereo: 0, sustain: 103} - type: mulp id: 21 parameters: {stereo: 0} + - id: 233 + parameters: {} + comment: Delay & output - type: pan id: 23 parameters: {panning: 61, stereo: 0} diff --git a/tracker/presets/LEAD/BellLead2.yml b/tracker/presets/LEAD/bell-lead-2.yml similarity index 80% rename from tracker/presets/LEAD/BellLead2.yml rename to tracker/presets/LEAD/bell-lead-2.yml index 2053217..3704b4a 100644 --- a/tracker/presets/LEAD/BellLead2.yml +++ b/tracker/presets/LEAD/bell-lead-2.yml @@ -1,9 +1,9 @@ -name: LEAD BellLead2 -numvoices: 4 +name: bell-lead-2 +numvoices: 1 units: - - type: envelope - id: 163 - parameters: {attack: 34, decay: 81, gain: 68, release: 78, stereo: 0, sustain: 103} + - id: 1005 + parameters: {} + comment: Main oscillators - type: oscillator id: 165 parameters: {color: 97, detune: 70, gain: 31, lfo: 0, phase: 0, shape: 86, stereo: 0, transpose: 76, type: 2, unison: 2} @@ -13,9 +13,18 @@ units: - type: addp id: 166 parameters: {stereo: 0} + - id: 1004 + parameters: {} + comment: Main envelope + - type: envelope + id: 163 + parameters: {attack: 34, decay: 81, gain: 68, release: 78, stereo: 0, sustain: 103} - type: mulp id: 167 parameters: {stereo: 0} + - id: 1003 + parameters: {} + comment: Delay & output - type: pan id: 168 parameters: {panning: 59, stereo: 0} diff --git a/tracker/presets/LEAD/BellLead.yml b/tracker/presets/LEAD/bell-lead.yml similarity index 84% rename from tracker/presets/LEAD/BellLead.yml rename to tracker/presets/LEAD/bell-lead.yml index b263494..2961646 100644 --- a/tracker/presets/LEAD/BellLead.yml +++ b/tracker/presets/LEAD/bell-lead.yml @@ -1,6 +1,9 @@ -name: BellLead -numvoices: 4 +name: bell-lead +numvoices: 1 units: + - id: 1011 + parameters: {} + comment: Main envelope - type: envelope id: 163 parameters: {attack: 34, decay: 102, gain: 68, release: 78, stereo: 0, sustain: 47} @@ -10,6 +13,9 @@ units: - type: mulp id: 229 parameters: {stereo: 0} + - id: 1012 + parameters: {} + comment: Main oscillators - type: oscillator id: 164 parameters: {color: 91, detune: 52, gain: 64, lfo: 0, phase: 128, shape: 48, stereo: 0, transpose: 76, type: 0, unison: 3} @@ -25,21 +31,30 @@ units: - type: oscillator id: 1002 parameters: {color: 29, detune: 63, gain: 63, looplength: 821, loopstart: 2374, phase: 0, samplestart: 557335, shape: 76, stereo: 0, transpose: 67, type: 4, unison: 1} - - id: 1003 - parameters: {} - disabled: true - type: addp id: 1004 parameters: {stereo: 0} - type: mulp id: 167 parameters: {stereo: 0} - - type: filter - id: 217 - parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + - id: 1009 + parameters: {} + comment: Filters + - type: loadnote + id: 1006 + parameters: {stereo: 0} + - type: send + id: 1007 + parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 1005, voice: 0} - type: filter id: 1005 - parameters: {bandpass: 0, frequency: 39, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 39, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} + - type: filter + id: 217 + parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} + - id: 1010 + parameters: {} + comment: Delay & output - type: pan id: 168 parameters: {panning: 61, stereo: 0} @@ -50,11 +65,3 @@ units: - type: outaux id: 172 parameters: {auxgain: 41, outgain: 86, stereo: 1} - - id: 1008 - parameters: {} - - type: loadnote - id: 1006 - parameters: {stereo: 0} - - type: send - id: 1007 - parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 1005, unit: 0, voice: 0} diff --git a/tracker/presets/LEAD/HappyLead.yml b/tracker/presets/LEAD/happy-lead.yml similarity index 72% rename from tracker/presets/LEAD/HappyLead.yml rename to tracker/presets/LEAD/happy-lead.yml index 7b3deb9..d0ccba7 100644 --- a/tracker/presets/LEAD/HappyLead.yml +++ b/tracker/presets/LEAD/happy-lead.yml @@ -1,6 +1,21 @@ -name: LEAD HappyLead -numvoices: 4 +name: happy-lead +numvoices: 1 units: + - id: 235 + parameters: {} + comment: Main oscillators + - type: oscillator + id: 164 + parameters: {color: 65, detune: 56, gain: 64, lfo: 0, phase: 0, shape: 42, stereo: 0, transpose: 76, type: 1, unison: 2} + - type: oscillator + id: 165 + parameters: {color: 64, detune: 54, gain: 64, lfo: 0, phase: 0, shape: 48, stereo: 0, transpose: 88, type: 1, unison: 3} + - type: addp + id: 166 + parameters: {stereo: 0} + - id: 236 + parameters: {} + comment: Main envelopes - type: envelope id: 163 parameters: {attack: 19, decay: 88, gain: 128, release: 57, stereo: 0, sustain: 80} @@ -10,27 +25,27 @@ units: - type: mulp id: 229 parameters: {stereo: 0} - - type: oscillator - id: 164 - parameters: {color: 65, detune: 56, gain: 64, lfo: 0, phase: 0, shape: 42, stereo: 0, transpose: 76, type: 1, unison: 2} - - type: add - id: 214 - parameters: {stereo: 0} - - type: oscillator - id: 165 - parameters: {color: 64, detune: 54, gain: 64, lfo: 0, phase: 0, shape: 48, stereo: 0, transpose: 88, type: 1, unison: 3} - - type: addp - id: 166 - parameters: {stereo: 0} - type: mulp id: 167 parameters: {stereo: 0} - - type: filter - id: 217 - parameters: {bandpass: 0, frequency: 91, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + - id: 234 + parameters: {} + comment: Filters + - type: loadnote + id: 231 + parameters: {stereo: 0} + - type: send + id: 232 + parameters: {amount: 89, port: 0, sendpop: 1, stereo: 0, target: 230, voice: 0} - type: filter id: 230 - parameters: {bandpass: 1, frequency: 49, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 49, highpass: -1, lowpass: 0, resonance: 128, stereo: 0} + - type: filter + id: 217 + parameters: {bandpass: 0, frequency: 91, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} + - id: 233 + parameters: {} + comment: Delay & output - type: pan id: 168 parameters: {panning: 60, stereo: 0} @@ -41,9 +56,3 @@ units: - type: outaux id: 172 parameters: {auxgain: 25, outgain: 38, stereo: 1} - - type: loadnote - id: 231 - parameters: {stereo: 0} - - type: send - id: 232 - parameters: {amount: 89, port: 0, sendpop: 1, stereo: 0, target: 230, unit: 0, voice: 0} diff --git a/tracker/presets/LEAD/SuperSaw 2.yml b/tracker/presets/LEAD/super-saw-2.yml similarity index 84% rename from tracker/presets/LEAD/SuperSaw 2.yml rename to tracker/presets/LEAD/super-saw-2.yml index 2cd68bd..5d061bf 100644 --- a/tracker/presets/LEAD/SuperSaw 2.yml +++ b/tracker/presets/LEAD/super-saw-2.yml @@ -1,15 +1,27 @@ -name: LEAD SuperSaw 2 -numvoices: 4 +name: super-saw-2 +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 11, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 36} + - id: 233 + parameters: {} + comment: Modulations - type: oscillator - id: 2 - parameters: {color: 128, detune: 32, gain: 64, phase: 128, shape: 66, stereo: 0, transpose: 76, type: 1, unison: 3} + id: 34 + parameters: {color: 128, detune: 64, gain: 65, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 45, type: 0} + - type: send + id: 35 + parameters: {amount: 106, port: 2, sendpop: 0, stereo: 0, target: 228, voice: 0} + - type: send + id: 36 + parameters: {amount: 128, port: 2, sendpop: 1, stereo: 0, target: 14, voice: 0} + - id: 232 + parameters: {} + comment: Right - type: oscillator id: 228 parameters: {color: 128, detune: 88, gain: 64, lfo: 0, phase: 58, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} + - type: oscillator + id: 2 + parameters: {color: 128, detune: 32, gain: 64, phase: 128, shape: 66, stereo: 0, transpose: 76, type: 1, unison: 3} - type: addp id: 229 parameters: {stereo: 0} @@ -19,20 +31,21 @@ units: - type: addp id: 24 parameters: {stereo: 0} + - type: envelope + id: 1 + parameters: {attack: 11, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 36} - type: mulp id: 17 parameters: {stereo: 0} - id: 18 parameters: {} - - type: envelope - id: 12 - parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 35} - - type: oscillator - id: 13 - parameters: {color: 128, detune: 32, gain: 64, phase: 44, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} + comment: Left - type: oscillator id: 14 parameters: {color: 128, detune: 96, gain: 64, lfo: 0, phase: 95, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3} + - type: oscillator + id: 13 + parameters: {color: 128, detune: 32, gain: 64, phase: 44, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} - type: addp id: 28 parameters: {stereo: 0} @@ -42,9 +55,15 @@ units: - type: addp id: 15 parameters: {stereo: 0} + - type: envelope + id: 12 + parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 35} - type: mulp id: 26 parameters: {stereo: 0} + - id: 230 + parameters: {} + comment: Effects & output - type: delay id: 29 parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0} @@ -54,29 +73,16 @@ units: parameters: {panning: 60, stereo: 1} - type: filter id: 19 - parameters: {bandpass: 0, frequency: 113, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 120, stereo: 1} - - id: 31 - parameters: {} + parameters: {bandpass: 0, frequency: 113, highpass: -1, lowpass: 1, resonance: 120, stereo: 1} - type: outaux id: 6 parameters: {auxgain: 7, outgain: 15, stereo: 1} + - id: 231 + parameters: {} + comment: Filter modulation - type: envelope id: 20 parameters: {attack: 66, decay: 0, gain: 128, release: 74, stereo: 0, sustain: 128} - - type: invgain - id: 32 - parameters: {invgain: 128, stereo: 0} - type: send id: 21 - parameters: {amount: 48, port: 0, sendpop: 1, stereo: 0, target: 19, unit: 0, voice: 0} - - id: 33 - parameters: {} - - type: oscillator - id: 34 - parameters: {color: 128, detune: 64, gain: 65, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 45, type: 0} - - type: send - id: 35 - parameters: {amount: 106, port: 2, sendpop: 0, stereo: 0, target: 228, unit: 0, voice: 0} - - type: send - id: 36 - parameters: {amount: 128, port: 2, sendpop: 1, stereo: 0, target: 14, unit: 0, voice: 0} + parameters: {amount: 48, port: 0, sendpop: 1, stereo: 0, target: 19, voice: 0} diff --git a/tracker/presets/LEAD/SuperSaw 3.yml b/tracker/presets/LEAD/super-saw-3.yml similarity index 90% rename from tracker/presets/LEAD/SuperSaw 3.yml rename to tracker/presets/LEAD/super-saw-3.yml index 33f2cf4..bf4d188 100644 --- a/tracker/presets/LEAD/SuperSaw 3.yml +++ b/tracker/presets/LEAD/super-saw-3.yml @@ -1,10 +1,10 @@ -name: LEAD SuperSaw 3 +name: super-saw-3 comment: Automate filter frequency for the classic trance sound -numvoices: 4 +numvoices: 1 units: - - type: envelope - id: 228 - parameters: {attack: 1, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 85} + - id: 231 + parameters: {} + comment: Right - type: oscillator id: 229 parameters: {color: 128, detune: 100, gain: 64, phase: 64, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} @@ -14,14 +14,15 @@ units: - type: addp id: 13 parameters: {stereo: 0} - - id: 15 - parameters: {} + - type: envelope + id: 228 + parameters: {attack: 1, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 85} - type: mulp id: 16 parameters: {stereo: 0} - - type: envelope - id: 17 - parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 99} + - id: 230 + parameters: {} + comment: Left - type: oscillator id: 18 parameters: {color: 128, detune: 31, gain: 64, phase: 64, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} @@ -31,20 +32,22 @@ units: - type: addp id: 20 parameters: {stereo: 0} - - id: 22 - parameters: {} + - type: envelope + id: 17 + parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 99} - type: mulp id: 23 parameters: {stereo: 0} - id: 31 parameters: {} + comment: Effects & output - type: delay id: 24 parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0} varargs: [350] - type: filter id: 26 - parameters: {bandpass: 0, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 77, stereo: 1} + parameters: {bandpass: 0, frequency: 128, highpass: 0, lowpass: 1, resonance: 77, stereo: 1} - type: compressor id: 27 parameters: {attack: 42, invgain: 91, ratio: 81, release: 63, stereo: 1, threshold: 55} @@ -54,7 +57,7 @@ units: - type: delay id: 29 parameters: {damp: 91, dry: 64, feedback: 36, notetracking: 2, pregain: 25, stereo: 1} - varargs: [36, 41] + varargs: [40, 41] - type: outaux id: 30 parameters: {auxgain: 0, outgain: 29, stereo: 1} diff --git a/tracker/presets/LEAD/SuperSaw.yml b/tracker/presets/LEAD/super-saw.yml similarity index 86% rename from tracker/presets/LEAD/SuperSaw.yml rename to tracker/presets/LEAD/super-saw.yml index 41b8408..9edd1ff 100644 --- a/tracker/presets/LEAD/SuperSaw.yml +++ b/tracker/presets/LEAD/super-saw.yml @@ -1,9 +1,21 @@ -name: LEAD SuperSaw -numvoices: 4 +name: super-saw +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 11, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 99} + - id: 231 + parameters: {} + comment: Modulations + - type: oscillator + id: 53 + parameters: {color: 128, detune: 64, gain: 64, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 0} + - type: send + id: 30 + parameters: {amount: 128, port: 2, sendpop: 0, stereo: 0, target: 2, voice: 0} + - type: send + id: 54 + parameters: {amount: 98, port: 2, sendpop: 1, stereo: 0, target: 14, voice: 0} + - id: 232 + parameters: {} + comment: Right - type: oscillator id: 2 parameters: {color: 128, detune: 100, gain: 64, phase: 64, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} @@ -19,20 +31,21 @@ units: - type: addp id: 24 parameters: {stereo: 0} + - type: envelope + id: 1 + parameters: {attack: 11, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 99} - type: mulp id: 17 parameters: {stereo: 0} - id: 18 parameters: {} - - type: envelope - id: 12 - parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 99} - - type: oscillator - id: 13 - parameters: {color: 128, detune: 31, gain: 64, phase: 64, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} + comment: Left - type: oscillator id: 14 parameters: {color: 128, detune: 96, gain: 64, lfo: 0, phase: 64, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3} + - type: oscillator + id: 13 + parameters: {color: 128, detune: 31, gain: 64, phase: 64, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3} - type: addp id: 28 parameters: {stereo: 0} @@ -42,9 +55,15 @@ units: - type: addp id: 48 parameters: {stereo: 0} + - type: envelope + id: 12 + parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 99} - type: mulp id: 26 parameters: {stereo: 0} + - id: 233 + parameters: {} + comment: Effects & output - type: delay id: 49 parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0} @@ -54,7 +73,7 @@ units: parameters: {panning: 60, stereo: 1} - type: filter id: 19 - parameters: {bandpass: 0, frequency: 116, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1} + parameters: {bandpass: 0, frequency: 116, highpass: 0, lowpass: 1, resonance: 128, stereo: 1} - type: delay id: 51 parameters: {damp: 91, dry: 128, feedback: 96, notetracking: 2, pregain: 65, stereo: 1} @@ -62,23 +81,14 @@ units: - type: outaux id: 6 parameters: {auxgain: 0, outgain: 25, stereo: 1} + - id: 230 + parameters: {} + comment: Filter modulation - type: envelope id: 20 parameters: {attack: 66, decay: 0, gain: 128, release: 74, stereo: 0, sustain: 128} - - type: invgain - id: 52 - parameters: {invgain: 128, stereo: 0} - type: send id: 21 - parameters: {amount: 48, port: 0, sendpop: 1, stereo: 0, target: 19, unit: 0, voice: 0} + parameters: {amount: 48, port: 0, sendpop: 1, stereo: 0, target: 19, voice: 0} - id: 29 parameters: {} - - type: oscillator - id: 53 - parameters: {color: 128, detune: 64, gain: 64, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 0} - - type: send - id: 30 - parameters: {amount: 128, port: 2, sendpop: 0, stereo: 0, target: 2, unit: 0, voice: 0} - - type: send - id: 54 - parameters: {amount: 98, port: 2, sendpop: 1, stereo: 0, target: 14, unit: 0, voice: 0} diff --git a/tracker/presets/PAD/Pad Gen.yml b/tracker/presets/PAD/pad-gen.yml similarity index 80% rename from tracker/presets/PAD/Pad Gen.yml rename to tracker/presets/PAD/pad-gen.yml index f453d80..b7ae804 100644 --- a/tracker/presets/PAD/Pad Gen.yml +++ b/tracker/presets/PAD/pad-gen.yml @@ -1,6 +1,9 @@ -name: Pad Gen -numvoices: 4 +name: pad-gen +numvoices: 1 units: + - id: 233 + parameters: {} + comment: Main envelopes - type: envelope id: 163 parameters: {attack: 61, decay: 87, gain: 83, release: 76, stereo: 0, sustain: 79} @@ -10,6 +13,9 @@ units: - type: mulp id: 229 parameters: {stereo: 0} + - id: 234 + parameters: {} + comment: Main oscillators - type: oscillator id: 164 parameters: {color: 41, detune: 52, gain: 64, lfo: 0, phase: 64, shape: 64, stereo: 0, transpose: 88, type: 1, unison: 3} @@ -25,9 +31,12 @@ units: - type: mulp id: 167 parameters: {stereo: 0} + - id: 235 + parameters: {} + comment: Effects & output - type: filter id: 230 - parameters: {bandpass: 1, frequency: 68, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 93, stereo: 0} + parameters: {bandpass: 1, frequency: 68, highpass: 1, lowpass: 0, resonance: 93, stereo: 0} - type: pan id: 168 parameters: {panning: 64, stereo: 0} @@ -38,9 +47,12 @@ units: - type: outaux id: 172 parameters: {auxgain: 12, outgain: 16, stereo: 1} + - id: 236 + parameters: {} + comment: Filter modulation - type: loadnote id: 231 parameters: {stereo: 0} - type: send id: 232 - parameters: {amount: 94, port: 0, sendpop: 1, stereo: 0, target: 230, unit: 0, voice: 0} + parameters: {amount: 94, port: 0, sendpop: 1, stereo: 0, target: 230, voice: 0} diff --git a/tracker/presets/PAD/pad-long.yml b/tracker/presets/PAD/pad-long.yml index c9c1f34..a4170e2 100644 --- a/tracker/presets/PAD/pad-long.yml +++ b/tracker/presets/PAD/pad-long.yml @@ -1,21 +1,9 @@ -name: PadLong -numvoices: 2 +name: pad-long +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 74, decay: 96, gain: 64, release: 96, stereo: 0, sustain: 96} - - type: envelope - id: 2 - parameters: {attack: 96, decay: 104, gain: 64, release: 96, stereo: 0, sustain: 104} - - type: send - id: 3 - parameters: {amount: 128, port: 0, sendpop: 1, target: 14} - - type: oscillator - id: 5 - parameters: {color: 64, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 28, type: 1} - - type: send - id: 6 - parameters: {amount: 96, port: 0, sendpop: 1, target: 13} + - id: 161 + parameters: {} + comment: Main oscillators - type: oscillator id: 159 parameters: {color: 0, detune: 80, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -31,15 +19,39 @@ units: - type: addp id: 12 parameters: {stereo: 0} + - id: 162 + parameters: {} + comment: Modulated filters + - type: oscillator + id: 5 + parameters: {color: 64, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 28, type: 1} + - type: send + id: 6 + parameters: {amount: 96, port: 0, sendpop: 1, target: 13} - type: filter id: 13 - parameters: {bandpass: 0, frequency: 53, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 53, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} + - type: envelope + id: 2 + parameters: {attack: 96, decay: 104, gain: 64, release: 96, stereo: 0, sustain: 104} + - type: send + id: 3 + parameters: {amount: 128, port: 0, sendpop: 1, target: 14} - type: filter id: 14 - parameters: {bandpass: 0, frequency: 16, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 48, stereo: 0} + parameters: {bandpass: 0, frequency: 16, highpass: 0, lowpass: 1, resonance: 48, stereo: 0} + - id: 163 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 74, decay: 96, gain: 64, release: 96, stereo: 0, sustain: 96} - type: mulp id: 15 parameters: {stereo: 0} + - id: 164 + parameters: {} + comment: Effects & output - type: pan id: 16 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/PAD/pad.yml b/tracker/presets/PAD/pad.yml index 2291b95..d7e3bb5 100644 --- a/tracker/presets/PAD/pad.yml +++ b/tracker/presets/PAD/pad.yml @@ -1,18 +1,9 @@ -name: Pad +name: pad numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 72, decay: 96, gain: 128, release: 88, stereo: 0, sustain: 96} - - type: send - id: 2 - parameters: {amount: 64, port: 4, sendpop: 0, target: 1} - - type: oscillator - id: 3 - parameters: {color: 80, detune: 60, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 2} - - type: oscillator - id: 4 - parameters: {color: 96, detune: 72, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 1} + - id: 83 + parameters: {} + comment: Modulations - type: oscillator id: 5 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 90, stereo: 0, transpose: 32, type: 0} @@ -22,24 +13,48 @@ units: - type: send id: 78 parameters: {amount: 61, port: 1, sendpop: 1, target: 4} + - id: 84 + parameters: {} + comment: Main oscillators + - type: oscillator + id: 3 + parameters: {color: 80, detune: 60, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 2} + - type: oscillator + id: 4 + parameters: {color: 96, detune: 72, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 1} - type: addp id: 80 parameters: {stereo: 0} + - id: 85 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 72, decay: 96, gain: 128, release: 88, stereo: 0, sustain: 96} + - type: send + id: 2 + parameters: {amount: 64, port: 4, sendpop: 0, target: 1} - type: mulp id: 10 parameters: {stereo: 0} + - id: 82 + parameters: {} + comment: Effects - type: filter id: 11 - parameters: {bandpass: 0, frequency: 26, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 26, highpass: -1, lowpass: 1, resonance: 128, stereo: 0} - type: filter id: 12 - parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, resonance: 64, stereo: 0} - type: distort id: 13 parameters: {drive: 104, stereo: 0} - type: hold id: 14 parameters: {holdfreq: 128, stereo: 0} + - id: 81 + parameters: {} + comment: Output - type: pan id: 15 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/PAD/pad2.yml b/tracker/presets/PAD/pad2.yml index 1d4505c..526e718 100644 --- a/tracker/presets/PAD/pad2.yml +++ b/tracker/presets/PAD/pad2.yml @@ -1,18 +1,9 @@ -name: Pad2 +name: pad2 numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 72, decay: 96, gain: 128, release: 88, stereo: 0, sustain: 96} - - type: send - id: 2 - parameters: {amount: 64, port: 4, sendpop: 0, target: 1} - - type: oscillator - id: 3 - parameters: {color: 80, detune: 60, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 1} - - type: oscillator - id: 4 - parameters: {color: 128, detune: 72, gain: 64, lfo: 0, phase: 32, shape: 112, stereo: 0, transpose: 64, type: 0} + - id: 85 + parameters: {} + comment: Modulations - type: oscillator id: 5 parameters: {color: 64, detune: 112, gain: 128, lfo: 1, phase: 0, shape: 16, stereo: 0, transpose: 80, type: 2} @@ -22,18 +13,39 @@ units: - type: send id: 81 parameters: {amount: 60, port: 1, sendpop: 1, target: 4} + - id: 86 + parameters: {} + comment: Main oscillators + - type: oscillator + id: 3 + parameters: {color: 80, detune: 60, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 64, type: 1} + - type: oscillator + id: 4 + parameters: {color: 128, detune: 72, gain: 64, lfo: 0, phase: 32, shape: 112, stereo: 0, transpose: 64, type: 0} - type: addp id: 83 parameters: {stereo: 0} + - id: 87 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 72, decay: 96, gain: 128, release: 88, stereo: 0, sustain: 96} + - type: send + id: 2 + parameters: {amount: 64, port: 4, sendpop: 0, target: 1} - type: mulp id: 10 parameters: {stereo: 0} + - id: 84 + parameters: {} + comment: Effects & output - type: filter id: 11 - parameters: {bandpass: 0, frequency: 80, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 24, stereo: 0} + parameters: {bandpass: 0, frequency: 80, highpass: 0, lowpass: 1, resonance: 24, stereo: 0} - type: filter id: 12 - parameters: {bandpass: 0, frequency: 48, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 24, stereo: 0} + parameters: {bandpass: 0, frequency: 48, highpass: 1, lowpass: 0, resonance: 24, stereo: 0} - type: pan id: 13 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/PL/Brass.yml b/tracker/presets/PL/Brass.yml index 8d7f297..ab241e6 100644 --- a/tracker/presets/PL/Brass.yml +++ b/tracker/presets/PL/Brass.yml @@ -1,7 +1,10 @@ -name: Brass +name: brass comment: Brass sound use for short stabs at C1-C2 range -numvoices: 4 +numvoices: 1 units: + - id: 225 + parameters: {} + comment: Main envelopes - type: envelope id: 163 parameters: {attack: 24, decay: 128, gain: 59, release: 89, stereo: 0, sustain: 128} @@ -11,6 +14,9 @@ units: - type: mulp id: 216 parameters: {stereo: 0} + - id: 226 + parameters: {} + comment: Main oscillators - type: oscillator id: 164 parameters: {color: 40, detune: 64, gain: 128, lfo: 0, phase: 68, shape: 88, stereo: 0, transpose: 64, type: 1, unison: 3} @@ -29,27 +35,33 @@ units: - type: mulp id: 167 parameters: {stereo: 0} + - id: 227 + parameters: {} + comment: Effects & output - type: compressor + id: 222 parameters: {attack: 14, invgain: 97, ratio: 38, release: 61, stereo: 0, threshold: 27} - type: mulp - id: 222 + id: 223 parameters: {stereo: 0} - type: filter id: 217 - parameters: {bandpass: 1, frequency: 57, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 26, stereo: 0} + parameters: {bandpass: 1, frequency: 57, highpass: 1, lowpass: 1, resonance: 26, stereo: 0} - type: filter id: 218 - parameters: {bandpass: 1, frequency: 85, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 1, resonance: 33, stereo: 0} + parameters: {bandpass: 1, frequency: 85, highpass: -1, lowpass: 0, resonance: 33, stereo: 0} - type: pan id: 168 parameters: {panning: 61, stereo: 0} - type: outaux id: 172 parameters: {auxgain: 31, outgain: 67, stereo: 1} - - parameters: {} + - id: 224 + parameters: {} + comment: Filter modulation - type: loadnote id: 219 parameters: {stereo: 0} - type: send id: 220 - parameters: {amount: 89, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0} + parameters: {amount: 89, port: 0, sendpop: 1, stereo: 0, target: 218, voice: 0} diff --git a/tracker/presets/PL/Popper.yml b/tracker/presets/PL/Popper.yml index 2734da7..fcacfb9 100644 --- a/tracker/presets/PL/Popper.yml +++ b/tracker/presets/PL/Popper.yml @@ -1,9 +1,9 @@ -name: Popper -numvoices: 3 +name: popper +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 65, gain: 128, release: 70, stereo: 0, sustain: 0} + - id: 197 + parameters: {} + comment: Modulations - type: envelope id: 2 parameters: {attack: 5, decay: 55, gain: 128, release: 80, stereo: 0, sustain: 0} @@ -28,30 +28,45 @@ units: - type: send id: 12 parameters: {amount: 80, port: 1, sendpop: 1, target: 16} + - id: 196 + parameters: {} + comment: Main oscillators - type: oscillator id: 14 parameters: {color: 128, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 63, stereo: 0, transpose: 76, type: 2, unison: 0} - - type: oscillator - id: 15 - parameters: {color: 40, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 61, stereo: 0, transpose: 76, type: 2, unison: 0} - type: oscillator id: 16 parameters: {color: 0, detune: 64, gain: 64, lfo: 0, phase: 18, shape: 128, stereo: 0, transpose: 76, type: 1, unison: 2} + - type: oscillator + id: 15 + parameters: {color: 40, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 61, stereo: 0, transpose: 76, type: 2, unison: 0} - type: addp id: 17 parameters: {stereo: 0} - type: addp id: 18 parameters: {stereo: 0} + - id: 193 + parameters: {} + comment: Filters - type: filter id: 20 - parameters: {bandpass: 0, frequency: 71, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 96, stereo: 0} + parameters: {bandpass: -1, frequency: 71, highpass: 1, lowpass: 1, resonance: 96, stereo: 0} - type: filter id: 19 - parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: -1, frequency: 50, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - id: 194 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 65, gain: 128, release: 70, stereo: 0, sustain: 0} - type: mulp id: 21 parameters: {stereo: 0} + - id: 195 + parameters: {} + comment: Delays & output - type: delay id: 22 parameters: {damp: 63, dry: 128, feedback: 61, notetracking: 2, pregain: 46, stereo: 0} diff --git a/tracker/presets/PL/Brass 2.yml b/tracker/presets/PL/brass2.yml similarity index 74% rename from tracker/presets/PL/Brass 2.yml rename to tracker/presets/PL/brass2.yml index 645c1c0..0d8d8a5 100644 --- a/tracker/presets/PL/Brass 2.yml +++ b/tracker/presets/PL/brass2.yml @@ -1,7 +1,9 @@ -name: Brass -comment: Brass sound use for short stabs at C1-C2 range -numvoices: 4 +name: brass2 +numvoices: 1 units: + - id: 228 + parameters: {} + comment: Main envelopes - type: envelope id: 163 parameters: {attack: 24, decay: 128, gain: 59, release: 57, stereo: 1, sustain: 114} @@ -11,17 +13,21 @@ units: - type: mulp id: 216 parameters: {stereo: 1} + - id: 229 + parameters: {} + comment: Main oscillators - type: oscillator id: 164 parameters: {color: 64, detune: 64, gain: 128, lfo: 0, phase: 64, shape: 101, stereo: 1, transpose: 64, type: 1, unison: 3} - type: distort + id: 217 parameters: {drive: 60, stereo: 1} - type: add id: 214 parameters: {stereo: 1} - type: oscillator id: 165 - parameters: {color: 70, detune: 72, gain: 128, lfo: 0, phase: 16, shape: 47, stereo: 1, transpose: 76, type: 1, unison: 3} + parameters: {color: 70, detune: 72, gain: 128, lfo: 0, phase: 16, shape: 40, stereo: 1, transpose: 76, type: 1, unison: 3} - type: distort id: 223 parameters: {drive: 60, stereo: 1} @@ -34,27 +40,33 @@ units: - type: mulp id: 167 parameters: {stereo: 1} + - id: 227 + parameters: {} + comment: Effects & output - type: compressor + id: 224 parameters: {attack: 14, invgain: 97, ratio: 38, release: 61, stereo: 1, threshold: 27} - type: mulp id: 222 parameters: {stereo: 1} - type: filter - id: 217 - parameters: {bandpass: 1, frequency: 40, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 65, stereo: 1} + id: 225 + parameters: {bandpass: 1, frequency: 40, highpass: 1, lowpass: 1, resonance: 65, stereo: 1} - type: filter id: 218 - parameters: {bandpass: 1, frequency: 80, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 1, resonance: 86, stereo: 1} + parameters: {bandpass: 1, frequency: 80, highpass: -1, lowpass: 0, resonance: 86, stereo: 1} - type: pan id: 168 parameters: {panning: 50, stereo: 1} - type: outaux id: 172 parameters: {auxgain: 31, outgain: 67, stereo: 1} - - parameters: {} + - id: 226 + parameters: {} + comment: Filter modulation - type: loadnote id: 219 parameters: {stereo: 0} - type: send id: 220 - parameters: {amount: 124, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0} + parameters: {amount: 124, port: 0, sendpop: 1, stereo: 0, target: 218, voice: 0} diff --git a/tracker/presets/PL/more-and-more.yml b/tracker/presets/PL/more-and-more.yml index d3e1d30..6327cf5 100644 --- a/tracker/presets/PL/more-and-more.yml +++ b/tracker/presets/PL/more-and-more.yml @@ -1,9 +1,9 @@ -name: MoreAndMore +name: more-and-more numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 63, gain: 128, release: 32, stereo: 0, sustain: 0} + - id: 233 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 52, type: 0} @@ -13,6 +13,9 @@ units: - type: send id: 4 parameters: {amount: 72, port: 1, sendpop: 1, target: 226} + - id: 232 + parameters: {} + comment: Main oscillators - type: oscillator id: 6 parameters: {color: 0, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -22,6 +25,9 @@ units: - type: addp id: 227 parameters: {stereo: 0} + - id: 231 + parameters: {} + comment: Modulated filters - type: envelope id: 228 parameters: {attack: 0, decay: 76, gain: 128, release: 32, stereo: 0, sustain: 0} @@ -33,13 +39,22 @@ units: parameters: {amount: 88, port: 0, sendpop: 1, target: 14} - type: filter id: 13 - parameters: {bandpass: 0, frequency: 80, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 80, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} - type: filter id: 14 - parameters: {bandpass: 0, frequency: 80, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 80, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - id: 229 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 63, gain: 128, release: 32, stereo: 0, sustain: 0} - type: mulp id: 15 parameters: {stereo: 0} + - id: 230 + parameters: {} + comment: Delay & output - type: delay id: 16 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/PL/punchy.yml b/tracker/presets/PL/punchy.yml index 5775bdf..49529e2 100644 --- a/tracker/presets/PL/punchy.yml +++ b/tracker/presets/PL/punchy.yml @@ -1,9 +1,15 @@ -name: ShortPunchy +name: punchy numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 70, gain: 128, release: 70, stereo: 0, sustain: 0} + - id: 197 + parameters: {} + comment: Modulations + - type: oscillator + id: 11 + parameters: {color: 128, detune: 64, gain: 64, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 96, type: 0} + - type: send + id: 12 + parameters: {amount: 80, port: 1, sendpop: 1, target: 16} - type: envelope id: 2 parameters: {attack: 0, decay: 65, gain: 101, release: 80, stereo: 0, sustain: 0} @@ -22,36 +28,45 @@ units: - type: send id: 192 parameters: {amount: 32, port: 3, sendpop: 1, target: 14} - - type: oscillator - id: 11 - parameters: {color: 128, detune: 64, gain: 64, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 96, type: 0} - - type: send - id: 12 - parameters: {amount: 80, port: 1, sendpop: 1, target: 16} + - id: 195 + parameters: {} + comment: Main oscillators - type: oscillator id: 14 parameters: {color: 128, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 76, type: 2} - - type: oscillator - id: 15 - parameters: {color: 64, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 2} - type: oscillator id: 16 parameters: {color: 0, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 76, type: 1} + - type: oscillator + id: 15 + parameters: {color: 64, detune: 64, gain: 64, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 2} - type: addp id: 17 parameters: {stereo: 0} - type: addp id: 18 parameters: {stereo: 0} + - id: 196 + parameters: {} + comment: Filters - type: filter id: 19 - parameters: {bandpass: 0, frequency: 46, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 94, stereo: 0} + parameters: {bandpass: 0, frequency: 46, highpass: 0, lowpass: 1, resonance: 94, stereo: 0} - type: filter id: 20 - parameters: {bandpass: 0, frequency: 62, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 96, stereo: 0} + parameters: {bandpass: 0, frequency: 62, highpass: 0, lowpass: 1, resonance: 96, stereo: 0} + - id: 193 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 70, gain: 128, release: 70, stereo: 0, sustain: 0} - type: mulp id: 21 parameters: {stereo: 0} + - id: 194 + parameters: {} + comment: Effects & output - type: delay id: 22 parameters: {damp: 32, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/PL/Sine pluck.yml b/tracker/presets/PL/sine-pluck.yml similarity index 98% rename from tracker/presets/PL/Sine pluck.yml rename to tracker/presets/PL/sine-pluck.yml index a858f38..3dcd4fa 100644 --- a/tracker/presets/PL/Sine pluck.yml +++ b/tracker/presets/PL/sine-pluck.yml @@ -1,4 +1,4 @@ -name: PL Sine +name: sine-pluck numvoices: 3 units: - type: envelope diff --git a/tracker/presets/PL/Super Pluck.yml b/tracker/presets/PL/super-pluck.yml similarity index 83% rename from tracker/presets/PL/Super Pluck.yml rename to tracker/presets/PL/super-pluck.yml index 08f9ac6..cef5e4d 100644 --- a/tracker/presets/PL/Super Pluck.yml +++ b/tracker/presets/PL/super-pluck.yml @@ -1,6 +1,9 @@ -name: Super Pluck -numvoices: 4 +name: super-pluck +numvoices: 1 units: + - id: 34 + parameters: {} + comment: Left - type: envelope id: 1 parameters: {attack: 11, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 36} @@ -24,6 +27,7 @@ units: parameters: {stereo: 0} - id: 18 parameters: {} + comment: Right - type: envelope id: 12 parameters: {attack: 18, decay: 67, gain: 64, release: 64, stereo: 0, sustain: 35} @@ -45,24 +49,28 @@ units: - type: mulp id: 26 parameters: {stereo: 0} + - id: 35 + parameters: {} + comment: Effects & output - type: delay + id: 29 parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0} varargs: [69] - type: pan + id: 30 parameters: {panning: 60, stereo: 1} - type: filter id: 19 - parameters: {bandpass: 0, frequency: 96, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 104, stereo: 1} - - parameters: {} + parameters: {bandpass: 0, frequency: 96, highpass: 0, lowpass: 1, resonance: 104, stereo: 1} - type: outaux id: 6 parameters: {auxgain: 14, outgain: 35, stereo: 1} + - id: 36 + parameters: {} + comment: Modulation - type: envelope id: 20 parameters: {attack: 66, decay: 0, gain: 128, release: 74, stereo: 0, sustain: 128} - - type: invgain - parameters: {invgain: 59, stereo: 0} - - parameters: {} - type: send id: 21 - parameters: {amount: 48, port: 0, sendpop: 1, stereo: 0, target: 19, unit: 0, voice: 0} + parameters: {amount: 29, port: 0, sendpop: 1, stereo: 0, target: 19, voice: 0} diff --git a/tracker/presets/PL/trance bells b/tracker/presets/PL/trance-bells.yml similarity index 82% rename from tracker/presets/PL/trance bells rename to tracker/presets/PL/trance-bells.yml index dcbc949..9597933 100644 --- a/tracker/presets/PL/trance bells +++ b/tracker/presets/PL/trance-bells.yml @@ -1,9 +1,12 @@ -name: Happy lead +name: trance-bells comment: |- Generic pluck generator Use oscillator type, color and shape to alter the sound properties -numvoices: 4 +numvoices: 1 units: + - id: 1007 + parameters: {} + comment: Main envelopes - type: envelope id: 163 parameters: {attack: 7, decay: 102, gain: 68, release: 78, stereo: 0, sustain: 47} @@ -13,6 +16,9 @@ units: - type: mulp id: 216 parameters: {stereo: 0} + - id: 1008 + parameters: {} + comment: Main oscillators - type: oscillator id: 164 parameters: {color: 91, detune: 52, gain: 128, lfo: 0, phase: 128, shape: 48, stereo: 0, transpose: 76, type: 0, unison: 3} @@ -28,20 +34,30 @@ units: - type: oscillator id: 1002 parameters: {color: 61, detune: 64, gain: 128, looplength: 821, loopstart: 2374, phase: 0, samplestart: 557335, shape: 58, stereo: 0, transpose: 55, type: 4, unison: 1} - - parameters: {} - disabled: true - type: addp - id: 1003 + id: 1004 parameters: {stereo: 0} - type: mulp id: 167 parameters: {stereo: 0} - - type: filter - id: 217 - parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + - id: 1006 + parameters: {} + comment: Modulated filters + - type: loadnote + id: 219 + parameters: {stereo: 0} + - type: send + id: 220 + parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 218, voice: 0} - type: filter id: 218 - parameters: {bandpass: 0, frequency: 39, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 39, highpass: 1, lowpass: 0, resonance: 128, stereo: 0} + - type: filter + id: 217 + parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} + - id: 1005 + parameters: {} + comment: Delay & output - type: pan id: 168 parameters: {panning: 61, stereo: 0} @@ -52,9 +68,3 @@ units: - type: outaux id: 172 parameters: {auxgain: 48, outgain: 24, stereo: 1} - - type: loadnote - id: 219 - parameters: {stereo: 0} - - type: send - id: 220 - parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0} diff --git a/tracker/presets/ST/Pizzicato.yml b/tracker/presets/ST/Pizzicato.yml index 1dd451c..465a6a3 100644 --- a/tracker/presets/ST/Pizzicato.yml +++ b/tracker/presets/ST/Pizzicato.yml @@ -1,38 +1,33 @@ -name: Pizzicato -numvoices: 4 +name: pizzicato +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 67, gain: 64, release: 62, stereo: 0, sustain: 0} + - id: 223 + parameters: {} + comment: Main oscillators - type: oscillator id: 2 parameters: {color: 60, detune: 64, gain: 74, looplength: 137, loopstart: 549, phase: 0, samplestart: 1034191, shape: 89, stereo: 0, transpose: 40, type: 4, unison: 0} - - type: distort - id: 17 - parameters: {drive: 93, stereo: 0} - disabled: true - - type: oscillator - id: 10 - parameters: {color: 59, detune: 63, gain: 67, looplength: 100, loopstart: 942, phase: 0, samplestart: 1633072, shape: 56, stereo: 0, transpose: 55, type: 4, unison: 2} - disabled: true - - type: addp - id: 11 - parameters: {stereo: 0} - disabled: true - type: oscillator id: 221 parameters: {color: 64, detune: 63, gain: 128, looplength: 398, loopstart: 2073, phase: 0, samplestart: 1034961, shape: 42, stereo: 0, transpose: 65, type: 4, unison: 0} - type: addp id: 16 parameters: {stereo: 0} + - id: 224 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 67, gain: 64, release: 62, stereo: 0, sustain: 0} - type: mulp id: 14 parameters: {stereo: 0} - id: 222 parameters: {} + comment: Effects & output - type: filter id: 15 - parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 5 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/ST/Strings.yml b/tracker/presets/ST/Strings.yml index 747676b..52a2327 100644 --- a/tracker/presets/ST/Strings.yml +++ b/tracker/presets/ST/Strings.yml @@ -1,56 +1,63 @@ -name: Strings -numvoices: 3 +name: strings +numvoices: 1 units: + - id: 224 + parameters: {} + comment: Modulations + - type: oscillator + id: 29 + parameters: {color: 128, detune: 64, gain: 82, lfo: 1, phase: 0, shape: 35, stereo: 0, transpose: 82, type: 0} + - type: send + id: 44 + parameters: {amount: 74, port: 1, sendpop: 0, stereo: 0, target: 24, voice: 0} + - type: send + id: 30 + parameters: {amount: 48, port: 1, sendpop: 1, stereo: 0, target: 37, voice: 0} + - id: 225 + parameters: {} + comment: Left - type: envelope id: 33 - parameters: {attack: 57, channel: 2, decay: 93, gain: 74, release: 71, stereo: 0, sustain: 64} - - type: oscillator - id: 19 - parameters: {color: 69, damp: 64, detune: 64, dry: 128, feedback: 125, gain: 65, looplength: 11272, loopstart: 147, notetracking: 0, phase: 0, pregain: 40, samplestart: 1458843, shape: 64, stereo: 0, transpose: 65, type: 4, unison: 0} + parameters: {attack: 57, decay: 93, gain: 74, release: 71, stereo: 0, sustain: 64} - type: oscillator id: 24 parameters: {color: 69, detune: 64, gain: 78, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 64, stereo: 0, transpose: 67, type: 4, unison: 1} + - type: oscillator + id: 19 + parameters: {color: 69, detune: 64, gain: 65, looplength: 11272, loopstart: 147, phase: 0, samplestart: 1458843, shape: 64, stereo: 0, transpose: 65, type: 4, unison: 0} - type: addp id: 20 parameters: {stereo: 0} - type: mulp id: 221 parameters: {stereo: 0} + - id: 226 + parameters: {} + comment: Right - type: envelope id: 46 - parameters: {attack: 57, decay: 93, gain: 78, panning: 64, release: 71, stereo: 0, sustain: 64} + parameters: {attack: 57, decay: 93, gain: 78, release: 71, stereo: 0, sustain: 64} - type: oscillator id: 37 - parameters: {auxgain: 35, color: 64, detune: 64, gain: 64, looplength: 9710, loopstart: 251, outgain: 40, phase: 0, samplestart: 1448797, shape: 64, stereo: 0, transpose: 79, type: 4, unison: 1} + parameters: {color: 64, detune: 64, gain: 64, looplength: 9710, loopstart: 251, phase: 0, samplestart: 1448797, shape: 64, stereo: 0, transpose: 79, type: 4, unison: 1} - type: oscillator id: 38 parameters: {color: 128, detune: 58, gain: 68, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 80, stereo: 0, transpose: 67, type: 4, unison: 0} - - type: xch - id: 41 - parameters: {stereo: 0} - type: addp id: 39 parameters: {stereo: 0} - type: mulp id: 35 parameters: {stereo: 0} + - id: 227 + parameters: {} + comment: Effects & output - type: hold id: 223 parameters: {holdfreq: 75, stereo: 1} - type: filter id: 45 - parameters: {bandpass: 1, frequency: 114, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1} + parameters: {bandpass: 1, frequency: 114, highpass: 0, lowpass: 1, resonance: 128, stereo: 1} - type: outaux id: 23 parameters: {auxgain: 15, outgain: 27, stereo: 1} - - id: 28 - parameters: {} - - type: oscillator - id: 29 - parameters: {color: 128, detune: 64, gain: 82, lfo: 1, phase: 0, shape: 35, stereo: 0, transpose: 82, type: 0} - - type: send - id: 44 - parameters: {amount: 74, port: 1, sendpop: 0, stereo: 0, target: 24, unit: 0, voice: 0} - - type: send - id: 30 - parameters: {amount: 48, port: 1, sendpop: 1, stereo: 0, target: 37, unit: 0, voice: 0} diff --git a/tracker/presets/ST/Pizzicato_octaves.yml b/tracker/presets/ST/pizzicato-octaves.yml similarity index 54% rename from tracker/presets/ST/Pizzicato_octaves.yml rename to tracker/presets/ST/pizzicato-octaves.yml index 53ed922..b4a7521 100644 --- a/tracker/presets/ST/Pizzicato_octaves.yml +++ b/tracker/presets/ST/pizzicato-octaves.yml @@ -1,32 +1,36 @@ -name: Pizzicato_octaves -numvoices: 4 +name: pizzicato-octaves +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 74, gain: 64, release: 62, stereo: 0, sustain: 0} + - id: 226 + parameters: {} + comment: Main oscillators - type: oscillator id: 2 parameters: {color: 60, detune: 64, gain: 89, looplength: 398, loopstart: 2073, phase: 0, samplestart: 1034961, shape: 89, stereo: 0, transpose: 65, type: 4, unison: 0} - type: oscillator id: 224 - parameters: {auxgain: 64, color: 64, detune: 63, gain: 128, looplength: 398, loopstart: 2073, outgain: 64, phase: 0, samplestart: 1034961, shape: 42, stereo: 0, transpose: 77, type: 4, unison: 0} - - type: distort - id: 50 - parameters: {drive: 94, stereo: 0} + parameters: {color: 64, detune: 63, gain: 128, looplength: 398, loopstart: 2073, phase: 0, samplestart: 1034961, shape: 72, stereo: 0, transpose: 77, type: 4, unison: 0} - type: addp id: 16 parameters: {stereo: 0} + - id: 227 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 74, gain: 64, release: 62, stereo: 0, sustain: 0} - type: mulp id: 14 - parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {stereo: 0} + - id: 228 + parameters: {} + comment: Effects & output - type: filter id: 15 - parameters: {bandpass: 0, frequency: 101, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 94, stereo: 0} - - id: 225 - parameters: {} + parameters: {bandpass: 0, frequency: 101, highpass: -1, lowpass: 1, resonance: 94, stereo: 0} - type: pan id: 5 - parameters: {auxgain: 39, outgain: 58, panning: 65, stereo: 0} + parameters: {panning: 65, stereo: 0} - type: delay id: 49 parameters: {damp: 72, dry: 116, feedback: 22, notetracking: 0, pregain: 86, stereo: 1} diff --git a/tracker/presets/ST/string.yml b/tracker/presets/ST/string.yml index dd0e3ca..8da09bb 100644 --- a/tracker/presets/ST/string.yml +++ b/tracker/presets/ST/string.yml @@ -1,18 +1,21 @@ -name: String -numvoices: 3 +name: string +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 88, decay: 88, gain: 88, release: 88, stereo: 0, sustain: 88} + - id: 66 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 128, detune: 64, gain: 64, lfo: 1, phase: 64, shape: 64, stereo: 0, transpose: 76, type: 0} - - type: send - id: 3 - parameters: {amount: 70, port: 1, sendpop: 0, target: 6} - type: send id: 4 - parameters: {amount: 70, port: 3, sendpop: 1, target: 63} + parameters: {amount: 70, port: 3, sendpop: 0, target: 63} + - type: send + id: 3 + parameters: {amount: 70, port: 1, sendpop: 1, target: 6} + - id: 67 + parameters: {} + comment: Main oscillators - type: oscillator id: 6 parameters: {color: 52, detune: 65, gain: 64, lfo: 0, phase: 64, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -22,9 +25,18 @@ units: - type: addp id: 64 parameters: {stereo: 0} + - id: 68 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 88, decay: 88, gain: 88, release: 88, stereo: 0, sustain: 88} - type: mulp id: 65 parameters: {stereo: 0} + - id: 69 + parameters: {} + comment: Output - type: pan id: 10 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/SY/Fairies.yml b/tracker/presets/SY/Fairies.yml index fc64bed..59a846e 100644 --- a/tracker/presets/SY/Fairies.yml +++ b/tracker/presets/SY/Fairies.yml @@ -1,9 +1,9 @@ -name: Fairies +name: fairies numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 80, decay: 96, gain: 64, release: 88, stereo: 0, sustain: 80} + - id: 235 + parameters: {} + comment: Modulations - type: envelope id: 2 parameters: {attack: 0, decay: 96, gain: 63, release: 88, stereo: 0, sustain: 40} @@ -13,6 +13,9 @@ units: - type: send id: 5 parameters: {amount: 96, port: 0, sendpop: 1, target: 12} + - id: 236 + parameters: {} + comment: Main oscillators - type: oscillator id: 232 parameters: {color: 3, detune: 56, gain: 52, lfo: 0, phase: 3, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -22,15 +25,24 @@ units: - type: addp id: 234 parameters: {stereo: 0} + - type: filter + id: 12 + parameters: {bandpass: 0, frequency: 16, highpass: 1, lowpass: 0, resonance: 37, stereo: 0} + - id: 237 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 80, decay: 96, gain: 64, release: 88, stereo: 0, sustain: 80} - type: distort id: 10 parameters: {drive: 69, stereo: 0} - - type: filter - id: 12 - parameters: {bandpass: 0, frequency: 16, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 37, stereo: 0} - type: mulp id: 13 parameters: {stereo: 0} + - id: 238 + parameters: {} + comment: Delay & output - type: pan id: 14 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/SY/Guitar.yml b/tracker/presets/SY/Guitar.yml index 87150cb..74517db 100644 --- a/tracker/presets/SY/Guitar.yml +++ b/tracker/presets/SY/Guitar.yml @@ -1,9 +1,9 @@ -name: Guitar -numvoices: 2 +name: guitar +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 27, decay: 80, gain: 112, release: 82, stereo: 0, sustain: 95} + - id: 92 + parameters: {} + comment: Karplus-Strong - type: envelope id: 2 parameters: {attack: 0, decay: 58, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -13,19 +13,25 @@ units: - type: mulp id: 4 parameters: {stereo: 0} - - type: filter - id: 5 - parameters: {bandpass: 1, frequency: 57, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - type: delay id: 6 parameters: {damp: 48, dry: 128, feedback: 126, notetracking: 1, pregain: 128, stereo: 0} varargs: [10787] + - id: 90 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 27, decay: 80, gain: 112, release: 82, stereo: 0, sustain: 95} - type: mulp id: 87 parameters: {stereo: 0} + - id: 91 + parameters: {} + comment: Filter & output - type: filter id: 88 - parameters: {bandpass: 0, frequency: 72, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 72, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 89 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/SY/Mighty.yml b/tracker/presets/SY/Mighty.yml index 37bf57e..0cbe596 100644 --- a/tracker/presets/SY/Mighty.yml +++ b/tracker/presets/SY/Mighty.yml @@ -1,39 +1,54 @@ -name: Mighty +name: mighty numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 64, gain: 128, release: 64, stereo: 0, sustain: 64} + - id: 220 + parameters: {} + comment: Modulations - type: envelope id: 2 parameters: {attack: 0, decay: 88, gain: 128, release: 0, stereo: 0, sustain: 0} - type: send id: 3 parameters: {amount: 96, port: 5, sendpop: 1, target: 217} + - id: 221 + parameters: {} + comment: Main oscillators + - type: oscillator + id: 217 + parameters: {color: 128, detune: 62, gain: 32, lfo: 0, phase: 48, shape: 32, stereo: 0, transpose: 88, type: 0} - type: oscillator id: 5 parameters: {color: 64, detune: 68, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} - type: oscillator id: 6 parameters: {color: 32, detune: 58, gain: 128, lfo: 0, phase: 32, shape: 64, stereo: 0, transpose: 52, type: 1} - - type: oscillator - id: 217 - parameters: {color: 128, detune: 62, gain: 32, lfo: 0, phase: 48, shape: 32, stereo: 0, transpose: 88, type: 0} - type: addp id: 218 parameters: {stereo: 0} - type: addp id: 219 parameters: {stereo: 0} + - id: 222 + parameters: {} + comment: Effects - type: filter id: 10 - parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 64, stereo: 0} + parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, resonance: 64, stereo: 0} - type: distort id: 11 parameters: {drive: 120, stereo: 0} + - id: 223 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 64, gain: 128, release: 64, stereo: 0, sustain: 64} - type: mulp id: 13 parameters: {stereo: 0} + - id: 224 + parameters: {} + comment: Delay & output - type: delay id: 15 parameters: {damp: 64, dry: 96, feedback: 64, notetracking: 0, pregain: 96, stereo: 0} diff --git a/tracker/presets/SY/airy.yml b/tracker/presets/SY/airy.yml index c2afb5d..86f7a55 100644 --- a/tracker/presets/SY/airy.yml +++ b/tracker/presets/SY/airy.yml @@ -1,15 +1,12 @@ -name: Airy +name: airy numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 48, decay: 80, gain: 128, release: 64, stereo: 0, sustain: 64} + - id: 129 + parameters: {} + comment: Modulations - type: noise id: 2 parameters: {gain: 64, shape: 64, stereo: 0} - - type: distort - id: 3 - parameters: {drive: 64, stereo: 0} - type: hold id: 4 parameters: {holdfreq: 0, stereo: 0} @@ -19,42 +16,60 @@ units: - type: addp id: 6 parameters: {stereo: 0} - - type: send - id: 123 - parameters: {amount: 40, port: 0, sendpop: 0, target: 12} - type: send id: 124 - parameters: {amount: 58, port: 1, sendpop: 1, target: 12} - - type: oscillator - id: 10 - parameters: {color: 128, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 88, type: 0} + parameters: {amount: 58, port: 1, sendpop: 0, target: 12} + - type: send + id: 123 + parameters: {amount: 40, port: 0, sendpop: 1, target: 12} + - id: 127 + parameters: {} + comment: Modulated noise - type: noise id: 11 parameters: {gain: 5, shape: 64, stereo: 0} - type: filter id: 12 - parameters: {bandpass: 1, frequency: 77, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 24, stereo: 0} + parameters: {bandpass: 1, frequency: 77, highpass: 0, lowpass: 0, resonance: 24, stereo: 0} + - id: 128 + parameters: {} + comment: Main oscillator + - type: oscillator + id: 10 + parameters: {color: 128, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 88, type: 0} - type: addp id: 13 parameters: {stereo: 0} + - id: 130 + parameters: {} + comment: Filters - type: push id: 14 parameters: {stereo: 0} - type: filter id: 15 - parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} - type: xch id: 16 parameters: {stereo: 0} - type: filter id: 17 - parameters: {bandpass: 1, frequency: 96, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 96, highpass: 0, lowpass: 0, resonance: 128, stereo: 0} - type: addp id: 18 parameters: {stereo: 0} + - id: 125 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 48, decay: 80, gain: 128, release: 64, stereo: 0, sustain: 64} - type: mulp id: 19 parameters: {stereo: 0} + - id: 126 + parameters: {} + comment: Delay & output - type: delay id: 20 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/SY/alpha-omega.yml b/tracker/presets/SY/alpha-omega.yml index f048976..5860622 100644 --- a/tracker/presets/SY/alpha-omega.yml +++ b/tracker/presets/SY/alpha-omega.yml @@ -1,21 +1,24 @@ -name: AlphaOmega +name: alpha-omega numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 64, gain: 128, release: 76, stereo: 0, sustain: 32} + - id: 212 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 52, type: 0} + - type: send + id: 5 + parameters: {amount: 96, port: 3, sendpop: 0, target: 207} - type: send id: 3 parameters: {amount: 48, port: 1, sendpop: 0, target: 205} - type: send id: 4 - parameters: {amount: 80, port: 1, sendpop: 0, target: 206} - - type: send - id: 5 - parameters: {amount: 96, port: 3, sendpop: 1, target: 207} + parameters: {amount: 80, port: 1, sendpop: 1, target: 206} + - id: 208 + parameters: {} + comment: Main oscillators - type: oscillator id: 205 parameters: {color: 0, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 76, type: 1} @@ -31,6 +34,9 @@ units: - type: addp id: 11 parameters: {stereo: 0} + - id: 209 + parameters: {} + comment: Modulated filter - type: envelope id: 12 parameters: {attack: 0, decay: 80, gain: 128, release: 64, stereo: 0, sustain: 30} @@ -39,10 +45,19 @@ units: parameters: {amount: 96, port: 0, sendpop: 1, target: 15} - type: filter id: 15 - parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 64, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} + - id: 210 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 64, gain: 128, release: 76, stereo: 0, sustain: 32} - type: mulp id: 16 parameters: {stereo: 0} + - id: 211 + parameters: {} + comment: Delays & output - type: delay id: 17 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/SY/guitar2.yml b/tracker/presets/SY/guitar2.yml index c29a4c5..9f9a9ce 100644 --- a/tracker/presets/SY/guitar2.yml +++ b/tracker/presets/SY/guitar2.yml @@ -1,9 +1,9 @@ -name: Guitar2 +name: guitar2 numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 0, gain: 70, release: 72, stereo: 0, sustain: 128} + - id: 87 + parameters: {} + comment: Karplus-Strong - type: envelope id: 2 parameters: {attack: 0, decay: 58, gain: 69, release: 0, stereo: 0, sustain: 0} @@ -13,19 +13,22 @@ units: - type: mulp id: 4 parameters: {stereo: 0} - - type: filter - id: 5 - parameters: {bandpass: 1, frequency: 30, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} - type: delay id: 6 parameters: {damp: 16, dry: 128, feedback: 128, notetracking: 1, pregain: 128, stereo: 0} varargs: [10787] - - type: filter - id: 84 - parameters: {bandpass: 1, frequency: 24, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + - id: 88 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 0, gain: 70, release: 72, stereo: 0, sustain: 128} - type: mulp id: 85 parameters: {stereo: 0} + - id: 89 + parameters: {} + comment: Output - type: pan id: 86 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/SY/nylon guitar.yml b/tracker/presets/SY/nylon-guitar.yml similarity index 77% rename from tracker/presets/SY/nylon guitar.yml rename to tracker/presets/SY/nylon-guitar.yml index a7db30a..2d3ecc5 100644 --- a/tracker/presets/SY/nylon guitar.yml +++ b/tracker/presets/SY/nylon-guitar.yml @@ -1,9 +1,9 @@ -name: Guitar +name: nylon-guitar numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 0, decay: 0, gain: 128, release: 64, stereo: 0, sustain: 128} + - id: 90 + parameters: {} + comment: Karplus-Strong - type: envelope id: 2 parameters: {attack: 0, decay: 58, gain: 128, release: 0, stereo: 0, sustain: 0} @@ -15,17 +15,26 @@ units: parameters: {stereo: 0} - type: filter id: 5 - parameters: {bandpass: 1, frequency: 48, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 1, frequency: 48, highpass: 1, lowpass: 1, resonance: 128, stereo: 0} - type: delay id: 6 parameters: {damp: 48, dry: 128, feedback: 126, notetracking: 1, pregain: 128, stereo: 0} varargs: [10787] + - id: 91 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 0, decay: 0, gain: 128, release: 64, stereo: 0, sustain: 128} - type: mulp id: 87 parameters: {stereo: 0} + - id: 92 + parameters: {} + comment: Filter & output - type: filter id: 88 - parameters: {bandpass: 0, frequency: 96, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + parameters: {bandpass: 0, frequency: 96, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: pan id: 89 parameters: {panning: 64, stereo: 0} diff --git a/tracker/presets/SY/strangeland.yml b/tracker/presets/SY/strangeland.yml index ddc8b9a..b5ed04f 100644 --- a/tracker/presets/SY/strangeland.yml +++ b/tracker/presets/SY/strangeland.yml @@ -1,21 +1,9 @@ -name: Strangeland -numvoices: 2 +name: strangeland +numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 32, decay: 88, gain: 128, release: 89, stereo: 0, sustain: 64} - - type: oscillator - id: 2 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 38, type: 0} - - type: send - id: 3 - parameters: {amount: 72, port: 0, sendpop: 1, target: 14} - - type: oscillator - id: 5 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 64, shape: 64, stereo: 0, transpose: 32, type: 0} - - type: send - id: 6 - parameters: {amount: 72, port: 0, sendpop: 1, target: 16} + - id: 247 + parameters: {} + comment: Main oscillators - type: oscillator id: 242 parameters: {color: 2, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 2} @@ -31,27 +19,51 @@ units: - type: addp id: 12 parameters: {stereo: 0} + - id: 246 + parameters: {} + comment: Filters - type: push id: 13 parameters: {stereo: 0} + - type: oscillator + id: 2 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 38, type: 0} + - type: send + id: 3 + parameters: {amount: 72, port: 0, sendpop: 1, target: 14} - type: filter id: 14 - parameters: {bandpass: 0, frequency: 96, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 96, stereo: 0} + parameters: {bandpass: 0, frequency: 96, highpass: 1, lowpass: 0, resonance: 96, stereo: 0} - type: xch id: 15 parameters: {stereo: 0} + - type: oscillator + id: 5 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 64, shape: 64, stereo: 0, transpose: 32, type: 0} + - type: send + id: 6 + parameters: {amount: 72, port: 0, sendpop: 1, target: 16} - type: filter id: 16 - parameters: {bandpass: 1, frequency: 52, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 112, stereo: 0} + parameters: {bandpass: 1, frequency: 52, highpass: 0, lowpass: 0, resonance: 112, stereo: 0} - type: addp id: 17 parameters: {stereo: 0} - - type: filter - id: 18 - parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0} + - id: 245 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 32, decay: 88, gain: 128, release: 89, stereo: 0, sustain: 64} - type: mulp id: 19 parameters: {stereo: 0} + - id: 244 + parameters: {} + comment: Effects & output + - type: filter + id: 18 + parameters: {bandpass: 0, frequency: 48, highpass: 0, lowpass: 1, resonance: 128, stereo: 0} - type: delay id: 20 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/SY/synastasia.yml b/tracker/presets/SY/synastasia.yml index 2c8f761..ae4d5da 100644 --- a/tracker/presets/SY/synastasia.yml +++ b/tracker/presets/SY/synastasia.yml @@ -1,36 +1,39 @@ -name: Synastasia +name: synastasia numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 64, decay: 70, gain: 128, release: 88, stereo: 0, sustain: 70} + - id: 199 + parameters: {} + comment: Modulations + - type: oscillator + id: 5 + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 73, type: 0} + - type: send + id: 193 + parameters: {amount: 56, port: 3, sendpop: 0, target: 13} + - type: send + id: 6 + parameters: {amount: 56, port: 1, sendpop: 1, target: 13} - type: oscillator id: 2 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 69, type: 0} - type: send id: 3 parameters: {amount: 72, port: 1, sendpop: 1, target: 12} - - type: oscillator - id: 5 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 73, type: 0} - - type: send - id: 6 - parameters: {amount: 56, port: 1, sendpop: 0, target: 13} - - type: send - id: 193 - parameters: {amount: 56, port: 3, sendpop: 1, target: 13} - type: oscillator id: 195 parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 77, type: 0} - type: send id: 10 parameters: {amount: 72, port: 1, sendpop: 1, target: 14} - - type: oscillator - id: 12 - parameters: {color: 0, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} + - id: 198 + parameters: {} + comment: Main oscillators - type: oscillator id: 13 parameters: {color: 0, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} + - type: oscillator + id: 12 + parameters: {color: 0, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} - type: oscillator id: 14 parameters: {color: 0, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -40,12 +43,21 @@ units: - type: addp id: 16 parameters: {stereo: 0} - - type: filter - id: 17 - parameters: {bandpass: 0, frequency: 104, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 96, stereo: 0} + - id: 197 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 64, decay: 70, gain: 128, release: 88, stereo: 0, sustain: 70} - type: mulp id: 18 parameters: {stereo: 0} + - id: 196 + parameters: {} + comment: Effects & output + - type: filter + id: 17 + parameters: {bandpass: 0, frequency: 104, highpass: 0, lowpass: 1, resonance: 96, stereo: 0} - type: delay id: 19 parameters: {damp: 0, dry: 64, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/presets/SY/synth.yml b/tracker/presets/SY/synth.yml index 0863e6f..060ae0e 100644 --- a/tracker/presets/SY/synth.yml +++ b/tracker/presets/SY/synth.yml @@ -1,9 +1,9 @@ -name: Synth +name: synth numvoices: 1 units: - - type: envelope - id: 1 - parameters: {attack: 64, decay: 64, gain: 128, release: 64, stereo: 0, sustain: 64} + - id: 75 + parameters: {} + comment: Modulations - type: oscillator id: 2 parameters: {color: 64, detune: 64, gain: 128, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1} @@ -16,15 +16,27 @@ units: - type: send id: 6 parameters: {amount: 81, port: 2, sendpop: 1, target: 73} + - id: 76 + parameters: {} + comment: Main oscillator - type: oscillator id: 73 - parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 8, stereo: 0, transpose: 32, type: 0} + parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 8, stereo: 0, transpose: 28, type: 0} - type: filter id: 74 - parameters: {bandpass: 1, frequency: 32, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 32, stereo: 0} + parameters: {bandpass: 1, frequency: 32, highpass: 1, lowpass: 1, resonance: 32, stereo: 0} + - id: 77 + parameters: {} + comment: Main envelope + - type: envelope + id: 1 + parameters: {attack: 64, decay: 64, gain: 128, release: 64, stereo: 0, sustain: 64} - type: mulp id: 10 parameters: {stereo: 0} + - id: 78 + parameters: {} + comment: Effects & output - type: delay id: 11 parameters: {damp: 64, dry: 128, feedback: 64, notetracking: 2, pregain: 64, stereo: 0} diff --git a/tracker/table.go b/tracker/table.go index 9f78456..28e6335 100644 --- a/tracker/table.go +++ b/tracker/table.go @@ -24,7 +24,7 @@ type ( clear(p Point) set(p Point, value int) - add(rect Rect, delta int) (ok bool) + add(rect Rect, delta int, largestep bool) (ok bool) marshal(rect Rect) (data []byte, ok bool) unmarshalAtCursor(data []byte) (ok bool) unmarshalRange(rect Rect, data []byte) (ok bool) @@ -135,9 +135,9 @@ func (v Table) Fill(value int) { } } -func (v Table) Add(delta int) { +func (v Table) Add(delta int, largeStep bool) { defer v.change("Add", MinorChange)() - if !v.add(v.Range(), delta) { + if !v.add(v.Range(), delta, largeStep) { v.cancel() } } @@ -227,7 +227,10 @@ func (m *Order) set(p Point, value int) { m.d.Song.Score.Tracks[p.X].Order.Set(p.Y, value) } -func (v *Order) add(rect Rect, delta int) (ok bool) { +func (v *Order) add(rect Rect, delta int, largeStep bool) (ok bool) { + if largeStep { + delta *= 8 + } for x := rect.TopLeft.X; x <= rect.BottomRight.X; x++ { for y := rect.TopLeft.Y; y <= rect.BottomRight.Y; y++ { if !v.add1(Point{x, y}, delta) { @@ -440,7 +443,10 @@ func (v *Notes) set(p Point, value int) { v.SetValue(p, byte(value)) } -func (v *Notes) add(rect Rect, delta int) (ok bool) { +func (v *Notes) add(rect Rect, delta int, largeStep bool) (ok bool) { + if largeStep { + delta *= 12 + } for x := rect.BottomRight.X; x >= rect.TopLeft.X; x-- { for y := rect.BottomRight.Y; y >= rect.TopLeft.Y; y-- { if x < 0 || x >= len(v.d.Song.Score.Tracks) || y < 0 || y >= v.d.Song.Score.LengthInRows() { diff --git a/vm/bytecode.go b/vm/bytecode.go index 3fac621..01361e0 100644 --- a/vm/bytecode.go +++ b/vm/bytecode.go @@ -144,10 +144,10 @@ func NewBytecode(patch sointu.Patch, featureSet FeatureSet, bpm int) (*Bytecode, if unit.Parameters["highpass"] == 1 { flags += 0x10 } - if unit.Parameters["negbandpass"] == 1 { + if unit.Parameters["bandpass"] == -1 { flags += 0x08 } - if unit.Parameters["neghighpass"] == 1 { + if unit.Parameters["highpass"] == -1 { flags += 0x04 } b.op(opcode + p["stereo"]) diff --git a/vm/compiler/templates/amd64-386/effects.asm b/vm/compiler/templates/amd64-386/effects.asm index 9512eb2..1b2f608 100644 --- a/vm/compiler/templates/amd64-386/effects.asm +++ b/vm/compiler/templates/amd64-386/effects.asm @@ -182,13 +182,13 @@ su_op_filter_skipbandpass: fadd dword [{{.WRK}}+4] su_op_filter_skiphighpass: {{- end}} -{{- if .SupportsParamValue "filter" "negbandpass" 1}} +{{- if .SupportsParamValue "filter" "bandpass" -1}} test al, byte 0x08 jz short su_op_filter_skipnegbandpass fsub dword [{{.WRK}}+8] su_op_filter_skipnegbandpass: {{- end}} -{{- if .SupportsParamValue "filter" "neghighpass" 1}} +{{- if .SupportsParamValue "filter" "highpass" -1}} test al, byte 0x04 jz short su_op_filter_skipneghighpass fsub dword [{{.WRK}}+4] diff --git a/vm/compiler/templates/wasm/effects.wat b/vm/compiler/templates/wasm/effects.wat index b093656..27d9fd2 100644 --- a/vm/compiler/templates/wasm/effects.wat +++ b/vm/compiler/templates/wasm/effects.wat @@ -186,12 +186,12 @@ (local.set $retval (f32.add (local.get $retval) (local.get $high))) )) {{- end}} -{{- if .SupportsParamValue "filter" "negbandpass" 1}} +{{- if .SupportsParamValue "filter" "bandpass" -1}} (if (i32.and (local.get $flags) (i32.const 0x08)) (then (local.set $retval (f32.sub (local.get $retval) (local.get $band))) )) {{- end}} -{{- if .SupportsParamValue "filter" "neghighpass" 1}} +{{- if .SupportsParamValue "filter" "highpass" -1}} (if (i32.and (local.get $flags) (i32.const 0x04)) (then (local.set $retval (f32.sub (local.get $retval) (local.get $high))) )) diff --git a/vm/go_synth_test.go b/vm/go_synth_test.go index 5bbcf25..04d62f8 100644 --- a/vm/go_synth_test.go +++ b/vm/go_synth_test.go @@ -97,7 +97,7 @@ var defaultUnits = map[string]sointu.Unit{ "clip": {Type: "clip", Parameters: map[string]int{"stereo": 0}}, "hold": {Type: "hold", Parameters: map[string]int{"stereo": 0, "holdfreq": 64}}, "distort": {Type: "distort", Parameters: map[string]int{"stereo": 0, "drive": 64}}, - "filter": {Type: "filter", Parameters: map[string]int{"stereo": 0, "frequency": 64, "resonance": 64, "lowpass": 1, "bandpass": 0, "highpass": 0, "negbandpass": 0, "neghighpass": 0}}, + "filter": {Type: "filter", Parameters: map[string]int{"stereo": 0, "frequency": 64, "resonance": 64, "lowpass": 1, "bandpass": 0, "highpass": 0}}, "out": {Type: "out", Parameters: map[string]int{"stereo": 1, "gain": 64}}, "outaux": {Type: "outaux", Parameters: map[string]int{"stereo": 1, "outgain": 64, "auxgain": 64}}, "aux": {Type: "aux", Parameters: map[string]int{"stereo": 1, "gain": 64, "channel": 2}},