Arturia Forums

DRUMS => Spark => Spark Users Community => Topic started by: raztua on February 18, 2014, 05:00:18 pm

Title: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 05:00:18 pm
It's time to work on the spark midi remote script,
to clarify the other post, we will work on the spark script here.

Where are we now ?

the table below showes the OUTPUT message for the 5 first pattern button ( when the spark software send information to the surface )

TIMESTAMPINPORTstatusDATA1DATA2CHANNOTEEVENT    
00000988 3 4 90 11 00 1 "F0"Note On   
00000AB4 3 4 80 11 00 1 "F0"Note Off   
00000C44 3 4 90 11 01 1 "F0"Note On   
00000DA2 3 4 80 11 01 1 "F0"Note Off   
00000F00 3 4 90 11 02 1 "F0"Note On   
00000FFA 3 4 80 11 02 1 "F0"Note Off   
00001158 3 4 90 11 03 1 "F0"Note On   
00001284 3 4 80 11 03 1 "F0"Note Off   
00001415 3 4 90 11 04 1 "F0"Note On   
0000150F 3 4 80 11 04 1 "F0"Note Off   

But the Input message ( when you press a key ) have different value.

What could be perfect is to have a scrrenshot of the sparkle, on wich for each pad the input and the output value is written ( and the velocity).

I am working on it tonight, so lets do it :)



Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 07:06:59 pm
i am trying to collect the MIDI data coming from the Spark CDM through a MIDI port called "Spark Private IN". hope this helps for a start...
I am using the application "MIDI Monitor" on OS X.

Pad 1-8:
17:19:31.915   From Spark Controller Spark Private IN   Note On   1   C-2   36
17:19:31.947   From Spark Controller Spark Private IN   Note Off   1   C-2   0
17:19:34.120   From Spark Controller Spark Private IN   Note On   1   C#-2   88
17:19:34.152   From Spark Controller Spark Private IN   Note Off   1   C#-2   0
17:19:37.830   From Spark Controller Spark Private IN   Note On   1   D-2   50
17:19:37.862   From Spark Controller Spark Private IN   Note Off   1   D-2   0
17:19:38.247   From Spark Controller Spark Private IN   Note On   1   D#-2   39
17:19:38.279   From Spark Controller Spark Private IN   Note Off   1   D#-2   0
17:19:38.664   From Spark Controller Spark Private IN   Note On   1   E-2   84
17:19:38.696   From Spark Controller Spark Private IN   Note Off   1   E-2   0
17:19:39.063   From Spark Controller Spark Private IN   Note On   1   F-2   91
17:19:39.095   From Spark Controller Spark Private IN   Note Off   1   F-2   0
17:19:39.471   From Spark Controller Spark Private IN   Note On   1   F#-2   101
17:19:39.503   From Spark Controller Spark Private IN   Note Off   1   F#-2   0
17:19:39.876   From Spark Controller Spark Private IN   Note On   1   G-2   127
17:19:39.908   From Spark Controller Spark Private IN   Note Off   1   G-2   0


Buttons "Select" /"1-8/9-16" / "mute" / "Solo"
17:21:36.002   From Spark Controller Spark Private IN   Note On   1   F-1   38
17:21:36.152   From Spark Controller Spark Private IN   Note Off   1   F-1   38
17:21:36.852   From Spark Controller Spark Private IN   Note On   1   F-1   44
17:21:36.952   From Spark Controller Spark Private IN   Note Off   1   F-1   44
17:21:37.552   From Spark Controller Spark Private IN   Note On   1   F-1   40
17:21:37.652   From Spark Controller Spark Private IN   Note Off   1   F-1   40
17:21:38.302   From Spark Controller Spark Private IN   Note On   1   F-1   39
17:21:38.402   From Spark Controller Spark Private IN   Note Off   1   F-1   39

