Options for Simulation {Newbie Alert}
Moderator: frank
Options for Simulation {Newbie Alert}
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.
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.
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Re: Options for Simulation {Newbie Alert}
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
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
Re: Options for Simulation {Newbie Alert}
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.
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.
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Re: Options for Simulation {Newbie Alert}
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
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
Re: Options for Simulation {Newbie Alert}
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.
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.
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Re: Options for Simulation {Newbie Alert}
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
DL
Re: Options for Simulation {Newbie Alert}
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)
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)
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Re: Options for Simulation {Newbie Alert}
@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
Re: Options for Simulation {Newbie Alert}
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.
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.
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Re: Options for Simulation {Newbie Alert}
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.
DL
![Very Happy :D](./images/smilies/icon_biggrin.gif)
DL
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Re: Options for Simulation {Newbie Alert}
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
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
Re: Options for Simulation {Newbie Alert}
thanks for the info. I will take a look at it.
Re: Options for Simulation {Newbie Alert}
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/
https://vcvrack.com/
Re: Options for Simulation {Newbie Alert}
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...
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...