Old 12-30-2016, 12:24 PM   #1
djdanlib
Human being with feelings
 
Join Date: Mar 2013
Location: NY
Posts: 44
Default v5.32pre4 - December 30 2016

v5.32pre4 - December 30 2016
+ MIDI editor: add mouse modifiers to insert note ignoring scale/key [p=1776708]
+ MIDI editor: show toolbar button feedback for actions to set next note length
+ Notation editor: edit tuplet brackets when running actions to change or select note voice [p=1776813]
+ ReaScript: allow up to 32M memory slots for each EEL script
# MIDI editor: allow re-selecting grid length for next inserted note after setting note length via action [p=1776858]
# spectral peaks: add per-track option to disable spectral peaks
# spectral peaks: always use .reapeaks spectral information, even when zoomed in
# spectral peaks: increase frequency resolution
# spectral peaks: optimized new analysis mode
djdanlib is offline   Reply With Quote
Old 12-30-2016, 12:32 PM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Here's a bit of lua which can query the pitch/tonality for the first selected item at the current edit cursor position (no non-essential error checking is done):

Code:
item = reaper.GetSelectedMediaItem(0,0);
take = reaper.GetMediaItemTake(item,0);
nch = reaper.GetMediaSourceNumChannels(reaper.GetMediaItemTake_Source(take));

ns = 1;
buf = reaper.new_array(ns*3*nch);
rv = reaper.GetMediaItemTake_Peaks(take,1000.0, reaper.GetCursorPosition(),nch,ns,115,buf);
if rv & (1<<24) and (rv&0xfffff) > 0 then
  spl = buf[nch*ns*2 + 1];
  reaper.MB(string.format("Pitch: %d Hz, tonality %f",spl&0x7fff,(spl>>15)/16384.0),"hi",0);
end
Justin is offline   Reply With Quote
Old 12-30-2016, 12:52 PM   #3
BenK-msx
Human being with feelings
 
BenK-msx's Avatar
 
Join Date: Jun 2008
Location: Whales, UK
Posts: 6,009
Default

Hot damn.

Happy new year.

Edit: btw the per track option for spectral peaks lives in track 'track performance options'(where buffering options are)

Still need a per item/track settings option and whatnot but Devs know this. Wunderbar
__________________
JS Super8 Looper Template & intro | BCF2000 uber info Thread | Who killed the Lounge?

Last edited by BenK-msx; 12-30-2016 at 01:16 PM.
BenK-msx is offline   Reply With Quote
Old 12-30-2016, 12:53 PM   #4
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

+ MIDI editor: show toolbar button feedback for actions to set next note length

I added some of these actions to my toolbar just now, and they became stuck in the on position after clicking them. Also while you're looking at button states, the action to color notes by voice doesn't show feedback like the other 'color notes by' actions do



+ Notation editor: edit tuplet brackets when running actions to change or select note voice [p=1776813]

Nice, thanks Appears to work well so far. Would it be possible to have the tuplet creation dialog set the voice of the selected notes upon tuplet creation?

And a request: can the tuplet dialog remember it's settings after closing/reopening? I usually don't need to modify note positions because I write the tuplet upon initial note entry, I only need to create the tuplet to correctly notate what is already there, in cases where auto-detect triplets missed it or it's a different kind of tuplet
Commala is offline   Reply With Quote
Old 12-30-2016, 01:00 PM   #5
SmajjL
Human being with feelings
 
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
Default

Eywa heard us!!
Is goosebums normal?
SmajjL is offline   Reply With Quote
Old 12-30-2016, 01:21 PM   #6
ivansc
Human being with feelings
 
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 22,754
Default

Only if they are on your butt, Smajii! Its bumPs. I LOVE your mangled english!
__________________
Ici on parles Franglais
ivansc is offline   Reply With Quote
Old 12-30-2016, 01:36 PM   #7
SmajjL
Human being with feelings
 
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
Default

ah-haha!! I see it, was a mistake I swear lets not correct this one.
SmajjL is offline   Reply With Quote
Old 12-30-2016, 02:44 PM   #8
MorkV
Human being with feelings
 
Join Date: Jun 2016
Posts: 47
Default

Quote:
+ MIDI editor: add mouse modifiers to insert note ignoring scale/key [p=1776708]
Nice!! Thanks!
MorkV is offline   Reply With Quote
Old 12-30-2016, 05:07 PM   #9
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default # spectral peaks: always use .reapeaks spectral information, even when zoomed in

Scrolling super smooth again now. Thanks Justin!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 12-30-2016, 05:13 PM   #10
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default hmm.. What about a toggleable "pitch" envelope to represent pitch as well as colour?

I know I know.. We now have brilliant use of colour for this but since we can now near enough recognise pitch by colour..

What about having a "phantom"/dashed/greyed out pitch envelope we can toggle to go alongside the coloured wavform that would actually tell us what note it was.

Only out of the 12 notes in an octave though (and just let it repeat for other octaves).

I know it's not super accurate and could be thrown off a lot but it would probably be good enough to use for quick pitch corrections and following note pitches visually (rather than just the patterns)

We could even then have one more colour option to compliment this which would be one colour per octave! That would work well with a pitch envelope.

Feel free to ignore this though! It's really great already as is!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 12-30-2016, 05:28 PM   #11
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default question.. Do I need to recan my media explorer database for better search speed?

Now we have this new peaks format I've noticed something weird in media explorer when searching through large databases.


I've got a database of SFX that's in the hundred thousands area.

clicking on sounds in say the first half of it will start the sound playing straight away even if the peak file takes a second or two.

But, clicking on a sound say two thirds down the list takes a good few seconds to play.

I tried turning off spectral peaks but it still seems to be slow.

Not sure if it's related to the new peaks but I've not had this before.