Buttons 1-16:
17:22:20.651   From Spark Controller Spark Private IN   Note Off   1   F-1   0
17:22:20.751   From Spark Controller Spark Private IN   Note Off   1   F-1   0
17:22:21.001   From Spark Controller Spark Private IN   Note On   1   F-1   1
17:22:21.151   From Spark Controller Spark Private IN   Note Off   1   F-1   1
17:22:21.351   From Spark Controller Spark Private IN   Note On   1   F-1   2
17:22:21.501   From Spark Controller Spark Private IN   Note Off   1   F-1   2
17:22:21.701   From Spark Controller Spark Private IN   Note On   1   F-1   3
17:22:21.851   From Spark Controller Spark Private IN   Note Off   1   F-1   3
17:22:22.052   From Spark Controller Spark Private IN   Note On   1   F-1   4
17:22:22.252   From Spark Controller Spark Private IN   Note Off   1   F-1   4
17:22:22.452   From Spark Controller Spark Private IN   Note On   1   F-1   5
17:22:22.552   From Spark Controller Spark Private IN   Note Off   1   F-1   5
17:22:22.802   From Spark Controller Spark Private IN   Note On   1   F-1   6
17:22:22.952   From Spark Controller Spark Private IN   Note Off   1   F-1   6
17:22:23.152   From Spark Controller Spark Private IN   Note On   1   F-1   7
17:22:23.302   From Spark Controller Spark Private IN   Note Off   1   F-1   7
17:22:23.503   From Spark Controller Spark Private IN   Note On   1   F-1   8
17:22:23.653   From Spark Controller Spark Private IN   Note Off   1   F-1   8
17:22:23.853   From Spark Controller Spark Private IN   Note On   1   F-1   9
17:22:24.003   From Spark Controller Spark Private IN   Note Off   1   F-1   9
17:22:24.203   From Spark Controller Spark Private IN   Note On   1   F-1   10
17:22:24.403   From Spark Controller Spark Private IN   Note Off   1   F-1   10
17:22:24.553   From Spark Controller Spark Private IN   Note On   1   F-1   11
17:22:24.753   From Spark Controller Spark Private IN   Note Off   1   F-1   11
17:22:24.903   From Spark Controller Spark Private IN   Note On   1   F-1   12
17:22:25.103   From Spark Controller Spark Private IN   Note Off   1   F-1   12
17:22:25.303   From Spark Controller Spark Private IN   Note On   1   F-1   13
17:22:25.453   From Spark Controller Spark Private IN   Note Off   1   F-1   13
17:22:25.653   From Spark Controller Spark Private IN   Note On   1   F-1   14
17:22:25.803   From Spark Controller Spark Private IN   Note Off   1   F-1   14
17:22:26.003   From Spark Controller Spark Private IN   Note On   1   F-1   15
17:22:26.153   From Spark Controller Spark Private IN   Note Off   1   F-1   15

Buttons "Record" / "Stop" / "Pause/Play" / "TAP":
17:23:18.854   From Spark Controller Spark Private IN   Note On   1   F-1   52
17:23:19.004   From Spark Controller Spark Private IN   Note Off   1   F-1   52
17:23:23.204   From Spark Controller Spark Private IN   Note On   1   F-1   51
17:23:23.354   From Spark Controller Spark Private IN   Note Off   1   F-1   51
17:23:24.054   From Spark Controller Spark Private IN   Note On   1   F-1   50
17:23:24.254   From Spark Controller Spark Private IN   Note Off   1   F-1   50
17:23:27.204   From Spark Controller Spark Private IN   Note On   1   F-1   49
17:23:27.354   From Spark Controller Spark Private IN   Note Off   1   F-1   49

the 8 x 3 encoders are relative. they send 65 clockwise and 63 counterclockwise.
their CC numbers are:
00 03 06 09 12 15 18 21
01 04 07 10 13 16 19 22
02 05 08 11 14 17 20 23

the encoders "Cutoff / Resonance / Aux 1 / Aux 2 / Panning / Volume" send: 29 / 28 / 27 / 26 / 25 / 24

encoder Tempo: 35
encoder Divide: 34
encoder Move: 33
encoder Shuffle: 32
encoder Master Volume: 31

