mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-14 02:54:37 -04:00
reorganize things into different packages
This commit is contained in:
28
vm/compiler/compiler_macros.go
Normal file
28
vm/compiler/compiler_macros.go
Normal file
@ -0,0 +1,28 @@
|
||||
package compiler
|
||||
|
||||
import (
|
||||
"github.com/vsariola/sointu"
|
||||
)
|
||||
|
||||
type CompilerMacros struct {
|
||||
Clip bool
|
||||
Library bool
|
||||
|
||||
Sine int // TODO: how can we elegantly access global constants in template, without wrapping each one by one
|
||||
Trisaw int
|
||||
Pulse int
|
||||
Gate int
|
||||
Sample int
|
||||
Compiler
|
||||
}
|
||||
|
||||
func NewCompilerMacros(c Compiler) *CompilerMacros {
|
||||
return &CompilerMacros{
|
||||
Sine: sointu.Sine,
|
||||
Trisaw: sointu.Trisaw,
|
||||
Pulse: sointu.Pulse,
|
||||
Gate: sointu.Gate,
|
||||
Sample: sointu.Sample,
|
||||
Compiler: c,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user