Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 01-05-2020, 08:59 AM   #1
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 415
Default Distinguish MIDI items from audio items (to use a different timebase by default)

Quote:
Originally Posted by nofish View Post
Hi,

this is scriptable (I already have a working test script).

Questions:

- It's possible to have items with audio and MIDI takes.
What should happen then ?

Timebase for items containing both audio and MIDI: Time .

Time-stretching audio can affect the sound quite unpleasantly,
whilst time stretching MIDI — cannot.
So, where and when audio is involved, time-stretching should be turned off by default, in my opinion.

Quote:
- Should this script work on all items in the project or only selected ones ?
On all of them.

Quote:
edit:
I know your request is about having this as a default, automatic setting. But in case doing it via a script in the meantime would help...
I think I will set some custom action consisting of several chosen scripts as a global startup action, after all...
So, scripts are welcome )
AugerJ is offline   Reply With Quote
Old 01-06-2020, 12:47 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,275
Default

Luckily I still had this test script from 2 years ago lying around lol.
I've just refined it a bit and uploaded it to ReaPack, script name: Set all items to timebase Time if at least containing one audio or video take, else to timebase Beats (pos., length, rate)

Let me know how it works..

(Note: My ReaPack repo isn't enabled by default in ReaPack, so if you haven't done so, you must import it first, see link in my sig.)
nofish is offline   Reply With Quote
Old 01-06-2020, 03:00 PM   #3
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 415
Default

Quote:
Originally Posted by nofish View Post
Let me know how it works..
For some reason, I thought that the script would affect all the items, including the ones yet to be imported into the project.
Is that change possible?
So that the script could be used as a startup action.

Other than that it works as expected: it changed the video and audio items’ timebase from “Project default” to “Time”, and the MIDI item’s timebase — from “Project default” to “Beats (position, length, rate)” (which was the project default timebase, if it matters).
AugerJ is offline   Reply With Quote
Old 01-06-2020, 03:47 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,275
Default

Oh, my bad, I see in the thread title "(to use a different timebase by default)" so yeah, that also should include the items yet to be imported.
Somehow I missed that and thought the request is about a "run and change all currently present items" script.

I currently haven't an idea how to do this 'by default' (other than the scripts running continously in the background so it would 'catch' also the new items but that would be quite inefficient, constantly iterating through all items in the project.)

Sorry, hopefully someone else chimes in with a better idea.
nofish is offline   Reply With Quote
Old 01-06-2020, 04:00 PM   #5
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 415
Default

Quote:
Originally Posted by nofish View Post
I currently haven't an idea how to do this 'by default' (other than the scripts running continously in the background so it would 'catch' also the new items but that would be quite inefficient, constantly iterating through all items in the project.)
I have to agree.
AugerJ is offline   Reply With Quote
Old 01-09-2020, 07:07 AM   #6
BirdBird
Human being with feelings
 
BirdBird's Avatar
 
Join Date: Mar 2019
Posts: 107
Default

Scripting it by tracking Undo History for every action that creates new media items would make it possible without iterating over every media item I guess, but it would still be prone to breaking as you add more and more third party scripts or custom actions that create items. It would be great to have media item defaults like we have track defaults.
BirdBird is offline   Reply With Quote
Old 01-10-2020, 08:18 PM   #7
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 546
Default

Surely Reaper CAN distinguish between an audio item and midi item, otherwise how would it know which action to do when double-clicking on an item, for example?

Totally agree with the gist of the thread though, especially this -

Quote:
Originally Posted by BirdBird View Post
It would be great to have media item defaults like we have track defaults.
I'd like this for a different reason - I would like midi items mix behaviour to be set to 'always mix' by default, so midi items behave like they do in Cubase. It makes overdubbing and layering midi parts on one track much more convenient and straightforward. I guess a script could work around it, but it wouldn't help while recording midi overdubs, we'd need a native solution for that I'm guessing.

If mix behaviour could be set on a track level then I could at least save it into my track templates for all my VSTi's, but it's item or project level only, and project level is no good because I don't want my audio items always mixing.
should do that too.

So yeah - another vote for separate media item and midi item defaults in the preferences or project setup page.
Joe90 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:53 AM.


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