That will be nice. It might also help in deciding how quickly I am going to jump on a grid :slight_smile:. Btw, screen functions work fine. Thanks for putting them together as well! I am currently using the screen as my debug interface until I start coding functionalities for the screen :stuck_out_tongue:. Gotta get one of them FTDI cables soon.

ha, screen is a luxury! i used to debug using grid ))

need to add more screen functions but need to figure out how to define an interface for them that isn’t teletype screen specific.


just pushed an update that fixes get_knob_value and get_cv for teletype and adds functions to read TXi inputs and knobs.


will try to add something soon!

5 Likes

Awesomo…will check it out!

put together a simple app that translates shnth button pressed to gates and barr pressure to CVs:

this took about 20 min using multipass. i didn’t combine it with the simple app (that converts MIDI to CV) - i want to keep example apps focused on one application, but it would be trivial to combine the 2 into a single app.

6 Likes

this was really fast!!! thanks!!! :smiley:
i was expecting a .hex file, but i cant even find avr32-gnu-toolchain-3.4.3.820-linux.any.x86_64.tar.gz and avr32-headers-6.2.0.742.zip to setup toolchain on linux… :thinking:
there is a broken Atmel link on https://github.com/monome/libavr32 and i couldnt find them on microchip site…

1 Like

yeah, the github is just the source code.

sorry about the toolchain setup confusion - i need to update the instructions. check this post for details: Module firmware development: avr32 toolchain

edit: i’ve uploaded the atmel patches file but not sure how to make it work for linux - could you post in the toolchain thread and somebody else might be able to help?

1 Like

@scanner_darkly, is there an event to recognize knob adjustment for TT? There is a knob value function to fetch the value but I am wondering if I can do stuff like a screen crawl based on knob move and then a row select based on front button press. Doesn’t look like it could be done but wanted to check with you once. Otherwise, I could just go in the direction of grid based interaction, I guess.

2 Likes

Like you want an event posted when the knob is adjusted? You’d have to set up a timer to poll the knob value and post an event or something. There’s probably also a little noise on the ADC all the time, so you may need to figure out some threshold value for the amount of change that constitutes a significant change for your application. Some example usage polling ADCs with a timer and posting events in the White Whale source.

2 Likes

yes, that’s what I am looking for. This is very helpful, thanks! @scanner_darkly already has a bunch of timer driven events. Maybe I could add one for the knob value change, considering a noise threshold. Wil check out the example in white whale as well.

1 Like

yeah you would need to set up your own timer to poll for knob values, which is pretty straightforward:

in init_control add this: add_timed_event(0, 50, 1);

this sets up timer 0 (first parameter is the timer index, you can have up to 100 timers) to fire every 50ms (second parameter), repeating (third parameter, set to 0 to fire just once).

and then in process_event do this:

        case TIMED_EVENT:
            if (data[0] == 0) knobValue = get_knob_value(0);
            break;

timers call process_event with TIMED_EVENT, and the first data byte is the timer index.


there is some inconsistency that i’d like to solve since really everything is polled - get_knob_values gets its values from polling periodically too, it’s just done behind the scenes. i think it would make sense to add a way to configure a knob to send an event when its value changes, so you don’t have to do it manually. as sam mentioned, there is some noise always inherently present though, so you have to be aware of the impact on performance - you wouldn’t want the event to trigger each time you poll. what would make sense is to specify min/max/step values. having a dedicated function/event would also allow to implement something that would avoid jumping values when it’s right on the edge between 2 values.

3 Likes

@csboling, @scanner_darkly, simple code with this timer approach works like a charm! I will look more into how it hits performance, but this definitely gives a nice way forward for the UI behavior I was hoping for.

1 Like

Several novice q’s—
How simple might it be to set up polyearthsea to run on TT, and then extend voices with ansible i2c? How about crow?
In addition, How would you go about adjusting the vertical intervals from fourths to fifths?
Thanks for any help :wink:

This should be straightforward since multipass supports Teletype, just run the polyearthsea build instructions but go to the Teletype directory instead of Ansible.

libavr32 doesn’t have any support for doing audio rate CV, it’s probably possible to get low audio rates out of the DACs with basically a complete rewrite of the DAC control code, but I would not be surprised if you ran into hardware limits of a couple kHz or less. The hardware and code are not designed for this.

multipass basically provides some abstractions over the common hardware used by Ansible/Teletype/trilogy modules, but everything is still pretty tied to libavr32. Running multipass on crow doesn’t really make sense because crow is an STM32 device: different processor, different peripheral libraries, totally different hardware across the board. Using crow as a synthesis voice controlled by I2C should be possible at some indeterminate point in the future (a major firmware update), see this issue.

I dunno, what have you tried? Looks like input processing for key presses on the normal “play surface” starts here, note index calculation is here, pitch full range CV values to send to different followers are calculated here.

2 Likes

So so helpful. You’ve given me my homework!
And to clarify—I just meant using ansible or crow as additional CV/gate outs over i2c sent from TT, no audio rate stuff!

yeah, you should be able to build polyES for teletype (run make from the teletype subfolder, as sam mentions). i tried it and can confirm it works.

i was going to add something to take advantage of the screen but never got a chance to finish it. there is some limited screen support in multipass now, so it should be pretty straightforward to add it. could use it to display the current mode (playing/armed/recording) and other useful info.

if you mean using ansible as a teletype expander for 4 extra CV/gates - multipass doesn’t currently support it. would be very easy to add though, i will try to do this soon. same for crow but not sure, didn’t have a chance to look closely at crow yet.

for changing intervals i think you only need to change 2 places. polyES stores actual x and y coordinates, not the note index, so you just need to change note index calculation. the 2nd place is for MIDI notes as polyES has to map it back to x/y coordinates. pretty sure that’s it.

this is actually for using some of the outputs for CVs where it maps x/y coordinates to the full CV range (so you could use the keyboard as a X/Y pad controller - you can even record control gestures into patterns and modify them with runes as you would modify sequences).

multipass provides facilities for mapping various devices and outputs to voices, and then you just work with voices and notes. this is where it outputs notes: https://github.com/scanner-darkly/polyearthsea/blob/master/src/control.c#L641

i really need to document how voice mapping and note functions work - high on my list! need to finish porting orca’s heart to multipass first as it will provide a better example of working with multipass.

2 Likes

added documentation on using voice allocation and notes functions: https://github.com/scanner-darkly/multipass/wiki/voices-and-notes

3 Likes

hi @scanner_darkly
not luck installing toolchain here. ubuntu studio 19.10 –
can you upload a .hex multipass-shnth? :slight_smile:
with dfu-programmer i can upload it…

which module do you need the firmware for?

white whale & meadowphysics – can you trigger 8 outs with 8 buttons on mp? :slight_smile:

@scanner_darkly, just curious…is there a less resource intensive way other than using timer events to keep a continuously on and gradually varying cv output? Trying to implement modulations like glides where I want to gradually oscillate between two microtonal notes within the timeframe of order of milliseconds. I am using a timer event that fires every 10-20ms to recalculate and update cv, but the timing seems to be quite inaccurate since I presume it is too heavy when running alongside everything else.

@scanner_darkly, its probably user error :slight_smile:. I think I have been using display statements inside those timed event handlers. After commenting out all of them, I seem to get better accuracy.

Nevertheless, would be nice to hear your thoughts on how best to handle what I am looking to do. Thanks!