buttons Pattern 1-16:
17:33:33.785   From Spark Controller Spark Private IN   Note On   1   F-1   16
17:33:33.935   From Spark Controller Spark Private IN   Note Off   1   F-1   16
17:33:34.586   From Spark Controller Spark Private IN   Note On   1   F-1   17
17:33:34.736   From Spark Controller Spark Private IN   Note Off   1   F-1   17
17:33:35.436   From Spark Controller Spark Private IN   Note On   1   F-1   18
17:33:35.586   From Spark Controller Spark Private IN   Note Off   1   F-1   18
17:33:35.787   From Spark Controller Spark Private IN   Note On   1   F-1   19
17:33:35.937   From Spark Controller Spark Private IN   Note Off   1   F-1   19
17:33:36.135   From Spark Controller Spark Private IN   Note On   1   F-1   20
17:33:36.235   From Spark Controller Spark Private IN   Note Off   1   F-1   20
17:33:36.436   From Spark Controller Spark Private IN   Note On   1   F-1   21
17:33:36.585   From Spark Controller Spark Private IN   Note Off   1   F-1   21
17:33:36.786   From Spark Controller Spark Private IN   Note On   1   F-1   22
17:33:36.936   From Spark Controller Spark Private IN   Note Off   1   F-1   22
17:33:37.087   From Spark Controller Spark Private IN   Note On   1   F-1   23
17:33:37.237   From Spark Controller Spark Private IN   Note Off   1   F-1   23
17:33:37.435   From Spark Controller Spark Private IN   Note On   1   F-1   24
17:33:37.585   From Spark Controller Spark Private IN   Note Off   1   F-1   24
17:33:37.785   From Spark Controller Spark Private IN   Note On   1   F-1   25
17:33:37.935   From Spark Controller Spark Private IN   Note Off   1   F-1   25
17:33:38.136   From Spark Controller Spark Private IN   Note On   1   F-1   26
17:33:38.286   From Spark Controller Spark Private IN   Note Off   1   F-1   26
17:33:38.487   From Spark Controller Spark Private IN   Note On   1   F-1   27
17:33:38.587   From Spark Controller Spark Private IN   Note Off   1   F-1   27
17:33:38.885   From Spark Controller Spark Private IN   Note On   1   F-1   28
17:33:39.035   From Spark Controller Spark Private IN   Note Off   1   F-1   28
17:33:39.185   From Spark Controller Spark Private IN   Note On   1   F-1   29
17:33:39.335   From Spark Controller Spark Private IN   Note Off   1   F-1   29
17:33:39.536   From Spark Controller Spark Private IN   Note On   1   F-1   30
17:33:39.686   From Spark Controller Spark Private IN   Note Off   1   F-1   30
17:33:40.087   From Spark Controller Spark Private IN   Note On   1   F-1   31
17:33:40.237   From Spark Controller Spark Private IN   Note Off   1   F-1   31

buttons Bank A/B/C/D:
17:34:08.737   From Spark Controller Spark Private IN   Note On   1   F-1   32
17:34:08.887   From Spark Controller Spark Private IN   Note Off   1   F-1   32
17:34:09.137   From Spark Controller Spark Private IN   Note On   1   F-1   33
17:34:09.337   From Spark Controller Spark Private IN   Note Off   1   F-1   33
17:34:09.537   From Spark Controller Spark Private IN   Note On   1   F-1   34
17:34:09.737   From Spark Controller Spark Private IN   Note Off   1   F-1   34
17:34:09.987   From Spark Controller Spark Private IN   Note On   1   F-1   35
17:34:10.187   From Spark Controller Spark Private IN   Note Off   1   F-1   35

button Song:
17:34:18.937   From Spark Controller Spark Private IN   Note On   1   F-1   45
17:34:19.137   From Spark Controller Spark Private IN   Note Off   1   F-1   45

the big dial:
17:34:33.734   From Spark Controller Spark Private IN   Control   1   30   65


Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 07:12:20 pm
ok, this is exactly what i wanted i work on it and send you a pre-alpha version within half an hour

if i understand well, only the pad are sensitive to velocity

when you press select or 18/916  button and save on live, does it record the same note butwith a different velocity?
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 07:18:13 pm
pads have actually aftertouch like here:

