Bleached (DIY midi controller)

Weird. have you tried any other midi controllers? Do they do the same thing?

is there any output from the matron REPL?

people have had issues with ableton because the bleached firmware fires too many messages - i think there’s a fixed firmware to top ? i forget

p.s.: PRs would be greatly appreciated if someone feels like fixing firmware issues (or has). I haven’t kept up with this project much

I have the non spammy version installed. It should only push midi upon change.

Here is repl for arcologies init, toggle and untoggle play. At this point my norns is frozen:

# script clear
# script load: /home/we/dust/code/arcologies/arcologies.lua
including /home/we/dust/code/arcologies/lib/includes.lua
including /home/we/dust/code/arcologies/lib/config.lua
including /home/we/dust/code/arcologies/lib/structures.lua
including /home/we/dust/code/arcologies/lib/Cell.lua
including /home/we/dust/code/arcologies/lib/mixins/bearing_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/capacity_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/channel_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/charge_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/clockwise_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/crow_out_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/crumble_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/deflect_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/device_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/docs_stub_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/drift_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/duration_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/er_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/level_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/metabolism_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/network_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/notes_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/offset_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/operator_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/output_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/ports_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/probability_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/psyop_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/pulses_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/range_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/resilience_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/state_index_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/structure_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/target_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/territory_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/topography_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/turing_mixin.lua
including /home/we/dust/code/arcologies/lib/mixins/velocity_mixin.lua
including /home/we/dust/code/arcologies/lib/Signal.lua
including /home/we/dust/code/arcologies/lib/functions.lua
including /home/we/dust/code/arcologies/lib/saveload.lua
including /home/we/dust/code/arcologies/lib/_arc.lua
including /home/we/dust/code/arcologies/lib/_crow.lua
including /home/we/dust/code/arcologies/lib/counters.lua
including /home/we/dust/code/arcologies/lib/docs.lua
including /home/we/dust/code/arcologies/lib/filesystem.lua
including /home/we/dust/code/arcologies/lib/_grid.lua
including /home/we/dust/code/arcologies/lib/glyphs.lua
including /home/we/dust/code/arcologies/lib/graphics.lua
including /home/we/dust/code/arcologies/lib/keeper.lua
including /home/we/dust/code/arcologies/lib/menu.lua
including /home/we/dust/code/arcologies/lib/_midi.lua
including /home/we/dust/code/arcologies/lib/page.lua
including /home/we/dust/code/arcologies/lib/parameters.lua
including /home/we/dust/code/arcologies/lib/popup.lua
including /home/we/dust/code/arcologies/lib/_softcut.lua
including /home/we/dust/code/arcologies/lib/sound.lua
including /home/we/dust/code/arcologies/lib/api.lua
including /home/we/dust/code/arcologies/lib/sharer.lua
# script run
loading engine: PolyPerc
>> reading PMAP /home/we/dust/data/arcologies/arcologies.pmap
m.read: /home/we/dust/data/arcologies/arcologies.pmap not read.
Engine.register_commands; count: 7
___ engine commands ___
amp	 	f
cutoff	 	f
gain	 	f
hz	 	f
pan	 	f
pw	 	f
release	 	f
___ polls ___
amp_in_l
amp_in_r
amp_out_l
amp_out_r
cpu_avg
cpu_peak
pitch_in_l
pitch_in_r
# script init
need to donwload norns.online
pset >> read: /home/we/dust/data/arcologies/arcologies-01.pset
pset :: /home/we/dust/data/arcologies/arcologies-01.pset not read.

Unplugging and replugging bleached gives the following continuation:

midi inconsistency for device: bleached
ALSA lib rawmidi_hw.c:111:(snd_rawmidi_hw_status) SNDRV_RAWMIDI_IOCTL_STATUS failed: No such device
rm_dev_tty: /dev/ttyACM0
dev_monitor: an unrecognized TTY device was removed.
device monitor: unmatched tty device
device_monitor(): adding midi device bleached
device_monitor(): adding midi device bleached
_norns.midi.add: 3, bleached, userdata: 0x65d0d618

I have no presets saved for Arcologies.

I have already tried a reset.

Edit: trying other scripts which freezes upon startup, there is a traceback to arcologies:

