MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Grid controller for the nw2s::b
MUFF WIGGLER Forum Index -> nw2s Goto page Previous  1, 2, 3, 4  Next [all]
Author Grid controller for the nw2s::b
a scanner darkly
w00t

Can't wait to give it a try tonight! I was able to successfully connect my grid128 yesterday and did get some buttons lighting up in semi-random manner (and with different brightness level) with one of the grid sketches - probably one of the test sketches? didn't investigate, mainly wanted to test the connection.
scottwilson
Well, that means there won't be any usb issues, but the protocols vary ever so slightly from 40h to series to grids, so that means that the grids won't yet work...

Confusingly, they're close enough that one will make the other do _something_ just probably not what you want it to.

Tho - my grids is on the way... so won't be long.

s
djthopa
This just keeps getting better and better.

Going to have to pull the trigger on this one!
a scanner darkly
scottwilson wrote:
Well, that means there won't be any usb issues, but the protocols vary ever so slightly from 40h to series to grids, so that means that the grids won't yet work...

Confusingly, they're close enough that one will make the other do _something_ just probably not what you want it to.

Tho - my grids is on the way... so won't be long.

s


So VB edition protocol is different from grayscale? I assumed there was one protocol for 40h and another for the later editions but sounds like that's not the case.

Saw your message on the monome forum, let me know if you need help with testing on VB128!
scottwilson
Correct. The protocol is very very optimized. He seems to have made a few optimizations as he went along, ensuring that the most information could be sent in the least number of bits. As the capabilities increased, it took a few more bits here and there.

You can set a complete 40h 128 grid in 32bytes. For series, you can set a full 256 grid in 36 bytes. For VB, you'll need 4 bytes per square, so I expect it will be a bit larger assuming I'm going to be using the varibright feature on most of the programs.

The 256 delivery was attempted today, but no one was home to receive, so I should have it by the weekend!

s
a scanner darkly
Interesting. I'd think for 40h 128 you'd only need 16 bytes (bit per square, 16*8 bits), for series I seem to remember 4 levels of brightness? so 2 bits per square, for 256 that would be 64 bytes, not sure how 36 bytes are achieved, and for VB 16 levels of brightness, so 4 bits per square, not bytes? Anyway, I should really look at the protocols :-) But yeah, that explains what I was seeing.
scottwilson
40H 128 is 32 bytes cause you can only address a single column at a time and the command structure is two bytes (one byte header and one byte payload), so that makes 16 * 2 = 32.

The series and grayscale are actually still only on and off. You can adjust brightness, but only the overall brightness of the board - not individual.

He introduced a 9 byte command that populates an entire quadrant (1 byte for the command and 8 bytes for the 64 bits), and so four nine byte commands = 36 bytes.

I haven't studied the grid structure in detail yet. It's definitely more flexible... The docs are available here:

http://monome.org/docs/tech:serial

Whenever I'm testing commands, I use a tool on OS X called CoolTerm that allows you to send hex bytes over the serial connection. Easy to play with if you're curious.
a scanner darkly
Thanks Scott, this is the context I was missing when I briefly looked at that link before, makes sense. Will try to experiment with my grid this weekend.
djthopa
Well...i bit the bullet! applause
scottwilson
Thanks for the order... a small group going out this week. Only about two or three more that are ready for final assembly if anyone else is thinking about making the plunge.

Can't wait to get 1.1 out to see what everyone does with it!

s
djthopa
Thumbs up for developing this!
scottwilson
@scanner: Grid compatible code checked in. Tested so far with the otogrid. You'll can see the code in there (right now anyway) specifies DEVICE_GRIDS and a 16x16 grid. You'll have to change that to 16x8 if you have a 128.

https://github.com/nw2s/b/blob/b-1.1.0-unstable/sketches/nw2s/bDemoGri dOto/bDemoGridOto.ino

JSON version to come...


s
a scanner darkly
It works! SlayerBadger! w00t

Only had a short time to test it before work, will have more time tonight. At first I wasn't getting anything on the grid (I think I did see "Grid initialized" on the serial monitor at that time but not 100% sure), in any case disconnecting and reconnecting the grid worked. And it's neat that when you do that it correctly reinitializes the grid without having to reset the ::b. So looks like you'll be able to switch the grid between the ::b and the Monome modules easily!

One thing I noticed (which could be by design) - all the buttons work as expected except the top row buttons which just flash briefly with lower brightness when pushed (just the button press, the top row LEDs still display the dots properly).

I'm using the grid with a USB OTG adapter and powering it with the Monome ext5v.

Thanks for adding this - what an amazing addition to what was already a very powerful module! Having more hands on control and ability to visualize things without tying up the outputs means a lot more interesting sketches. Hopefully USB MIDI host functionality will also be added one day ;-)

thumbs up
scottwilson
Glad to hear it! Thanks for the details. I'll check on the top row button presses - certainly not by design. I created a ticket.

I'm not sure the plugging and unplugging is _super_ robust. It's something that I'm working on, but haven't fully tested yet... I know it works to a degree, but in my head I can think of some situations when it is likely not to work.

More instruments and demos coming. I'm also going to try to get some of these that makes sense to work without requiring the grids for visualization/interaction - like the otogrid I wanted to do for a while even before I wrote the USB driver.

