Let's Design and Build a (mostly) Digital Theremin!

Posted: 8/5/2019 6:25:48 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Yeah, a loop/frame kinda thing through which the audience can see most of the player, if you get a good shape, probably looks "cleanest", and "cool" in an aesthetic sense. Minimalist, functional design. In my funny imagination anyway, that doesn't really know what the rest of it will look like.

As for gimp,
in case it's still as quirky UI wise as > 10y ago when I once tried it (and you feel the same), and you don't need its truckload of features but rather a simple image manipulation / non-vector drawing program: Have you tried Paint.NET? It's also open source, less mighty than Gimp. I for one refuse to learn a bazillion funky key commands to get basic stuff done just for occasional, far-from-pro use. And despite its name, it bears hardly a resemblance to the similarly named abomination that installs with Windows (last time I saw it).

Posted: 8/6/2019 3:11:05 PM
ILYA

From: Theremin Motherland

Joined: 11/13/2005


the fourth antenna ("female type") could be a mirror in a frame inlaid with Swarovski stones.

Posted: 8/6/2019 7:56:38 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"As for gimp, in case it's still as quirky UI wise as > 10y ago when I once tried it (and you feel the same), and you don't need its truckload of features but rather a simple image manipulation / non-vector drawing program: Have you tried Paint.NET? It's also open source, less mighty than Gimp. I for one refuse to learn a bazillion funky key commands to get basic stuff done just for occasional, far-from-pro use. And despite its name, it bears hardly a resemblance to the similarly named abomination that installs with Windows (last time I saw it)."  - tinkeringdude

Haven't even heard of paint.Net, so thanks and I'll give it a look-see, though I suppose the .NET precludes it from running in Linux (and .NET means another huge blob of versioned OS/SW).  I don't really mind a complex interface to image manipulation SW, it's mostly just acclimation to how they do things, and the basic transformations tend to be very similar.  Though I find the UI of the "gold standard" Photoshop to be fairly alien to what I expect in terms of where features are located and how they are used.

"the fourth antenna ("female type") could be a mirror in a frame inlaid with Swarovski stones."  - ILYA

One might use aluminized reflective plastic here for a genuine plate?  (Not my original idea!)  Mirror, mirror on the Theremin: who's the greatest player of all?

Posted: 8/6/2019 8:57:17 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

As I guess they still use regular .NET, then it's probably not for Linux. (I've ran stuff I did in .NET on Mono under Linux, but UI wise that goes only so far). AFAIK they are planning to melt it all together into one thing next year: .NET / Mono / .NET core, the latter already being multi platform. I'm curious what that will look like, and if doing multi platform stuff will be easier then.

But... Linux you say... and your FPGA tool chain runs on Linux?

Posted: 8/6/2019 10:53:45 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"But... Linux you say... and your FPGA tool chain runs on Linux?"  - tinkeringdude

It does, and was probably developed on Linux.  I would really like to get off of the MS crazy train, WPS office (runs on Linux and Win) seems to open the few Word and Excel files I tried surprisingly well, and I'm able to convert my Outlook *.pst files to Thunderbird mbox, so the main fly in the ointment for my D-Lev stuff seems to be Tera Term, a terminal emulator with a rich scripting language.  How is serial port scripting handled in Linux?

Posted: 8/7/2019 6:42:08 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

I didn't even get to try the scripting in TeraTerm, the fact that is does not discern between delete and backspace, which I situationally use all the time everywhere else, was annoying enough to switch to a different one
I'm not sure what "serial port scripting" is referring to, is that an established sequence of words to mean something more specific?
A lot of scripting stuff where the traditional (arcane to my eye) unix scripting languages are not so well suited for seems to be done with python these days, a lot of Linux distributions apparently come with it installed by default, so it wouldn't be an additional burden to the installation.
While I have fumbled with some python scripts to change them to my needs, I don't really speak python. But it would seem to make sense to acquaint oneself with that, it's everywhere. Heck, even the raspberry pi and beaglebone things come with libraries to access GPIOs and stuff from python (with somewhat limited use, given the speed, but for toying around or using it to test other hardware...).
It would seem to make sense to know a language like that instead of a ton of funny specialized languages which quickly become a major PITA once you want to do only a tiny little thing that they were not exactly made for.

EDIT: btw, some engineering & sciency folks say a lot of good things about using python and its math plotting libraries, which some people use as an alternative to Matlab for some things. (okay, there probably are no nuclear power plant simulation plugins for python)

Posted: 8/7/2019 10:06:17 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I didn't even get to try the scripting in TeraTerm, the fact that is does not discern between delete and backspace, which I situationally use all the time everywhere else, was annoying enough to switch to a different one"  - tinkeringdude

I think the delete key behavior can be changed in the options.  There's a lot of weird stuff going on with terminal emulation as all of the "standards" are ancient and defacto.  Tera Term seem more flexible and friendly than any other terminal emulator I've tried, though some of that is probably just familiarity.

"I'm not sure what "serial port scripting" is referring to, is that an established sequence of words to mean something more specific?"

