Jump to content
Why become a member? ×
  • advertisement_alt
  • advertisement_alt
  • advertisement_alt

Trampa v3 - DIY MIDI Controller


SamIAm
 Share

Recommended Posts

21 minutes ago, Random Guitarist said:

 

That reminds me of when I did some work at a flight simulator company, a lot of the engineers had started in Fortran and migrated to C.

They migrated syntax, but some never mastered the new idioms, and were writing what became known as C-tran

Many years ago I built a system (TUI! … yes this was DOS based) using turbo pascal to “wrap” a huge library of various Fortran functionality in the materials behaviour space to make it more accessible to clients. Never took the opportunity to learn Fortran tho (all I/O was text file based)

  • Like 1
Link to comment
Share on other sites

26 minutes ago, Random Guitarist said:

 

That reminds me of when I did some work at a flight simulator company, a lot of the engineers had started in Fortran and migrated to C.

They migrated syntax, but some never mastered the new idioms, and were writing what became known as C-tran

Saw that at BT Martlesham Heath in the 1980s', they took the C Pre-Processor and wrote a lot of macros so it resembled Basic but was really in C. Debugging that garbage was painful. In the end, I taught them how to use C to save my own sanity.

  • Haha 2
Link to comment
Share on other sites

5 hours ago, Random Guitarist said:

 

They migrated syntax, but some never mastered the new idioms, and were writing what became known as C-tran

 

First thing I did professionaly was an air traffic controller, it was written in C++ but the guy was an ADA programmer so he had #defined everything. Took a long time searching through headers to eventually find something was just defined as 0.

 

Second company I did work for professionally, was a company that did C++, and had clearly learned on the job, read the books but not really understood you didn't have to inherit everything from everything, and you didn't need to use all C++ features at the same time!

  • Haha 1
Link to comment
Share on other sites

5 hours ago, Smanth said:

Many years ago I built a system (TUI! … yes this was DOS based) using turbo pascal to “wrap” a huge library of various Fortran functionality in the materials behaviour space to make it more accessible to clients. Never took the opportunity to learn Fortran tho (all I/O was text file based)

 

4 hours ago, Smanth said:

Anyone else remember Zorland C (I first cut my teeth on C with this) ... later Zortech C?

S'manth x

Yes to the latter and I still have great fondness for TP, to the point I still do quite a bit of stuff in Free Pascal (or Lazarus for graphical work).  The Borland compiler is was quite something even on a 286, on modern hardware goes like SOAS :)  It was all much simpler back the day :).

 

Topic drift but following @Smanth's foray making me use the grey matter again, I have started dabbling with various AI sources to create code.  A serious game changer.  The code it has created for me is very good other than one instance of trying to assign a boolean variable into a float variable, static type checking saves the day.   Conversely I fed it some detailed questions on a materials science topic (I did three years postgraduate research in this field).  By giving it a false (simple) initial statement it produced very convincing descriptions that are the opposite of the actual reality. The best AI 'flaw' I have read so far (elsewhere) is generated article references that are simply bogus, look real but are fictional. 

Link to comment
Share on other sites

Trampa codebase now reliably will react to button presses and raise events in the multi-threaded mode. I'm now trying to figure out the best way to setup the mapping of button/expression actions to MIDI messages.

 

From an enclosure perspective, I've made some progress ... using a 3D printer at my makerspace I've printed parts to get Patty (My Prusa 3D printer that melted in the fire) up and running again.

 

Resulta over the past couple of days have been very promising ... Patty fires up and I have been able to move all the axes, which shows the electronics/motors are still operational.

image.thumb.png.b9bb79110f6d8a7961de905831d2dfbc.png

 

The biggest step is getting the extruder (The equivalent of a print head) working and today I've been successful in stripping down the melted bits.

image.thumb.png.4d3057b366ce75efc6b28f6bb6e96412.png

 

Next activity is to rebuild it with the new parts :)

S'manth x

 

(And HUGE thanks to @rwillett who is kindly printing some parts for me to help!)

 

Edited by Smanth
  • Like 3
Link to comment
Share on other sites

Well, much to my delight Patty is up and running!

IMG_1052.thumb.jpg.98c04af8990ac3dfaf8fe5ac0f324c99.jpg

 

