MARF 248r source code available

Discussing some incredible modules that don't quite fit into the other forum categories.

Moderators: Joe., lisa, luketeaford, Kent

User avatar
sempervirent
Super Deluxe Wiggler
Posts: 4286
Joined: Wed Oct 06, 2010 4:40 pm
Location: Republic of Cascadia
Contact:

MARF 248r source code available

Post by sempervirent » Fri Oct 18, 2019 12:16 pm

Roman posted this in the DIY section but it's worth reposting here:
viewtopic.php?t=222687

MW user @maxl0rd has set up a Github repo for managing the project:
https://github.com/wir35/marf

I'm sure a list of specific known issues would be helpful. I have the V1 and haven't come across any bugs (yet), I think it's the V2 which has more issues to resolve.

User avatar
Synesthesia
Northern Light Modular
Posts: 1567
Joined: Wed Sep 02, 2009 8:35 am
Location: Limerick, Ireland
Contact:

Post by Synesthesia » Fri Oct 18, 2019 12:54 pm

Roman is a star :) thanks for that.

this isn't an open source project, but still the code has been released and published.

Thanks for sharing this Wes.

User avatar
Fuzz
Common Wiggler
Posts: 137
Joined: Mon Aug 01, 2016 5:05 pm
Location: Seattle

Post by Fuzz » Fri Oct 18, 2019 2:25 pm

Thanks for posting Wes!

I've spend a year with v2 and here are my findings...

1. The programmed pulse outputs 1 and 2 are reversed, where programmed pulse 1 will fire from pulse output 2 and vice versa. (This has been commonly fixed by either crossing the resistors or cutting and modifying the traces on the PCB)

2. Interval Time sliders do not save. From what I hear, v1 allows you to save both the Output Voltage sliders and the Interval Time sliders but v2 does not. Robert Standefer looked through the code and confirmed that it was never implemented.

3. "CV Jitter" When using "full range" voltage from the main voltage output for pitch, the tone becomes thin & wiry and the tuning fluctuates. Once you program each stage with "quantize" the tuning stabilizes. See Dave Brown's 248 page for more information on CV Jitter. The "Time" CV output when used for pitch is also jittery.

https://modularsynthesis.com/roman/buch ... 48marf.htm

4. External Inputs are unusable for pitch. When plugging CV into the External Inputs and sending the voltage output from the MARF to an oscillator (Suzanne Ciani style) the signal is degraded. This must have some relation to the CV Jitter noted above, as the output signal becomes extra noisy, and using "quantize" does not help.

5. Programmed Pulses don't fire when clocked externally with stages programmed to "stop." This could be some user error here, but I found the best way to "conventionally" clock the MARF externally is to set each stage with a "stop" function from the Operating Mode section and then put the clocking pulse into the "start" pulse input. That way every pulse from an external source will advance the MARF one step, but unfortunately in this configuration programmed output pulses don't fire when the "stop" function is attached to a stage. I don't see why the pulses shouldn't fire, but if someone could give me a good reason why they don't that would be great, or if a v1 owner could let us know if it works in a similar fashion.

6. Mode Advance switch does not function. I'm guessing it's supposed to sequentially advance through each stage?

7. Does not work with the 248 Expansion module.

I'm sure I'm missing something else, but I use the MARF a lot and I'm happy to help in whatever way I can to get this thing working "correctly." Glad to see that someone taking on this project!
darksparkler.bandcamp.com - Music
sourceofuncertainty.audio - Podcast

razzmtazz266
Common Wiggler
Posts: 192
Joined: Sun Oct 12, 2014 9:15 am

Post by razzmtazz266 » Fri Oct 18, 2019 2:28 pm

I hope this example of releasing the source code catches on. Especially for projects that started as cc project. 8-)

jimfowler
Veteran Wiggler
Posts: 510
Joined: Mon Feb 22, 2016 1:13 pm
Location: New York
Contact:

Post by jimfowler » Fri Oct 18, 2019 6:31 pm

