Author Topic: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!  (Read 3319 times)

0 Members and 1 Guest are viewing this topic.

Offline NiisseTopic starter

  • Newbie
  • Posts: 8
  • Country: nl
Hi all,

I've been lurking on these forums for a while, but I've decided to make an account to share with you my first real electronics project. As the title says, I'm working on a Raspberry Pi based MIDI sequencer / controller. I am planning for the end result to be completely portable and stand-alone (in a 3D-printed case) with built in battery and audio, but it will also be able to hook it up to any MIDI device, either real hardware or software.

The core of this project is a sequencer written in Python. It uses the Pi's GPIO to interface with my hardware - at the moment a bunch of 7-segment displays for showing BPM and the current Pattern no, as well as an array of LEDs for indicating the sequencer's current step - all controlled by a bank of shift registers. I've already implemented all the basic stuff like playing / pausing, turning steps on or off, and more.

Inspired by the countless makers I've been watching on YouTube for the past 10 years or so, I've decided I wanna try and document my project's progress. I figured this would be an easy way for people to understand what's going on, and potentially give feedback, suggestions and / or criticism.







« Last Edit: July 28, 2021, 02:37:30 pm by Niisse »
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #1 on: July 29, 2021, 11:00:12 am »
Will you be using serial or USB MIDI?
A Pi 2, 3 can't be a USB gadget, a Pi Zero or Pi 4 can be.

What's the design? Will you use a little USB MIDI keyboard for input?
A Pi Zero with the keyboard into the host port and the peripheral port connected to something as a USB keyboard will work.

Edit: Pi 4 can be a peripheral over the Type C connector.
« Last Edit: July 29, 2021, 11:11:43 am by Renate »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #2 on: July 29, 2021, 06:44:47 pm »
Edit: Pi 4 can be a peripheral over the Type C connector.

How do you configure this software-wise?
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #3 on: July 29, 2021, 06:56:44 pm »
How do you configure this software-wise?
I'm not sure on the RPi 4, but it's something along these lines:
Code: [Select]
/boot/cmdline.txt

modules-load=dwc2,g_hid

/boot/config.txt

# Enable USB gadget
dtoverlay=dwc2
(Replace g_hid with g_midi or something.)
 

Offline NiisseTopic starter

  • Newbie
  • Posts: 8
  • Country: nl
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #4 on: July 30, 2021, 09:48:29 am »
Will you be using serial or USB MIDI?
A Pi 2, 3 can't be a USB gadget, a Pi Zero or Pi 4 can be.

I'm developing it using a Pi 4. There are a couple of options. When it's in stand-alone / portable mode, there is no need for MIDI out as it will all be internal. For hooking it up to other MIDI devices, I'll probably integrate a USB MIDI interface for serial in/out; and I'll expose a USB port for connecting USB-MIDI devices. I'll integrate a MIDI device select function in the device; hooking up multiple MIDI-capable devices will be possible (as will MIDI channel selecting).

What's the design? Will you use a little USB MIDI keyboard for input?

I am designing my own input systems. There will be sequencer-like inputs which I am working on right now, and later on I will build a small one or two-octave keyboard-like keys module. I will also build a drumpad module. I will experiment with allowing you to hook up external MIDI devices to this which could be passed on through.
 

Online Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 645
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #5 on: August 04, 2021, 01:10:25 am »
Sequencers are cool.  My interest in digital music control started in the 70s with Tangerine Dream. My first sequencer was a 8-step TTL based device tied to a TRS-80 Model 1 computer. Below is my latest which uses a  Teensy 3.5 for control. It doesn't do stored patterns, but operates like old school analog sequencers. My daughter did the art work (a nod to 'Look Mum No Computer').  Embedded in the panel is a PAIA MIDI-CV module that interfaces a keyboard and provides triggering.

I think having the PI will make yours really versatile. Be sure to post your progress and some audio when you have it.  If I may offer a development tip. Instead of using a shift register for each of the digits you can use a single Maxim 7219 to drive up to eight digits with the same serial stream you are using. It will integrate with the LED shift registers as well.  Nice looking project.
1241917-0
« Last Edit: August 04, 2021, 01:17:57 am by Ground_Loop »
There's no point getting old if you don't have stories.
 
The following users thanked this post: Niisse

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #6 on: August 04, 2021, 11:29:16 am »
Instead of using a shift register for each of the digits you can use a single Maxim 7219...
Hmm, I learned something here.
That chip has a "Code B" ROM in it to map 4 bits to 0-9, -, E, H, L, P.
Fortunately, there is a bypass for that.
Why you'd want to use the ROM anyway is a bit obscure to me since you have to send 16 bits in any case.
By using the ROM you lose the ability to make chasing segments in a circle or deciding for yourself if 6 & 9 have "tails".
 

