Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix timeinstk and timeinsts to match timek and times #1614

Merged
merged 1 commit into from Jul 30, 2022

Conversation

gesellkammer
Copy link
Contributor

This PR adapts timeinstk and timeinsts to actually return the elapsed cycles and elapsed time of an event and makes them conform to the global time given by timek and times.

At the moment timeinstk and timeinsts differ from timek by one cycle, even if the instrument is run at logical time 0.

instr 1
	kcycle = timek()
	kcycleinstr = timeinstk()
	println "kcycle: %d, kcycleinstr: %d", kcycle, kcycleinstr
	ktime = times()
	ktimeinstr = timeinsts()
	println "ktime: %f, ktypeinstr: %f", ktime, ktimeinstr
	turnoff
endin

schedule 1, 0, 1

The manual page for timeinstk should also be modified to reflect this change. The same modification can be applied to the develop branch (csound7)

@vlazzarini vlazzarini merged commit 7f8bff9 into csound:csound6 Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants