hyphz / fr8x-editor

A PC based editor for data files from the Roland FR-8x V-Accordion.
4 stars 4 forks source link

Need to ask a few questions #4

Open volovicg opened 1 year ago

volovicg commented 1 year ago

Any chance someone can help answer a few questions. I would prefer a phone call or quick zoom if someone is willing. I don't know factor so having trouble getting the environment to run correctly - although I think I am almost there. I don't know what I need to type into the listener to load the setfile ?

How may bytes after the preamble does the SC chunk start? The 0x8d ends the preamble but when visually unpacking the binary looking for the fr-7x at the start - with shifting each byte to the right - I could not find it - so I may not be starting in the correct place. I can be reached at logicprose@icloud.com

volovicg commented 1 year ago

So I got the environment working ( I am not familiar with factor). Can walk me through a factor example of how to decode one of the chunks ?

IN: scratchpad "/Users/volovicg/Fr-8x Factor-editor/fr8x-editor-master" add-vocab-root IN: scratchpad USING: fr8x-data ; Loading /Users/volovicg/Fr-8x Factor-editor/fr8x-editor-master/fr8x-data/fr8x-data.factor Loading resource:basis/bitstreams/bitstreams.factor Loading resource:basis/bitstreams/bitstreams-docs.factor Loading /Users/volovicg/Fr-8x Factor-editor/fr8x-editor-master/fr8x-data-format-syntax/fr8x-data-format-syntax.factor Loading resource:basis/xml/xml.factor Loading resource:basis/xml/autoencoding/autoencoding.factor Loading resource:basis/xml/name/name.factor Loading resource:basis/xml/char-classes/char-classes.factor Loading resource:basis/xml/data/data.factor Loading resource:basis/xml/data/data-docs.factor Loading resource:basis/xml/errors/errors.factor Loading resource:basis/xml/state/state.factor Loading resource:basis/xml/errors/debugger/debugger.factor Loading resource:basis/xml/writer/writer.factor Loading resource:basis/wrap/strings/strings.factor Loading resource:basis/wrap/strings/strings-docs.factor Loading resource:basis/xml/entities/entities.factor Loading resource:basis/xml/entities/entities-docs.factor Loading resource:basis/xml/writer/writer-docs.factor Loading resource:basis/xml/errors/errors-docs.factor Loading resource:basis/xml/tokenize/tokenize.factor Loading resource:basis/xml/elements/elements.factor Loading resource:basis/xml/dtd/dtd.factor Loading resource:basis/xml/xml-docs.factor Loading resource:basis/xml/traversal/traversal.factor Loading resource:basis/xml/traversal/traversal-docs.factor Loading /Users/volovicg/Fr-8x Factor-editor/fr8x-editor-master/fr8x-data/fr8x-data-docs.factor IN: scratchpad "GREG.ST8" load-set-file IN: scratchpad Command: com-edit IN: scratchpad "/Users/volovicg/Fr-8x Factor-editor/fr8x-editor-master/fr8x-data/GREG.ST8" load-set-file IN: scratchpad "GSV.SET8" load-set-file IN: scratchpad "GSV.ST8" load-set-file

