PLEASE HELP - Open aud project, orphan all files opens blank

Help for Audacity on macOS.
Forum rules
ImageThis forum is for Audacity on macOS 10.4 and later.
Please state which version of macOS you are using,
and the exact three-section version number of Audacity from "Audacity menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: PLEASE HELP - Open aud project, orphan all files opens b

Post by Gale Andrews » Thu Jun 27, 2013 3:46 am

kozikowski wrote:Excellent. Now over five chapters we have all the definitions, conditions and steps to code a terrific rescue tool. Everybody wins!
Well, I'm not sure how many users would follow all this without step-by-step documentation, or whether developers would be rushing to make some script available that worked on the _data folders and the AUP. Also bear in mind this only tests out correctly so far for a recording that was never edited.

I also note that someone on the Wiki ( http://wiki.audacityteam.org/wiki/File_ ... ty_project ) wrote rough steps to split a large failed project into sections using Audacity 1.3.7. However his project appeared to be under the 2^31 limit so it looked as if his problem was something else, and his steps would not recover audio beyond the limit in Audacity 2.x.

Anyway I will post the Windows PowerShell script that rewrites the waveblock start values for all projects after the first. I am told it should work with any version of PowerShell:

Code: Select all

$DebugPreference = "Continue"
[int64]$offset = 0
$indata = Get-Content .wrp2.aup
$outdata = $null
$first = $true
$testitem = [regex]'waveblock start="(?<startingpoint>d*)"'
$rcdCount = 0

foreach ($item in $indata)
{
    if ($item -match $testitem)
    {
        if ($first)
        {
            $first = $false
            $offset = $matches['startingpoint']
        }
        [string]$startstr = -$offset + $matches['startingpoint']
        $item = $item -replace $matches['startingpoint'], $startstr
        $rcdCount++
        Write-Debug -Message "Record $rcdCount"
    }
    $outdata += "$item`n"
}
Set-Content -Path .wrp2mod.aup -Value $outdata -Encoding Ascii -Force
"$rcdCount records processed."
All you need to change in the script is the name of the original project (here "wrp2.aup") and the name of the modified project that is being written (here "wrp2mod.aup").

If you don't want progress messaging, change $DebugPreference to "SilentlyContinue".

If anyone here wants to write a Perl or Python version, that would be great (needed for the other platforms). Otherwise I might look into a Perl version based on a suggestion someone made.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

tylerstringer
Posts: 68
Joined: Tue Jun 04, 2013 1:33 am
Operating System: Please select

Re: PLEASE HELP - Open aud project, orphan all files opens b

Post by tylerstringer » Thu Jun 27, 2013 4:09 pm

Q win-win for both of us. Your team was excellent!

Post Reply