Csound Csound-dev Csound-tekno Search About

ping-pong

Date2015-11-09 14:23
FromEnrico Francioni
Subjectping-pong
Hello to all, 

I would like to make a motion to "ping-pong" signal in a quadraphonic system, does anyone 
have any idea? 
The movement signal (with the variables kx and ky, then passed to "space") it should be 
reported in the Controller (Cartesian plane) which is the representation of the real acoustic 
space. 

Carry a patch under my test. It could be a starting point? 

Thank you all for any suggestions, 
Enrico 


*** 






; header 
sr	=	44100 
ksmps	=	64 
nchnls	=	4 
0dbfs	=	1 

;=========================================== 
        instr 1 ; SINE-PONG 
;=========================================== 

asig	rand	.7 

kvelX	=	.25 
kvelY	=	.3 
kx	oscili	1, kvelX, 1 
ky	oscili	1, kvelY, 1 

a1, a2, a3, a4 space	asig, 0, 0, 0, kx, ky 

ir	=	2	
kx_5	=	(kx + (ir * .5)) / ir 
ky_5	=	(ky + (ir * .5)) / ir 

                outvalue	"xd5out", kx	; Display 
                outvalue	"yd5out", ky	; Display 
                outvalue	"pingx", kx_5	; Controller 
                outvalue	"pongy", ky_5	; Controller 

outch	1, a1, 2, a2, 3, a3, 4, a4 
                
                endin 



f1	0	1024	10	1 
i1    0    -1 
e 




***



...A further step could be this: 







; header 
sr	=	44100 
ksmps	=	64 
nchnls_i	=	1 
nchnls	=	4 
0dbfs	=	1 

;=========================================== 
        instr 1	; PING-PONG 
;=========================================== 

asig	rand	.7 

kvelX	line	rnd(.4), p3, rnd(.5)+.4 
kvelY	line	rnd(.5)+.4, p3, rnd(.4) 

kx	oscili	1, kvelX, 1 
ky	oscili	1, kvelY, 1 


a1, a2, a3, a4 space	asig, 0, 0, 0, kx, ky 

ir	=	2	
kx_5	=	(kx + (ir * .5)) / ir 
ky_5	=	(ky + (ir * .5)) / ir 

                outvalue	"xd5out", kx 
                outvalue	"yd5out", ky 
                outvalue	"pingx", kx_5 
                outvalue	"pongy", ky_5 

outch	1, a1, 2, a2, 3, a3, 4, a4 
                
                endin 



f1	0	1024	7	-1	512	1	512	-1 
i1 0 60	
e 3600 




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