FR - MIDI I/O in Jack Connections Bay (Jorgen please read)

Official support for: energy-xt.com
RELATED
PRODUCTS

Post

This works (sorta)! Thanks!!! I now have a somewhat workable pitchbend...

If I pitch up (from center to right) I get a nice pitch up..

But....

If I pitch down (from center to left) The pitch scale is reversed (!) It starts out high pitched just off center, and when I max out to the left, its back to normal pitch.

It makes me wonder if there isn't a problem parsing negative numbers in the (stream) code? Is there an easy patch for this? Perhaps convert negative numbers to positive... but how would you distinguish a down pitch from an up pitch?

Thanks again for your help... Its nice to finally be really, really close to having EnergyXT2 working a full 100%

Cheers,
NexxuSix

Post

okay, i looked at my version of the code, which (i think) works right with pitchbend... try changing that section to this:

Code: Select all

    case SND_SEQ_EVENT_PITCHBEND:
       ev->data.control.value += 8192;
       data = (0xE0 | ev->data.control.channel) |
              ((ev->data.control.value & 0x7F) << 8) |
              (((ev->data.control.value >> 7) & 0x7F) << 16);
note the added line: ev->data.control.value += 8192;
wrongtastic, baby
tucson's number one gothic rock band since 1995

Post

Thats got it! Woo Hoo! :D

Thank you *very* much for patching the code... I'm realy rusty with programming (haven't done so in several years) but what does this line do to the data stream (how does it make the pitch work)?

Code: Select all

 ev->data.control.value += 8192; 
I think I might actually make some music tonight for a change... ;)

Thanks (again)!
-NexxuSix

Post

i didn't investigate much when i originally got it working (it was several months ago), so i don't know exactly why it's needed... it just adds 8192 to the pitch bend value. pitch bend is either measured from 0 to 16383, where 8192 is the center value, or from -8192 to +8191, with 0 as the center.

i guess the data coming in uses the -8192..+8191 range, but XT2 expects 0..16383.
wrongtastic, baby
tucson's number one gothic rock band since 1995

Post

Doesn't that have something to do with signed and unsigned bits (data)? It seems to me way back in the day, when I wrote a simple program for my Ensoniq EPS (and later helping with code for a Korg Wavestation A/D) that I had encountered similar problems with this... having to "float" the data a bit with another number to make it readable.

-NexxuSix

Post

yes, signed or unsigned 14-bit data, i suppose.

i checked the version of jack.cpp at http://svn.jacklab.net, and it does have that line. all credit still goes to Drumfix, though i will take credit for finding the semicolon typo.
wrongtastic, baby
tucson's number one gothic rock band since 1995

Post

Well.. I can only hope that this version of jack.cpp we've been working on gets uploaded to http://www.energy-xt.com/download/jack.php or is this version just a "special case" to make it work with a Novation 25LE?

Post

And while we're at it: The same ";"-error is in the songposition message
handling as well.

I did all those patches for wine's alsa midi a year ago, but apparently
forgot these changes is needed in the jack.cpp as well.

@NexxuSix: These are general bugs not related only to your device.

Post

Last night was fun... I finally got down to making some music with EnergyXT2 (in Linux) for a change, rather than trying to debug it ;)

Do you have a line number for that songposition ";" correction?

I kinda thought so... the reason I asked if the corrections were "Novation 25LE" specific, is because I have been posting (and have felt like I was the only one?) with problems using my controller. I figured because nobody else was posting help like you did, nobody else was having controller issues, except me! :?

Anyway... all is good now... I'll be making some more music tonight as well :D

Post

I uploaded the corrected version to the same place as before.

I think the version before was so old, it didn't even have songposition handling.
Anyway, i think energyXT2 cannot follow an external midiclock.
So it's somewhat irrelevant.

Post

Just a question then... can the version of jack,cpp you have be used for other applications? How would I adapt a custom application to this code?

Post

To my knowledge the code is public domain, so you can use it in your own projects.
In general all your app has to do is to call procedure libaam with the appropriate dispatcher codes.
If you understand how this procedure works you can easily add midiout as well.

Post

Unbelieveble!
:o
Thank you guys for this topic, what a huge midnight surprise!

Post

NexxuSix wrote:Just a question then... can the version of jack,cpp you have be used for other applications? How would I adapt a custom application to this code?
http://kkoagulaa.wordpress.com/2008/06/ ... 01-teaser/

Post Reply

Return to “energyXT”