ver.90c7dbb
Tags: music software

sporth

stack-based audio programming language inspire by Forth.

The DSP library sporth uses is Soundpipe

Links

Example

# Based off of https://paulbatchelor.github.io/proj/cook/recipes/waiting_room/
# plays a suspended second chord

_sine 8192 gen_sine
_root var								# midi note number for the root of the chord
67 _root set

# voice 1 (maj 2nd)
  (_root get 2 +) mtof 0.3 8 3
  15 inv 1 0.2 _sine osc
  0.1 0.6 biscale gbuzz
  0.5 0.8 delay

# voice 2 (root)
  (_root get) mtof 0.3 8 3
  10 inv 1 0 _sine osc
  0.1 0.6 biscale gbuzz 
  0.5 1 delay

+ 										# sum1 = voice 1 + voice 2

# voice 3 (per. 5th)
  (_root get 7 +) mtof 0.3 8 3
  12 inv 1 0.75 _sine osc
  0.1 0.6 biscale gbuzz
  0.5 0.6 delay
							
+										# sum2 = sum1 + voice 3
							
-8 ampdb * 400 buthp					# attenuate sum2 and run through HP filter