IMG_1056.jpg.8aee2d0bb85ce4224b419948316e6b55.jpg

 

I am now in the process of modelling all the bits and bobs that will go into the enclosure so I can make holes of the right sizes in the right places as well as maximising its ability to stand up to being stomped upon!

 

I am toying with the idea of having one "module" (which will be on the right of Trampa) which houses a footswitch, OLED panel, expression socket, Pico (The brains) and the USB midi/power socket ... and then a second "module" that would house a footswitch and OLED panel.  The idea would be that one could add as many second modules as desired to result in as many footswitches as desired.  Having smaller individual modules would improve physical strength of each ... I just need to figure out a simple and robust way of connecting them together (I suspect superglue will form part of this!).

 

But so far ...

Trampav3v15.thumb.jpg.ad0a6641edba871e5a9b5a2d5aab4b91.jpg

S'manth x

  • Like 3
Link to comment
Share on other sites

Could you print the edges of the modules into a tongue and groove sort of a shape, with little internal tabs you could put a bolt through? You can put a dab of glue in the grooves and tighten it up with some tiny M2 bolts. Then to make it really modular, the end pieces have the corresponding tongue/groove and a hole for a bolt to sit on the outside. Might be too complicated though! I tried doing some 3d modelling once. I did not have a good time...

  • Like 1
Link to comment
Share on other sites

9 minutes ago, MichaelDean said:

Could you print the edges of the modules into a tongue and groove sort of a shape, with little internal tabs you could put a bolt through? You can put a dab of glue in the grooves and tighten it up with some tiny M2 bolts. Then to make it really modular, the end pieces have the corresponding tongue/groove and a hole for a bolt to sit on the outside. Might be too complicated though! I tried doing some 3d modelling once. I did not have a good time...

T&G is an option, peg and hole another. Tho I might just bolt them together using M3 bolts.

3D modelling only ever fell into place when I started playing with 3D printing. I've found it requires loads of patience, viewing existing designs to learn approaches, loads of youtubing a good ruler and calipers and many, many iterations. It is a magical experience to model something up and then see it appear on the printer! I started with FreeCad, whcih was OK but a bit buggy when I got to complex designs but then fell in love with Fusion 360 ... praise be to Autodesk for providing a free (For non-commercial use) licence!

S'manth x

 

  • Like 1
Link to comment
Share on other sites

Someone was doing stompboxes with a jigsaw puzzle connection. Individual effects that you could just puzzle together to make a board. Looked a really cool idea, with probably a price tag to match.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Progress on the h/w side.

The rendered 3D model of the Trampa enclosure looks like this

Trampav3v27.png.845883d8a8767d2e95e4f8e9c5f4d329.png

 

Patty managed to print it and I'm nearly there with the assembly.  Searching around for the 4th OLED display (which is in hiding!). The unsightly wires are there to allow me to use it with the development system to get the code running as desired, when this is complete the wires will be contained in the enclosure.

tf.thumb.jpg.2ffb81fce9062d79cdd723989c4dabb1.jpg

 

On the right hand side are a USB-C connector (for midi and power) and the jack for an expression pedal.

 

ts.thumb.jpg.5627352715cb8b9bbf85926937888964.jpg

 

Now ... to get back to the s/w coding side! :)

S'manth x

Edited by SamIAm
  • Like 4
Link to comment
Share on other sites

6 minutes ago, Woodinblack said:

Is the plastic printing good for stamping on?

Not sure yet, but I can add extra internal supports. My previous Trampa enclosure was sturdy enough to cope with stomping (tho perhaps not a car!)

S'manth x

Link to comment
Share on other sites

1 hour ago, Smanth said:

Not sure yet, but I can add extra internal supports. My previous Trampa enclosure was sturdy enough to cope with stomping (tho perhaps not a car!)

 

Of all the things my pedal board has had to contend with, a car hasn't happened yet!

 

I suppose actually you will find out and as you have the plans you can always print again.

 

 

28 minutes ago, itu said:

I have had my Future Compact in use for few years with no issues.

 

Oh yes I remember those now.

I know if the future impact came in cases that size I would probably still have one!

  • Like 2