Tera Term has a scripting language built into it, macros really, that it can execute.  They handle parsing of input, branching, file access, etc. and it has been more than adequate for this project so far.  I use the macro format to pump the EEPROM with a new SW load, and to read and write presets from / to various preset slots.

"A lot of scripting stuff where the traditional (arcane to my eye) unix scripting languages are not so well suited for seems to be done with python these days, a lot of Linux distributions apparently come with it installed by default, so it wouldn't be an additional burden to the installation.

While I have fumbled with some python scripts to change them to my needs, I don't really speak python. But it would seem to make sense to acquaint oneself with that, it's everywhere. Heck, even the raspberry pi and beaglebone things come with libraries to access GPIOs and stuff from python (with somewhat limited use, given the speed, but for toying around or using it to test other hardware...).

It would seem to make sense to know a language like that instead of a ton of funny specialized languages which quickly become a major PITA once you want to do only a tiny little thing that they were not exactly made for."

I suppose you're right, and do appreciate the prodding in that direction.  I briefly tried out python to write the Hive simulator in, but gave up on it (probably prematurely) as it isn't strongly typed, and being sort of interpreted I was afraid to put a month or more of work into going down that road only to find it was too slow (you need all the speed you can get in a processor simulator).  I'll give it another look.

Posted: 8/8/2019 6:57:32 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

I briefly tried out python to write the Hive simulator in, but gave up on it (probably prematurely) as it isn't strongly typed, and being sort of interpreted I was afraid to put a month or more of work into going down that road only to find it was too slow (you need all the speed you can get in a processor simulator).  I'll give it another look.

Hehe. I do have an aversion against dynamic typing, and I've not seen a good argument for its necessity (vs., say static automatic type inference), and stuff I read to advertize for DT often makes points about a certain language implementation that happens to have DT, but no actual DT-specific arguments...
Be that as it may, python is very widely spread according to polls, so one may like that or not, but other options in many places will be less easy to get going.

As for slowness. Yeah, if you do every math stuff with variables and loops in python code, it's going to be slow. Same with doing stuff in Matlab that it's not optimized for, though.
But there are numerical libraries which are implemented in C in the background, for a lot of common tasks, and if you throw your data at it, only the high level glue logic of your scripts will actually be the high level, interpreted stuff, while the rest is done natively.

And you could then of course make some custom routines in C for something special you need, only as much as is really needed speed wise, in C, and the rest in the convenience of the higher level language.
I say that because I guess simulating a processor is quite a special case thing, a mapping from one instruction set to another around as few as possible corners, so there are probably no libraries for that (where people expect high speeds)?

Posted: 8/8/2019 9:25:51 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"As for slowness. Yeah, if you do every math stuff with variables and loops in python code, it's going to be slow. Same with doing stuff in Matlab that it's not optimized for, though."  - tinkeringdude

I'm so anal I "rolled my own" dec2hex conversions, rather than rely on the C++ libraries, as there were too many modes and unexpected behavior going on.

"But there are numerical libraries which are implemented in C in the background, for a lot of common tasks, and if you throw your data at it, only the high level glue logic of your scripts will actually be the high level, interpreted stuff, while the rest is done natively."

Interesting.

"And you could then of course make some custom routines in C for something special you need, only as much as is really needed speed wise, in C, and the rest in the convenience of the higher level language."

I was looking at months of work anyway, so interposing a new language and getting it to work with custom C modules felt like a bridge too far at the time.  The Hive core isn't all that complex, but there are 8 threads so there's a lot of storage in the pipeline.  Doing cycle accurate logic simulation in C means you need two SW variables for each HW register, so the "cha-cha" (HW actually stores intermediate values via setup and hold times) of the HW clock cycle doesn't produce a race condition.  The closer the sim mirrors reality, the slower it tends to run.  Have you made custom C modules for python code?

"I say that because I guess simulating a processor is quite a special case thing, a mapping from one instruction set to another around as few as possible corners, so there are probably no libraries for that (where people expect high speeds)?"

I don't think I'd try transferring the assembler / simulator to python at this point, though I'm not all that happy with the console ASCII "graphics" of the sim, particularly when running on Win7 / 10 where whatever they did to the console really slowed it down compared to XP.  It could be that I just need to recompile to a 64 bit target, but I'm kind of doubting that.  And it would be nice to make the visual side of it cross-platform.

But I'm mainly interested in getting the serial port portion of this project in better shape, maybe even make a simple editor / librarian for the presets.  Have you messed at all with the default GUI tools (Tkinter) of python?

Posted: 8/9/2019 10:22:09 AM
Buggins

From: Theremin Motherland

Joined: 3/16/2017


I don't think I'd try transferring the assembler / simulator to python at this point, though I'm not all that happy with the console ASCII "graphics" of the sim, particularly when running on Win7 / 10 where whatever they did to the console really slowed it down compared to XP.  It could be that I just need to recompile to a 64 bit target, but I'm kind of doubting that.  And it would be nice to make the visual side of it cross-platform.

Try Qt. It's cross platform, and would allow you to make nice looking convenient simulator GUI.

You must be logged in to post a reply. Please log in or register for a new account.