shithub: neindaw

Download patch

ref: 52c88085238abb4e32ce61fbc8a463fc5c8a2cb9
parent: 89e5b69e1f1cc15c816e3619368738df3f807fdc
author: Sigrid Haflínudóttir <[email protected]>
date: Tue Dec 31 07:03:40 EST 2019

call clear() on seek to 0, update example in the readme

--- a/README.md
+++ b/README.md
@@ -28,14 +28,11 @@
 # raise frequency to 160Hz
 % echo 160 > K*/a/f*/ctl
 
-# pipe sound to /dev/audio in background
-% audio/pcmconv -i f32c2r44100 < data > /dev/audio &
+# pipe sound to /dev/audio in background, it should start kicking
+% while() { audio/pcmconv -i f32c2r44100 -l 65536 < data } > /dev/audio &
 
-# start toggling the gate to get the kicks
-% while() { echo 1; sleep 0.2; echo 0; sleep 0.2 } > K*/control/gate/ctl &
-
 # set B oscillator parameters and enable it
-% echo 600 > K*/b/frequency/ctl
+% echo 400 > K*/b/frequency/ctl
 % echo 0.001 > K*/b/attack/ctl
 % echo 1 > K*/control/b*/ctl
 ```
@@ -73,3 +70,4 @@
  * add some way to read and write the whole configuration of an instance
    in an easy way, so instances can be cloned, or configs saved to disk
    as presets
+ * make all of that compile and run on Linux as well?
--- a/fs.c
+++ b/fs.c
@@ -170,6 +170,8 @@
 		break;
 	case Xdspdata:
 		o = auxtype2obj(&a->type);
+		if (r->ifcall.offset == 0) /* clear every time the offset is reset */
+			dspf->clear(o->dsp.dsp);
 		framesz = o->dsp.numout * sizeof(*p);
 		n = r->ifcall.count;
 		for (p = (FAUSTFLOAT*)r->ofcall.data; n >= framesz;) {