17:36:03.030   From Spark Controller Spark Private IN   Note Off   1   C-2   0
17:36:03.083   From Spark Controller Spark Private IN   Aftertouch   1   C-2   28
17:36:03.105   From Spark Controller Spark Private IN   Aftertouch   1   C-2   39
17:36:03.126   From Spark Controller Spark Private IN   Aftertouch   1   C-2   47
17:36:03.148   From Spark Controller Spark Private IN   Aftertouch   1   C-2   67
17:36:03.169   From Spark Controller Spark Private IN   Aftertouch   1   C-2   75
17:36:03.191   From Spark Controller Spark Private IN   Aftertouch   1   C-2   82
17:36:03.212   From Spark Controller Spark Private IN   Aftertouch   1   C-2   89
17:36:03.234   From Spark Controller Spark Private IN   Aftertouch   1   C-2   94
17:36:03.255   From Spark Controller Spark Private IN   Aftertouch   1   C-2   93
17:36:03.276   From Spark Controller Spark Private IN   Aftertouch   1   C-2   104
17:36:03.298   From Spark Controller Spark Private IN   Aftertouch   1   C-2   106
17:36:03.319   From Spark Controller Spark Private IN   Aftertouch   1   C-2   107
17:36:03.341   From Spark Controller Spark Private IN   Aftertouch   1   C-2   111
17:36:03.362   From Spark Controller Spark Private IN   Aftertouch   1   C-2   115
17:36:03.384   From Spark Controller Spark Private IN   Aftertouch   1   C-2   125
17:36:03.405   From Spark Controller Spark Private IN   Aftertouch   1   C-2   127
17:36:04.414   From Spark Controller Spark Private IN   Aftertouch   1   C-2   123
17:36:04.435   From Spark Controller Spark Private IN   Aftertouch   1   C-2   120
17:36:04.478   From Spark Controller Spark Private IN   Aftertouch   1   C-2   124
17:36:04.500   From Spark Controller Spark Private IN   Aftertouch   1   C-2   125
17:36:04.521   From Spark Controller Spark Private IN   Aftertouch   1   C-2   127
17:36:04.907   From Spark Controller Spark Private IN   Aftertouch   1   C-2   126
17:36:04.929   From Spark Controller Spark Private IN   Aftertouch   1   C-2   127
17:36:04.950   From Spark Controller Spark Private IN   Aftertouch   1   C-2   126
17:36:04.993   From Spark Controller Spark Private IN   Aftertouch   1   C-2   125
17:36:05.058   From Spark Controller Spark Private IN   Aftertouch   1   C-2   124
17:36:05.079   From Spark Controller Spark Private IN   Aftertouch   1   C-2   121
17:36:05.101   From Spark Controller Spark Private IN   Aftertouch   1   C-2   117
17:36:05.122   From Spark Controller Spark Private IN   Aftertouch   1   C-2   116
17:36:05.165   From Spark Controller Spark Private IN   Aftertouch   1   C-2   115
17:36:05.186   From Spark Controller Spark Private IN   Aftertouch   1   C-2   111
17:36:05.208   From Spark Controller Spark Private IN   Aftertouch   1   C-2   100
17:36:05.229   From Spark Controller Spark Private IN   Aftertouch   1   C-2   99
17:36:05.251   From Spark Controller Spark Private IN   Aftertouch   1   C-2   96
17:36:05.272   From Spark Controller Spark Private IN   Aftertouch   1   C-2   85
17:36:05.294   From Spark Controller Spark Private IN   Aftertouch   1   C-2   81
17:36:05.315   From Spark Controller Spark Private IN   Aftertouch   1   C-2   78
17:36:05.337   From Spark Controller Spark Private IN   Aftertouch   1   C-2   74
17:36:05.358   From Spark Controller Spark Private IN   Aftertouch   1   C-2   61
17:36:05.380   From Spark Controller Spark Private IN   Aftertouch   1   C-2   46
17:36:05.401   From Spark Controller Spark Private IN   Aftertouch   1   C-2   35
17:36:05.423   From Spark Controller Spark Private IN   Aftertouch   1   C-2   34
17:36:05.444   From Spark Controller Spark Private IN   Aftertouch   1   C-2   32
17:36:05.466   From Spark Controller Spark Private IN   Aftertouch   1   C-2   27
17:36:05.487   From Spark Controller Spark Private IN   Aftertouch   1   C-2   24
17:36:05.508   From Spark Controller Spark Private IN   Aftertouch   1   C-2   18
17:36:05.530   From Spark Controller Spark Private IN   Aftertouch   1   C-2   5
17:36:05.540   From Spark Controller Spark Private IN   Note Off   1   C-2   0

