Csound Csound-dev Csound-tekno Search About

Freq/Tempo Strangeness

Date1998-08-24 14:09
Fromdavid first
SubjectFreq/Tempo Strangeness
Hi -

Can someone explain the following phenomenon?

When I run the orc/sco below at any of the following tempos - 99, 100, 105,
106, 199, 200, 205 (and probably others) the kcps linseg glissandos in
instruments 3 & 4 resolve to their proper (non-beating) pitches. But if I set
the tempo at 98, 101-104, 107, 108, 201, or 207 the pitches _don't_ resolve
properly and varying degrees of beating are heard.

On the other hand, if I take out the linsegs and run the orc/sco with either
set of pitches found in the kcps linsegs then the pitch resolution is fine and
no beating is heard.

Furthermore, there is at least one pair of kcps linseg pitches for which I
have yet to find a "suitable" tempo (618.75 - 594).

What is this hidden (at least to me so far) relationship between
tempo/pitch/linsegs? Could someone please take a minute to check this out?

d1st

Tested w/ both 3.47 & 3.48 beta Mills/PPC
9600/233
OS 8.1
128 MB ram 
10 MB allocated to application
-----------------------------------------------------------------------

sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

                		instr 1
kamp1 linseg p4, p3, p4
kamp2 linseg p4*0, p3, p4*0
kcps  linseg p5, p3, p5
aout1  oscil  kamp1, kcps, 1
aout2  oscil  kamp2, kcps, 1
	outs 	aout1, aout2
						endin

						instr 2
kamp1 linseg p4, p3, p4
kamp2 linseg p4*0, p3, p4*0
kcps  linseg p5, p3, p5
aout1  oscil  kamp2, kcps, 1
aout2  oscil  kamp1, kcps, 1
	outs 	aout1, aout2
						endin

						instr 3
kamp1 linseg p4, p3, p4
kamp2 linseg p4*0, p3, p4*0
kcps  linseg 275, p3*1/8, 275, p3*1/8, 264, p3*1/8, 264
aout1  oscil  kamp2, kcps, 2
aout2  oscil  kamp1, kcps, 2
	outs 	aout1, aout2
						endin

						instr 4
kamp1 linseg p4, p3, p4
kamp2 linseg p4*0, p3, p4*0
kcps  linseg 412.5, p3*1/8, 412.5, p3*1/8, 396, p3*1/8, 396
aout1  oscil  kamp2, kcps, 3
aout2  oscil  kamp1, kcps, 3
	outs 	aout1, aout2
						endin

						instr 5
kamp1 linseg p4, p3, p4
kamp2 linseg p4*0, p3, p4*0
kcps  linseg p5, p3, p5
aout1  oscil  kamp1, kcps, 4
aout2  oscil  kamp2, kcps, 4
	outs 	aout1, aout2
					    endin																																										
																									instr 7
kamp1 linseg p4, p3, p4
kamp2 linseg p4*0, p3, p4*0
kcps  linseg p5, p3, p5
aout1  oscil  kamp1, kcps, 3
aout2  oscil  kamp2, kcps, 3
	outs 	aout1, aout2
						endin

-----------------------------------------------------------------------
f1	0	8192	10	1 .5 .333 .25 .20  .1667 0 .125 .1111 .1 0 .0833 0 0 .05333 .05
f2	0	8192	10	1 .5 .333 .25   0  .1667 0 .125 .1111  0 0 .0833 0 0  0     .05
f3	0	8192	10	1 .5 .000 .25   0  .0000 0 .125  0  0 0 .0000 0 0  0        .05
f4	0	8192	10	1 .5 .333 .25   0  .1667 0 .125  0 .1 0 .0833 0 0  0        .05
f5	0	8192	10	1 .5 .000 .25   0  .0000 0 .125  0 .1 0 .0000 0 0  0        .05
f6	0	8192	10	1 .5 .333 .25   0  .1667 0 .125  0 .1 0 .0833 0 0  0        .05
t	0	100
	
	
	i1	0	32	1000	55 ;1/1R
	i2	0	32	1000	110 ;1/1L
	i1	0	32	1000	220 ;1/1R
	i3	0	32	1000	
	i1	0	32	1000	330 ;3/2R
	i4	0	32	1000	
	i5	0	32	1000	495 ;9/8R
	i7	0	32	1000	742.5 ;27/16R

Date1998-08-24 18:27
FromErik Spjut
SubjectRe: Freq/Tempo Strangeness
I don't have time to check out your problem but I am 99.99% certain it will
disappear if you set kr=sr. The %@$$*&^$%#^ control frames always end
places other than the exact time you specify UNLESS your duration is an
EXACT multiple of the control frame period. Hence linseg's, expseg's, and
any other useful signal ends at the wrong place. My guess is that your
tempo's give you the exact relationship when things work.

-------------------------------------------------------------------------------
Erik Spjut (pronounce ju as long u or yew) - Associate Professor of Engineering
and  Associate Director for Engineering Computing,  Center for Design Education
Harvey Mudd College, Claremont, CA 91711-5990  USA
Erik_Spjut@hmc.edu      Ph & Voice mail (909) 607-3890      Fax (909) 621-8967