Ok so iam up to here as far as mapping encoder 3 on my midi controller
<device name="BCR2000" author="Lee Eather" type="MIDI" drivername="BCR2000">
<encoder cc="0x03" name="nudge back/forward" />
</device>
That is for the device file.
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="BCR 2000" author="Lee Eather" description="BCR 2000" version="600" date="03/10/2009">
<map value="nudge back/forward" action="nudge" />
</mapper>
That is for the mappers file.
This is what i have been told to do so far but the encoder i am trying to encode is still not working.
The encoder is encoder three on my MIDI controller. Both Device and mapper files are in thier respective folders.
I have the "CC" number on my MIDI device set to 3 and that is the encoder iam trying to encode and use yet it still does not work.
What is wrong if anyone knows?
...All i want to encode is one simple button yet it wont work?
What is wrong?
<device name="BCR2000" author="Lee Eather" type="MIDI" drivername="BCR2000">
<encoder cc="0x03" name="nudge back/forward" />
</device>
That is for the device file.
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="BCR 2000" author="Lee Eather" description="BCR 2000" version="600" date="03/10/2009">
<map value="nudge back/forward" action="nudge" />
</mapper>
That is for the mappers file.
This is what i have been told to do so far but the encoder i am trying to encode is still not working.
The encoder is encoder three on my MIDI controller. Both Device and mapper files are in thier respective folders.
I have the "CC" number on my MIDI device set to 3 and that is the encoder iam trying to encode and use yet it still does not work.
What is wrong if anyone knows?
...All i want to encode is one simple button yet it wont work?
What is wrong?
Posté Thu 29 Oct 09 @ 12:34 am
The controller is selected in mappers as well.
Posté Thu 29 Oct 09 @ 9:51 pm
I'm guessing your making your own midi-controller since you can control what cc-code you can send. I'm doing this myself also and I have managed to encode some buttons.
But for buttons I don't send cc-messages, but note-on's with changing velocity. So if you send 90 01 00, you select "note on" (9) on channel 0 (0), "01" stands for note 1 and "00" gives you a velocity of zero.
Note: midi only ranges values from 0 to 127 so the last byte should never be bigger then/than 7F.
My midi device map looks like this: The notes are in hexadecimal form.
<?xml version="1.0" encoding="UTF-8"?>
<device name="DIY Midi Controller" author="Me" type="MIDI" decks="1">
<button note="0x14" name="PLAY1" deck="1" />
<button note="0x15" name="PLAY2" deck="2" />
<button note="0x16" name="LOOP_IN" />
<button note="0x17" name="LOOP_OUT" />
<slider cc="0x01" name="VOLUME" />
</device>
And my mappersthingy:
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="DIY Midi Controller" author="Me" description="DIY Mapper" version="602" date="20/11/2009" priority="10">
<map value="" action="off" />
<map value="PLAY1" action="deck 1 play_pause" />
<map value="PLAY2" action="deck 2 play_pause" />
<map value="LOOP_IN" action="loop_in" />
<map value="LOOP_OUT" action="loop_out" />
<map value="VOLUME" action="pitch" />
</mapper>
I hoped that helped you and that someone can help me with the following:
I'm having trouble getting the slider to work. I'm sending CC-messages but somehow VDJ does not respond to them. My buttons allready work so I'm pretty sure it's not the hardware that's being a jackass. For the moment I send: B0 01 [00-7F].
Does anyone know what MIDI message to send to control a slider?
But for buttons I don't send cc-messages, but note-on's with changing velocity. So if you send 90 01 00, you select "note on" (9) on channel 0 (0), "01" stands for note 1 and "00" gives you a velocity of zero.
Note: midi only ranges values from 0 to 127 so the last byte should never be bigger then/than 7F.
My midi device map looks like this: The notes are in hexadecimal form.
<?xml version="1.0" encoding="UTF-8"?>
<device name="DIY Midi Controller" author="Me" type="MIDI" decks="1">
<button note="0x14" name="PLAY1" deck="1" />
<button note="0x15" name="PLAY2" deck="2" />
<button note="0x16" name="LOOP_IN" />
<button note="0x17" name="LOOP_OUT" />
<slider cc="0x01" name="VOLUME" />
</device>
And my mappersthingy:
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="DIY Midi Controller" author="Me" description="DIY Mapper" version="602" date="20/11/2009" priority="10">
<map value="" action="off" />
<map value="PLAY1" action="deck 1 play_pause" />
<map value="PLAY2" action="deck 2 play_pause" />
<map value="LOOP_IN" action="loop_in" />
<map value="LOOP_OUT" action="loop_out" />
<map value="VOLUME" action="pitch" />
</mapper>
I hoped that helped you and that someone can help me with the following:
I'm having trouble getting the slider to work. I'm sending CC-messages but somehow VDJ does not respond to them. My buttons allready work so I'm pretty sure it's not the hardware that's being a jackass. For the moment I send: B0 01 [00-7F].
Does anyone know what MIDI message to send to control a slider?
Posté Fri 20 Nov 09 @ 10:42 am
I don't have anything here to test with, but you specify:
<device name="BCR2000" author="Lee Eather" type="MIDI" drivername="BCR2000">
...yet...
<mapper device="BCR 2000" author="Lee Eather" description="BCR 2000" version="600" date="03/10/2009">
Does the device appear automatically with a tick against it, and if you select the controller, click learn then turn encoder three does it recognise that control?
Personally I would also consider giving your control names a better name, for example ENCODER3 rather than "nudge back/forward" since you it reflects the controls identifier rather than it's function (which is defined by it's mapping).
<device name="BCR2000" author="Lee Eather" type="MIDI" drivername="BCR2000">
...yet...
<mapper device="BCR 2000" author="Lee Eather" description="BCR 2000" version="600" date="03/10/2009">
Does the device appear automatically with a tick against it, and if you select the controller, click learn then turn encoder three does it recognise that control?
Personally I would also consider giving your control names a better name, for example ENCODER3 rather than "nudge back/forward" since you it reflects the controls identifier rather than it's function (which is defined by it's mapping).
Posté Fri 20 Nov 09 @ 11:02 am
Yes thats what i was told to write.
It shows no tick although i think it has before. I have to scan for device for it to show.
When i click learn and turn encoder 3 nothing happens also with all other encoder/knobs, when controller is selected.
What is wrong with,
Also i have a 'simple midi' file in mappers along with the other mapper file, the one i created in virtual dj mappers section. Should there only be one, hopefully we get to the bottom of this and fix it.
I also changed the name to 'encoder 3', i see your logic.
It shows no tick although i think it has before. I have to scan for device for it to show.
When i click learn and turn encoder 3 nothing happens also with all other encoder/knobs, when controller is selected.
What is wrong with,
SBDJ wrote :
<device name="BCR2000" author="Lee Eather" type="MIDI" drivername="BCR2000">
...yet...
<mapper device="BCR 2000" author="Lee Eather" description="BCR 2000" version="600" date="03/10/2009">
<device name="BCR2000" author="Lee Eather" type="MIDI" drivername="BCR2000">
...yet...
<mapper device="BCR 2000" author="Lee Eather" description="BCR 2000" version="600" date="03/10/2009">
Also i have a 'simple midi' file in mappers along with the other mapper file, the one i created in virtual dj mappers section. Should there only be one, hopefully we get to the bottom of this and fix it.
I also changed the name to 'encoder 3', i see your logic.
Posté Mon 21 Dec 09 @ 6:19 pm
"BCR2000" now appears in mapping devices automatically.
Encoder 3 "nudge" appears in the mappers section. but there is no effect from nudge. is there a number or some sort of variable i need to put in front or behind the nudge.
Encoder 3 "nudge" appears in the mappers section. but there is no effect from nudge. is there a number or some sort of variable i need to put in front or behind the nudge.
Posté Fri 25 Dec 09 @ 6:48 pm
? Just 'nudge' doesn't have any effect, even though it is present in the mappers section of Virtual DJ. So the mapper and device file are working fine but the effect of nudge is not working, it should just work shouldn't it?
Posté Thu 04 Mar 10 @ 8:07 pm
?
Posté Sat 20 Mar 10 @ 9:27 pm
If you select your BCD, click the learn button then turn the encoder, does it detect it?
Posté Sun 21 Mar 10 @ 6:50 am
So nudge works now.
The mappers file reads
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="BCR2000" author="Lee Eather" description="BCR2000" version="607" date="05/04/2010">
<map value="nudge" action="deck 1 nudge +120ms" />
</mapper>
When I use nudge on encoder 3 the nudge only nudges forwards on the song not backwards no mattter which way i turn the encoder.
So I want the song to nudge forward when I turn the encoderto the right and the song to
nudge backwards when I turn the encoder to the left? What do i do to 'action' to do that?
Thanks.
The mappers file reads
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="BCR2000" author="Lee Eather" description="BCR2000" version="607" date="05/04/2010">
<map value="nudge" action="deck 1 nudge +120ms" />
</mapper>
When I use nudge on encoder 3 the nudge only nudges forwards on the song not backwards no mattter which way i turn the encoder.
So I want the song to nudge forward when I turn the encoderto the right and the song to
nudge backwards when I turn the encoder to the left? What do i do to 'action' to do that?
Thanks.
Posté Wed 07 Apr 10 @ 10:16 pm
This is because you have mapped it to nudge +120ms, so it will always nudge in the positive direction.
What you are trying to do will only work properly if the encoder is an endless encoder (No min/max stopping points) and the definition file has been setup correctly so that it sends +1/-1 appropriately for each movement pulse of the knob.
If the knob is an ordinary encoder with a min/max stopping point (E.g: Like an EQ knob on a mixer), then it will not work. The best you could do is map it to:
param_greater 50% ? deck 1 nudge +120ms : deck 1 nudge -120ms
This would cause it to nudge right only when the knob is turned right past the centre (12 o'clock) position, and nudge left only when turned left before the (12 o'clock) position.
What you are trying to do will only work properly if the encoder is an endless encoder (No min/max stopping points) and the definition file has been setup correctly so that it sends +1/-1 appropriately for each movement pulse of the knob.
If the knob is an ordinary encoder with a min/max stopping point (E.g: Like an EQ knob on a mixer), then it will not work. The best you could do is map it to:
param_greater 50% ? deck 1 nudge +120ms : deck 1 nudge -120ms
This would cause it to nudge right only when the knob is turned right past the centre (12 o'clock) position, and nudge left only when turned left before the (12 o'clock) position.
Posté Thu 08 Apr 10 @ 12:28 pm
The knob is a min point of 0 and a maximum of 127.
With the old mapping engine i was able to set the minimum stopping point at 63 on my controller and the maximum stopping point at 65, so whenever i turned the encoder to the left it would send values of 63 which is always lower than 12'clock (12 O'clock being 64) and make the waveform go forwards and when turned to the right send values of 65 which is always higher than 12 O'clock which would make the waveform go backwards.
When i use param_greater 50% ? deck 1 nudge +120ms : deck 1 nudge -120ms it nudges the waveform backwards only, not forwards no matter which way i turn the knob weather it be completely left (0) or completely right (127), so that action must be wrong if you say it will go forward and backwards.?
Could'nt i set up the defintion file to read + and - values properly and set my controller up as explained in the second paragraph, to have 63 as my minimum value and 65 as my highest value so the waveform has values of - continuously when encoder is turned to the right and + continuously when encoder is turned to teh left, so i don't get any other values other than minus turned to the right (Backward) and positive (Forwards) to the left.?
With the old mapping engine i was able to set the minimum stopping point at 63 on my controller and the maximum stopping point at 65, so whenever i turned the encoder to the left it would send values of 63 which is always lower than 12'clock (12 O'clock being 64) and make the waveform go forwards and when turned to the right send values of 65 which is always higher than 12 O'clock which would make the waveform go backwards.
When i use param_greater 50% ? deck 1 nudge +120ms : deck 1 nudge -120ms it nudges the waveform backwards only, not forwards no matter which way i turn the knob weather it be completely left (0) or completely right (127), so that action must be wrong if you say it will go forward and backwards.?
Could'nt i set up the defintion file to read + and - values properly and set my controller up as explained in the second paragraph, to have 63 as my minimum value and 65 as my highest value so the waveform has values of - continuously when encoder is turned to the right and + continuously when encoder is turned to teh left, so i don't get any other values other than minus turned to the right (Backward) and positive (Forwards) to the left.?
Posté Thu 08 Apr 10 @ 11:07 pm
lee eather wrote :
When i use param_greater 50% ? deck 1 nudge +120ms : deck 1 nudge -120ms it nudges the waveform backwards only, not forwards no matter which way i turn the knob weather it be completely left (0) or completely right (127), so that action must be wrong if you say it will go forward and backwards.?
Sorry, you said if i setup +1/-1 in the definition file correctly.
How do i do that, to map param_greater 50% ? deck 1 nudge +120ms : deck 1 nudge -120ms. I have read the 'VDJ script' and 'controller defintion file' section and it is limited in what it tells you to be able to map certain things.
Thanks.
Posté Sun 11 Apr 10 @ 10:49 pm
jpboggis wrote :
What you are trying to do will only work properly if the encoder is an endless encoder (No min/max stopping points) and the definition file has been setup correctly so that it sends +1/-1 appropriately for each movement pulse of the knob.
How do i do this?
The knob has a min point of 0 and a maximum of 127.
Is this possible?
Posté Fri 23 Apr 10 @ 9:56 pm
JP says it will only work with endless encoders. If the encoder has a max and min value then it doesn't sound like an endless encoder to me. Can you turn the encoder continually round without it stopping?
Posté Sat 24 Apr 10 @ 10:29 am
Yes. Both ways.
Posté Sat 24 Apr 10 @ 9:38 pm
bump.
Posté Mon 03 May 10 @ 10:23 pm
By 'endless encoder', I mean a knob that can be turned continously round and round without it stopping at any point.
For endless encoders to work correctly, they should ideally be defined correctly in a definition file for the controller. However, with simple MIDI wrapper it is normally possible to get them to work using:
param_greater 50% ? right action : left action
E.g:
param_greater 50% ? browser_scroll +1 : browser_scroll -1
If it does have a stopping point then it will not work (It might be possible in a future version of VirtualDJ if an action is added to VDJscript to detect which direction an ordinary knob is being turned.)
If it doesn't have a stopping point and sends values from 0,1,2,3,etc. through to 127 as it is turned, it would need to be defined as follows:
<fullencoder cc="0xNN" name="ENCODER_NAME" full="128" />
For endless encoders to work correctly, they should ideally be defined correctly in a definition file for the controller. However, with simple MIDI wrapper it is normally possible to get them to work using:
param_greater 50% ? right action : left action
E.g:
param_greater 50% ? browser_scroll +1 : browser_scroll -1
If it does have a stopping point then it will not work (It might be possible in a future version of VirtualDJ if an action is added to VDJscript to detect which direction an ordinary knob is being turned.)
If it doesn't have a stopping point and sends values from 0,1,2,3,etc. through to 127 as it is turned, it would need to be defined as follows:
<fullencoder cc="0xNN" name="ENCODER_NAME" full="128" />
Posté Tue 04 May 10 @ 1:24 pm
This is correct, this is what i have on my MIDI controller.
I tried defining the definition file using <fullencoder cc="0xNN" name="ENCODER_NAME" full="128" /> using both browser scroll and nudge, which i am trying to define and couldn't get it to work using the simple midi wrapper script which you wrote down.
...you did say it was for simple midi wrapper. Is there a different script mapping for mapping the controller i am trying to map in the mapping file or is it the same as what you wrote because i tried it using both browser and nudge it would not work. I looked at as much as i could to see what i did wrong and couldn't see what i did?
jpboggis wrote :
For endless encoders to work correctly, they should ideally be defined correctly in a definition file for the controller. However, with simple MIDI wrapper it is normally possible to get them to work using:
param_greater 50% ? right action : left action
E.g:
param_greater 50% ? browser_scroll +1 : browser_scroll -1
If it does have a stopping point then it will not work (It might be possible in a future version of VirtualDJ if an action is added to VDJscript to detect which direction an ordinary knob is being turned.)
If it doesn't have a stopping point and sends values from 0,1,2,3,etc. through to 127 as it is turned, it would need to be defined as follows:
<fullencoder cc="0xNN" name="ENCODER_NAME" full="128" />
param_greater 50% ? right action : left action
E.g:
param_greater 50% ? browser_scroll +1 : browser_scroll -1
If it does have a stopping point then it will not work (It might be possible in a future version of VirtualDJ if an action is added to VDJscript to detect which direction an ordinary knob is being turned.)
If it doesn't have a stopping point and sends values from 0,1,2,3,etc. through to 127 as it is turned, it would need to be defined as follows:
<fullencoder cc="0xNN" name="ENCODER_NAME" full="128" />
I tried defining the definition file using <fullencoder cc="0xNN" name="ENCODER_NAME" full="128" /> using both browser scroll and nudge, which i am trying to define and couldn't get it to work using the simple midi wrapper script which you wrote down.
...you did say it was for simple midi wrapper. Is there a different script mapping for mapping the controller i am trying to map in the mapping file or is it the same as what you wrote because i tried it using both browser and nudge it would not work. I looked at as much as i could to see what i did wrong and couldn't see what i did?
Posté Fri 25 Jun 10 @ 1:51 am
The above script is only for use with Simple MIDI Wrapper, NOT with a proper definition. With a proper definition this is not needed because VirtualDJ knows it is an endless encoder from the definition file.
When mapping with a proper definition file, you should just map it to: browser_scroll
When mapping with a proper definition file, you should just map it to: browser_scroll
Posté Fri 25 Jun 10 @ 12:25 pm