I think Fuzz summed it up. Possibly worth noting the build thread on emcloned as well: http://www.emcloned.com/viewtopic.php?f=17&t=1334 as there is some useful info there.

Also: http://www.emcloned.com/viewtopic.php?f=17&t=1402

- Jim

User avatar
Siren
Learning to Wiggle
Posts: 46
Joined: Fri Sep 16, 2011 6:29 am

Post by Siren » Sat Oct 19, 2019 2:09 pm

Does this mean the expander can finally be made to work with the v2?

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Post by stevenb » Mon Dec 09, 2019 8:49 am

[video][/video]

MARF has arrived! Downloaded the code from GitHub. Time to get the development system up and running :bang: .

As far as bugs go, I've also noticed that when I use the "Stage No" switch, the selected stage number is always Stage 1 after the first press, then the "current stage" after the 2nd press. Kinda weird.

I think the first bug I'll look into is the one described by Fuzz. This one is egregious.

"5. Programmed Pulses don't fire when clocked externally with stages programmed to "stop." This could be some user error here, but I found the best way to "conventionally" clock the MARF externally is to set each stage with a "stop" function from the Operating Mode section and then put the clocking pulse into the "start" pulse input. That way every pulse from an external source will advance the MARF one step, but unfortunately in this configuration programmed output pulses don't fire when the "stop" function is attached to a stage. I don't see why the pulses shouldn't fire, but if someone could give me a good reason why they don't that would be great, or if a v1 owner could let us know if it works in a similar fashion."

Steven

jimfowler
Veteran Wiggler
Posts: 510
Joined: Mon Feb 22, 2016 1:13 pm
Location: New York
Contact:

Post by jimfowler » Tue Dec 10, 2019 2:33 pm

Steven -

Kind of you to step up and attempt this major fix. You’ll be my personal hero if you can get some or all of these sorted. Please keep us up to date with your progress.

- Jim
Last edited by jimfowler on Wed Dec 11, 2019 7:05 am, edited 1 time in total.

User avatar
Fuzz
Common Wiggler
Posts: 137
Joined: Mon Aug 01, 2016 5:05 pm
Location: Seattle

Post by Fuzz » Tue Dec 10, 2019 3:30 pm

I'm also very excited to see you take on the task! Thanks!
darksparkler.bandcamp.com - Music
sourceofuncertainty.audio - Podcast

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Post by stevenb » Tue Dec 10, 2019 5:02 pm

jimfowler wrote:Steven -

Kind of you to step up and attempt this major fix. You’ll be my personal hero if you can get some of all of these sorted. Please keep us up to date with your progress.

- Jim
Fuzz wrote:I'm also very excited to see you take on the task! Thanks!
It's going to be an adventure :guinness:
I'll probably get started after the New Year :party:

Steven

tarandfeathers
Wiggling with Experience
Posts: 314
Joined: Wed May 07, 2014 3:02 pm
Location: Leeds, UK
Contact:

Post by tarandfeathers » Wed Dec 11, 2019 6:25 am

Worth noting that the project is built in Keil MDK - the free version of this will not build images larger than 32k, and the 248 is bigger than that, so a paid license is required to build, the cheapest one they offer is $1500 for one year.

So if you don't already have the Keil software, you'll have to either buy a license, or deal with moving the project to a different environment. That might be trivial, or might be an absolutely colossal pain. I don't particularly have a horse in the race but I'd suggest moving the project to an open tool chain would be the way to go, but the easiest way to do this might just be to extract which pins are connected to what from the existing source code, and then start again from scratch.

Also re: bug#7, code for the expander seems to be present in the v2 firmware, I wonder if this is something as simple as the expander detection being on the wrong pin, or not connected, after the PCB was laid out for through hole?
Dunnington Audio - Various Buchla accoutrements available

jimfowler
Veteran Wiggler
Posts: 510
Joined: Mon Feb 22, 2016 1:13 pm
Location: New York
Contact:

