Info tool for sfs files

Post your feature requests for future versions of Orion, Hydra, Scorpion or Plucked String. (Please do not expect a reply from the developers)

Moderators: Christophe, Mark

Re: Info tool for sfs files

Postby HYPNAGOGIA » Fri Jun 12, 2020 8:11 pm

Personally, can't wait to see what you're cooking :)

I do have question, though.
What good is this tool for Macs, being that Orion was Windows only?
I'm guessing I'm just not quite understanding what this tool will actually do to grasp why it's useful for Macs ¯\_(ツ)_/¯
User avatar
HYPNAGOGIA
Godlike
 
Posts: 4855
Joined: Tue Jun 21, 2005 1:17 am
Location: Serbia

Re: Info tool for sfs files

Postby Jouni » Wed Jun 17, 2020 8:19 am

Found one new copy of Orion source code from backup disk, it's some beta 8.0 so missing something from full 8.0, but I can add hopefully working 8.0 file support too. Obviously there might be something new I'm not aware as the development continued some months after I moved on.

So updating those few this regard that.. other than that the app is ready and I sent (hopefully it came through) message to Richard to check it out before making it public.

What comes to the macOS version, it's useful for me as today I'm 100% mac user (Logic Pro X) and developer and Windows is usually just last resort. I can run Orion in Parallels https://www.parallels.com/, that much what is needed. I will make Windows version of the app later, it's mostly just setting up the compiler in the Parallels. Maybe later to automate it in some app building service.
Jouni
Godlike
 
Posts: 3963
Joined: Sun Jan 11, 2004 10:21 pm
Location: Finland

Re: Info tool for sfs files

Postby Jouni » Fri Jun 19, 2020 5:05 pm

Done now to certain point, and there's also 64-bit Windows version, was fairly easy at least to do locally.

Video how it (command line tool) works (for geeks):

http://www.kettureaktio.fi/orionology/orionology-1.1.0.mp4

macOS: http://www.kettureaktio.fi/orionology/orionology-mac-1.1.0.zip
Windows (64-bit): http://www.kettureaktio.fi/orionology/orionology-win-1.1.0.zip

I'll make the source code open source when Richard has time to check it briefly. I'm sure he's very busy with Obsession right now.

App does not have any specific added tools such as midi export and not all data is displayed, even though it's loaded in memory. Treat app as alpha in that sense. A place to start from, if something is needed.
Jouni
Godlike
 
Posts: 3963
Joined: Sun Jan 11, 2004 10:21 pm
Location: Finland

Re: Info tool for sfs files

Postby megawattt » Mon Jun 22, 2020 2:21 pm

Many thanks Jouni.

Being a die hard Orion user this tool will come in very handy :D , will midi export be added in the future ?
megawattt
Regular
 
Posts: 135
Joined: Tue Dec 12, 2006 5:12 pm

Re: Info tool for sfs files

Postby Jouni » Tue Jun 23, 2020 11:05 am

If I can find need for midi export in such what Orion cannot do right now. Orion midi export was slightly simple, but effective.

That said, after Richard gives the go, the source code will be open source for this tool. Then anyone brave enough can make features they need. I'll merge them in if needed.
Jouni
Godlike
 
Posts: 3963
Joined: Sun Jan 11, 2004 10:21 pm
Location: Finland

Re: Info tool for sfs files

Postby HYPNAGOGIA » Wed Jun 24, 2020 10:51 pm

Cool!

Thanks Jouni.
Hope to see if this source comes out. Wouldn't mind taking a look under the hood :)
User avatar
HYPNAGOGIA
Godlike
 
Posts: 4855
Joined: Tue Jun 21, 2005 1:17 am
Location: Serbia

Re: Info tool for sfs files

Postby Jouni » Sun Jul 05, 2020 4:53 pm

Okay, Richard has probably looked (hopefully) the source code now and he did say earlier that maybe just make it public.

So the source code in it's current form can be found (and the prebuilt release links): https://gitlab.com/stardrivestudio/orionology

Hopefully it is useful for someone and giving small insight into Orion, even though it's not using Orion's code directly and just some of the data structure definitions (copy paste).
Jouni
Godlike
 
Posts: 3963
Joined: Sun Jan 11, 2004 10:21 pm
Location: Finland

Re: Info tool for sfs files

Postby BMS » Wed May 25, 2022 5:20 pm

Wow, this is quite the thing! Thanks Jouni

