December 21, 2014, 03:02:01 am
Welcome, Guest. Please login or register.
Did you miss your activation email
News: Arturia's webmaster is glad to offer you these brand new forums ! Have fun using it and feel free to email any encountered problem at webmaster@arturia.com.

Arturia Forums



Author Topic: Spark midi remote script : lets get it working  (Read 2791 times)

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #30 on: February 18, 2014, 11:16:40 pm »
OK I just found out what Martin W already mentioned a while ago in the original thread: Spark CDM uses different midi message FROM the computer TO the hardware. I collect them in a seperate post. then I will try yr new script.

i have another idea, but don't have much left ;)

Unselect the script, and use the spark as a midi controler.
In live select for a track the spark as output instrument.
Then create a clip in wich you put F-1 notes vith different velocities.
It will help us to know what's going on

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #31 on: February 18, 2014, 11:56:13 pm »
midi messages FROM the computer TO the Spark CDM hardware:
(retrieved by clicking in the Spark plugin while monitoring the midi output with MIDI Monitor)

Pad 1-8:
23:12:43.447   To Spark Controller Spark Private OUT   Note On    1   E-1   53
23:12:43.575   To Spark Controller Spark Private OUT   Note Off    1   E-1   53
23:12:49.427   To Spark Controller Spark Private OUT   Note On    1   E-1   54
23:12:49.589   To Spark Controller Spark Private OUT   Note Off    1   E-1   54
23:12:51.958   To Spark Controller Spark Private OUT   Note On    1   E-1   55
23:12:52.132   To Spark Controller Spark Private OUT   Note Off    1   E-1   55
23:12:53.885   To Spark Controller Spark Private OUT   Note On    1   E-1   56
23:12:54.013   To Spark Controller Spark Private OUT   Note Off    1   E-1   56
23:12:55.127   To Spark Controller Spark Private OUT   Note On    1   E-1   57
23:12:55.302   To Spark Controller Spark Private OUT   Note Off    1   E-1   57
23:12:57.624   To Spark Controller Spark Private OUT   Note On    1   E-1   58
23:12:57.774   To Spark Controller Spark Private OUT   Note Off    1   E-1   58
23:12:58.820   To Spark Controller Spark Private OUT   Note On    1   E-1   59
23:12:58.982   To Spark Controller Spark Private OUT   Note Off    1   E-1   59
23:13:01.374   To Spark Controller Spark Private OUT   Note On   1   E-1   60
23:13:01.525   To Spark Controller Spark Private OUT   Note Off   1   E-1   60

button "1-8/9-16":
23:20:12.225   To Spark Controller Spark Private OUT   Note On   1   E-1   44
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   53
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   54
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   55
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   56
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   57
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   58
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   59
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   60
23:20:12.225   To Spark Controller Spark Private OUT   Note Off   1   E-1   61
*** ZERO ***   To Spark Controller Spark Private OUT   SysEx      Unknown Manufacturer   35 bytes
*** ZERO ***   To Spark Controller Spark Private OUT   SysEx      Unknown Manufacturer   35 bytes
*** ZERO ***   To Spark Controller Spark Private OUT   SysEx      Unknown Manufacturer   35 bytes
*** ZERO ***   To Spark Controller Spark Private OUT   SysEx      Unknown Manufacturer   35 bytes

Pad 9-16: same as Pad 1-8.

what i found out with a little Max patch:
if you send a midi note with pitch E-1 (16) and a velocity between 0 (or 1?) and 64 you can turn on ALL buttons, pads, patterns, groups, etc on the hardware. I just can't figure out how to turn them OFF again.

will now test your new script...


pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #32 on: February 19, 2014, 12:06:51 am »
i installed it. what do i do now? how do I know what works?

can you try this script please?
http://www.mediafire.com/download/yymphq5fvyxv8h6/spark0.2.rar

raztua

  • Apprentice
  • *
  • Posts: 49
  • Karma: 4
Re: Spark midi remote script : lets get it working
« Reply #33 on: February 19, 2014, 12:11:50 am »
the same as before:s

If you press play on the live software, i might light the pattern button from 1 to 16

can you tell me what are the velocities associated to the patterns button from 1 to 16?


pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #34 on: February 19, 2014, 12:19:16 am »

can you tell me what are the velocities associated to the patterns button from 1 to 16?