the buttons use the velocity to be distinguished since they use the same pitch.

ok, this is exactly what i wanted i work on it and send you a pre-alpha version within half an hour

if i understand well, only the pad are sensitive to velocity
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 07:27:17 pm
ok thank, and what about the test in live ?
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 08:03:00 pm
Lets try a simple script : i have attached it to this post but i don't know how it works

if you don't find it it is on mediafire too :
sources (http://www.mediafire.com/download/bt4hmp99x8i57q8/spark.rar)
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 08:19:59 pm
you mean if Pad "9" sends a different note value that Pad "1"? no.
Pad 1:
17:42:05.983   From Spark Controller Spark Private IN   Note On   1   C-2   22
17:42:06.015   From Spark Controller Spark Private IN   Note Off   1   C-2   0

Pad 9:
17:42:21.210   From Spark Controller Spark Private IN   Note On   1   F-1   44
17:42:21.410   From Spark Controller Spark Private IN   Note Off   1   F-1   44
17:42:23.006   From Spark Controller Spark Private IN   Note On   1   C-2   8
17:42:23.038   From Spark Controller Spark Private IN   Note Off   1   C-2   0

or did I misunderstand you?

will now test your script...

when you press select or 18/916  button and save on live, does it record the same note butwith a different velocity?
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 08:41:09 pm
thi script is really simple: you press play and you see the led blinking
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 08:46:35 pm
hm... doesn't seem to work at all:
* when I select it as Control Surface I don't get the red rectangular.
* when I hit Play (on the Spark hardware) nothing happens.

please have a look at the attached screenshot. your .RAR had a spark folder in a spark folder. I copied the inner folder into Live.app. I guess this is correct?
HOW THE HELL DO I ATTACH IMAGES???
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 08:56:18 pm
no it is a simple script, play button wont work on the surface and the yellow box is not set yet
just push play on the live software :)
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 08:59:36 pm
which LED exactly should blink?

no it is a simple script, play button wont work on the surface and the yellow box is not set yet
just push play on the live software :)
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 09:00:26 pm
if you cant see the leds, it means that it doesn work, it should be the pattern buttons from 1 to 16
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 09:03:35 pm
you are working on a mac??
you have to copy only one folder ( not the second folder )
and you can find info here : http://sonicbloom.net/en/ableton-live-tutorial-how-to-install-midi-remote-scripts/ (http://sonicbloom.net/en/ableton-live-tutorial-how-to-install-midi-remote-scripts/)
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 09:07:05 pm
we might misunderstand each other. so lets be really precise:
Spark hardware is in Spark Mode
I load a new emtpy project
I hit PLAY in Live
I can see the postion marker run through the 16 white buttons

good? bad? right? wrong?

if you cant see the leds, it means that it doesn work, it should be the pattern buttons from 1 to 16
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 09:08:33 pm
right ou have perfectly understood.
You have the choice between spark and midi mode?
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 09:10:03 pm
i copied only one folder "spark" with the following files in it to Live:
__init__.py
__init__.pyc
Consts.py
Consts.pyc
spark.py
spark.pyc

I know how to add scripts to Live.

you are working on a mac??
you have to copy only one folder ( not the second folder )
and you can find info here : http://sonicbloom.net/en/ableton-live-tutorial-how-to-install-midi-remote-scripts/ (http://sonicbloom.net/en/ableton-live-tutorial-how-to-install-midi-remote-scripts/)
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 09:11:49 pm
right ou have perfectly understood.
You have the choice between spark and midi mode?

yes. by pressing Filer+Slicer+Roller at the same time I can switch between Spark Mode and Midi Controller Mode.
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 09:12:24 pm
and it doesn't work...
hum let me think on what could be wrong.

Can you check your log.txt file ?
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 09:19:24 pm
and it doesn't work...
hum let me think on what could be wrong.

Can you check your log.txt file ?
if you tell me the OS X equivalent for it ;)

anyway I have a gut feeling that I am doing something wrong or misunderstand you. can you write again what I should do and what I should see?
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 09:25:57 pm
sorry, my english is not perfect.

The script is a simple test script that work this way:
You put the script on the midi remote script folder, or the equivalent for mac.
Then you select in live option the script and associate it to the surface.
In output an input you have to put on selected track and remote
and thats all, you only have to press play on the albeton's live software and admire the leds turning on and off

