Jump to content

Warning: Techy Type Question


Markyboard

Recommended Posts

  • Members

I was reading the S90ES manual today (exciting day at work) and it talks about the tone generator processing internal midi messages.

 

" The keyboad itself doesn't generate sounds, but instead generates/transmits note on/off, velocity and other information (MIDI messages) to the synthesizers tone generator block when you play notes. The controllers also generates/transmits MIDI messages. The synthesizer's tone generator block produces the sound according to the MIDI messages transmitted from the keyboard and controllers."

 

Note - this is not referring to MIDI messages coming into the MIDI input connector.

 

So I was always under the impression that internally the data coming from the builty in keyboard and controllers was generated over a parallel bus and had a different protocol then midi. Isn't the keyboard and other controllers scanned and read over some address and data buses by the processor and then sent over the same or other parallel busses to the dedicated ASIC/FPGA or what ever they're using for the tone generator and that MIDI data is produced strictly for outputing to the external world and not used internally?

 

How do most keyboard work internally?

 

Is the data really first turned into serial MIDI data and then fed to the other hardware? This seems slow.

Link to comment
Share on other sites

  • Members

That's a good question. If it is all MIDI data though, internally they could in theory use a faster serial bus. The fact that it's just a keyboard, mod wheel, CC knob, etc. though, means that it wouldn't saturate a standard MIDI connection in the first place though most likely. If it's on its own MIDI bus, and uses a separate one for external connections, I could see it having plenty of speed for these sorts of things. It would also make it easier to interface the internals to the externals.

 

I'm sure there are keyboards that work both ways, but I really don't have any specific data to back that up. Just theories. I never really thought about it. I just accepted that there is either an electronic link, or the old Moog wire grid :D

Link to comment
Share on other sites

  • Members

With most synthesizers, the keyboard is usually handled via either some kind of gate array or via the system processor. The system processor then sends note information over to the sound engine and the sound engine generates the blips, bloops, and whatnot.

 

I don't know if you're familiar with how velocity sensitivity works, but here's how the usual keyboard algo works:

 

Say you have an 88-note keyboard. There are effectively two "switches" per key - one that corresponds to the up position, and one that corresponds to the down, or full travel position. That gives us 176 switches for an 88 key keybed.

 

Now, the designer will usually arrange the keyboard in a matrix of rows and columns, then scan the position of each switch. Since this takes many thousands of operations per second, a microprocessor usually handles this. That's exactly how Dave Rossum built the first scanned polyphonic keyboard.

 

So, the microprocessor scans each switch, and according to some predefined software algorithm, it will determine the time of flight of each key (which is the time from when the up switch on the key is released, and the time the down switch on the same key is hit - hence the name velocity, not pressure, sensitivity), and storing that in a format similar to a MIDI message. Originally, the processor would have just stuffed these messages in a buffer for the voice engine to handle, but now it's integrated more into the system since CPUs are much more powerful nowadays.

 

So, to whittle it down:

 

1. Processor senses a key is in flight, it determines which note the key is, then starts a timer counting the in-flight time of the key.

2. When the key's bottom switch is pressed, the timer stops. The longer the time, the quieter the note.

3. The software routine translates this information and stuffs it into a message that is roughly translated "Note XX played at XX velocity" - which is roughly the same as a MIDI message.

4. The processor sends it on its way to the next subroutine, or next processor in the chain for more antique synths.

 

I could get into more detail and nuance like velocity curves and whatnot, but I think I'll refrain for now. :-)

Link to comment
Share on other sites

  • Members

Thanks guys. What Proteus says is exactly how I've seen these things work for 20+ years (Memorymoog being my specialty hobby).

I think what Yamaha is calling MIDI messages here is like you say messages with the equivalent data content of MIDI in them. Probably makes it easier for people to understand. Every block diagram I've ever looked at shows parallel bus architecture and it crossed my mind that maybe they were doing things different to save money or something.

 

So let's say you wanted to take a 4 voice keyboard and turn it into an 8 voice by adding another tone generator board to it. You could do it via MIDI and make the connections internal and feed the audio outputs of one into the audio inputs of the other. But if you were designing it as an 8 voice to begin with, both boards (tone generators) would tie directly into the processor directly via the parallel busses.

 

Just thinking out loud.

Link to comment
Share on other sites

  • Members

My Yamaha keyboard does exactly what Markyboard's manual says. Looking at the schematic, the keys are connected to a diode matrix via the switches. The matrix feeds into a 63805 microprocessor via two parallel busses, and the mpu then outputs serial MIDI to the main CPU. That in turn fires off the signals to the tone generator and effects chips.

 

Bryan

Link to comment
Share on other sites

  • Members

 

Originally posted by Markyboard

So let's say you wanted to take a 4 voice keyboard and turn it into an 8 voice by adding another tone generator board to it. You could do it via MIDI and make the connections internal and feed the audio outputs of one into the audio inputs of the other. But if you were designing it as an 8 voice to begin with, both boards (tone generators) would tie directly into the processor directly via the parallel busses.


Just thinking out loud.

 

 

Very true - you don't have to have parallel buses though. What most people forget is that MIDI defines not only a communication protocol, but also a message format. The protocol defines how things hook up (serial vs. parallel, voltage levels, etc.), and the message format defines how things talk once they're hooked up (note on, note off, etc.). When Yamaha effectively says "We're sending MIDI from the processor to the tone generator." It will loosely mean we're sending MIDI style messages over. It's protocol independent, but the message format is the same and/or similar.

 

Just like you can send MIDI over ethernet, firewire, USB, and raw MIDI cables. It's the message format that goes across, not the protocol.

 

In my experience designing synths over the ages, I've found that synth manufacturers extend MIDI if not invent a more detailed message format. 7 and 14-bit pitch is grossly underweighted, especially if you have a 32-bit raw pitch parameter that a voice engine can have. Some manufacturers will keep the message format, but extend the size up to 32 bits to increase internal resolution from the microprocessor. That makes MIDI processing easy, since you just drop the MIDI messages in as a subset of the higher resolution message format, no translation is required.

Link to comment
Share on other sites

  • Members

Thanks Bryan. I suggested it as a possibility but I am a little surprised its converted to serial.. But as Proteus says the meassage formats are pretty much consistant but they can architect the internal transmission protocol any way they like. Thanks-back to music. :cool:

Link to comment
Share on other sites

  • Members

 

Originally posted by Markyboard

I think what Yamaha is calling MIDI messages here is like you say messages with the equivalent data content of MIDI in them. Probably makes it easier for people to understand.

 

If you haven't done so already, you might want to download the Data List for the S90ES. I think you'll be as impressed as I was how much is communicated via its MIDI messages.

Link to comment
Share on other sites

  • Members

Seems logical that Yamaha do it that way. After all, if you're keying in midi to send up the wire, all you need is the keyboard. Same with receiving. If the main synth is set up to receive midi, it makes sense for the keyboard to transmit to the CPU in the same format. Saves having two separate interfaces.

 

Bryan

Link to comment
Share on other sites

  • Members

Originally posted by Pilot

Seems logical that Yamaha do it that way. After all, if you're keying in midi to send up the wire, all you need is the keyboard. Same with receiving. If the main synth is set up to receive midi, it makes sense for the keyboard to transmit to the CPU in the same format. Saves having two separate interfaces.


Bryan

 

Good point. I just had it the other way around in my head. The serial midi input(midi connector) would get converted to parallel by the processor so that it went to the tone generator over the same protocol bus as the internal controller messages.

 

OK I thought I told you nerds to end this thread and make music.:p:D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...