Csound Csound-dev Csound-tekno Search About

[Cs-dev] [ csound-Bugs-3197199 ] Date opcode not re-initializing?

Date2011-03-04 14:34
From"SourceForge.net"
Subject[Cs-dev] [ csound-Bugs-3197199 ] Date opcode not re-initializing?
Bugs item #3197199, was opened at 2011-03-02 12:02
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3197199&group_id=81968

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Opcodes
Group: csound5
Status: Open
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: John ffitch (jpff)
Summary: Date opcode not re-initializing?

Initial Comment:
Hi,

The folowing instr, when started, prints always the same value.

Have red Bug ID 3149314 (closed status) but still have problem with csound-FLOAT 5.13.0 compiled on UBUNTU 10.04.

(It is OK with csound DOUBLE, and reported as working on windows too)

Cheers,
Rene



-odac -b1024 -B2048 -+rtaudio=alsa



instr	1	;AUTO UPDATE - TRIGGERS INSTR 2
	ktrig	metro		1
		schedkwhen	ktrig, 0, 0, 2, 0, 0.01
endin

instr	2	
	idate	date			;READ DATE SINCE 1ST JANUARY 1970 IN SECONDS
		print idate
endin


i 1 0 30



----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2011-03-04 14:34

Message:
My suggestion

Remove 'date' opcode from csound float and update the documentation.
René

----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2011-03-04 10:16

Message:
I understand the problem.  The current time is such that the precision of
floats is too small to register seconds.  The solution is either to use
doubles (!) and remove opcode from float version as it cannot work, or to
rebase the time to something more recent, such as 1 Jan 2000 or 1 jan 2010

I woul;d appreciate suggestions.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2011-03-03 13:39

Message:
My output with csound-float:
idate don't change, dates is ok
no error message.

Rene

PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.13 (float samples) Jan 17 2011
libsndfile-1.0.21
UnifiedCSD:  date.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/csound-Cgaxi8.orc
scorename: /tmp/csound-pw86Ly.sco
RAWWAVE_PATH: /home/moi/csound5-f/Opcodes/stk/rawwaves/
rtmidi: PortMIDI module enabled
rtaudio: ALSA module enabled
orch compiler:
	instr	1	
	instr	2	
Elapsed time at end of orchestra compile: real: 0.011s, CPU: 0.000s
sorting score ...
	... done
Elapsed time at end of score sort: real: 0.011s, CPU: 0.000s
Csound version 5.13 (float samples) Jan 17 2011
0dBFS level = 32768.0
orch now loaded
audio buffered in 1024 sample-frame blocks
ALSA output: total buffer size: 2048, period size: 1024
writing 4096-byte blks of shorts to dac
SECTION 1:
new alloc for instr 1:
  rtevent:	   T  0.000 TT  0.000 M:      0.0      0.0
new alloc for instr 2:
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:53 2011
  rtevent:	   T  1.001 TT  1.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:54 2011
  rtevent:	   T  2.001 TT  2.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:55 2011
  rtevent:	   T  3.001 TT  3.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:56 2011
  rtevent:	   T  4.001 TT  4.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:57 2011
  rtevent:	   T  5.001 TT  5.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:58 2011
  rtevent:	   T  6.001 TT  6.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:30:59 2011
  rtevent:	   T  7.001 TT  7.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:00 2011
  rtevent:	   T  8.001 TT  8.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:01 2011
  rtevent:	   T  9.001 TT  9.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:02 2011
  rtevent:	   T 10.001 TT 10.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:03 2011
  rtevent:	   T 11.001 TT 11.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:04 2011
  rtevent:	   T 12.001 TT 12.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:05 2011
  rtevent:	   T 13.001 TT 13.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:06 2011
  rtevent:	   T 14.001 TT 14.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:07 2011
  rtevent:	   T 15.001 TT 15.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:08 2011
  rtevent:	   T 16.001 TT 16.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:09 2011
  rtevent:	   T 17.001 TT 17.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:10 2011
  rtevent:	   T 18.001 TT 18.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:11 2011
  rtevent:	   T 19.001 TT 19.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:12 2011
  rtevent:	   T 20.001 TT 20.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:13 2011
  rtevent:	   T 21.001 TT 21.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:14 2011
  rtevent:	   T 22.001 TT 22.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:15 2011
  rtevent:	   T 23.001 TT 23.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:16 2011
  rtevent:	   T 24.001 TT 24.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:17 2011
  rtevent:	   T 25.001 TT 25.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:18 2011
  rtevent:	   T 26.001 TT 26.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:19 2011
  rtevent:	   T 27.001 TT 27.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:20 2011
  rtevent:	   T 28.001 TT 28.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:21 2011
  rtevent:	   T 29.001 TT 29.001 M:      0.0      0.0
instr 2:  idate = 1299159040.000
Thu Mar  3 14:31:22 2011
B  0.000 .. 30.000 T 30.000 TT 30.000 M:      0.0      0.0
Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.		   overall amps:      0.0      0.0
	   overall samples out of range:        0        0
0 errors in performance
Elapsed time at end of performance: real: 30.001s, CPU: 1.060s
1407 4096-byte soundblks of shorts written to dac




----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2011-03-03 10:43

Message:
I tried on OpenSuse on a floats mchine and it was OK,  Are you getting hit
by precision?  Could you add the outout you get?


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2011-03-03 10:24

Message:
The opcode dates is working well on both csound float and double.
Rene

----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2011-03-02 17:15

Message:
I cannot see anything in the code that suggests any differences.  Can you
try using dates as well to see if that works?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3197199&group_id=81968

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-d