Hi! I just thought I'd stop by to tell you about a project that I've just released for free. It's a development tool for the FV-1 single-chip effects processor from Spin Semiconductors, and I've been using it for a few years to make effect units and so on. But I finally got around to cleaning up the code and making it available as open source software. (GPL3 license)

The key features are cross-platform support, (Windows, Mac and Linux) and a built-in hardware simulator. So if you're new to DSP, or thinking about trying the FV-1, you can test out your algorithm creations in real-time on your PC. It's optimized for hardware simulation accuracy, not high performance but still runs at much better than real-time on my PC.

Anyway, I don't spend much time on forums these days, so if you have questions, problems, ideas, please email me and I'll pop by if anyone wants help with it. If you know Java and want to help extend the software, I want to make it cross-compile DSP code for other architectures... I think a lot of these ARM and PIC-based signal processing projects that people are doing these days could benefit from ElmGen for algorithm creation, if it could emit efficient C code. (not too difficult with the current structure)

Hi! I've heard from a few people now who are starting to use ElmGen... thanks for the questions and comments so far. I'm going to use this thread as a the "official" support thread.

I also updated my site with some handy tips for getting started.

To answer a few questions:

Can't run the JAR - The JAR is a library which you need to include in your own project... you can't run it directly. I use Eclipse for doing Java coding which is free. Import the ElmGen JAR into your project and add it to the classpath in the Project Properties. A simple project consists of a main class (see SimTest.java for an example) and at least one program (see Reverb.java) The main class sets up each program and then either adds it to an EEPROM image and flashes the chip, or runs it in a simulator.

Can ElmGen output HEX files? - Yes and no. Yes: You can read the raw bytes from the assembled EEPROM image after adding all your programs to it using the getBytes() method. A complete image is 4096 bytes made up of 512 bytes * 8 programs. Each program has 128 words (32 bits each) assembled in order with no headers or gaps in the ROM image. No: Intel-style HEX files usable with device programmers, etc. is not currently supported. I have worked with these formats before so I can add this if people want it. (do you want this?)

Are the SpinASM or other Tools Needed? - No. You can write programs, assemble them into a ROM image, flash an EEPROM and run the hardware simulator all with ElmGen. It produces ROM images that are byte for byte (tested) compatible with SpinASM, including bugs and undocumented bits.

Is the Compiled Output Correct? - Probably. Each instruction was tested against code generated by SpinASM using the same operands to ensure that the same code will produce the same outputs. Porting a SpinASM program ElmGen should produce identical ROM output.

Is the Simulator Accurate? - Hopefully. Because the FV-1 uses analog inputs and outputs, and because there appears to be no way to access the internal registers (that I know of) it is impossible to compare simulations bit-for-bit. However the simulator recreates the widths of the data path and resolutions of the adders and multipliers. No floating point math is used since the FV-1 does everything with integers only.

Please send your feedback to me or to this list and I'lll do my best to help you. For those of you (like me 3 years ago) afraid to jump into DSP due to the cost and complexity of the tools... I hope that this project will convince you to give it a try.

And many thanks for making ElmGen available.
I gave it a test yesterday night on a Macintosh using the Netbeans IDE and I successfully compiled the example and simulation test and run them (the simulation I mean). It worked all fine.
Now I am at the point to write my own programs for the FV-1 ( still have to read thoroughly the FV-1 docs though ) and I wont be able to test on hardware until a week or so because I have ordered FV-1 chips only yesterday..._________________Yves

By the way in the example files Mute and Bypass you seem to have swapped the strings used in the super() function : super("Bypass") for Mute class and super("Mute") for Bypass class..._________________Yves

I have received the FV-1s, still waiting for the EEPROMs and I am designing a PCB for the basic configuration (the one in the FV-1) datasheet. I now have an Arduino Uno board and I wanted to be sure about the way to connect the EEPROM to the Arduino to be able to program it through the ElmGen environment.

I gather that if I use a small piece of perfboard with a DIP8 socket I should connect A0,A1,A2,WP and Vss pins to the GND port of the Arduino board, the SCL pin to Analog port 5, the SDA pin to Analog port 4 and my question is :
must I power the Vcc pin from the +5V or the 3.3V POWER port of the Arduino ? Or may be either one or the other is OK ?

It is important to not power the FV-1 itself with more than +3.3V. In my setup the Arduino (a 5V type) only connects the I2C lines and ground. The FV-1 contains the pullup resistors for the I2C bus, so they float at +3.3V normally... Attaching the Arduino to do "in-circuit" programming doesn't cause any problems.

If you're programming the EEPROM by itself it doesn't matter what voltage it runs at. But in most cases the method described above will be most useful. The FV-1 works normally with the Arduino attached... However your computer may cause some ground loops through the USB and add noise to the audio signal. Maybe Unplug the I2C wires while doing careful listening or tests.