Post by jimfowler » Wed Dec 11, 2019 7:12 am

Another good reference is Dave Brown’s analysis:

https://www.modularsynthesis.com/roman/ ... 48marf.htm

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Post by stevenb » Thu Dec 12, 2019 2:56 am

tarandfeathers wrote:Worth noting that the project is built in Keil MDK - the free version of this will not build images larger than 32k, and the 248 is bigger than that, so a paid license is required to build, the cheapest one they offer is $1500 for one year.

So if you don't already have the Keil software, you'll have to either buy a license, or deal with moving the project to a different environment. That might be trivial, or might be an absolutely colossal pain. I don't particularly have a horse in the race but I'd suggest moving the project to an open tool chain would be the way to go, but the easiest way to do this might just be to extract which pins are connected to what from the existing source code, and then start again from scratch.

Also re: bug#7, code for the expander seems to be present in the v2 firmware, I wonder if this is something as simple as the expander detection being on the wrong pin, or not connected, after the PCB was laid out for through hole?
Migrating projects isn't exactly my thing. Anyone offer some help there?

Yes, I saw the code also. As far as the expander detection being on the wrong pin, that is entirely possible. Known unknowns. Time will tell.

Steven

User avatar
shoegazer86
Common Wiggler
Posts: 82
Joined: Sat Oct 20, 2018 9:16 am
Location: Buffalo

Re: MARF 248r source code available

Post by shoegazer86 » Sat Jan 04, 2020 10:34 am

I am trying to work with a python script to import the project to STM32 CubeIDE, which is free and unrestricted. I will keep you all posted if I can do this successfully. I am rusty with this kind of stuff so it may take some moving and shaking.
The MEMS Project
Modular Electronic Music Systems
University of Michigan

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Re: MARF 248r source code available

Post by stevenb » Mon Jan 06, 2020 1:33 pm

Awesome! Being Mac-centric I was headed for an EmbedXcode port, but this looks interesting.
Let me know if you need a 2nd set of eyes on the Python script.
Does anyone have the compiled firmware file that I could get? I want to test the STLink programmer separate from building the firmware.

Steven

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Re: MARF 248r source code available

Post by stevenb » Thu Jan 09, 2020 6:54 pm

shoegazer86 wrote:
Sat Jan 04, 2020 10:34 am
I am trying to work with a python script to import the project to STM32 CubeIDE, which is free and unrestricted. I will keep you all posted if I can do this successfully. I am rusty with this kind of stuff so it may take some moving and shaking.
I found that I was able to create a new project in Atolic Truestudio, then build it without errors (just a few warnings). I then exported the project as an archive. I was able to open that archive in STM32 cubeIDE and build the project there. Mind you, I still have none of the processor stuff configured, but the code builds without error. Good baby step. :guinness:

-s

gaslampmusehog
Wiggling with Experience
Posts: 262
Joined: Wed Jan 30, 2008 11:21 am
Location: Phoenician

Re: MARF 248r source code available

Post by gaslampmusehog » Thu Jan 09, 2020 9:49 pm

Heck yeah!

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Re: MARF 248r source code available

Post by stevenb » Wed Jan 15, 2020 2:42 pm

stevenb wrote:
Thu Jan 09, 2020 6:54 pm

I found that I was able to create a new project in Atolic Truestudio, then build it without errors (just a few warnings). I then exported the project as an archive. I was able to open that archive in STM32 cubeIDE and build the project there. Mind you, I still have none of the processor stuff configured, but the code builds without error. Good baby step. :guinness:

-s
Next step.Getting the proc to run in debug mode. Anyone know the secret sauce?

Steven

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Re: MARF 248r source code available

Post by stevenb » Tue Jan 21, 2020 8:22 pm

Encouraging day today! I was finally able to program the STM32 I bought. I spent several days not being able to connect with my ST-Link. With the help of Dave Brown, and my friend Tony, the hardware engineer guy, we figured out that DIP switch 3 being in the "on" position was keeping the board from going into the mode needed to program the STM32. With Dip switch 3 in the off position, and the programmer "Mode" set to "Normal" and "Reset Mode" set to "Hardware Reset" all I had to do was power on the MARF, launch the programmer app, and connect. Easy Peasy!