lua: /home/we/dust/code/arcologies/lib/counters.lua:106: attempt to index a nil value (global 'counters')
stack traceback:
	/home/we/dust/code/arcologies/lib/counters.lua:106: in field 'event'
	/home/we/norns/lua/core/metro.lua:164: in function </home/we/norns/lua/core/metro.lua:160>

Clearing the script kills the loading issue.

Edit 2: Tried with Midi Fighter Twister. Was not able to reproduce the issue with this device.

wooooo that’s a weird one.

sort of random thought, but perhaps try disabling the serial port, if you can?

comment this out

and in arduino IDE > Tools > USB Type, select “MIDI” (isntead of MIDI+Serial)

pretty weird though. (for proximate cause i’d guess a MIDI event stuck in the queue, but i don’t know why the controller would matter. will take a look)

1 Like

That is a pretty good suggestion, thank you. I’ll try and report back.

FWIW- Event loop for the main sketch should include a midi read (even if it’s not being used)

EDIT for code:

// MIDI Controllers should discard incoming MIDI messages.
  while (usbMIDI.read()) {
  }

from here

MIDI controllers which only transmit data should be designed to read and ignore all incoming messages. If MIDI-OX or similar software is sending messages to Teensy, this simple code will prevent problems with USB buffers filling up with never-read messages.

EDIT #2 - did a test flashing the Bleached code to my teensy based OMX-27 with the above change (and modification for only 5 pots), loaded arcologies, no apparent problems so far.

5 Likes

oooh that could do it. if the usb buffer is always full of stuff then it will constantly be raising events, and any potential race condition between matron event loop and lua VM will be surfaced.

(or , i don’t know, matron could just be stalling forever trying to write to the device which would also bork things up pretty good.)

1 Like

After a quick tryout, adding this to the main loop seems to work. Thank you for the suggestion!

1 Like

yeah nice catch @okyeron !

1 Like

thxthx @zebra - if anyone feels like giving that PR a quick test I’ll go ahead & merge it : )

1 Like

Yep it works fine - for some reason my magpied version of the FW already included the midi read. I believe it was proposed earlier in this thread by someone so I just bunged it into mine.
Anyway, the addition is definitely fine for merging.

yes the same fix was proposed my @vicimity waaaay up there.

2 Likes

How does one go about ordering the pcbs? which file is relevant on the github? Utterly new at gizmo diy but otherwise happy with powertools. I think given a little practice I’ll be sweet soldering but I cannot figure out how to go about ordering the boards? I’m planning on building a portable case for shield/LPm3 with a built in battery and integrated mixer. Bleached fits nicely in the empty space and would complete the instrument beautifully. If anyone has a spare board I would love to acquire it from you, but also advice on commissioning the boards would be most welcome.

@nonverbalpoetry An alternate approach, one not requiring the pcb may be more appropriate to my abilities. Have you made one this way? It does sound simple enough but I’m sure I could manage a mistake.

Where are you located? I have 3 spare boards for my 9-pot version and you can gladly have one for the cost of postage. The main issue is that I’m in Japan and some countries are impossible to post to.
In fact, if anyone would like one of the spares, again for the cost of postage only, please let me know.

4 Likes

That’s very kind I would love one thank you! I’m in New Zealand, I believe postage between Japan and NZ is quite good, many of our community buy their modules from Japan and our groups allow Japanese posts. I would be thrilled to cover the post, I’ll message you.

2 Likes

Looks like you found a solution but for simple circuits like this I actually really enjoy freeware soldering. It’s especially useful when you want to put it in a different form factor, e.g all the knobs in a long row, or fitting it inside a little jewlery box. I didn’t end up making one because I realised teletype was incompatible with teensy based midi input.

2 Likes

Interesting, can you say more? Is that also true for ansible / satellite?

Yea all the info is scattered around here. No one got to the bottom of why but teletype midi in just wouldn’t work on certain midi controllers, and it seemed like midi controllers that were based on teensys were among the ones that didn’t work. I could be wrong though, if anybody wants to try?

2 Likes

Just in from the wonderful @ramphands. Unwrapping the Japanese newspaper was a joy. Such generosity, thank you very kindly.

255110793_445980180253733_1277684719757334236_n
255113181_594771541790081_2985852523403505186_n

6 Likes