[Csnd] how to determine end of midi track/file with the API
| Date | 2013-02-11 18:57 |
| From | zappfinger |
| Subject | [Csnd] how to determine end of midi track/file with the API |
Is it possible to determine when a midi file is done playing using the csnd API? Richard -- View this message in context: http://csound.1045644.n5.nabble.com/how-to-determine-end-of-midi-track-file-with-the-API-tp5720077.html Sent from the Csound - General mailing list archive at Nabble.com. |
| Date | 2013-02-11 19:18 |
| From | Victor |
| Subject | Re: [Csnd] how to determine end of midi track/file with the API |
You can use -T which means terminate on midi Victor On 11 Feb 2013, at 18:57, zappfinger |
| Date | 2013-02-11 19:23 |
| From | zappfinger |
| Subject | [Csnd] Re: how to determine end of midi track/file with the API |
Found it!
Apparently I can use GetStatus() on the performance for this.
Example in a Python tkinter app:
def playMidi(self, midiFile):
....
self.perf = csnd.CsoundPerformanceThread(self.cs)
self.perf.Play()
self.check()
def check(self):
print self.perf.GetStatus() # prints 0 while playing, 1 when done
playing
self.master.after(50,self.check)
Richard
--
View this message in context: http://csound.1045644.n5.nabble.com/how-to-determine-end-of-midi-track-file-with-the-API-tp5720077p5720078.html
Sent from the Csound - General mailing list archive at Nabble.com.
|
| Date | 2013-07-14 21:23 |
| From | zappfinger |
| Subject | [Csnd] Re: how to determine end of midi track/file with the API |
Coming back to this question: I would like to determine when a midi file is ended /in csound/ and be able to do something - like send an OSC command when this is so. The -T flag will stop the performance at midi end, so I cannot do anything then from csound. Richard -- View this message in context: http://csound.1045644.n5.nabble.com/how-to-determine-end-of-midi-track-file-with-the-API-tp5720077p5725590.html Sent from the Csound - General mailing list archive at Nabble.com. |
| Date | 2013-07-14 21:35 |
| From | Victor Lazzarini |
| Subject | Re: [Csnd] Re: how to determine end of midi track/file with the API |
I don't think there is currently any way of doing this. Maybe you can file a feature request? Victor On 14 Jul 2013, at 21:23, zappfinger wrote: > Coming back to this question: > I would like to determine when a midi file is ended /in csound/ and be able > to do something - like send an OSC command when this is so. > > The -T flag will stop the performance at midi end, so I cannot do anything > then from csound. > > Richard > > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/how-to-determine-end-of-midi-track-file-with-the-API-tp5720077p5725590.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
| Date | 2013-07-14 22:28 |
| From | joachim heintz |
| Subject | Re: [Csnd] Re: how to determine end of midi track/file with the API |
just a thought: does the release opcode receives a "1" in this case? if so, it might be possible to find a (temporary) solution. joachim Am 14.07.2013 22:23, schrieb zappfinger: > Coming back to this question: > I would like to determine when a midi file is ended /in csound/ and be able > to do something - like send an OSC command when this is so. > > The -T flag will stop the performance at midi end, so I cannot do anything > then from csound. > > Richard > > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/how-to-determine-end-of-midi-track-file-with-the-API-tp5720077p5725590.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > > |