Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

SysEx generator for Teensy-based MIDI controller project

Post any examples or modules that you want to share here

SysEx generator for Teensy-based MIDI controller project

Postby oddson » Thu Nov 21, 2013 8:40 am

Here's a very simple project I built to control a Teensy-based MIDI controller with a few bytes of system exclusive messaging. (The controller is just a box with a Teensy and some 1/4" sockets for up to three foot-switches and two expression pedals - since it's Teensy-based I'm calling it 'Footsy'.)


footsy_screeny.png
footsy_screeny.png (40.23 KiB) Viewed 46935 times


The message instructs the controller which MIDI channel and which CC numbers to communicate through.

The message consists of the start and end sysEx bytes, a four-byte Key and 9 bytes of program data.

Selectors generate the main 'message' part of the sysEx string (9 hex bytes)

1 - F0
2 - 7D
3-6 - Key
7 - MIDI channel (1-16)
8 - Ex1 CC
9 - Ex2 CC
10 - FS1 CC
11 - FS1 0=momentary / 1=Toggle
12 - FS2 CC
13 -FS2 0=momentary / 1=Toggle
14 - FS3 CC
15 - FS3 0=momentary / 1=Toggle

The code in the controller sends back a three-byte ACKnowledge message "F07DF7" which displays on the panel.

The indicators on the right-hand side let you see the controls are working as expected.

While the project is very simple I'm posting here as I think there might be some interest in FlowStone from Teensy builders -- many of whom appear to be involved with MIDI projects (Teensy allows MIDI communications over USB directly... unlike Arduino and its clones). FlowStones other features like easy access to the COM port may also be of interest.

EDIT -- corrected EX displays which were in the wrong positions on the front panel for first 7 downloads
I don't image anyone who downloaded was building the thing... but just in case.
Attachments
footsy_0.1.fsm
(148.94 KiB) Downloaded 2086 times
Last edited by oddson on Sat Jun 25, 2016 9:41 pm, edited 5 times in total.
oddson
 
Posts: 36
Joined: Sun Jul 25, 2010 12:13 am

Re: SysEx generator for Teensy-based MIDI controller project

Postby Walter Sommerfeld » Thu Nov 21, 2013 1:42 pm

Hi oddson,

very interesting project...

What will i need to add output cons to simulate a switch?
Is a driver needed for the Teensy USB Interface?

cheers,
Walter
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: SysEx generator for Teensy-based MIDI controller project

Postby oddson » Thu Nov 21, 2013 4:23 pm

Walter Sommerfeld wrote:Is a driver needed for the Teensy USB Interface?

No - plug it in and it works.
To program a Teesny there is a tiny app called the Teensy Loader. There's also some added librariesto make Aurdino software work with it. But once the board has a MIDI 'sketch' in its flash memory you don't need anything on your computer -same for other USB protocols.
Walter Sommerfeld wrote:What will i need to add output cons to simulate a switch?

Not sure if I understand. But the pins on the Teensy are pulled high by a pull-up resistor on the board until a momentary switch is engaged pulling to ground. So two wires can 'simulate' a switch... ;)
Ex pedals are just a pot as a voltage divider.
footsy_w_pedals.JPG
footsy_w_pedals.JPG (70.46 KiB) Viewed 46896 times
oddson
 
Posts: 36
Joined: Sun Jul 25, 2010 12:13 am

Re: SysEx generator for Teensy-based MIDI controller project

Postby oddson » Thu Nov 21, 2013 9:15 pm

Here's all that's inside the box:
footsy_wire.jpg
footsy_wire.jpg (41.64 KiB) Viewed 46885 times


Unfortunately I couldn't find a TRS that had a switch on the Ring connector at my local electronics store so this pulls the analog pin on any unused EX pedal socket to VCC instead of ground but the device-code will only send a CC=127 msg if you're connected when you unplug. [EDIT - this is needed to prevent the pin's voltage from 'floating' and generating garbage messages. You have to pull it to one side or the other when not in use.]
So... apart from getting some Teensy people to consider FlowStone I hope this might get some of you to try Teensy.

They're not expensive (if bought directly from Paul's site) and they're really easy to get started on -- especially for MIDI where you can just plug directly thru USB without the software kludges standard Arduinos seem to require.
Last edited by oddson on Thu Nov 21, 2013 10:58 pm, edited 1 time in total.
oddson
 
Posts: 36
Joined: Sun Jul 25, 2010 12:13 am

Re: SysEx generator for Teensy-based MIDI controller project

Postby Walter Sommerfeld » Thu Nov 21, 2013 9:38 pm

Hi oddson again,

No - plug it in and it works.

that's even more awesome :-)

