Jump to content

MIDI concertina version 2.0 video


Recommended Posts

2 hours ago, RatFace said:

 

 

The other thing is that there will inevitably be delay in the system anyway - through processing on the microprocessor, and then in conversion from midi to audio. I suspect that delay is more than you want anyway, and you wouldn't want to add any more.

 

I follow this thread with great interest, although am not technically advanced and don't quite "get" everything.  However, I do play MIDI instruments (including the Hayden-like Striso board) very often, and can say that as long as the iPad or iPhone or even old laptop is being fed by an audio output (from the headphone-out) there has been no problem with latency/delays. But if I am using Bluetooth, it varies greatly depending upon the synth/app and the output device.  My question: do your DIY efforts face delays even when "hard wired" to the phone/tablet/PC?

Link to comment
Share on other sites

15 minutes ago, David Colpitts said:

My question: do your DIY efforts face delays even when "hard wired" to the phone/tablet/PC?

 

Yes - typically the chain is something like:

  1. The keys will be wired to 
  2. A programmable microprocessor - Arduino. This reads the keys (but often has to do it by scanning the keyboard, wired as a "matrix", which can take some time). It will also read things like a pressure/force sensor, which will have a clock (typically 80Hz). On mine, the processor completes its loop 80 times a second - so that's 12ms latency straight away!
  3. The microprocessor sends out midi:
    1. That might go direct into a hardware midi expander box. I expect this results in the lowest latency, but I don't know/think any/many allow for custom soundfonts
    2. Alternatively, it might go to an external computer/phone over USB (fraction of a ms) which is converting the midi into an audio signal. Audio Evolution Mobile Studio on my phone - it has custom drivers to reduce latency, and supports custom soundfonts and effects etc. I don't know what people use if they plug into a PC. 
    3. I think some people do this using something like a raspberry pi inside the instrument - which is basically the same thing.
  4. Alternatively, you could synthesize the audio on the microprocessor (avoiding midi altogether)- either by writing code to load/play soundfonts, or by just building the audio out of a truncated fourier series. I quite fancy doing the latter - the sound wouldn't be "real", but it would be very convenient (no external computer/phone needed), and you could still send out midi for recording etc. 
  5. Then the audio signal will go straight to wired headphones/amp+speakers. Bluetooth has a minimum of 40ms, which is a lot.

There may be other ways of doing things. 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, RatFace said:

Then the audio signal will go straight to wired headphones/amp+speakers. Bluetooth has a minimum of 40ms, which is a lot.

Wired headphones/amp+speakers is very important.  Audio over 'classic' Bluetooth has a lot of latency.  I believe that the audio signal is compressed at the transmitter and then decompressed at the receiver, all on the fly which would explain why the latency is so much.

 

There is another version of Bluetooth, BLE or Bluetooth Low Energy, which does not transmit audio at all, but it can be used to transmit midi messages, which are very short, from a musical instrument to a receiver like a cellphone.   The latency here should be a lot less.  This is how Widi Masters work and they claim a latency of 3ms. 

Edited by Don Taylor
typo
  • Like 1
Link to comment
Share on other sites

I really like having the instrument completely stand-alone - so no need for external power or devices, and wired headphones are not at all inconvenient. I clip my phone on the top - it takes in the midi, gives me far more control over the audio generation than I really need(!), and also powers the microprocessor over USB (with the phone display off, it will last a few hours). Then I have a little battery powered amp/speaker system. I took it on a train journey recently, and had an hour or so to kill at Basingstoke, so was able to play (silently) on the station platform. I didn't even get arrested!

 

image.thumb.jpeg.64f51f00a5cb80d482d6b61972563aad.jpeg

 

I do have a problem/question about that though - a lot of newer phones don't have a headphone socket, so I'm unsure how to do this on a phone that only has USB. I need the USB to power the Arduino/Teensy, and receive midi, and output to wired headphones. Does anybody know if that's possible (or suggest an alternative - I quite fancy getting a new(ish) Pixel, but this is stopping me!)?

 

Edited by RatFace
  • Like 1
Link to comment
Share on other sites

6 hours ago, RatFace said:

do have a problem/question about that though - a lot of newer phones don't have a headphone socket, so I'm unsure how to do this on a phone that only has USB.

I bought a pair of Creative Soundblaster JAM V2 headphones, they were fairly cheap and actually sound quite good.  They were advertised as Bluetooth headphones that could also be plugged into a Windows USB socket using a USB-C OTG cable.  The box said that it only worked in wired mode on Windows and that you had to use a Creative supplied app on Windows for it to work at all. 

 

I was getting frustrated with using these headphones in Bluetooth mode so I tried plugging them into my Android phone (a low-end Samsung A13 5G) with a USB-C OTG cable and it just worked!  No app needed. 

 

However, if you go this route for hearing your instrument then how are you going to connect your instrument to the phone's USB port for power and midi? 

 

 

 

 

Edited by Don Taylor
Removed some irrelevancies
Link to comment
Share on other sites

17 minutes ago, Don Taylor said:

However, if you go this route for hearing your instrument then how are you going to connect your instrument to the phone's USB port for power and midi? 

 

Yes - exactly! There are USB splitters (into headphone + usb), but I suspect the usb side is then for charging only:

 

image.png.08bc6ca0f916e284515811f0f3e05f89.png

 

Maybe another option would be to use a small USB hub (one in from the phone, two out)... I have no idea if it will work. Though perhaps I can try with my current phone.

 

Apologies for the thread drift :)

 

Edited by RatFace
Link to comment
Share on other sites

7 hours ago, RatFace said:

Maybe another option would be to use a small USB hub

This worked for me using a 4-port USB hub with a USB-A to USB-C adapter on the input port connected to my phone.  I plugged an Arduino Nano ESP32 running a USB midi test program into one of the ports and a pair of headphones connected via a USB-C to USB-A cable into another port.  Worked first time.

 

I think that you could find a simpler hub with an audio jack out and a USB-C in, but, in principle, you can use a hub with an Android phone.

 

Maybe one of these:

image.png.28e4899c50bb56220fef4b17be8764f8.png

Edited by Don Taylor
  • Thanks 1
Link to comment
Share on other sites

On 8/19/2024 at 8:45 AM, RatFace said:
  • A programmable microprocessor - Arduino. This reads the keys (but often has to do it by scanning the keyboard, wired as a "matrix", which can take some time). It will also read things like a pressure/force sensor, which will have a clock (typically 80Hz). On mine, the processor completes its loop 80 times a second - so that's 12ms latency straight away!

 

I'm using a Teensy 4.0, which is fast enough to avoid any macroscopic latency.  My main loop runs 1000 times per second, except when it is sending a MIDI message (which takes roughly 1ms for every note ON/OFF).  I don't wait for the bellows sensor to be ready to send me data, but rather I simply move on if it isn't.

 

I've also avoided Bluetooth anything because I've had the worst freaking luck interfacing with bluetooth audio in any reliable way, opting instead for the mild inconvenience of a cable.  The setup is USB-Midi from the box to a MacBook, running MainStage, and analog audio from the headphone jack to a speaker.  I have no perceptible latency from this chain, beyond what I might intentionally program into the concertina.

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

This is a full set of electronic parts for an English concertina:

- two key blocks & hall sensor boards

- two air pressure sensors

- transpose knob & midi bank knob

- midi sampler player + SDcard 

- audio amplifier + headphone jack + volume knob

- internal 1.5 inches 3W speakers

- power module + power switch

 

 

 

 

Screenshot_2024-09-20-21-01-30-841_com_miui.gallery.thumb.jpg.7213655f59ffb804ea6f4169dead60c5.jpg

 

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...