I'd previously been using PowerGREP and specific Regexes to pull the names of samples from the binaries into a list, and then using those lists to rebuild self contained sample folders for each *.sfs file. Same with pulling the VST names that were used in projects for reference.

This is amazing in that it converts it all to plaintext, and gives far more information about all sorts of things.

Tried redirecting the output of this into a text file from CMD/PS, so I could automate some things but I only seem to get the last bit which is written to the host, (input, filename, version and all good part.)

I'll see if I can figure out how to pipe the INFO and DEBUG stuff into a txt file/csv if it's possible, would be MEGA handy.
BMS
Regular
 
Posts: 125
Joined: Wed Oct 28, 2009 12:05 am

Re: Info tool for sfs files

Postby BMS » Mon May 30, 2022 5:31 pm

Best I could do to get the Orionology output to write into a txt file in Powershell (in the time I had to look was)

Start-transcript
Then run orionology on a file
Then stop-transcript

Crap I know!

Redirecting the output stream only sent the bit at the end that's actually written to the host to the file otherwise, probably isn't doing a proper stdout, so couldn't store in a var or pump out with out-file or whatever.

Hopefully get some more time to look into that, cause would be handy to run this command over a bunch of files and get txt files outputted from each sfs.
BMS
Regular
 
Posts: 125
Joined: Wed Oct 28, 2009 12:05 am

Re: Info tool for sfs files

Postby Jouni » Tue Sep 27, 2022 6:50 am

I can't remember the details anymore without looking the code, but I recall I used the logging package for it. It might go to stderr (in macOS), don't know how it functions in powershell.
Jouni
Godlike
 
Posts: 3963
Joined: Sun Jan 11, 2004 10:21 pm
Location: Finland

Re: Info tool for sfs files

Postby BMS » Mon Jan 09, 2023 3:46 am

Thanks for the reply, never got around to digging any deeper myself there, still very a insightful tool you made here for inspecting files one at a time. :D
BMS
Regular
 
Posts: 125
Joined: Wed Oct 28, 2009 12:05 am

Re: Info tool for sfs files

Postby BMS » Mon Jan 09, 2023 11:22 am

Been toying actually in a bit of downtime this morning actually.

With help from a good friend, he wrote, and I tweaked a simple PowerShell script which runs through a folder of .sfs songs and make a text file for each song with the info that comes out of ORIONology in each one.

From there I've been running various regexes on those files to collect the names of samples I'd used in old tunes / vsts and build a master list.

Will run find and move script I have using that list to collate all those samples from across my old backup/archive/sample pool drives into a failsafes folder, or even make a folder for each respective song and 'collect' all the stray samples so I can be sure that I can dump a load of older unwanted samples and stuff that got mixed in but still have my legacy projects open with no missing samples.

I did this before but using a crude way of searching for data across the binaries with regexes, which worked but I'm sure some stuff got missed. I'm going to compare this to see if I get better results.

Once again, Thank you so much Jouni for making/Richard for allowing this tool.

8)
BMS
Regular
 
Posts: 125
Joined: Wed Oct 28, 2009 12:05 am

Re: Info tool for sfs files

Postby Jouni » Sat Feb 04, 2023 12:45 pm

No problem at all. Great to hear you've found it useful. Sure it's a bit technical, but in case you're up to doing mods to the tool, feel free.
Jouni
Godlike
 
Posts: 3963
Joined: Sun Jan 11, 2004 10:21 pm
Location: Finland

Re: Info tool for sfs files

Postby Timelessdnb » Sat Jul 08, 2023 6:21 pm

BMS wrote:Been toying actually in a bit of downtime this morning actually.

With help from a good friend, he wrote, and I tweaked a simple PowerShell script which runs through a folder of .sfs songs and make a text file for each song with the info that comes out of ORIONology in each one.

From there I've been running various regexes on those files to collect the names of samples I'd used in old tunes / vsts and build a master list.

Will run find and move script I have using that list to collate all those samples from across my old backup/archive/sample pool drives into a failsafes folder, or even make a folder for each respective song and 'collect' all the stray samples so I can be sure that I can dump a load of older unwanted samples and stuff that got mixed in but still have my legacy projects open with no missing samples.

I did this before but using a crude way of searching for data across the binaries with regexes, which worked but I'm sure some stuff got missed. I'm going to compare this to see if I get better results.

Once again, Thank you so much Jouni for making/Richard for allowing this tool.

8)

Hi, would there be any chance of getting a copy of the PowerShell script, it would be most appreciated, many thanks
Timelessdnb
Novice
 