Not sure if I understand.
It's my fault - i often translate like i think in german ;-)
I want it to act like a switch to the 'outside' not like urs as an input... think i need a relay 4 this
I worked in a QC Team in a manufactory with SMD pick-and-place machines etc. before now as a freelancer but i'm now a little rusty :idea:

Here's all that's inside the box:

Thanks 4 showing even the innermost part of ur box!

maybe we can collaborate a little in my project... tried the FT232 - then thought about HID but had other projects in my head...
Now FS features HID but cannot produce core friendly exes :-(
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: SysEx generator for Teensy-based MIDI controller project

Postby oddson » Thu Nov 21, 2013 11:37 pm

Hey Walter.
Walter Sommerfeld wrote:maybe we can collaborate a little in my project...

I barely understand the parts of this thing I built :lol: ... HID and FT232 mean very little to me but Paul Stoffregen is a genius at this stuff and he's very generous with his time on his forum.

That said... I would assume a relay is how you'd control external switches.

His web-site doesn't do his product justice (IMHO there's too much old project info when clearly Teensy is the main thing there that draws people to the site) but there is a lot of great info so you can likely tell if Teensy will work for you. Or you could just order one...

You might want to check these pages:

http://pjrc.com/teensy/rawhid.html
http://pjrc.com/teensy/usb_serial.html
http://pjrc.com/teensy/uart.html
and less so...
http://pjrc.com/teensy/td_uart.html
http://pjrc.com/teensy/td_serial.html
oddson
 
Posts: 36
Joined: Sun Jul 25, 2010 12:13 am

Re: SysEx generator for Teensy-based MIDI controller project

Postby Walter Sommerfeld » Fri Nov 22, 2013 12:19 pm

Thanks for all ur Info and all the links! :)

Or you could just order one...

well - this is the next thing i will do! ;)

Keep on doing!
Will report later...

Cheers,
Walter
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: SysEx generator for Teensy-based MIDI controller project

Postby trogluddite » Mon Nov 25, 2013 9:52 am

Hi there oddson - great to see you around again!
Great 'come back' post - plug and play USB on such a dinky little board looks like great fun, thin I'll have to get me one of those!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: SysEx generator for Teensy-based MIDI controller project

Postby oddson » Wed Dec 04, 2013 3:14 am

Hey Trog... thanks.

From a FS perspective it's a no-brainer. (Frankly as a physical build and as C/Arduino coding it's pretty simple too!)

I have a couple issues I'm hoping someone here can help me out with... (even though neither really has to do with FS).

The Teensy has 10 bit ADCs that read the voltage coming of the expression pedals as voltage dividers. So I have 3 bits more resolution than the 128 MIDI values from using only a single CC message.

So I'm looking to make use of them in two ways:

1) To use MSB/LSB paired CC messages (with and optional low-pass filter since I do not have 14 bits of data).
2) To map the voltage to curves rather than a linear response.

For the first I need to know which message is supposed to be sent last? I'd assume MSB otherwise you'd risk big leaps if it misread, for example, 88,000 --> 87,127 as 88,000 --> 88,127 --> 87,127.

On the down side it means you have to send the pair for every message update instead of just when the MSB changes.

Does anyone know (or better yet can anyone point me to the correct reference)?

As for the second I'd like to find some function that, with a very small number of parameters, lets me control not only the convexity/concavity of the curve but also where the first derivative hits unity (i.e. mapping the 45 degree tangent across as much of the range as possible with a single variable if possible).

My algebra is pretty rusty from decades of under-use.

Can anyone help on either front?
oddson
 
Posts: 36
Joined: Sun Jul 25, 2010 12:13 am

Re: SysEx generator for Teensy-based MIDI controller project

Postby carpenzano » Thu Mar 05, 2020 3:13 pm

oddson wrote:Here's a very simple project I built to control a Teensy-based MIDI controller with a few bytes of system exclusive messaging. (The controller is just a box with a Teensy and some 1/4" sockets for up to three foot-switches and two expression pedals - since it's Teensy-based I'm calling it 'Footsy'.)

I'm building up a VST that should send out sysex messages.
I have discovered that, whilst the standalone (exe) version works well, the VST version doesn't work (I have tried it in many different hosts with the same results): no sysex message is sent out but simple a "F0 00 00 00" message.
I think that there is a bug in the StrSysex primitive.
Have you ever tried to compile your SysEx generator as a VST plugin? Have you met the same problem or not?
Many thanks
Giovanni
carpenzano
 
Posts: 12
Joined: Mon Jul 23, 2012 12:24 pm
Location: Milan (Italy)

Next

Return to User Examples

Who is online

Users browsing this forum: No registered users and 44 guests