Does this make sense? I put 3 pin header pads on all my FV-1 boards for doing the programming and this has worked fine.

Just a short message to report my successful use with a MacOSX environment, of the ElmGen Program to generate an operational code for the FV-1 and burn it into a 24LC32A EEPROM .
For the java programming NetBeans, I installed the RXTX java library for MacOSX, there it is important to read the instructions at this address http://jlog.org/rxtx-mac.html and run the fixperm-217-leo.sh shell script which fixes some permissions. Next it is important to modify the serial port name in the SimTest program from "COM5" to the appropriate nport name as indicated in the Arduino menu : something ike "/dev/tty.usbmodem1d11" the suffix 1d11 may be different on your system depending on which usb socket your arduino is connected to (see http://www.arduino.cc/en/Guide/MacOSX ).

I have designed a PCB and built a special board for the FV-1 (based on the schemo in the datasheet + some ancillary circuits) and burned an EEPROM with the examples provided by Andrew and and it works (both the internal and external effects). I have started to program my own stuff and the first tests are very promising.

Thanks Andrew for making the use of FV-1 so easy !_________________Yves

Great to see the pictures of your boards! I'm glad to know that my code is getting a workout. The FV-1 is truly a unique part and quite fun to use. I'm only now trying to implement the same kinds of algorithms on other more general purpose processors, and it's not nearly as much fun.

Keep up the good work, and send me bug reports or feature ideas and I'll see about adding them.

Let me start by saying THANKS for creating this! I have had an FV-1 since last January and most of that time it has sat in the closet.

why? Because programming in pure assembly has been beyond me. However in the last few months I have started learning how to use ARDUINO and C, and I think this tool looks like something I could learn to use (i ordered some books on JAVA!)

SO..

Where to start?

besides downloading this program, I noticed I need to get RXTX as well.

So if anyone could help me I have OSX and WINDOWS but would prefer to keep it on OSX if possible

I'm going to try this ElmGen for sure!! Debugging FV-1 DSP code is sometimes very difficult and it seems it could help me debugging particular area's of my code.

I've designed a general input/output board that takes the OCT daughterboard. I'm using it to develop a vintage echo emulation. The project is called eTAP2HW detailed information on my site www.echotapper.nl. The board's layout and design files are available on request.

I'm going to try this ElmGen for sure!! Debugging FV-1 DSP code is sometimes very difficult and it seems it could help me debugging particular area's of my code.

That's excellent! I'm glad to hear more people are using this code. I expect that the simulator part of the code will be quite hackable as you need. Right now the main purpose is to just hear the resulting audio. But I think there are probably a lot of uses to graph things in the frequency domain like you have on your blog.

If you make improvements please let me know so that I can update it. If there is a lot of contribution I will put it on a source repository, but so far I haven't received any patches.

I just got ElmGen running this morning on Windows 7 and Eclipse. I'm a bit of a bozo Java wise and some of your instructions needed interpretation in this version of Eclipse. However experience is the best teacher and I think I will be able to handle it.

You can't do it like that because in Java the + operator concatenates Strings if one of the things being added is a String.

An easy way to do it is to use the address pointer: ADDR_PTR which is an actual register in the FV-1 that you can use to get at different places in the delay memory. Read the SpinAsm manual for how to do this. This is needed if you want delay times that are adjusted at run-time... like vibrato or a delay time control.

If you want to use RDA for hard-coded delay offsets, use getDelayMemByName() to look up your pre-defined delay memory. Then use MemStart's getStart() to find the offset, and then add your own offset. (+100) This all gets done at compile time, since this is all compiled into the program, and not calculated on the FV-1.

Keep in mind that you could also just stick any number from 0-32767 into RDA and keep track of the memory yourself. ElmGen helps you as a convenience, but it's not required if you prefer to use a pen and paper to set up the memory allocation.

Thanks Andrew. For now I am just using one delay line, so it starts at zero and the taps can simply be explicit offset constants. At some point I'm going to use one of the pots to adjust the taps, so I will also need to use the register offset method.

I had to look into the ElmGen source to see how the readDelay() function worked when given the name of the memory segment rather than an integer value, as it's not documented in the Javadocs.

Anyway, here is my code, with the taps based on the tap spacing of the MN3011 BBD. Dry comes out of the left channel and the effect comes out of the right (just for testing). There's a few debug type statements in there also.

I should add an LPF prior to the delay line and possibly mild distortion to give it that authentic BBD sound.

If you want to use RDA for hard-coded delay offsets, use getDelayMemByName() to look up your pre-defined delay memory. Then use MemStart's getStart() to find the offset, and then add your own offset.
Andrew

Hi Andrew,

I want to use this getDelayMemByName() function, however within class ElmProgram it is defined as a private method. Any problem you see making it public?

For example I'm trying to port this reference pitch shifter code into ElmGen:

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum

Please support our site. If you click through and buy from our affiliate partners, we earn a small commission.