s
a scanner darkly
I didn't actually expect hot plugging to work, so that was a nice surprise! But yeah, I can see how it might not always work, and I assume unless a sketch does full grid refresh on each cycle it would need to have some additional code to be executed upon reconnecting the grid. In any case if a sketch is able to save its current state to the SD card then Reset should always work in case something goes wrong after reconnecting the grid.

I'll check on the top row issue again once I get home just to make sure!

Curious now, would HID host code be easier than MIDI host code? I'm thinking of using shnth as a controller for the ::b specifically but might be useful for some other HID stuff - I think Manta is HID? And what about OSC support? This would be the perfect excuse to get a Soundplane :-) And I would imagine there might be people wanting to buy the ::b just to be able to use their Manta or Soundplane with a modular without having to use a computer.
scottwilson
I'm getting a bit more comfortable with the USB code which certainly makes HID and MIDI less daunting, but for now I'd prefer to get the monome users some more depth before moving on.

In addition to the shnth, HID would open up other things like game controllers and other general wackiness...

OSC is certainly worth considering as well, and perhaps easier than either of the other two as I believe it's raw serial... back of my head, certainly.

-s
a scanner darkly
Yeah, I think Monome support is a great first step as it should get more people interested in writing sketches and extending the library, and perhaps somebody else will be able contribute to OSC/MIDI support - wish I could but there is a lot of domain knowledge on both Arduino and USB sides that I would need to catch up on.

I should correct myself re:Soundplane - looks like it uses its own protocol which gets converted to MIDI/OSC by the Soundplane client, but the client code is open source, so should be fairly easy to port by the looks of it.
scottwilson
Soundplane sure is purty. If anyone's got a spare one, I'll code to it as soon as I get it!!

Seriously though, once I get through what I've committed to for 1.1, if there are some other specific models you want support for, I'm happy to try if you can spare one for a while.

There's probably a bit of back and forth I can do with whomever beforehand just to POC it before committing, if you're willing to put some time in and send me some log files.

Some of those devices are rare, some are no longer available, and for others, it's a fairly hefty investment to have around, but could be a fair trade if you can help get started and then do without it for a bit.

-s
a scanner darkly
Thanks Scott - that's a very generous offer, and I might just take you up on this!

I've been tempted by Soundplane for a while now (and did play with one at a synth meet in Seattle) but no support for Windows stopped me so far. Being able to use the ::b might just give me the push to order one. Going to give this some thought...
a scanner darkly
Started a separate thread for more technical discussion on programming the grid, thought it makes sense to keep this thread for more general info / updates.

Link to the new thread: https://www.muffwiggler.com/forum/viewtopic.php?t=124210
a scanner darkly
Finally got my Game of Life sketch working last night. Here is a preview - sorry about the crappy iPad video!

I'll publish the code once I clean it up a bit and add more features (voltage control over the rules and a couple of other things).

So basically it runs the Game of Life using the grid to display it. Pressing a button flips that cell. You'll see me using blinkers in the video (3 cells in a row), they pretty neat in that they are stable by themselves, and add some rhythmic variation.

The top row is also output on the digital outs, and each analog out outputs a sum of all the live cells in each column (so 0 cells == 0V, all 8 cells == max V). The patch is LDB1E drum module, Piston Honda and Braids in meta mode, the digital outs are used to trigger stuff, and the analog outs control everything there is to control. It's really quite incredible to have these many outputs...

djthopa
Yikes!

Excellent work! Cant wait to try this!

Good times w00t w00t
scottwilson
It's so sad when they all die! Having all those outputs is pretty nice.

s
myecholalia
@a scanner darkly: oh....my....god!
please release the game of life patch already as is.
this would be super-nice to have as an additional control interface for an experimental modular gig here in singapore on sunday.
SlayerBadger! screaming goo yo w00t
a scanner darkly
scottwilson wrote:
It's so sad when they all die!


C'est la Vie ;-)

It's a bit weird when you add one cell and it takes a whole colony down! Once I add voltage control over the rules it'll be possible to adjust the rate of birth/death though, so things could be fine tuned, and another option will be enabling probability as well to allow for some chance. One consequence of this is that it will be possible to use some of the outputs to influence the rules, so the game itself will change in non obvious ways. Kinda like a universe circuit bending itself.

I'm also thinking of adding a way to use voltage to create new cells, say a new cell is created when a digital input goes high at the coordinates controlled by two analog inputs.

myecholalia wrote:
please release the game of life patch already as is.
this would be super-nice to have as an additional control interface for an experimental modular gig here in singapore on sunday.


I'll see what I can do, have to do extra hours at work this week while also having to get some things done before I travel this weekend (so, sadly no chance of working more on this until next week) but I'll try to clean up the code and remove whatever was hardcoded for my grid 128. Might have something tomorrow night.

A couple of things - my code depends on the 1.1 firmware so you will need that, have you tried it yet? Also, at this point you can set the tempo with a knob but you can't sync it to external clock yet (Scott - correct me if I'm wrong, I don't think there is a slave clock yet?).
MUFF WIGGLER Forum Index -> nw2s Goto page Previous  1, 2, 3, 4  Next [all]
Page 3 of 4
Powered by phpBB © phpBB Group