Search found 39 matches
- 25 Feb 2012 05:02
- Forum: General Discussion
- Topic: inbound MIDI system exclusive processing
- Replies: 22
- Views: 15369
Re: inbound MIDI system exclusive processing
Darn it. I had a long message typed up and the forum logged me out before I could post it. I'll try again. Great work everyone. Thanks for the template, bxsj. Great work. I wish i had seen yours before I worked on mine, it would have saved a little time with the hex conversion. So ... before the for...
- 22 Jan 2012 22:41
- Forum: General Discussion
- Topic: sysex again, it´s geting complicated...
- Replies: 27
- Views: 41421
Re: sysex again, it´s geting complicated...
I might have discovered the root cause of the sysex receive problem. It appears to be a timing issue. Some background: My latest hardware project is a DIY midi interface for my iPad, using a Teensy 2.0 board and Arduino. I'm using a 7-pin DIN jack with MIDI in and MIDI out combined so I can use a si...
- 21 Jan 2012 23:09
- Forum: General Discussion
- Topic: Thoughts on floor() function use
- Replies: 0
- Views: 637
Thoughts on floor() function use
I've been thinking about how I have been using the floor() function. To scale an x=0 to 1 value to some integer range 0 to n, I'd use the expression: floor(x * n) So for instance, to get an integer value 0 to 10: output = floor(x * 10) when x is between 0.000 and 0.099, the output is 0 when x is bet...
- 21 Jan 2012 22:33
- Forum: General Discussion
- Topic: Negative and positive values on a bipolar knob (sysex)
- Replies: 10
- Views: 5939
Re: Negative and positive values on a bipolar knob (sysex)
I keep forgetting that x, in this context, refers to the Knob.x value. It has a range of 0 to 1. Add a monitor object to observe the Knob.x value. As you will see, Knob.x = 0.5 when the knob in the middle of its rotation range. To convert this to a bipolar value, subtract 0.5 from the x value, then ...
- 21 Jan 2012 18:41
- Forum: General Discussion
- Topic: Negative and positive values on a bipolar knob (sysex)
- Replies: 10
- Views: 5939
Re: Negative and positive values on a bipolar knob (sysex)
It looks like it is two's compliment, but the data field size is 8 bits rather than 14 bits. The same code that I posted above should work with small changes: decl lsb, msb; if(x < 0){ x = 0x100 + x; // create two's compliment, 8-bit lsb = x & 0x7F; // isolate lsb 7 bits msb = 1; // msb should alway...
- 20 Jan 2012 21:06
- Forum: Projects
- Topic: Two axis accelerometer controller for iPhone
- Replies: 5
- Views: 11641
Re: Two axis accelerometer controller for iPhone
By the way, you'll want to turn off the screen-auto-rotate on the iPhone when using this template.
- 20 Jan 2012 21:01
- Forum: Projects
- Topic: Two axis accelerometer controller for iPhone
- Replies: 5
- Views: 11641
Two axis accelerometer controller for iPhone
Here's a template I have been playing with. It converts the accelerometer data to CC messages, and has a few features that make it easier to use. I think the main feature of this template are the "SET" buttons. Hold the iPhone in the position that you want associated with CC value of 0, then tap SET...
- 20 Jan 2012 19:39
- Forum: General Discussion
- Topic: Negative and positive values on a bipolar knob (sysex)
- Replies: 10
- Views: 5939
Re: Negative and positive values on a bipolar knob (sysex)
Cool. Making progress at least. The process of elimination is a good technique to use for problems like these. Based on the info in your last post, it looks like it is not using two's compliment. So we have eliminated this possibility. The next step is to collect some data so we can determine how th...
- 20 Jan 2012 18:46
- Forum: General Discussion
- Topic: Negative and positive values on a bipolar knob (sysex)
- Replies: 10
- Views: 5939
Re: Negative and positive values on a bipolar knob (sysex)
Is there a corresponding Parameter Read command that you can send? You can examine the MachineDrum response to determine how it encodes negative parameter values. I suspect that negative values are passed using two's compliment representation. Here is the Wikipedia article explaining how negative nu...