Hello!
Been a while! So trying to finish off my patch for MIDIBOX TIA control
I have done all the basics and easy functions but now I have a few I'm not sure how to set using LSB and MSB
so example: I have functions I want to set (maybe best as a drop down menu? or knob?)
LFO MODE:
CC: 93
Hex: 5Dh
Bit 0 - enables LFO
Bit1: Sync with ASSIGNED note events
Bit2: Sync with ALL note events
bit 6-4: Waveform
0 - Sine
1 - Triangle
2 - Saw
3 - Pulse
4 Random
example 11h=17= enable & triangle wave
example 15h = 21 = enable & triangle & sync
I don't get how they got those hex and number examples at the bottom to set this?
how do I set these in Jazz editor, as a script?
anyone give me an example in the editor on how to set these values?
cc implementation help
-
- Newbie
- Posts: 15
- Joined: 25 Feb 2017 18:22
Re: cc implementation help
You want to set the bits in an integer?
I believe Lemur the normal bitwise operators: https://en.wikipedia.org/wiki/Bitwise_operation
To set a bit use bitwise OR
something like
//create your backing store
decl myValue = 0
// set bit 3
myValue = myValue | (1 << 3)
I believe Lemur the normal bitwise operators: https://en.wikipedia.org/wiki/Bitwise_operation
To set a bit use bitwise OR
something like
//create your backing store
decl myValue = 0
// set bit 3
myValue = myValue | (1 << 3)
Re: cc implementation help
not sure what I need to do at all?
so cc 93 is the control change number
then how do I set the bits required to enable the function? as in the list
in my other functions i've just been setting the cc number then scale (0-127) or whatever value is needed but this is something different that I don't understand at all
so cc 93 is the control change number
then how do I set the bits required to enable the function? as in the list
in my other functions i've just been setting the cc number then scale (0-127) or whatever value is needed but this is something different that I don't understand at all
-
- Newbie
- Posts: 15
- Joined: 25 Feb 2017 18:22
Re: cc implementation help
????????
MSB and LSB are about binary numbers.
https://en.wikipedia.org/wiki/Most_significant_bit
"Setting a bit" will change the number.
00000001 is 1
00000010 is 2
00000011 is 3
etc.
Not sure what you want to do.
MSB and LSB are about binary numbers.
https://en.wikipedia.org/wiki/Most_significant_bit
"Setting a bit" will change the number.
00000001 is 1
00000010 is 2
00000011 is 3
etc.
Not sure what you want to do.
Re: cc implementation help
Basically I want to change CC parameters as in the list on here: http://www.midibox.org/dokuwiki/lib/exe ... _chart.pdf
most you just set the cc number and scale either 0-127 or 0-64 positive/0-64 negative
but some require bits to be set?
check out the list
most you just set the cc number and scale either 0-127 or 0-64 positive/0-64 negative
but some require bits to be set?
check out the list
-
- Newbie
- Posts: 15
- Joined: 25 Feb 2017 18:22
Re: cc implementation help
Yeah so as I said, use bitwise OR to se the bit in an integer
Re: cc implementation help
What you have missed is the binary representation of the numbers...
0001 0001 = 11h = 17 Decimal = Triangle Bits 4-6=1 and Enabled Bit 0=1
0001 0000 = 10h = 16 decimal = Triangle ... Dis-Enabled
0000 0001 = 01h =1 decimal =Sine ...enabled
0010 0001 21h 33dec Saw
0011 0001 31h 49dec Pulse
0100 0001 41h 65dec Random
Itiusing the bits inside so you need to work out the decimal numbers to send to match
Hope that helps
0001 0001 = 11h = 17 Decimal = Triangle Bits 4-6=1 and Enabled Bit 0=1
0001 0000 = 10h = 16 decimal = Triangle ... Dis-Enabled
0000 0001 = 01h =1 decimal =Sine ...enabled
0010 0001 21h 33dec Saw
0011 0001 31h 49dec Pulse
0100 0001 41h 65dec Random
Itiusing the bits inside so you need to work out the decimal numbers to send to match
Hope that helps
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]