Posts: 2
Joined: Sat Jul 08, 2023 6:19 pm

Re: Info tool for sfs files

Postby BMS » Thu Jul 13, 2023 1:22 pm

Timelessdnb wrote:
BMS wrote:Been toying actually in a bit of downtime this morning actually.

With help from a good friend, he wrote, and I tweaked a simple PowerShell script which runs through a folder of .sfs songs and make a text file for each song with the info that comes out of ORIONology in each one.

From there I've been running various regexes on those files to collect the names of samples I'd used in old tunes / vsts and build a master list.

Will run find and move script I have using that list to collate all those samples from across my old backup/archive/sample pool drives into a failsafes folder, or even make a folder for each respective song and 'collect' all the stray samples so I can be sure that I can dump a load of older unwanted samples and stuff that got mixed in but still have my legacy projects open with no missing samples.

I did this before but using a crude way of searching for data across the binaries with regexes, which worked but I'm sure some stuff got missed. I'm going to compare this to see if I get better results.

Once again, Thank you so much Jouni for making/Richard for allowing this tool.

8)

Hi, would there be any chance of getting a copy of the PowerShell script, it would be most appreciated, many thanks


Hi, funnily enough i just came on to post a better script I've been cooking in the last few days cause I thought I'd share the love (which I will in my next post)

but sure, but then it depends what you are expecting it to do?

The original version a friend help me make was simple

provided as is, with no warranties, if you mess up your stuff that's on you etc etc disclaimers

I'd personally work with copies of files and test small first. I literally copied all my sfses to one directory away from my working projects to generate logs for all of them. Don't want to assume anyone level of knowledge so will try to explain the best I can.

First you have to put the orionology.exe into the same folder that you have the sfs/sfs'es in
then run powershell

OLD --- Make Orion Song File LOGS with orionology.exe v 1.0 --- OLD --- (check next post for update)

Code: Select all

<#

Title: Make Orion Song File LOGS with orionology.exe v 1.0
Author: Stockwell, with many thanks to D.Weller
Tags: Music, Production, ORION, Powershell

This script changes the working directory to "C:\Source" (as an example) and searches for all .sfs files within that directory. Then orionology.exe is run which reads the contents of each .sfs file. The script then generates a corresponding .LOG file for each .sfs file, using the output of orionology.exe

Requires you to have orionology.exe by Jouni Airaksinen. https://gitlab.com/stardrivestudio/orionology which must be in the same directory as the .sfs files you want to process to be able to read from them.

#>

CD "C:\Source" # Replace C:\Source with your own directory
$allFiles = Get-ChildItem "C:\Source\*.sfs" # Replace C:\Source with your own directory here too, keeping the \*.sfs part intact

   Foreach($sfs_file in $allFiles){
      $toProcess = $sfs_file.Name
      $textName = $sfs_file.BaseName
      .\orionology.exe "$($toProcess)" -v 2>"$($textName).LOG" # You can change the verbosity amount here by replacing the -v [flag] with -vv or -vvv
}



Which does a simple change of directory to "C:\Source", retrieves all files with the ".sfs" extension, and for each file, executes the "orionology.exe" program with the file name as an argument. The program's error output* is captured and saved to a log file with the same base name as the input file. *the error output was the only way we could figure out how to get any output into a txt file, but I'm sure its just the same as what you'd get in the console just running orionology [flags] songname.sfs

oh yeah, see the -v [flag] after the last line "$($toProcess)" that flag can be any of these

from the orionology.exe -help

FLAGS:
-h, --help Prints help information
-v Sets the level of verbosity (v=info, vv=debug, vvv=trace)
-V, --version Prints version information


so that line could be changed to

Code: Select all
.\orionology.exe "$($toProcess)" -v 2> "$($textName).LOG"
.\orionology.exe "$($toProcess)" -vv 2> "$($textName).LOG"
or
.\orionology.exe "$($toProcess)" -vvv 2> "$($textName).LOG"


for the amount of verbosity you need.

Any questions, I'll check back, also will post a more user friendly, reusable version, I've been working on the last few days.

Depending what you need to do with the information in these logs there is various post processing scripts I've been toying with, one of which is a script to make sample lists from orionology logs

Make Sample List Files From Orionology LOGS v 1.5

Code: Select all

<#
Title: Make Sample List Files From Orionology LOGS v1.5
Author: Stockwell
Tags: Music, Production, ORION, Samples, Organisation

Description: This script processes Orionology logs in a root directory and its subfolders and identifies any text in them that looks like a file path. It extracts the filenames from these paths and saves them as a list of filenames in separate text files. The text files are named after the original log files, with "_Sample_List" appended to the filename and a .txt extension for further processing.

Requires you to have made some logs with Orionology by Jouni Airaksinen. https://gitlab.com/stardrivestudio/orionology
#>

function GetSampleListFromOrionologyLogs {
    param (
        [Parameter(Mandatory = $true)]
        [string]$directoryPath
    )

    Clear-Host
    Write-Host "`n`nMake a list of samples from an Orionology Log v1.5`n`n"
   
   $directoryPath = Read-Host "Enter the folder path that contains the orionology .LOG files (will inlcude sub folders)"

    while (-Not (Test-Path $directoryPath -PathType Container) -or !(Get-ChildItem -Path $directoryPath -Filter "*.log" -File -Recurse)) {
        if (-Not (Test-Path $directoryPath -PathType Container)) {
            Write-Host "`n`nThe specified path is not a valid directory."
        } else {
            Write-Host "`n`nNo log files found in the specified directory and its subdirectories."
        }
        $directoryPath = Read-Host "`n`nPlease enter a valid folder path that contains the LOG files"
    }

    $logFiles = Get-ChildItem -Path $directoryPath -Filter "*.log" -File -Recurse
   
   Write-Host "`n`nWorking...`n`n"

    foreach ($logFile in $logFiles) {
   
      

        Write-Host "Processing log file: $($logFile.Name)"

        $outputFile = Join-Path -Path $logFile.Directory.FullName -ChildPath ($logFile.BaseName + "_Sample_List.txt")

        $content = Get-Content -Path $logFile.FullName | Out-String
        $content = $content -replace "\s\r\n", " "

        $outputLines = [regex]::Matches($content, ".*[\\/](?!orionology\.exe).*\.[a-zA-Z]{3}") | ForEach-Object {
            $line = $_.Value.Trim()
            $line -replace "^(.*[\\\/])", ""
        }

        $outputLines = $outputLines | Select-Object -Unique

        $outputLines | Out-File -FilePath $outputFile -Encoding UTF8

        Write-Host "Log file processed successfully: $($logFile.Name)"
    }

    Write-Host "`n`nOperation Successful. Your Sample Lists are located in the same folders as each orionology .LOG file`n"
}

GetSampleListFromOrionologyLogs -directoryPath $directoryPath



Results:

bms-list-samples-orionology-log-results.png


Seems legit, can't guarantee it doesn't miss anything as was using the powergrep app before with a slightly different regex, which is faster than powershell but this allows me to be more flexible. I've also made other scripts where it will grab files from each list and copy the samples into each folder, but I would have to test them again before posting them here, so many considerations such as user input validation, eroors/edge cases, when really I made these things for me.

here we go, bug.. edited to add a line, in the results I had a duplicate line, added in $outputLines = $outputLines | Select-Object -Unique to make sure if you use the same sample twice in the song, then it only lists one (useful later to avoid conflicts when we grab them with another script)

---

Btw - Here's a preview of the file copier script I haven't posted yet, in action.

It reads the contents of the _sample list.txt files and copies the files to the folders where they reside. I've made and used this for personal consumption really. I haven't made it robust enough to post up just yet, but give us a shout if anyone would find it handy and/or confident they wont mess up anything.

As you can see here, the first folder where the sample list is located, under it the Assets/Audio/ folders already exist so it asks you to confirm if you want to overwrite any files in there, one by one atm but might see if I can add a switch to skip all. If assets/audio doesn't exist it just copies all the files automatically as in the second example. (basically I used the same sample list for both folders in this test, but renamed one to "Another Track" instead of "All I wanted", even though the lists were the same, and that is why the samples are the same names in both folders.)

test-folders-same-sample-lists.PNG


and so on.

Bare in mind, I'm over explaining here to apologise for my lack of programming/scripting skills as I really don't know what I'm doing, and just hacking things together for my own use really, rather than any sort of public consumption. Maybe someone with actual skills is better placed to come up with stuff like this.
You do not have the required permissions to view the files attached to this post.
Last edited by BMS on Mon Jul 17, 2023 8:19 pm, edited 25 times in total.
BMS
Regular
 
Posts: 125
Joined: Wed Oct 28, 2009 12:05 am

PreviousNext

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 616 guests

© 2017 Synapse Audio Software. All Rights Reserved.