BUT :
Maybe i have made mistake,
Maybe the spark doesn't work the way it though
Maybe we are going on a wrong direction :)
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 09:29:26 pm
Maybe it doesnt work because it has been compilated on a windows computer( mine) and it is running on a mac computer ( yours ;) )
delet all the *.py file.

you can find you log here
Mac OS X: /User/Library/Preferences/Ableton/log.txt

press play on live, open the log, and you shall see something like that :

21343 ms. RemoteScriptMessage: (spark) 3
21505 ms. RemoteScriptMessage: (spark) 4
21567 ms. RemoteScriptMessage: (spark) 5
21757 ms. RemoteScriptMessage: (spark) 6
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 09:51:32 pm
Maybe it doesnt work because it has been compilated on a windows computer( mine) and it is running on a mac computer ( yours ;) )
delet all the *.py file.

you mean all the .pyc files? I did that already before.

Quote
you can find you log here
Mac OS X: /User/Library/Preferences/Ableton/log.txt

press play on live, open the log, and you shall see something like that :

21343 ms. RemoteScriptMessage: (spark) 3
21505 ms. RemoteScriptMessage: (spark) 4
21567 ms. RemoteScriptMessage: (spark) 5
21757 ms. RemoteScriptMessage: (spark) 6

such a file path doesn't exist on OS X.

but i am still not sure how I would know that your script is working. in the beginning you wrote "you press play and you see the led blinking".
which of the 16 step buttons should lit up? all at once? or one after another (1 to 2 to 3 to 4 to ... to 16 to 1)?  steady light or blinking?
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 10:05:19 pm
they should all light up one after the other when the song is playing
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 10:09:22 pm
Sorry i v said a mistake, you have to keep the *.PY file and delete the .PYC
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 10:13:18 pm
that's exactly what happens! but if i deactivate the spark script in the control surface menu and i hit Play in Live the same thing happens. i am confused...
they should all light up one after the other when the song is playing
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 10:14:15 pm
i know. that's what I did anyway...
Sorry i v said a mistake, you have to keep the *.PY file and delete the .PYC
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 10:15:16 pm
and how does the midi mode works for the spark?
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 10:19:45 pm
if I change to midi mode nothing happens on the hardware. Spark CDM has 2 Midi ports (Spark Public and Spark Private). I tried with both...
and how does the midi mode works for the spark?
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 10:22:55 pm
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
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 10:35:29 pm
can you try this script please?
http://www.mediafire.com/download/yymphq5fvyxv8h6/spark0.2.rar (http://www.mediafire.com/download/yymphq5fvyxv8h6/spark0.2.rar)
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 10:49: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
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 11:29: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...

Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 11:39:51 pm
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 (http://www.mediafire.com/download/yymphq5fvyxv8h6/spark0.2.rar)
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 18, 2014, 11:44:50 pm
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?

Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 18, 2014, 11:52:16 pm

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)
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 19, 2014, 12:00: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.
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 19, 2014, 12:03: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 ??
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 19, 2014, 12:08: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 ??
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 19, 2014, 12:11: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 ?




Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 19, 2014, 10:30: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.
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 19, 2014, 12:48: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...
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 19, 2014, 02:37: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
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 19, 2014, 03:16: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.
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 19, 2014, 04:13:20 pm
i have written a new script
sources (http://www.mediafire.com/download/3gwm7sm27uq746d/spark0.3.rar)

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 ?
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 19, 2014, 09:59:22 pm
i have written a new script
sources (http://www.mediafire.com/download/3gwm7sm27uq746d/spark0.3.rar)

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 ?
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 19, 2014, 11:06:27 pm
normally as soon as the script is selected in live's option it creates a clip.
What version of live are you using?
Title: Re: Spark midi remote script : lets get it working
Post by: pmwm on February 20, 2014, 08:25:47 am
normally as soon as the script is selected in live's option it creates a clip.
that doesn't happen.
Quote
What version of live are you using?
9.1.1 (2014-01-13_6911b41930)
Title: Re: Spark midi remote script : lets get it working
Post by: raztua on February 20, 2014, 11:37:44 am
Is your first track a midi track??

It must not be an audio track