Hello list,
; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac ; -iadc -d ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: ; -o scans.wav -W ;;; for file output any platform sr = 44100 ksmps = 32 nchnls = 1instr 1
a0 = 0
; scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
scanu 1, .01, 6, 2, 3, 4, 5, 2, .1, .1, -.01, .1, .5, 0, 0, a0, 1, 2
;ar scans kamp, kfreq, ifntraj, id
a1 scans ampdb(p5), cpsmidinn(p4), 7, 2
ihold
outs a1,a1
endin
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 “string-128.matrxB” ; Spring matrices
f4 0 128 -7 0 128 0 ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories
; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn’t work. (csound just exits immediately).
I need the note to be held to simulate rehammering the string without resetting the state of the masses.
I was going to do some hack like this:
while indx < 128 do
k1,k2 xscanmap 2, 1, 1, indx
kvel table indx,1
tablew k1+kvel,indx,1
tablew k2,indx,6
od
to add the hammer waveform over the current state of the vibrating system but I can’t do that without the note being held.
Thank you in advance.
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here