Csound Csound-dev Csound-tekno Search About

scans cps?

Date2006-05-14 00:07
FromJonathan Murphy
Subjectscans cps?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Can anyone explain why the following .csd is broken (Csound tidy up: 
Floating point exception), but works with cpsmidib (see commented
region, the only other change being the replacement of "kvel" with 
"ivel". Please note that it has nothing to do with i/kvel, k-rate 
control of amplitude is working with cpsmidib)? Additionally, why does
cpsmidib still bend notes, even with an irange value of 0. Finally,
what are sane ranges for the values of kmass, kstif, kcentr, kdamp,
and why (taking by way of an example the tables used below (snatched
from Dr Boulanger's toot, if memory serves))?




;-+rtaudio=jack -+rtmidi=alsa  -+jack_client="sine-scanned" -Mhw:1,0 -d -m0 --sched --expression-opt -b128 -B512 -o dac:alsa_pcm:playback_
- -+rtaudio=alsa -+rtmidi=alsa -Mhw:1,0 -odevaudio -d -m0 --sched --expression-opt -b128 -B512




sr=48000
ksmps=64
nchnls=1

giinit  ftgen 1, 0, 128, 7, 0, 64, 1, 64, 0
gimass  ftgen 2, 0, 128, -7, 1, 128, 1
gistif  ftgen 3, 0, 16384, -23, "circularstring-128"
gicent  ftgen 4, 0, 128, -7, 0, 128, 2
gidamp  ftgen 5, 0, 128, -7, 1, 128, 1
givel   ftgen 6, 0, 128, -7, 0, 128, 0
giscans ftgen 7, 0, 128, -5, .001, 128, 128

giequal ftgen 8, 0, 64, -2, 12, 2, 261.659, 60, 1.00, 1.059, 1.122, 1.189, 1.260, 1.335, 1.414, 1.498, 1.588, 1.682, 1.782, 1.888, 2.000

opcode tunk, kk, k

kfn xin
kkey init 0
kvel init 0
midinoteonkey kkey, kvel
ktrig init 1
kindex = kkey
kcps cpstun ktrig, kindex, kfn
xout kcps, kvel

endop

instr 1

kcps, kvel tunk 8
kaft init 0
midichannelaftertouch kaft, 1, 6144

; kcps cpsmidib 0 
; ivel veloc
; kamp ctrl7 1, 4, 0, 128
; kaft init 0
; midichannelaftertouch kaft, 1, 6144

kenv linsegr 0, 1, 1, 1, 0
ini = 1
irate = 0.01
ifnvel = 6
ifnmass = 2
ifnstif = 3
ifncentr = 4
ifndamp = 5
kmass = 2
kstif = 0.1
kcentr = 0.1
kdamp = -0.01
ileft = 0.1
iright = 0.5
kpos = 0
kstrngth = 0
ain = 0
idisp = 0
id = 2

scanu ini, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id

a1 scans kvel, kcps, 7, 2
a2 = a1*kenv*kaft

kcf ctrl7 1, 3, 1, 1024					  
kq ctrl7 1, 2, 1, 128	                                 
alp lowpass2 a2, kcf, kq, 1

out alp

endin





i1 0 3600 




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 

iD8DBQFEZmbDCibrChMdb1sRAumfAJ9Pw/BLwuqH0PFph+J7St74yfR7JQCfWmNr
h7sn4dfUhx+27c7LHgUQzog=
=0VXR
-----END PGP SIGNATURE-----

Date2006-05-14 09:50
FromIstvan Varga
SubjectRe: scans cps?
AttachmentsNone  

Date2006-05-14 10:44
FromIstvan Varga
SubjectRe: scans cps?
AttachmentsNone