Standalone MIDI

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello, all.  Just thought I'd revisit this topic since it's been a  
while.  Has anyone ever constructed a Pi-based standalone 1-2 channel  
MIDI sequencer?  By standalone I mean it has an integral display and  
required pushbuttons/rotary knob for device control.

I'm not talking about a DAW, just a small box with appropriate  
interfaces (DIN in/out and/or USB (for MIDI-over-USB)) that allows one  
to both record in real-time, store on a flash drive and/or micro SD in  
.MID format (type 1 or 2) and play back?  This functionality is readily  
available on Linux OSs (but you need a USB-to-MIDI interface such as an  
M-Audio MIDISPORT).  The device I would like to functionally duplicate  
can be seen in action at
https://www.youtube.com/watch?v=5L6oicVUcvQ


That box (from the UK) was available some years back in both kit and  
assembled form.  Thanks for your time and comment.  Sincerely,

--  
J. B. Wood                e-mail: arl snipped-for-privacy@hotmail.com

Re: Standalone MIDI
declaimed the following:

Quoted text here. Click to load it
    What do you intend to show on the display?

    What type of control do you envision? (If you visualize a one/two
octave keyboard, you then have to specify how many notes in parallel -- one
note at a time can use a simple row/column keyboard scan -- but when you go
beyond two notes such a matrix can generate ghost key presses; avoiding
ghosts requires a linear matrix, which means LOTS of GPIOs -- a 1x24 would
need 24 GPIOs to detect key presses, while a 4x4 is only using 8 GPIOs for
16 keys)

Quoted text here. Click to load it

    MIDI itself is just an odd (and these days slow -- 31.25kbps) serial
