Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

MiniakTransform Engine Hardware Update

So I have been busy learning more about AVRStrudio, and how to break up large C programs into structures C/C++ under Arduino's framework.

This is fun stuff.

I notice a bargain on eBay that is sorely tempting me ... it is a Sainsmart Touch Screen with SD caard attachment .. and the deal-breaker is it INCLUDES the Mega 2560 for about £30.

See I figure I may want to add SD support to allow storage of syx dumps etc and recall of machine state.
Sure you can update the eeprom, but this has limited lifespan.
Whereas an micro SD card is cheap and commodity item.

Back to the fun. Now that I see how to split C/C++ I will add more functionality.
The current program was getting too large. There is a balance in embedded between speed/space. In adding the NRPN address decode to be identical to Miniak, I went past the SRAM limit.

Fortunately, F("a string") and/or PROGMEM directives move literal strings into flash memory space (recall ATMEL processors are Harvard architecture ie separate program and data space).

I was about to add in the full decode for value when I realized "Doh I already done this for MiniakPanel". And that's when I recalled that limits are important.
Without limits, your decode will trash memory (which is apparently what has happened to Micron users loading certain Ion patches into their memory via sysex load ... so nothing to do with MiniakPanel incase you were worried I caused it!).

Anyhow, this is why I have been investigating the C++ route (C# is suspiciously like Java which is not too dissimilar to C++).

Will be adding in classes to decode the full data values (strings and all) DEPENDING on the memory requirement. I still have to watch SRAM usage.

But one thing that using C++ made me think of, and I have implemented, was an ARP unit. (Later to add sequencing).

Basically, some kind souls have written scheduler and TimedAction classes, as well as an SL port.

So I can load notes into a SL Vector.
I can sort them (for UP/DOWN/UP^DOWN), or just heap them for RAND/"AS PLAYED" (aka PROG in some circles)..

Here's some diagnostics data from UP^DOWN

Pushing back 68
OFF ARP pos = 2 2 ON ARP pos = 3
OFF ARP pos = 3 2 ON ARP pos = 4
OFF ARP pos = 4 2 ON ARP pos = 3
OFF ARP pos = 3 2 ON ARP pos = 2
OFF ARP pos = 2 2 ON ARP pos = 1
OFF ARP pos = 1 2 ON ARP pos = 0
OFF ARP pos = 0 2 ON ARP pos = 1
OFF ARP pos = 1 2 ON ARP pos = 2
OFF ARP pos = 2 2 ON ARP pos = 3
OFF ARP pos = 3 2 ON ARP pos = 4
OFF ARP pos = 4 2 ON ARP pos = 3
OFF ARP pos = 3 2 ON ARP pos = 2
OFF ARP pos = 2 2 ON ARP pos = 1
OFF ARP pos = 1 2 ON ARP pos = 0
OFF ARP pos = 0 2 ON ARP pos = 1
OFF ARP pos = 1 2 ON ARP pos = 2
OFF ARP pos = 2 2 ON ARP pos = 3
OFF ARP pos = 3 2 ON ARP pos = 4
OFF ARP pos = 4 2 ON ARP pos = 3

So far this isnt a latching ARP (once you let go each not is cancelled).
I am thinking of the latching.
It is easy in so far as one simply doesnt cancel the note.
But most latching ARPs do cancel the notes as new notes are added ... so I dont know how long they allow before they consider a new note added ... research time!

You can imagine this playing the notes in a given order.
Right now I hardcoded the tempo at 120 bpm ( recall bpm == number of 1/4 notes per minute so 120 / (60 * 1000) = 1/ 500 ie new note every 500 ms.

Turns out this is nicely in sync with Miniak at 120bpm.
Ah but see I read the F8 values so I could sync that.
AND it means I probably could generate midi Sync (recall the transform engine has a merge so this could send sync data round the system ... to be tested!).

So all in all things are looking pretty good for MiniakTransform.

He is reading in BCR, and allowing 1 knob to control full range (no need to dual -ve/+ve knob).

He is ARPing if you want across one Keyboard zone.
Recall I allow up to 8.
And transposition within each zone (independent).
The merge still needs to determine what to do with the captured sysex.
But with any luck I will be able to reuse a lot of the C# to decode and put state to the knobs.

Will try to add in variable BPM for my arp unit.
And think about sequencer (I guess I could use the keypad to allow rest to be entered in step mode).

Regards

Steve H

Posted by Stephen Hookings 2012-08-02