[Cs-dev] Iterate score during performance?
Date | 2014-10-08 17:45 |
From | Michael Gogins |
Subject | [Cs-dev] Iterate score during performance? |
Attachments | None None |
Is there a way, using the Csound API, after Csound has started, to iterate through all score events, beginning with the very first event and ending with the very last event, returning the values of each event's fields? One use case is to draw a piano roll display of the score being performed, e.g. on an HTML canvas. I understand that this would work only for already scheduled events. I also understand that only the first 3 fields have a fixed meaning. Thanks, |
Date | 2014-10-08 17:59 |
From | Steven Yi |
Subject | Re: [Cs-dev] Iterate score during performance? |
My first instinct is to say no, at least from what I remember last time looking through that area of code. Pre-scheduled events end up being processed and sorted, then written to disk. At run time, the file is open and events are read one event at a time, essentially acting like a priority queue. Because the implementation depends on reading from a file, it's not in memory and thus not something one can iterate. For realtime-events, even those that come in that are scheduled for the future, those end up on a different, in-memory queue. However, I don't see any API methods for iterating those events either. However, one possibility may be to add a Cscore callback. That should actually work as a means to iterate through events as I think that gets called after reading and processing score data, but before the sorted data gets written to disk for use at runtime. Perhaps that's worth investigating, and Jim Hearon wrote a couple of articles on using Cscore callbacks. [1] [2] [1] - http://www.csounds.com/journal/issue16/InterfacingCscore.html [2] - http://www.csounds.com/journal/issue17/InterfacingCscore2.html On Wed, Oct 8, 2014 at 12:45 PM, Michael Gogins |
Date | 2014-10-08 18:08 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Iterate score during performance? |
Attachments | None None |
Thanks for the info, I'll check Jim's articles. Best, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Oct 8, 2014 at 12:59 PM, Steven Yi <stevenyi@gmail.com> wrote: My first instinct is to say no, at least from what I remember last |
Date | 2014-10-08 19:11 |
From | jpff |
Subject | Re: [Cs-dev] Iterate score during performance? |
On Wed, 8 Oct 2014, Steven Yi wrote: > My first instinct is to say no, at least from what I remember last > time looking through that area of code. Pre-scheduled events end up > being processed and sorted, then written to disk. At run time, the > file is open and events are read one event at a time, essentially > acting like a priority queue. Because the implementation depends on > reading from a file, it's not in memory and thus not something one can > iterate. Not in cs6. The sorted score is held in memory in the CORFIL structure. There are no files used in csound except output audio and fout. ==John ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-10-08 19:28 |
From | Steven Yi |
Subject | Re: [Cs-dev] Iterate score during performance? |
Ah, thanks for the correction! Just to clarify, the score data for the initial score events is still written out as text to the CORFIL, and read back in line by line as previously? On Wed, Oct 8, 2014 at 2:11 PM, jpff |
Date | 2014-10-08 19:40 |
From | jpff |
Subject | Re: [Cs-dev] Iterate score during performance? |
On Wed, 8 Oct 2014, Steven Yi wrote: > Ah, thanks for the correction! Just to clarify, the score data for > the initial score events is still written out as text to the CORFIL, > and read back in line by line as previously? > Yes; in Engine/scsort.c and associated files ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-10-08 19:45 |
From | Steven Yi |
Subject | Re: [Cs-dev] Iterate score during performance? |
Fantastic, thanks again! On Wed, Oct 8, 2014 at 2:40 PM, jpff |