Options for Simulation {Newbie Alert}

Hardware questions and issues with the FV-1

Moderator: frank

Post Reply
daeg
Posts: 11
Joined: Mon Apr 06, 2020 5:55 pm

Options for Simulation {Newbie Alert}

Post by daeg »

Hey guys, just getting started with this stuff and would like to start testing code snippets.

What I'm looking for is a way to take ASM programs, and simulate them on a wave file. Linux compatibility is a big plus.

Spincad Designer does this beautifully with real-time pot adjustment, but doesn't support you writing your own code. Elmgen is beyond me and I don't get what it's for or is supposed to do.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Options for Simulation {Newbie Alert}

Post by Digital Larry »

ElmGen is a 1:1 representation of the SpinASM language, but in Java. It was developed by Andrew Kilpatrick. I built SpinCAD Designer on top of it, which allows you to treat SpinASM as an object oriented language. That's how the block concept of SpinCAD Designer was made possible.

I wrote a companion to SpinCAD Designer, called SpinCAD Builder. This lets you make your own blocks in the SpinCAD Designer program, starting from Spin ASM. Conceivably you could make a block which was the entire program you want to simulate, minus the input/output and then compile that and connect it to the I/O blocks and then simulate it.

Couple things to note:

a) This isn't exactly easy
b) The ElmGen simulator might have a few remaining bugs

DL
daeg
Posts: 11
Joined: Mon Apr 06, 2020 5:55 pm

Re: Options for Simulation {Newbie Alert}

Post by daeg »

Thanks for the thought out response. I've played around with Spincad Designer and it's brilliant work. The ability to loop a wave file and adjust the parameters in real-time quite special.

So if I'm understanding you correctly; there is no currently no way to just write some ASM code and test it without having a FV-1 and EEPROM present.
Both the ElmGen and SpinCAD methods would require writing the effect / patch code in Java rather than the Spin ASM.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Options for Simulation {Newbie Alert}

Post by Digital Larry »

If you use SpinCAD Builder, you can add blocks into SpinCAD Designer which are based on Spin ASM, not Java.

The earliest SpinCAD blocks were written in Java until I figured out how to do them with SpinCAD Builder.

See:
https://github.com/HolyCityAudio/SpinCA ... CADBuilder

and the documentation for how to set all this up:
https://github.com/HolyCityAudio/SpinCA ... signer.zip

DL
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Options for Simulation {Newbie Alert}

Post by potul »

I've done this is the past. Create a block in SpinCAD that contains a full program, and test it in spincad.

There are some caveats though. One is that some of the CHO instructions are not usable right away, you need to add some spincad pseudocode that is quite undocumented.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Options for Simulation {Newbie Alert}

Post by Digital Larry »

I'd be a little suspicious about the simulation in SpinCAD for pitch shift and chorus, some of those I never managed to get working correctly. But hey, as I'm fond of saying, it's open source so go for it! To make them work better, you'll either need to be very good at guessing how the FV-1 works internally, or actually know for a fact how it works internally.

DL
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Options for Simulation {Newbie Alert}

Post by potul »

I wouldn't use it to fine tune an algorithm, or to evaluate the sound quality of the effect, but it's a handy resource to test ideas and at least see that your code is in the right path.

It has been very useful for me in the past, as I travel a lot for work, and it allows me to still work on some stuff while I'm away of the physical device. (nowadays with the lockdown my office is next to my FV1 board... so I don't need it anymore)
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Options for Simulation {Newbie Alert}

Post by Digital Larry »

potul wrote: Tue Apr 14, 2020 12:46 pm There are some caveats though. One is that some of the CHO instructions are not usable right away, you need to add some spincad pseudocode that is quite undocumented.
@potul what did you mean exactly? While I'm not about to launch into a documentation project for SpinCAD etc. I don't mind answering questions here and there about it.

DL
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Options for Simulation {Newbie Alert}

Post by potul »

I mean that some instructions cannot be used directly in the "dummy block".
I.e, you cannot use the CHO RDA instruction, but use the @readChorusTap instruction.
Not a big deal once you figure out, but it's not as easy as copy your code in a block and run.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Options for Simulation {Newbie Alert}

Post by Digital Larry »

Ah OK. It's been so long I forget some of these things. Yeah some things had to be adapted in order to work with relocatable addresses. That's one of the main reasons that generated SpinASM from SpinCAD looks incomprehensible. Win some, lose some. :D

DL
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Options for Simulation {Newbie Alert}

Post by Digital Larry »

While it's not exactly documentation, for some insight into the SpinCAD builder language, here's the parser definition.
https://github.com/HolyCityAudio/SpinCA ... nCAD.xtext

And the primary code generator (turns SpinASM and SpinCAD Builder language into "ElmGen" Java):
https://github.com/HolyCityAudio/SpinCA ... ator.xtend

Some of the things that you see in the included SpinCAD Builder based blocks found here:
https://github.com/HolyCityAudio/SpinCA ... CADBuilder

leverage "macros" which I invented for commonly used situations to make life easier. As far as I know, most existing Spin ASM code can be parsed without resorting to use of macros. I think pot skip code is not handled well if at all. If you want details on any of this let me know.

DL
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Options for Simulation {Newbie Alert}

Post by potul »

thanks for the info. I will take a look at it.
knutolai
Posts: 65
Joined: Wed Nov 23, 2016 9:43 am
Location: Bergen, Norway

Re: Options for Simulation {Newbie Alert}

Post by knutolai »

Haven't tried this, but there exists a FV1 module for the VCV eurorack DAW (software eurorack) where you can enter your own algorithms. Maybe someone who has tried this could chime in with their experience?

https://vcvrack.com/
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Options for Simulation {Newbie Alert}

Post by potul »

Wow, this was a good one.
I tried VCV rack and the FV1 plugin yesterday.... Some spn were working fine, some others will not load. I haven't investigated much yet on why...
Post Reply