Big thanks to Dave and Tony.
Now onto building that code thing
:party:

Steven

jimfowler
Veteran Wiggler
Posts: 510
Joined: Mon Feb 22, 2016 1:13 pm
Location: New York
Contact:

Re: MARF 248r source code available

Post by jimfowler » Wed Jan 22, 2020 1:13 am

Awesome! Sounds like concrete progress to me. Keep it up!

- Jim

levelhead3
Common Wiggler
Posts: 221
Joined: Mon Jun 11, 2018 8:53 pm
Location: Olympia

Re: MARF 248r source code available

Post by levelhead3 » Wed Jan 22, 2020 1:30 am

Also, just a random thanks from a non-MARF owner (aka someone with no vested interest). It is so cool to see the community DIY spirit alive and well here, and this sounds like no small project.

Cheers Steven!

:chug:

User avatar
boops
Ultra Wiggler
Posts: 766
Joined: Mon May 06, 2013 6:06 am
Location: Paris France
Contact:

Re: MARF 248r source code available

Post by boops » Wed Jan 22, 2020 1:49 am

Great work ,up.
FS :custom buchla 203 style càbinet ,skiff new design,boat ,hardware for diy cabinet ,easel case ,new 1u to 10u to 56u and more. / New 208 buchla card 12 /
HQ small case buchla psu PCB
https://www.muffwiggler.com/forum/viewt ... 93#3118393
https://www.muffwiggler.com/forum/viewt ... highlight=

User avatar
stevenb
Common Wiggler
Posts: 134
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California

Re: MARF 248r source code available

Post by stevenb » Wed Feb 05, 2020 6:49 am

I was finally able to get the project building in Atollic TrueStudio without errors. I have a debug version that allows me to step thru the code and see what's happening in the code. The first thing I noticed was that the slowest step speed was running at warp factor 11, just a blur of lights on the control panel. Several days of digging around revealed that the function that checks what time range switch is active is returning a -1 for the choice while the logic was testing for +1. That was causing the step interval to be set to 0, sequence running as fast as it could. The time interval sliders and time range switches had no effect. I changed the logic to test for -1 and it all started working. Still have to fix the root problem, but the time range switches and the step interval sliders are now working as expected.

60256887519__83F3B3BD-D2D8-4120-867E-6F915BF78E0B.jpeg
I have a bunch of cleanup to do, then I'll post the project to the git, along with a firmware file for testing. This will not be firmware that anyone wants to use, but it needs to be tested to see what other issues are in this code base. There is still an issue with Dip switch position 3 causing the issue with flashing the unit. I've got that commented out for now so it works. Caveat emptor!

Once again major thanks to those who helped me to get here. This is a major hurdle cleared. I do stand on the shoulders of giants :hail:

Steven
You do not have the required permissions to view the files attached to this post.
Last edited by stevenb on Wed Feb 05, 2020 10:07 am, edited 1 time in total.

jimfowler
Veteran Wiggler
Posts: 510
Joined: Mon Feb 22, 2016 1:13 pm
Location: New York
Contact:

Re: MARF 248r source code available

Post by jimfowler » Wed Feb 05, 2020 7:58 am

So rad. I’ll be more than happy to test your code in whatever form once you post it. Will I need an expander or are you not looking at that right now?

- Jim

User avatar
batchas
Super Deluxe Wiggler
Posts: 4552
Joined: Wed Nov 09, 2011 2:51 pm

Re: MARF 248r source code available

Post by batchas » Wed Feb 05, 2020 8:11 am

I'll test it too and report back when it's ready. Thanx a lot :tu:
FS: New Orgone Accumulator MK2 for BugBrand/FRAC
-----------------------------------
www.batchas.com

Post Reply

Return to “Buchla, EMS & Serge”