FR - MIDI I/O in Jack Connections Bay (Jorgen please read)
-
- KVRist
- Topic Starter
- 148 posts since 25 Nov, 2003 from Northern IL, USA
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
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
-
- KVRAF
- 2237 posts since 12 Nov, 2002 from swordfish
okay, i looked at my version of the code, which (i think) works right with pitchbend... try changing that section to this:
note the added line: ev->data.control.value += 8192;
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);
wrongtastic, baby
tucson's number one gothic rock band since 1995
tucson's number one gothic rock band since 1995
-
- KVRist
- Topic Starter
- 148 posts since 25 Nov, 2003 from Northern IL, USA
Thats got it! Woo Hoo!
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)?
I think I might actually make some music tonight for a change...
Thanks (again)!
-NexxuSix
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;
Thanks (again)!
-NexxuSix
-
- KVRAF
- 2237 posts since 12 Nov, 2002 from swordfish
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.
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
tucson's number one gothic rock band since 1995
-
- KVRist
- Topic Starter
- 148 posts since 25 Nov, 2003 from Northern IL, USA
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
-NexxuSix
-
- KVRAF
- 2237 posts since 12 Nov, 2002 from swordfish
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.
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
tucson's number one gothic rock band since 1995
-
- KVRist
- Topic Starter
- 148 posts since 25 Nov, 2003 from Northern IL, USA
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?
-
- KVRer
- 28 posts since 24 Jul, 2007
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.
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.
-
- KVRist
- Topic Starter
- 148 posts since 25 Nov, 2003 from Northern IL, USA
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
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
-
- KVRer
- 28 posts since 24 Jul, 2007
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.
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.
-
- KVRist
- Topic Starter
- 148 posts since 25 Nov, 2003 from Northern IL, USA
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?
-
- KVRer
- 28 posts since 24 Jul, 2007
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.
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.
-
- KVRer
- 10 posts since 21 Feb, 2007
Unbelieveble!
Thank you guys for this topic, what a huge midnight surprise!
Thank you guys for this topic, what a huge midnight surprise!
-
tor.helge.skei tor.helge.skei https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=152647
- KVRian
- 527 posts since 30 May, 2007
http://kkoagulaa.wordpress.com/2008/06/ ... 01-teaser/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?