SynthMaker

MIDI implementation

Archive · 2005 6 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

unkargherth ·

thinking on the new MIDI Modules ( specifically MIDI split), a question arised

If midi msgs are 4 bytes long, it's obvious that i cannot run at audio sample rate ( which anyway not needed. MIDI spec sets Dta rate at max of 32kbits/second)

Then, when i need to process to or more related midi messages, How can i now the timming difference between them? How many amples run between the first and the second ( assuming midi source sent them as fast as midispec allows) ?

NothanUmber ·

You could perhaps use the midi clock ( http://www.borg.com/~jglatt/tech/midispec/clock.htm ) and the sample rate informations from the Settings-module in order to calculate how many samples passed per quarter note at the current playing speed (not sure if that's what you wanted...). The time between two arbitrary consecutive midi messages could be mesured with the aid of a timer component that has a midi in, a midi out, an int out (for the current gap in milliseconds) and a trigger out that indicates a new message. It measures the time between two messages with a timer component (WTimer) that increments a counter at each tick (the counter is reset each time a new message comes in and it's last max. value is then saved in a sample and hold module which is connected to the output) Don't know the exact frequency of the WTimer module though (even not sure if the time between two ticks is absolutely equal)

unkargherth ·

Wtimer period suposed to be 1/25 secs, but i suspect it depends on CPU load

Anyway what i meant to askk ( soory if don't exprerssed correctly) is if MIDI Msgs coming from a source sending it as fats as it can are recived on regular intervals, or at irregulars intervals , if they are buffered or not, or if they simply arrived as fast as they are received

NothanUmber ·

Hm, the transfer speed should in any case be faster than 25 messages per second so if that's the finest resolution you can measure you can assume that you'll receive more than one message per interval if your event generator is continuously creating new messages at it's full rate. The number and regulatiry of messages per interval will most likely depend on the event generator, as you already wrote only the maximum transfer rate is (approximately) mentioned by the midi-specs. That doesn't mean that every controller has to be able to send it's messages at full rate (or even a rate that constantly divides the latter one).

unkargherth ·

So then, it is safe to assume irregular, asynchronous arriving of messages?

NothanUmber ·

Jupp (at least at my understanding...)

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.