0-15 (although 0 doesn't work yet. but 1-15 lit up buttons 2-16)

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #35 on: February 19, 2014, 12:27:06 am »
the same as before:s

If you press play on the live software, i might light the pattern button from 1 to 16
this is what happens but I just don't understand what this proves. if I deactivate the script this still works as long as I am in Spark Mode. if i switch to Midi Mode the hardware shows nothing.

raztua

  • Apprentice
  • *
  • Posts: 49
  • Karma: 4
Re: Spark midi remote script : lets get it working
« Reply #36 on: February 19, 2014, 12:30:10 am »
i don't understand :
The spark doesnt have an hardware sequencer so if you see the led on and off, it means that
1- the spark software is lanched
2-the script is working

with no script the sparkle surface stay with all led off is it different with the spark ??

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #37 on: February 19, 2014, 12:35:56 am »
OK i need to sleep this over. it's getting late and my brain is melting...

however I found out something important!
to turn ON e.g. button 2 you have to send [144 16 1]
to turn OFF button 2 you CANNOT send [144 16 0] (as Note OFF) but instead you have to send [128 16 1] (the "real" Note OFF message). did you know that already?

i don't understand :
The spark doesnt have an hardware sequencer so if you see the led on and off, it means that
1- the spark software is lanched
2-the script is working

with no script the sparkle surface stay with all led off is it different with the spark ??

raztua

  • Apprentice
  • *
  • Posts: 49
  • Karma: 4
Re: Spark midi remote script : lets get it working
« Reply #38 on: February 19, 2014, 12:38:59 am »
time to make a little pause and clarify where we are, and what we want to do

usually when you are using midi message you send a triplet ( AA , BB , CC)
AA is the type of signal : 144=144+0 (90 in hexadecimal) for a note on on channel    and 128 ( 80 ) for a note off
it can be decompose this way : 144 is the note on message and 0 is the channel ( first channel
a note on message on the second channel has a value of 145
BB is the tone ( 0 - 127)
CC is the velocity ( 0-127)

In a perfect world, the midi normalization has been made to make everything easy :)

Here it is note the same.
The spark uses two different way to work
----------From the spark to the computer :
for pads ( the 8 big buttons) it is note event from C2 to G2  ( with velocities )
for button it is different : the note sent by the spark is a F-1 ( 17  in decimal, 11 in hexadecimal)  and the value of the velocity is related to one button from 1 to ???<127
encoder->we will see this later, it seems to work in a normal way

---------From the computer to the spark
For pads > it works just like buttons
for buttons : the note sent is E1 ( 16 in decimal , 10 in hexa ) and the  note off signal (128,16,0) for exemple to turn off the light of the pattern button 1

Do you agree with me ?




« Last Edit: February 19, 2014, 11:04:55 am by raztua »

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #39 on: February 19, 2014, 10:57:38 am »
time to make a little pause and clarify where we are, and what we want to do

usually when you are using midi message you send a triplet ( AA , BB , CC)
AA is the type of signal : 144=144+0 (90 in hexadecimal) for a note on on channel    and 128 ( 80 ) for a note off
it can be decompose this way : 144 is the note on message and 0 is the channel ( first channel
a note on message on the second channel has a value of 145
BB is the tone ( 0 - 127)
CC is the velocity ( 0-127)
I am familiar with all this MIDI message definition stuff. In my world (MaxMsp) I am just used to use Velocity = 0 as Note Off which is not 100% standard conform. that's why it took me a while to figure out how to turn off any button on the Spark hardware.
Quote
In a perfect world, the midi normalization has been made to make everything easy :)

Here it is note the same.
The spark uses two different way to work
----------From the spark to the computer :
for pads ( the 8 big buttons) it is note event from C2 to G2  ( with velocities )
for button it is different : the note sent by the spark is a F-1 ( 17  in decimal, 11 in hexadecimal)  and the value of the velocity is related to one button from 1 to ???<127
velocity from the computer to the hardware definitely worked from 1 (step 2 of the 16 step buttons) until 68.
one last thing i need to find out is how to access Step 1!
Quote
encoder->we will see this later, it seems to work in a normal way

---------From the computer to the spark
For pads > it works just like buttons
for buttons : the note sent is E1 ( 16 in decimal , 10 in hexa ) and the  note off signal (128,10,0) for exemple to turn off the light of the pattern button 1

Do you agree with me ?
i almost agree:
for all (i think) buttons, 8 pads, 8 white LEDs :
to tun on the note sent is E1; the velocity goes from 0 - 68 => 144 16 [0-68]
to tun off the note sent is E1; the velocity goes from 0 - 68 => 128 16 [0-68] (NOT 126 16 0!)
so the velocity for Note On (144) and Note Off (128) need to be the same.

i am putting all my findings into a Max For Live device to make more research easier. I could send it to you or anyone else with a Spark CDM hardware to test/verify.

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #40 on: February 19, 2014, 01:15:26 pm »
I tested the encoders on the Spark software to see what they send out to the hardware. It seems it's all sysEx data! I really hope we can avoid having to deal with SysEx. But it's probably not necessary anyway, right? I hated my few programming excursions into sysex...

raztua

  • Apprentice
  • *
  • Posts: 49
  • Karma: 4
Re: Spark midi remote script : lets get it working
« Reply #41 on: February 19, 2014, 03:04:30 pm »
Encoders doen't have to get information from the software to the spark
They are infinite rotative encoder, it means when you rotate clockwise  65 and anti-clockwise it is 63 f(from what i have understood from your posts )

As they are no leds to know the value of the encoder on the hardware, it is note usefull to work on the datas sent to the spark.
I think the sysex value are used to modify the lcd screen

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #42 on: February 19, 2014, 03:43:36 pm »
ah yeah, the sysex stream is for the screen! well, that would be pretty rewarding to get this to work as well... in a remote future =)

63 and 65 are the values for controller values in relative mode according to the MIDI protocol definition. the software takes care of the rest.

raztua

  • Apprentice
  • *
  • Posts: 49
  • Karma: 4
Re: Spark midi remote script : lets get it working
« Reply #43 on: February 19, 2014, 04:40:20 pm »
i have written a new script
sources

whats it does :
It creates an empty clip on the first track if it works
when you press a key it analyses the key pressed, and light two buttons/pad : the one pressed, and the one what have the value next to it

For exemple if i press button 1 it light the button 1 and 2

can you tell me if it works ?

pmwm

  • Apprentice
  • *
  • Posts: 31
  • Karma: 0
Re: Spark midi remote script : lets get it working
« Reply #44 on: February 19, 2014, 10:26:22 pm »
i have written a new script
sources

whats it does :
It creates an empty clip on the first track if it works
didn't get it to work. when does it create this clip? immediately when i open a Live project? When I press Pad 1?
Quote
when you press a key it analyses the key pressed, and light two buttons/pad : the one pressed, and the one what have the value next to it

For exemple if i press button 1 it light the button 1 and 2
didn't get this to work either.
Quote
can you tell me if it works ?

 

Carbonate design by Bloc
SMF 2.0.8 | SMF © 2014, Simple Machines