Link to comment
Share on other sites

6 hours ago, Woodinblack said:

Of all the things my pedal board has had to contend with, a car hasn't happened yet!

I think it is the Softstep 2 usb midi pedalboard that claims to be able to survive a 2 story drop onto concrete and being run over by a car.

S'manth x

  • Like 1
Link to comment
Share on other sites

2 hours ago, Smanth said:

I think it is the Softstep 2 usb midi pedalboard that claims to be able to survive a 2 story drop onto concrete and being run over by a car.

S'manth x

 

Just checking and the 12-step will survive being run over by a van.

 

And is it my imagination, or have the prices of McMillen stuff rocketed?

Link to comment
Share on other sites

Some important changes have come up.

 

Button detection

Currently Tramps runs one thread per physical button; this periodically reads the physical button state (checking and debouncing the I/O pin it is connected to) and then takes the appropriate action.  I've been pondering how best to detect pressing of adjacent buttons which I intend to use to switch up. and down configuration banks for instance, but I could not think of a elegant way of expressing this in the design.  Then I had a lightbuld moment.  I'm going to add a layer of logic just above the physical button I/O that checks (with debounce) ALL the physical button inputs.  Once these inputs have stabilised it will update the state of a virtual button and this is what the existing button code will process. So at present, with 4 physical buttons (pB), the code will map to vitural buttons (vB) as follows:

pB1 -> vB1

pB2 -> vB2

pB3 -> vB3

pB4 -> vB4

pB1+pB2 -> vB5

pB2+pB3 -> vB6

pB3+pB4 -> vB7

Taking this approach requires but a small change to the code base, but then allows me to treat a virtual button press in the same way as I currently treat a physical button press ... suddenly the functionality of handling adjacent button presses is already there!

 

Storage of settings

I had been intending to use an EEPROM chip to add memory for storing configuration of which buttons do what (And I have one in my box of bits) but I've realised it is not a lot better in terms of speeds or  number of supported updates than the built in memory the Pico uses to store the firmware. The Pico flash memory is rated at 100,000 write/erase cycles (which would be about 10 updates a day for over 25 years!) totally good enough I think.  I've found some example code that allows one to use the tail end of the Pico memory for data storage without erasing the formware program so I'm going to have a go at getting this running.  The end result, will be about the same code complexity but lower hardware complexity and cost (Tho only about £5 lower lol).

 

Both of these things are on the back burner these past couple of weeks as I've been focussing on crafting an application for a clinical research nurse role that would be spot on for me ... real world has to take priority at times :)

 

S'manth x

Edited by Smanth
  • Like 2
Link to comment
Share on other sites

S'Manth
 

Abstracting the hardware away makes good sense. I'd do the same for the reading and writing of information to storage. The extra overhead of an abstraction layer is negligible.

 

Don't forget you could also look at long presses of the switch, short presses, double taps. The latter could be difficult to do on stage TBH 😊but might be worth thinking about just in case. Four switches gives you an awful lot of options.  

 

Are you still planning on an LCD per switch? If so, then abstracting this output layer as well makes even more sense as you have two buttons working together to do something. 
 

Looking good 
 

Rob

 

 

  • Like 1
Link to comment
Share on other sites

18 minutes ago, rwillett said:

Don't forget you could also look at long presses of the switch, short presses, double taps. The latter could be difficult to do on stage TBH 😊but might be worth thinking about just in case. Four switches gives you an awful lot of options.

Thanks Rob,

My button logic already does.

In "Instant" mode it only generates press/release events, but with near zero latency - this is aimed at looping or tap tempo type uses.

In "tap" mode, it generates single/double tap (It will actually do triple or more taps but I doubt these are of much value), long hold/long hold release and repeat events.  It also allows for a shifted long hold, if you tap then long hold.

 

It was combining this sort of stuff into adjacent buttons that got me thinnking and out popped the abstration layer, which will allow generating all of these event types for all of gthe virtual buttons (7 at present) :) 

 

I am still aiming for one OLED per button (tho I might also add an extra one for the whole board as well) ... I've not yet approached the design of the OLED code, but have found an example on the Pico site that I think will fit in nicely.

 

S'manth x

Edited by Smanth
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...