ReaScript: Possible to preview a wave file? >> Balkans >> Forum about travel in Ukraine
Forum about travel in Ukraine

Forum about travel in Ukraine



SearchSearch   Users   Registration   Entrance
Today: 12.07.2025 - 19:51:43
Pages:  1  

ReaScript: Possible to preview a wave file?

Advertising


AuthorMessage

YAYO

user




Statistics:
Messages: 511
Registration: 05.24.2001

I guess someone with with some C++ extension writing experience might best be able to answer this one: Using ReaScript, would it be possible to preview an audio file before adding it to a project? Additionally, I'd like to be able to specify the start and end section of the file to preview e.g. I have a 30 sec file and want to start playing from 7 secs in and play for a duration 2 secs. Any ideas?

---------------------
Yale Dakar Club Member #7
Message # 1 01.05.21 - 02:33:41
RE: ReaScript: Possible to preview a wave file?

shiggarfraggar

user




Statistics:
Messages: 352
Registration: 12.14.2003

Don't know about the preview bits (there are some API calls with Preview in the name but...) Have a look at the Item Property SOFFS, which looks like START OFFSET. From some (very) quick tests you can start partway through the media file by setting SOFFS and play for LENGTH seconds.

---------------------
s50 cams, s50 euro headers, cosomos intake, iridium plugs, custom track pipe with no cats, acs muffler, 3.38 lsd, bilstien shocks H&R springs, tms shock mounts tms subframe plates, JC software, uuc ssk, Urethane traling arm bushings, and millions of
Message # 2 01.05.21 - 02:41:49
RE: ReaScript: Possible to preview a wave file?

DaveLSB///M3

user




Statistics:
Messages: 122
Registration: 05.12.2003

Silly question -- by Preview, do you mean play the media file before it gets added to the project?

---------------------
Message # 3 01.05.21 - 02:50:02
RE: ReaScript: Possible to preview a wave file?

Meow 3

user




Statistics:
Messages: 81
Registration: 02.11.2003

Yes, that's what I mean. I was wondering whether I worded that properly... Basically I want to replicate the kind of thing that Reaper's Media Explorer does: audition an audio file from the disc before adding it to the project. However, where the Media Explorer's purpose is to audition multiple files, I want to audition different sections of a single file. The sections would be pre-defined using WaveLab MRK files (basically text definition files with marker start and end times - easy to get at using Perl). If you're familiar with ACID, think of what I'm working towards as souped up version of the Chopper (minus the waveform display but plus far greater control of each chopped up piece of audio). Currently, my AutoHotkey frontend GUI uses Window's MCI calls to do this auditioning for me then ReaScript does the actual insertion. However, it's a bit of a ratty system since the auditioned audio passes through Window's sound system. Ideally, I'd rather pump it through Reaper's mixer and control the whole thing in one application. Oh, and yes, I'm using the full range of offset/length parameters for both the ITEM itself and also it's SOURCE when defining the chunk for each item I insert. I don't know of any other DAW that allows this kind of non-destructive editing capability. When I first tried Reaper and saw these parameters in the "Media Item Properties" dialog I was blown away.

---------------------
Message # 4 01.05.21 - 02:54:32
RE: ReaScript: Possible to preview a wave file?

arpecker

user




Statistics:
Messages: 201
Registration: 04.16.2002

Have you consdered previewing the file by having a separate project tab and inserting it in there so that you can play it before it goes in your real project?

---------------------
Message # 5 01.05.21 - 03:00:30
RE: ReaScript: Possible to preview a wave file?

Transporter

user




Statistics:
Messages: 200
Registration: 05.17.2003

No, hadn't thought of that. Could have some potential but would still be a kludge in my mind, replacing one working-but-not-optimal approach with another. My AHK GUI is basically a Window's ListBox control with all the available regions lined up: index, name, sample start position and length in beats (according to the current Reaper tempo). I might have a bunch of snare drums in that list and audition them by doubling clicking on them, one by one. Once I'm satisfied with my selection, I hit "insert" and my AHK frontend writes a text file (with all the relevant item parameters) and then triggers my ReaScript to read the text file, build a chunk and insert the item. Check out the attached screenshot if you like. It might add some meaning to my words.

---------------------
Message # 6 01.05.21 - 03:09:18
RE: ReaScript: Possible to preview a wave file?

on a friday

user




Statistics:
Messages: 2,615
Registration: 12.05.2002

Using the API audio preview functions may be quite tricky to do from ReaScripts at this point. It might be possible, but I can't say without trying. But just trying would probably require installing the win32 API Python bindings. (The Reaper audio preview requires the code that wants to preview the audio to provide a critical section object.)

---------------------
Message # 7 01.05.21 - 03:12:55
RE: ReaScript: Possible to preview a wave file?

MadFish

user




Statistics:
Messages: 565
Registration: 06.21.2003

Thanks for the input, Xen. If it's beyond ReaScript then I know not to waste energy on it. Can't win 'em all.

---------------------
Paul
Message # 8 01.05.21 - 03:18:04
RE: ReaScript: Possible to preview a wave file?

SnowDriver

user




Statistics:
Messages: 81
Registration: 05.14.2002

It is very easy to preview parts of same audio file with the explorer. Just click on the explorer peak graph on the place you want to hear. Edit: Sorry, I was too eager to answer and did not read your question well enough. The explorer does not show the loop/slice info. That would be a very good feature!

---------------------
'08 E92 M3 DCT Black/Black E46 M3/3L engine Racecar SOLD : '05 M3 ZCP/SMG (Silver Grey/Cinnamon) '98 M3/2,8L engine Race Car '04 330 Ci ZHP (Black/Black) '98 M3/2 with Eurosport/Conforti OBDII Kit H&R Sport Springs, Koni Shocks, X brace, Hawk HP+ pad
Message # 9 01.05.21 - 03:27:18
RE: ReaScript: Possible to preview a wave file?

forrest

user




Statistics:
Messages: 46
Registration: 03.02.2001

"replacing one working-but-not-optimal approach with another" Yup...

---------------------
Message # 10 01.05.21 - 03:33:10
RE: ReaScript: Possible to preview a wave file?
OT: Amazing guitar work! : Previous topic
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants