Modality-toolkit icon indicating copy to clipboard operation
Modality-toolkit copied to clipboard

For Ableton Push `setPadLight` messages result in error

Open nasedil opened this issue 6 years ago • 3 comments

Hi, I've tried to run code from the examples from the MPush page in docs:

k = MPush('push');
k.setPadLight(k.elAt(\pad, \8, \1, \on), \green);

That code results in the following error:

ERROR: Message 'asInteger' not understood.
RECEIVER:
   nil
ARGS:
CALL STACK:
	DoesNotUnderstandError:reportError
		arg this = <instance of DoesNotUnderstandError>
	Nil:handleError
		arg this = nil
		arg error = <instance of DoesNotUnderstandError>
	Thread:handleError
		arg this = <instance of Thread>
		arg error = <instance of DoesNotUnderstandError>
	Object:throw
		arg this = <instance of DoesNotUnderstandError>
	Object:doesNotUnderstand
		arg this = nil
		arg selector = 'asInteger'
		arg args = [*0]
	MIDIOut:noteOn
		arg this = <instance of MIDIOut>
		arg chan = 0
		arg note = nil
		arg veloc = 21
	MIDIMKtlDevice:send
		arg this = <instance of MIDIMKtlDevice>
		arg key = 'pad_8_1_on'
		arg val = 21
		var elem = <instance of MKtlElement>
		var elemDesc = <instance of Event>
		var msgType = 'noteOn'
		var chan = 0
		var num = nil
	MKtl:send
		arg this = <instance of MPush>
		arg key = 'pad_8_1_on'
		arg val = 21
	MAbstractElement:trySend
		arg this = <instance of MKtlElement>
	MAbstractElement:value_
		arg this = <instance of MKtlElement>
		arg newval = 21
	ArrayedCollection:do
		arg this = [*1]
		arg function = <instance of Function>
		var i = 0
	MPush:setPadLight
		arg this = <instance of MPush>
		arg elem = <instance of MKtlElement>
		arg color = 'green'
		arg intensity = 'full'
		arg blink = 'steady'
	Interpreter:interpretPrintCmdLine
		arg this = <instance of Interpreter>
		var res = nil
		var func = <instance of Function>
		var code = "k.setPadLight(k.elAt(\pad, \..."
		var doc = nil
		var ideClass = <instance of Meta_ScIDE>
	Process:interpretPrintCmdLine
		arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Message 'asInteger' not understood.
RECEIVER: nil

However, this line works fine:

k.setBtLight(k.elementAt(\bt, 0, 0), 'none');

I've tried some other code examples from the page, it seems that some of them also behave differently then they are suppose to work.

nasedil avatar Jul 14 '19 21:07 nasedil

are you using the Push2 or Push?

LFSaw avatar Jul 17 '19 17:07 LFSaw

@LFSaw I'm using Push (1st one)

nasedil avatar Jul 17 '19 18:07 nasedil

i'll try to have a look tomorrow, currently without my push here...


http://tai-studio.org

On 17. Jul 2019, at 20:20, Eugene Petkevich [email protected] wrote:

@LFSaw I'm using Push (1st one)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

LFSaw avatar Jul 17 '19 18:07 LFSaw