Old 05-28-2023, 06:49 AM   #1
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 193
Default Set source "section" via ReaScript

Hi.

I'm trying to find a way to programmatically set the "section" part of an item source.

I can read it using PCM_Source_GetSectionInfo, but I can't find any way to set it.

Am I missing something?
If not, is it something that can be (easily) exposed to the API?

I'm writing a quite involved script, and that would help me insure compatibility with whoever might be using sections (why would you actually? I don't really see its use, honestly).

Either way, any help would be greatly appreciated.
__________________
Stem Manager | Project Archiver
odedd is offline   Reply With Quote
Old 05-28-2023, 06:57 AM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

BR_SetMediaSourceProperties, if using SWS is an option.
nofish is offline   Reply With Quote
Old 05-30-2023, 03:04 AM   #3
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 193
Default

Thanks nofish!

I still don't really see the use case for sections, but whatever. They're here and they're a PITA
__________________
Stem Manager | Project Archiver
odedd is offline   Reply With Quote
Old 05-30-2023, 06:43 AM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

You can e.g. loop just a part of an audio file using section.
(Not that I use this commonly though...)
nofish is offline   Reply With Quote
Old 05-30-2023, 07:27 AM   #5
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Not exactly what you are looking for, but may be helpful:
reaper.InsertMediaSection( file, mode, startpct, endpct, pitchshift )
vitalker 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 02:37 AM.


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