You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local mode = 9
local submode = 0
local source = reaper.PCM_Source_CreateFromFile('C:/untitled.wav')
local preview = reaper.CF_CreatePreview(source)
reaper.CF_Preview_SetValue(preview, "D_VOLUME", 1)
reaper.CF_Preview_SetValue(preview, "D_PITCH", 2) -- the pitch is changed to produce a click
reaper.CF_Preview_SetValue(preview, 'B_PPITCH', 0)
reaper.CF_Preview_SetValue(preview, "I_PITCHMODE", mode<<16|submode)
local track = reaper.GetSelectedTrack(0, 0)
reaper.CF_Preview_SetOutputTrack(preview, nil, track)
reaper.CF_Preview_Play(preview) -- after configuring the preview
Results (From top to bottom: Original file, D_PITCH = 0, D_PITCH = -1, D_PITCH = 2):
The text was updated successfully, but these errors were encountered:
Thank you!
I tested it. It got much better! The wave almost always has the correct duration.
But now at the end of the sound there is a small artifact that looks like a distorted waveform. This isn't a big problem when played back alone, but it is a problem when played back on loop: even a waveform with a perfect start and end will sound stuttered when played back on loop, stuttering at the end each time.
Also, I discovered two modes in which the waveform breaks off as before: these are Simple Windowed (mode = 2) and ReaReaRea (mode = 15). (Assuming the "mode" locale from the Example code)
Screenshot of my testing results:
Results (From top to bottom: Original file, mode = 9, mode = 2, mode = 15):
Example code:
Results (From top to bottom: Original file, D_PITCH = 0, D_PITCH = -1, D_PITCH = 2):
The text was updated successfully, but these errors were encountered: