Old 01-06-2018, 03:18 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default File change event

Reaper can be set to during recording automatically start a new file at certain circumstances.

We want to use software running in parallel to grab and analyze any file that is "full" as soon as possible.

We use "Beyond" to do the communication between that software and Reaper.

Is there any API function in Reaper that issues an event when such files get closed ? (This would be a nicer option than polling for the file state.)

-Michael
mschnell is offline   Reply With Quote
Old 01-07-2018, 04:56 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

You could implement your own PCM_sink subclass in C++, the object destructor is called when the file is closed. The custom sink class could internally just use the existing Reaper sinks to implement writing WAV-files or whatever. That however would probably be quite messy to implement and use in the end.

If you can use polling and it works, maybe just best to stick with that.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-07-2018, 10:34 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Xenakios View Post
You could implement your own PCM_sink subclass in C++ ...
You mean by doing a Reaper extension dll ? (How else to attach some C++ code to reaper ?)

In fact the external program does not even need to physically poll, but AFAIK there is a Windows API that allows to monitor a directory and send a message when something changes (supposedly e.g. if a file is closed / available, or a new file is created). I suppose this can be used by the external Python program.

Thanks for your answers !
-Michael
mschnell is offline   Reply With Quote
Old 01-08-2018, 06:56 AM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by mschnell View Post
You mean by doing a Reaper extension dll ? (How else to attach some C++ code to reaper ?)
Yes, the PCM_sink approach would require making an extension plugin.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.