port using 8N1 content, using opto-isolators on the receive lines (cf: this
Arduino shield https://www.sparkfun.com/products/12898 ). Using a suitable
ribbon cable might allow connecting this to an R-Pi (however -- you might
need level-shifters on the serial port; Arduino shields are commonly 5V
systems, the R-Pi is 3.3V; and the potentiometers won't be useful as the
R-Pi does not have ADC inputs)

    Timing is not part of the protocol -- timestamping on record, and
delaying on playback, is up to the processor handling the data stream.


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Re: Standalone MIDI
On Tue, 03 Sep 2019 13:06:58 -0400, Dennis Lee Bieber wrote:

Quoted text here. Click to load it

Not Necessarily so. To eliminate ghosting you simply need a diode on each  
switch (how do you think a quality computer keyboard manages N Key  
rollover?).
16 io pins gets you 8*8 = 64 keys so a full piano (81 keys if i remember  
correctly) still only requires 9 by 9.


--  
God must have loved calories, she made so many of them.

Re: Standalone MIDI
On Wed, 04 Sep 2019 10:34:21 GMT

Quoted text here. Click to load it
You need more than that to allow for various switches/selectors etc.
Also you need to scan the matrix as fast as possible, preferably in the tens of
microseconds range. However, just to make it 'interesting' you should include
some form of debounce mechanism.
Been there, done that, T shirt worn out!

--  
W J G

Re: Standalone MIDI
Quoted text here. Click to load it

Since sound only travels one foot per millisecond and most musical
instruments (and all groups) are bigger than that, scanning resolution of a
millisecond or so should be undetectable.  

--  
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

Re: Standalone MIDI
On Wed, 04 Sep 2019 10:43:19 -0500

Quoted text here. Click to load it

That's what I thought at first. Works fine when you just poke a few keys.

--  
W J G

Re: Standalone MIDI
On Wed, 04 Sep 2019 12:27:53 +0100, Folderol wrote:

Quoted text here. Click to load it

figures quoted were a minimum obviously the matrix can be made as large  
as possible.
microseconds for a full scan is massively overkill a 10mS scan time would  
equal 100 scans a second more than enough for human interaction.

My original job was with a manufacturer of custom industrial keyboards so  
I am fully aware of the need to debounce a 6mS delay when a change was  
detected was considered more than adequate.

another option would be to only recognise a change after 2 consecutive  
scans which would still be more than acceptable performance with the  
above 100hz scan frequency.



--  
American by birth; Texan by the grace of God.

Re: Standalone MIDI
Quoted text here. Click to load it

Isn't MIDI time resolution 1/128 of a second?  That's pretty
close to 100Hz aka 10msec.

--  
Robert Riches
snipped-for-privacy@jacob21819.net
We've slightly trimmed the long signature. Click to see the full one.
Re: Standalone MIDI

Quoted text here. Click to load it

No.  Serial MIDI transmits a note on or note off command in 960us,
i.e. about 1ms.  USB MIDI transmits commands with a 1ms resolution
if it's a full speed device.

David

Re: Standalone MIDI
declaimed the following:

Quoted text here. Click to load it

    The 1/128s thought may be a misunderstanding of notation level.

    Scoring software (Finale, et al) can notate down to a 128th note, but
that is independent of real-time. A 128th note at 120bps is going to be
much shorter than a 128th note at 40bps. It will also vary based upon
time-signature... If a quarter-note is 1 beat (common 4/4 or waltz time
3/4), the 128th note is just 1/32 of a beat, but if using cut-time (2/2)
that 128th note is 1/64th of a beat.

    MIDI beat clock is 24pulses per quarter note (12/8th, 6/16th, 3/32, so
the beat clock can't pin down 64th and 128th notes -- but since the beat
clock is meant to allow multiple devices to maintain sync, not timing... it
probably doesn't matter) https://en.wikipedia.org/wiki/MIDI_beat_clock

    MIDI timecode is a derivative of SMPTE timecode used to allow tracks to
be synchronized to video... https://en.wikipedia.org/wiki/MIDI_timecode
It's wall-clock time, not time from start of performance.


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Re: Standalone MIDI
declaimed the following:

Quoted text here. Click to load it

    But would the OP be up to adding 64+ additional discrete components?
{Of course, this whole part of the discussion is predicated on the OP
wanting to create a MIDI controller module, vs just a capture/playback
system).


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Re: Standalone MIDI
On 9/3/19 1:06 PM, Dennis Lee Bieber wrote:
Quoted text here. Click to load it
Hello, and thanks for your prompt reply.  First, I'm talking about an  
elementary MIDI sequencer primarily for live MIDI recording and playback  
- not editing (except maybe for punch in/out).  A "keyboard" has no  
relevance here as I'm not asking for a synthesizer or MIDI controller.  
The display's primary function would be to list/scroll the *.MID files  
on the removable storage (flashdrive and/or SD card) and allow selection  
of the file(s) to be played via the MIDI "out" port.  The keypad or  
pushbuttons on the device would allow for naming of MIDI data collected  
at the MIDI "in" port for subsequent storage as a *.MID file on the  
removable media.  The front panel controls could also provide for things  
like varying the playback tempo or transposing the playback file to  
another musical key.  BTW, I wanted this device to interface with a  
digital piano so one or two MIDI channels is all I require for recording  
and playback.  For the record I have (still in working condition) a 30+  
year old Brother (yeah the typewriter company) MDI-30 "Disk Composer"  
that provides the functions I've described.  But it has limited internal  
memory and only reads/writes to an to a 3.5" floppy disk (using a custom  
Brother format).  Sincerely,


--  
J. B. Wood                e-mail: arl snipped-for-privacy@hotmail.com

Re: Standalone MIDI
declaimed the following:


Quoted text here. Click to load it

    QWERTY, 16-key "phone/calculator" (spell stuff by how many times a
button is pushed), or just a D-pad (left/right for position, up-down to
select character) with enter/return [to navigate menus]?

Quoted text here. Click to load it

    A Linux device (R-Pi/Beaglebone) may be, on the one hand, overkill for
this, while on the other hand if not configured well could be subject to
timing issues (I'm pretty certain "Raspbian" is not using a real-time
kernel build, so periodic OS activities could cause jitter in the MIDI
data). One of the larger Arduinos (the ones using an ARM M-series processor
[Due] rather than the AVR processor [Uno/Mega]) probably has enough
on-board flash to support SD card, simple display (were you thinking a 2x16
B/W text display ( https://www.adafruit.com/product/181 [or serial mod
version https://www.adafruit.com/product/784 ]) or something more of a
graphics display? ( https://www.adafruit.com/product/3527 or
https://www.adafruit.com/product/2232 ).
https://www.adafruit.com/product/802 is arduino specific (and out of
stock), incorporating SD slot, color display, D-pad and four buttons
[counting the D-pad push down as one].


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Site Timeline