Help with patch format

This forum is for developers of Rack Extensions to discuss the RE SDK, share code, and offer tips to other developers.
User avatar
pongasoft
RE Developer
Posts: 379
Joined: 21 Apr 2016
Location: Las Vegas

Post 05 Dec 2021

For my re-mock project, I am parsing patch files but the format is not really specified. Can somebody who has access to a Windows version of Reason run the following for me:

Open Mimic (or any other sample based rack extension). Load a sample from the file system (not one provided with Mimic). Save the patch itself (should prompt for a location/name). And I need this file. This file is a readable xml file and I can see what it looks on Mac and want confirmation for PC...

Thanks
Yan

User avatar
orthodox
RE Developer
Posts: 1872
Joined: 22 Jan 2015
Location: 55°09'24.5"N 37°27'41.4"E

Post 05 Dec 2021

Here:
test--mimic-patch.zip
You do not have the required permissions to view the files attached to this post.

User avatar
pongasoft
RE Developer
Posts: 379
Joined: 21 Apr 2016
Location: Las Vegas

Post 06 Dec 2021

orthodox wrote:
05 Dec 2021
Here: test--mimic-patch.zip
Thank you so much.

Is this "/This PC/DATA (D:)/MUSIC/test/test78-7.wav" an actual valid PC path (as in, if I use std::ifstream("/This PC/DATA (D:)/MUSIC/test/test78-7.wav")) it will actually work?

User avatar
orthodox
RE Developer
Posts: 1872
Joined: 22 Jan 2015
Location: 55°09'24.5"N 37°27'41.4"E

Post 06 Dec 2021

pongasoft wrote:
06 Dec 2021
orthodox wrote:
05 Dec 2021
Here: test--mimic-patch.zip
Thank you so much.

Is this "/This PC/DATA (D:)/MUSIC/test/test78-7.wav" an actual valid PC path (as in, if I use std::ifstream("/This PC/DATA (D:)/MUSIC/test/test78-7.wav")) it will actually work?
No it won't work. I don't know how to deal with such paths, it requires a separate study.
I would transform the string, ignore "/This PC", then extract "D:" from the second level, so it becomes "D:/MUSIC/test/test78-7.wav". This path will work.

User avatar
pongasoft
RE Developer
Posts: 379
Joined: 21 Apr 2016
Location: Las Vegas

Post 06 Dec 2021

orthodox wrote:
06 Dec 2021
pongasoft wrote:
06 Dec 2021


Thank you so much.

Is this "/This PC/DATA (D:)/MUSIC/test/test78-7.wav" an actual valid PC path (as in, if I use std::ifstream("/This PC/DATA (D:)/MUSIC/test/test78-7.wav")) it will actually work?
No it won't work. I don't know how to deal with such paths, it requires a separate study.
I would transform the string, ignore "/This PC", then extract "D:" from the second level, so it becomes "D:/MUSIC/test/test78-7.wav". This path will work.
I guess the alternative is to use the nativeURL (and process any %xx elements):

Code: Select all

                <NativeURL mode="Win32File" >
                    file://D:\MUSIC\test\test78-7.wav
                </NativeURL>

User avatar
Enlightenspeed
RE Developer
Posts: 899
Joined: 03 Jan 2019

Post 06 Dec 2021

Is there any reason you can't just do it with relative paths?

User avatar
pongasoft
RE Developer
Posts: 379
Joined: 21 Apr 2016
Location: Las Vegas

Post 06 Dec 2021

Enlightenspeed wrote:
06 Dec 2021
Is there any reason you can't just do it with relative paths?
Yes. This is for my mocking framework and in this framework, when you execute a unit test, you are in the space of the code, not the space of the DAW... so relative doesn't work (and I don't want to install the device in the DAW just to run a test..)

User avatar
Enlightenspeed
RE Developer
Posts: 899
Joined: 03 Jan 2019

Post 13 Dec 2021

pongasoft wrote:
06 Dec 2021
Enlightenspeed wrote:
06 Dec 2021
Is there any reason you can't just do it with relative paths?
Yes. This is for my mocking framework and in this framework, when you execute a unit test, you are in the space of the code, not the space of the DAW... so relative doesn't work (and I don't want to install the device in the DAW just to run a test..)
Just seeing this now, sorry for the delay. You have two options really, either force it to be a user determined path or set it up as a wildcard search - you can actually do this with regex too if you want to avoid any external libs. Not aware of any other obvious way for doing it because it would be highly desirable not to force this on to the root.

Good luck

  • Information
  • Who is online

    Users browsing this forum: CommonCrawl [Bot] and 0 guests