Find my way in all midi covering threads and options

Status
Not open for further replies.

Hajo

Member
Hi, quite new to midi and development boards and I'm getting a bit lost with all the information on the internet.

I want to put "midi" on my accordion. I started this project with the system of Brendan Varva, using an Arduino mega. I think I'll manage to get it working. I might put hiduino to it as well for real midi usb on the mega.
https://github.com/bvavra/MIDI_Accordion

The midification from Brendan is depending on a pc to play the actual music.
And that's a great start. But I would like to get the possibility to play the accordion with headphones and the acoustics of. But sounding like an accordion with the register options in it.

And with this I get lost on the direction to follow. There are so many bits and pieces on the internet, but I don't get the right ones together. All the searching on Google brought me to teensy as well. Because of the midi usb support and a few projects on midi controllers and playing audio. And the more powerful board compared to the Arduino. But I don't know if Arduino isn't good enough to achieve what I want.

Can someone tell me witch hardware, libraries and directions of codes I have to use? Or to look into? So I can read into all the stuff I actually need.

Regards, hajo
 
If you can explain the physical sensors on the right-hand keys and you can describe anything instrument specific about the expected MIDI output I'm sure I can at least run though any special issues you'll have and point to existing code to handle the basic stuff.

The physical build looks daunting and I didn't even get as far as the right hand keys sensors.

I think it might be easier to glue a 25 key controller to a keyboard from a PC with a Teensy 3.6 as a usbMIDI host and MIDI converter. (Kidding.... sort of)
 
The physical sensors on the keyboard are quite basic. The instrument used to be an old acoustic/electronic one of the 70's. The electronic part is beyond repair. The old switches with coil springs are all right and I like to keep them. I know they work on rebuild organs.

If I can't get them to work I look into hall or opto sensors.

There going to be matrices for the keyboards. 6x8 for the right hand, and 4x6 to the left hand. The 6x8 uses the least io on the board like the 4x6. But the 4x6 is based on the layout of the switches.

The bellow pressure I get with an bmp280 barometer sensor. This pressure will be transferred into general volume. Cc midi code if I'm correct.

The accordion has several potentiometers for regulating volumes. I might use one for overall volume. Also cc!?

The keyboards just send noteOne noteOff. I can set these to any midi channel a keyboard.

I would like to use buttons to create registers on the accordion, so I can choose different voices like the accounting accordion has. Which I can set on a channel to.

This has been done by Brendan and a few organ enthusiasts.

On the pc I could use midi software or hauptwerk/grand orgue depending on the possibilities they have.

Now I hope I can get this midi output used in an onboard sound system. This might be on the encoder itself or on a different board. I see a lot of midi controllers and encoders on my search, but not of these had all together. (At least to my understanding)

And that system has to play the accordion wav samples for the voices. Other sound options are not required for me. Drumkits and so. But if it comes along with the rest I won't mind.

I hope this is better for you?

I did find an much easier way indeed.. just buy an existing system..... But they are a bit to expensive to me. And not as much fun as making your own.

Regards.
 
The physical sensors on the keyboard are quite basic. The instrument used to be an old acoustic/electronic one of the 70's. The electronic part is beyond repair. The old switches with coil springs are all right and I like to keep them. I know they work on rebuild organs.
So you're not adding sensors like the guy in the project you reference? That should make it a thousand times easier.

And there is nothing like velocity to track, just on/off? That will also simplify things.

The air-pressure sensor appears to be I2C... I don't have any experience with this but once you have a numeric result sending it as midi will be simple enough but there will likely be some issues about how frequently to update and whether there is signal noise that needs to be filtered. ResponsiveAnalogRead() is an excellent library to get a smooth control signal from a noisy one.

Now I hope I can get this midi output used in an onboard sound system. This might be on the encoder itself or on a different board. I see a lot of midi controllers and encoders on my search, but not of these had all together. (At least to my understanding)

Not sure what you mean by 'encoder' in this context.

I'd hold off on an on-board sound module for now and focus on the MIDI controller part.

Once you're ready for it you should be able to write or borrow some code for a sample playback unit. Not my area.



Notes:

I haven't worked with matrix switches much.

I believe you can treat the two matrix like a 6x12 with six write and 12 read pins (depending on diode configuration).

A T3.5 would have enough pins to read you matrix and still have enough for a few other things but you could maybe get away with an LC or 3.2

My 'many buttons and knobs' code is available from the examples in the Teensyduino distribution or from this thread:
Example code for MIDI controllers with Pots and Buttons

It would only need another loop to index writing each control line to active as an outer loop while the inner loop reads through the inputs as usual.

The note array becomes two-dimensional as the note values for each button and this become D1 when the note-on/off event it generated so we need an array of 6x12 MIDI note values.

As each note value will likely be sequential it might be possible to forego the two-dimensional array 'note' matrix and calculate D1 from i and j indicator variables instead.

So these are my 'broad stroke' comments. Questions?
 
Last edited:
Have you looked MEMS pressure sensors that provide analog output like this?:

http://omronfs.omron.com/en_US/ecb/products/pdf/en-2smpp-02.pdf

It produces a voltage output that would be much simpler - scale and send.
(Although I'm not sure about pressure levels on this particular sensor.)

And there's no need for the level of accuracy and other weather features of the I2C chip.

All you would need to add is a constant current source.
 
Thank you for your replies!!

Why would it be easier to remove the existing switches with new one's? Not on the hardware I suppose. The switches Brendan uses are more difficult to place in my accordion. I keep my acoustic part, so I only have the "outside" of the accordion to work with. If I really have to replace the switches I have to look into opto vs hall.

The pressure on the accordion has two directions. When pressed, high pressure= higher volume, when pulled, negative pressure (to the outside). More negative pressure=higher volume.

Brendan has a code to make the pull and push both a positive outcome. I thought I would stick as close to that as possible.

I've been looking into the analogue pressure sensors. But I thinkt it is not easy. I need to get the negative and positive pressure to be positive output only. I haven't found a pressure sensor that can give me a this option. I know one I have seen I gonna have a new look into though. The pressure of the bellows is low. Up to 2kpa. Depending on the sensor I need to boost the outcome a little to create the right range of voltage output. But than again I have to protect the board against an accidental higher pressure and to high amplified output voltage. So I switched my focus back to the bmp280 (it is the successor of the bmp180 of Brendan)

The board reading the keys and registers, foot pedals, stops and swell pedals is named the midi encoder in the pipe organ world. This is one of my problems in midi. All the names used in the midi "world" and they don't appear to be used for the same object. But that can be my confusion.

I'll stick to the encoder for now. Get it working and go to the playback option after that. At least I know that it is a sensible stap to take. And no waist of effort.

Would I go for the teensy? So I can add the playback on the same board later or use the mega and do the playback on the teensy later?

I'll look to the needed pins for the matrices. I wanted to use as little as possible but that might not be necessary.

I going to have a look into the codes and library you suggest! Thanks!
 
MIDI is a good start. If you later want to try creating the sound on the microcontroller, get at least Teensy 3.2. If you want high quality output, you'll probably need the audio shield too. The DAC can sometimes work, but the DAC quality is limited to only 12 bit resolution.

Is playing pre-made samples the only good way to create the sound? Or do good-sounding synthesis models exist for accordions? (I can help with the electronics and programming questions... but I don't know much about music & accordions)
 
Why would it be easier to remove the existing switches with new one's?
It would not. I was saying the existing switches make it a thousand times easier build.
 
Ah. Sorry I misunderstood your comment. Though the "that" ment the other guys sensors. Not my keeping the existing.
 
Status
Not open for further replies.
Back
Top