Do I need to rescan the database for optimal use of the new coloured peaks?

EDIT: On further testing.. It seems that even dragging in SFX from that database is quite slow too. I'll do a rescan and let you know how it goes!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.

Last edited by musicbynumbers; 12-30-2016 at 05:40 PM.
musicbynumbers is offline   Reply With Quote
Old 12-30-2016, 06:35 PM   #12
Dannii
Human being with feelings
 
Dannii's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,598
Default

Loving the tweaks to the Spectral Display in this pre! The display is MUCH more meaningful now and as musicbynumbers mentioned, the scrolling is very smooth now too.

Great stuff Justin.
__________________
Dannii is offline   Reply With Quote
Old 12-30-2016, 06:39 PM   #13
Dannii
Human being with feelings
 
Dannii's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,598
Default

The Spectral Display Settings window is also now maintaining its position correctly here.

This is fantastic stuff! In my biased opinion, this is one of the most exciting additions to REAPER I've yet seen!
Notation is pretty cool too though.
__________________
Dannii is offline   Reply With Quote
Old 12-31-2016, 01:04 AM   #14
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Justin
about : GetMediaItemTake_Peaks
What Pitch detection algorythm is used ?
More precisely, what is the window size of the pitch detection ?

Thanks for the code snippet, it is very useful,
I added it on ReaTeam Templates repo.

ReaScripts-Templates/Justin_Get item source frequence and pitch at a certain position.lua at master · ReaTeam/ReaScripts-Templates
X-Raym is offline   Reply With Quote
Old 12-31-2016, 03:59 AM   #15
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

thank you for allowing some tracks to prevent spectral peaks.

minor glitch, when switching the performance prevent spectral for some tracks, it doesn't update the arrange until you scroll or zoom or do something.
heda is offline   Reply With Quote
Old 12-31-2016, 04:54 AM   #16
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by Commala View Post
+ MIDI editor: show toolbar button feedback for actions to set next note length

I added some of these actions to my toolbar just now, and they became stuck in the on position after clicking them.
I can confirm this...
Soli Deo Gloria is offline   Reply With Quote
Old 12-31-2016, 05:42 AM   #17
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by Justin View Post
Here's a bit of lua [...]

Code:
[...]
if rv & (1<<24) 
[...]
Excuse the noobesque question, but the << operator - Are we bitshifting here?

AFAIK (which, to be honest, isn't that much), bitshifting in LUA requires code like this:

Code:
--left shift
local function BLShift(n, d)
  return (n * 2^d) % 2^32
end

-- right shift
local function BRShift(n, d)
  local floor = math.floor
  return floor(n % 2^32 / 2^d)
end
Is this a Reaper specific thing, outside the standard LUA spec? If so, I assume it much more efficient that the two examples I gave?
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is offline   Reply With Quote
Old 12-31-2016, 06:02 AM   #18
snooks
Banned
 
Join Date: Sep 2015
Posts: 1,650
Default

The bitwise operators were added in Lua 5.3, which is the version Reaper uses.
snooks is offline   Reply With Quote
Old 12-31-2016, 06:16 AM   #19
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by snooks View Post
The bitwise operators were added in Lua 5.3, which is the version Reaper uses.
thanks!
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is offline   Reply With Quote
Old 12-31-2016, 07:11 AM   #20
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Hmm..

I wonder if the algorithm could be intelligent enough (at some point) to change the spectrum for best usage for that item..

So it could change depending on whether it detects dialogue, drums, monophonic instrument or polyphonic instrument.

And display differently for each type

Either that or have a tick box so that we can make changes to just selected items and do it manually ourselves
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 12-31-2016, 09:49 AM   #21
BenK-msx
Human being with feelings
 
BenK-msx's Avatar
 
Join Date: Jun 2008
Location: Whales, UK
Posts: 6,009
Default

Mbn
Something like Sws autocolour/icon by track name could set per track spectral settings to an assigned preset,

E.g track name 'vox/vocal' etc. Changes spectral preset to 'good for vocal'

Oh the fun little tools we shall have with this spectral lark are endless!
__________________
JS Super8 Looper Template & intro | BCF2000 uber info Thread | Who killed the Lounge?
BenK-msx is offline   Reply With Quote
Old 12-31-2016, 10:16 AM   #22
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Quote:
Originally Posted by BenK-msx View Post
Mbn
Something like Sws autocolour/icon by track name could set per track spectral settings to an assigned preset,

E.g track name 'vox/vocal' etc. Changes spectral preset to 'good for vocal'

Oh the fun little tools we shall have with this spectral lark are endless!
That sounds more practical good idea!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-03-2017, 09:53 AM   #23
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Justin
In your code snippet,
PItch and tonality are output with way:
Quote:
Pitch: 928 Hz, tonality 0.983459
What is the unity of measure of the tonality ?
X-Raym is offline   Reply With Quote
Old 01-03-2017, 01:19 PM   #24
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by X-Raym View Post
@Justin
In your code snippet,
PItch and tonality are output with way:

What is the unity of measure of the tonality ?
No real unit, just a factor -- 0 is a very wide distribution of power, 1 is power all concentrated at one frequency, everything in between varies... by default .75 is the threshold for things to show up as gray (appears as 1.0 for noise thresh in the peaks window)...
Justin is offline   Reply With Quote
Old 02-28-2017, 06:08 PM   #25
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Could this script be modified so that it returns the average frequency of a time selection?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-28-2017, 07:04 PM   #26
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@amalgama
Beware that this doesnt work post take and track fx. It only works from item media source.
I have scripts for determining average pitch of items, post fx. See my virtual instrument creation script pack on my website.
It uses JSFX/ scripts combo.

Maybe it can help you.
X-Raym 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 12:58 PM.


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