--- Data stack: V{ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~... IN: scratchpad dup "O_R" get-chunk

--- Data stack: V{ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~... { ~orData~ ~orData~ ~orData~ ~orData~ ~orData~ ~orData~ ~orData~... IN: scratchpad [ custom-name>> ] map

--- Data stack: V{ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~... { "VTW " "Trumpet " "Tenor Sax " "Alto Sax "... IN: scratchpad [ [ patch-cc00>> 0 = ] [ patch-cc32>> 0 = ] [ patch-pc>> 122 = ] tri and and ] filter

--- Data stack: V{ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ ~array~... { "VTW " "Trumpet " "Tenor Sax " "Alto Sax "... IN: scratchpad [ [ patch-cc00>> 0 = ] [ patch-cc32>> 0 = ] [ patch-pc>> 122 = ] tri and and ] filter

volovicg commented 1 year ago

Update, so I have the fr8xdata library loaded and I am able to load a set file and save a set file. While I have the basics of factor as a stack based RPN environment ( very cool btw ) - I just don't know the syntax even with looking at the docs.factor info. Can you briefly provide an example of what I would need to type into the REPL to display a chunk ( Let's say the "TR" chunk) so I could see a representation of the register-name, and then change one character of that name and save that chunk so when I do a save-set file command it save the change just made.

kvaml commented 1 year ago

I have looked at the software and been impressed with the effort to decode the Roland files. Now that Roland provides the Java set editor, the factor software is not that useful as an editor.

I think the future would be adapting it to provide reports showing set and UPG data. Programs like diff or meld would then let you compare sets or programs. This could be immensely helpful in tracking changes when developing or modifying sets.

On Sun, 2023-09-17 at 10:55 -0700, volovicg wrote:

Update, so I have the fr8xdata library loaded and I am able to load a set file and save a set file. While I have the basics of factor as a stack based RPN environment ( very cool btw ) - I just don't know the syntax even with looking at the docs.factor info. Can you briefly provide an example of what I would need to type into the REPL to display a chunk ( Let's say the "TR" chunk) so I could see a representation of the register-name, and then change one character of that name and save that chunk so when I do a save-set file command it save the change just made.

-- Lloyd Kvam 5 Foliage View Lebanon, NH 03766 802-448-0836

volovicg commented 1 year ago

Yes, however I comparing how the SET information is stored in the firmware of the 8x vs the 4x in evaluating and understanding the differences between them given I don’t have a 4x - doing it offline on set files themselves provides and advantage as the editor modifies the contents RAM then ROM when saved. So it’s a tedious process going back and forth and especially without a 4x in hand. On the 8x itself there is bootloader, program segment, user data segment and data segment ( which is actually a FAT12 file system) and much of this data is packed similarly or even identically to the way the SET file is archecturally. So having this information at hand better helps me understand the internals of the 8x. I also find it amazing he was able to do this and wondered if he had no prior knowledge or had a resource or connection to Roland which provided the data structure details. I have no idea if factor is continuing to be used but as a college student using HP RPN calculators - the stack based approached is very intuitive and familiar to me.

Very much appreciate your response… and does that mean you cannot assist with my question - were you able to execute any display dumps from the REPL itself ?

On Sep 17, 2023, at 2:21 PM, kvaml @.***> wrote:

I have looked at the software and been impressed with the effort to decode the Roland files. Now that Roland provides the Java set editor, the factor software is not that useful as an editor.

I think the future would be adapting it to provide reports showing set and UPG data. Programs like diff or meld would then let you compare sets or programs. This could be immensely helpful in tracking changes when developing or modifying sets.

On Sun, 2023-09-17 at 10:55 -0700, volovicg wrote:

Update, so I have the fr8xdata library loaded and I am able to load a set file and save a set file. While I have the basics of factor as a stack based RPN environment ( very cool btw ) - I just don't know the syntax even with looking at the docs.factor info. Can you briefly provide an example of what I would need to type into the REPL to display a chunk ( Let's say the "TR" chunk) so I could see a representation of the register-name, and then change one character of that name and save that chunk so when I do a save-set file command it save the change just made.

-- Lloyd Kvam 5 Foliage View Lebanon, NH 03766 802-448-0836

— Reply to this email directly, view it on GitHub https://github.com/hyphz/fr8x-editor/issues/4#issuecomment-1722535585, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCQCAX2E7OK6YVELRHOGZ4DX245SLANCNFSM6AAAAAA4TSKSRE. You are receiving this because you authored the thread.

mrjbq7 commented 1 year ago

I don’t use this Roland thing but feel free to ask specific questions, and the Factor discord server is a resource as well. Come and chat!https://factorcode.orgOn Sep 17, 2023, at 11:43 AM, volovicg @.***> wrote: Yes, however I comparing how the SET information is stored in the firmware of the 8x vs the 4x in evaluating and understanding the differences between them given I don’t have a 4x - doing it offline on set files themselves provides and advantage as the editor modifies the contents RAM then ROM when saved. So it’s a tedious process going back and forth and especially without a 4x in hand. On the 8x itself there is bootloader, program segment, user data segment and data segment ( which is actually a FAT12 file system) and much of this data is packed similarly or even identically to the way the SET file is archecturally. So having this information at hand better helps me understand the internals of the 8x. I also find it amazing he was able to do this and wondered if he had no prior knowledge or had a resource or connection to Roland which provided the data structure details. I have no idea if factor is continuing to be used but as a college student using HP RPN calculators - the stack based approached is very intuitive and familiar to me.

Very much appreciate your response… and does that mean you cannot assist with my question - were you able to execute any display dumps from the REPL itself ?

On Sep 17, 2023, at 2:21 PM, kvaml @.***> wrote:

I have looked at the software and been impressed with the effort to decode the

Roland files. Now that Roland provides the Java set editor, the factor

software is not that useful as an editor.

I think the future would be adapting it to provide reports showing set and UPG

data. Programs like diff or meld would then let you compare sets or programs.

This could be immensely helpful in tracking changes when developing or

modifying sets.

On Sun, 2023-09-17 at 10:55 -0700, volovicg wrote:

Update, so I have the fr8xdata library loaded and I am able to load a set

file and save a set file. While I have the basics of factor as a stack based

RPN environment ( very cool btw ) - I just don't know the syntax even with

looking at the docs.factor info. Can you briefly provide an example of what I

would need to type into the REPL to display a chunk ( Let's say the "TR"

chunk) so I could see a representation of the register-name, and then change

one character of that name and save that chunk so when I do a save-set file

command it save the change just made.

--

Lloyd Kvam

5 Foliage View

Lebanon, NH 03766

802-448-0836

Reply to this email directly, view it on GitHub https://github.com/hyphz/fr8x-editor/issues/4#issuecomment-1722535585, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCQCAX2E7OK6YVELRHOGZ4DX245SLANCNFSM6AAAAAA4TSKSRE.

You are receiving this because you authored the thread.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

kvaml commented 1 year ago

On Sun, 2023-09-17 at 11:43 -0700, volovicg wrote:

Very much appreciate your response… and does that mean you cannot assist with my question - were you able to execute any display dumps from the REPL itself ?

I am in the process of moving to a new home in a different state. My time is pretty limited at present. I had hoped to make some progress on reporting, but that has not happened.

My notes barely make sense to me at this time.  Here they are in case you find them useful:

From the Factor REPL:

  1. cfactor to get into the REPL
  2. Add the vocab root "path\to\fr8x-editor" add-vocab-root # Note, this is case sensitive and is not validated.
  3. Load the data library USING: fr8x-data ;
  4. Load a set file. There isn't one in the repository because of potential copyright issues but you can export one from your V-Accordion or download one from Roland or another user site. Then, "setfile.st8" load-set-file . You will see a complex object on the stack, this is the decoded set.
  5. You will now need to refer to the wiki for the chunks of the set file. IN your case, for example, if you want to find alto sax that would be in a orchestra right hand register which is in the "O_R" chunk. So dup "O_R" get- chunk will put the TR list on the stack (while leaving the full set file below it in case you want it later)
  6. This is a list of orData objects. You can get data from them using field functions and use list combinators to apply them to the whole list. For example you can get all the names with [ custom-name>> ] map (again throw a dup in at the start if you want to keep the list around)
  7. The patch used in each one is stored only as three numbers in the set file, in fields patch-00, patch-cc32 and patch-pc . The corresponding names are listed in the midivoices.txt and midireeds.txt files. Look in this and you will see Alto Sax is 0 0 122. So you can search the list for this with [ [ patch-cc00>> 0 = ] [ patch-cc32>> 0 = ] [ patch-pc>> 122 = ] tri and and ] filter @.*** can probably tell you a nicer syntax for this!)

Good luck.  Hopefully I will be checking back with you some time later in October.

-- Lloyd Kvam 5 Foliage View Lebanon, NH 03766 802-448-0836

volovicg commented 1 year ago

Everything is working!!!!!!!!

Just to close out this thread - I got everything working with the help of my new friends over on discord. Factor was new to me and I had to understand the basics a bit and now I want to dive deeper into factor as I can see the power of using a concatenated language. Pretty cool. If the originally developer of this code reads this. Here are some file specific questions.

1/ How did you gain insight into the file structure - did you have insight from another source - or did you reverse engineer through trial and error. just curious more so if I continue to decode. for example did you change a parameter on the 8x, save the set and analyze/compare what changed - this would be very time consuming but maybe you did it that way.

2/ There is no mapping for SC2 - did you not know what it contains, or did not have time to determine it.

3/ There are two additional registers beyond the normal 24 ( 26) - any idea what they represent ?

4/ I know you wrote this a long time ago - but I certainly would like to be able to ask you a few questions about the structure of the set file - if you ever would consider contacting me. logicprose@icloud.com

Thank Greg Vee You can also find me on here.... https://www.facebook.com/groups/advancedrolandvaccordion/

hyphz commented 1 year ago

I worked out the structure of the set file by reverse engineering the Java editor. I do not know what the extra registers are, nor what SC2 is used for.

Mark

On Tue, Sep 19, 2023 at 2:55 PM volovicg @.***> wrote:

Everything is working!!!!!!!!

Just to close out this thread - I got everything working with the help of my new friends over on discord. Factor was new to me and I had to understand the basics a bit and now I want to dive deeper into factor as I can see the power of using a concatenated language. Pretty cool. If the originally developer of this code reads this. Here are some file specific questions.

1/ How did you gain insight into the file structure - did you have insight from another source - or did you reverse engineer through trial and error. just curious more so if I continue to decode. for example did you change a parameter on the 8x, save the set and analyze/compare what changed - this would be very time consuming but maybe you did it that way.

2/ There is no mapping for SC2 - did you not know what it contains, or did not have time to determine it.

3/ There are two additional registers beyond the normal 24 ( 26) - any idea what they represent ?

4/ I know you wrote this a long time ago - but I certainly would like to be able to ask you a few questions about the structure of the set file - if you ever would consider contacting me. @.***

Thank Greg Vee You can also find me on here.... https://www.facebook.com/groups/advancedrolandvaccordion/

— Reply to this email directly, view it on GitHub https://github.com/hyphz/fr8x-editor/issues/4#issuecomment-1725628396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVCMFCZA3RE6HWFZC2G4MDX3GP4FANCNFSM6AAAAAA4TSKSRE . You are receiving this because you are subscribed to this thread.Message ID: @.***>