Offline NiisseTopic starter

  • Newbie
  • Posts: 8
  • Country: nl
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #7 on: August 04, 2021, 08:01:41 pm »
Sequencers are cool.  My interest in digital music control started in the 70s with Tangerine Dream. My first sequencer was a 8-step TTL based device tied to a TRS-80 Model 1 computer. Below is my latest which uses a  Teensy 3.5 for control. It doesn't do stored patterns, but operates like old school analog sequencers. My daughter did the art work (a nod to 'Look Mum No Computer').  Embedded in the panel is a PAIA MIDI-CV module that interfaces a keyboard and provides triggering.

That's super cool! I can only imagine what it must have been like experiencing the very start of music synthesis. I love your Teensy-based sequencer, it looks amazing. Have any videos of it in action?

I think having the PI will make yours really versatile. Be sure to post your progress and some audio when you have it.  If I may offer a development tip. Instead of using a shift register for each of the digits you can use a single Maxim 7219 to drive up to eight digits with the same serial stream you are using. It will integrate with the LED shift registers as well.  Nice looking project.

I will most definitely look into that, especially if, as Renate says, the ROM is bypassable for manual control. It would indeed make my life (and wiring) easier. Once I build the actual thing (as this is after all intended to merely become a fully functional prototype) , I will look into it.

I'll for sure continue reporting my progress. I've been working on it a lot and despite the fact that there's much to be done, it's nearly at the stage where it can start playing music. I'd hoped to put out a new video this week, but it will be a while longer. Thank you for your kind words :)
 

Online Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 645
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #8 on: August 04, 2021, 11:22:05 pm »
Sequencers are cool.  My interest in digital music control started in the 70s with Tangerine Dream. My first sequencer was a 8-step TTL based device tied to a TRS-80 Model 1 computer. Below is my latest which uses a  Teensy 3.5 for control. It doesn't do stored patterns, but operates like old school analog sequencers. My daughter did the art work (a nod to 'Look Mum No Computer').  Embedded in the panel is a PAIA MIDI-CV module that interfaces a keyboard and provides triggering.

That's super cool! I can only imagine what it must have been like experiencing the very start of music synthesis. I love your Teensy-based sequencer, it looks amazing. Have any videos of it in action?

Here ya go.  Just uploaded, it's a couple years old now.  Video is also highlighting a programmable VCF on the proto board.
There's no point getting old if you don't have stories.
 
The following users thanked this post: Niisse

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2549
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #9 on: August 05, 2021, 02:00:39 am »
I wrote a MIDI Sequencer for my Roland piano some years ago.
It's written using DirectMusic and a MIDI to USB interface.
(I would highly recommend USB if you don't want to drop notes.)

Basically, it reads the piano keys and echos them to four MIDI channels.
Each output channel can be assigned a different instrument and use either the entire keyboard or
have the keyboard split.  For a split keyboard, only the highlighted keys on that channel will play.
The split keyboard can also be moved up or down in octave.

The key velocity can be over-ridden so the key will play as a piano or an organ.



Instrument and channel selection dialog boxes:

« Last Edit: August 05, 2021, 02:19:52 am by MarkF »
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #10 on: August 05, 2021, 10:10:30 am »
I wrote a MIDI Sequencer for my Roland piano some years ago.
Pretty nice, but I still hate knobs on GUIs.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2549
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #11 on: August 05, 2021, 10:53:58 am »
I wrote a MIDI Sequencer for my Roland piano some years ago.
Pretty nice, but I still hate knobs on GUIs.

Me too.  They have always been an operational sore spot.
Trying to rotate the mouse in a circle to set the value is always awkward.

My current programming is that you do NOT turn the knob. 
You pull in any direction from the center.
The value is the linear distance from the knob center.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #12 on: August 05, 2021, 11:52:08 am »
Mouse scroll wheels on controls is handy, but it only really works for stepwise things.

Years ago I worked with a company that used CATIA CAD and they had accessory knob boxes with 8? knobs on their workstations.

This is a control I wrote which steals its essence from hardware scopes and uses either mouse click or scroll to select.
 

Offline NiisseTopic starter

  • Newbie
  • Posts: 8
  • Country: nl
Re: A Work-In-Progress Raspberry Pi-based MIDI Sequencer & Controller!
« Reply #13 on: August 06, 2021, 10:13:50 am »
This is a control I wrote which steals its essence from hardware scopes and uses either mouse click or scroll to select.

Love the UI design on this!

I wrote a MIDI Sequencer for my Roland piano some years ago.

This looks really cool, too. I agree on the 'controlling knobs with a mouse'-thing, though, it's usually not a great user experience.
Makes me wonder what it will be like to implement physical knobs for my project - obviously it'll need some LED indicators of sorts :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf