Skip to content

For Ableton Push setPadLight messages result in error #330

@nasedil

Description

@nasedil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions