mirror of
https://github.com/vsariola/sointu.git
synced 2026-04-01 03:33:12 -04:00
fix: display correct exponent in tracker, switch directions, i.e. meaning of exp 0 <-> 128
This commit is contained in:
1
build_vst_plugin_native.ps1
Normal file
1
build_vst_plugin_native.ps1
Normal file
@ -0,0 +1 @@
|
|||||||
|
go build -buildmode=c-shared -tags="plugin","native" -o sointu-vsti.dll .\cmd\sointu-vsti\
|
||||||
8
patch.go
8
patch.go
@ -257,6 +257,10 @@ func engineeringTime(sec float64) (string, string) {
|
|||||||
return fmt.Sprintf("%.2f", sec), "s"
|
return fmt.Sprintf("%.2f", sec), "s"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func envelopExpDisplayFunc(v int) (string, string) {
|
||||||
|
return fmt.Sprintf("= %.3f", math.Pow(2, 2*float64(64-v)/32)), ""
|
||||||
|
}
|
||||||
|
|
||||||
func formatFloat(f float64) string {
|
func formatFloat(f float64) string {
|
||||||
return strconv.FormatFloat(f, 'f', -1, 64)
|
return strconv.FormatFloat(f, 'f', -1, 64)
|
||||||
}
|
}
|
||||||
@ -469,7 +473,3 @@ 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)
|
return 0, 0, fmt.Errorf("could not find a unit with id %v", id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func envelopExpDisplayFunc(v int) (string, string) {
|
|
||||||
return fmt.Sprintf("= %.3f", math.Pow(2, float64(v-64)/32)), ""
|
|
||||||
}
|
|
||||||
|
|||||||
@ -151,7 +151,7 @@ su_op_envelopexp_applyexp:
|
|||||||
fld dword [r10] ; stack: [ expo, x' ]
|
fld dword [r10] ; stack: [ expo, x' ]
|
||||||
{{.Prepare (.Float 0.5)}}
|
{{.Prepare (.Float 0.5)}}
|
||||||
fld dword [{{.Use (.Float 0.5)}}] ; stack: [ 0.5, expo, x' ]
|
fld dword [{{.Use (.Float 0.5)}}] ; stack: [ 0.5, expo, x' ]
|
||||||
fsubp st1, st0 ; stack: [ expo-0.5, x' ]
|
fsubrp st1, st0 ; stack: [ expo-0.5, x' ]
|
||||||
{{.Prepare (.Int 6)}}
|
{{.Prepare (.Int 6)}}
|
||||||
fimul dword [{{.Use (.Int 6)}}] ; stack: [ 6*(expo-0.5), x' ]
|
fimul dword [{{.Use (.Int 6)}}] ; stack: [ 6*(expo-0.5), x' ]
|
||||||
{{.Call "su_power"}} ; stack: [ kappa, x' ]
|
{{.Call "su_power"}} ; stack: [ kappa, x' ]
|
||||||
|
|||||||
Reference in New Issue
Block a user