question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clip.set_notes(...) did not match C++ signature set_notes(...)

See original GitHub issue

Hi, I’m enjoying this library very much.

One issue I’ve noticed (using Ableton 11) is that using set_notes on a Clip (and possibly other Set commands) will throw this error.

node:39754) UnhandledPromiseRejectionWarning: Error: Python argument types in
    Clip.set_notes(Clip, list)
did not match C++ signature:
    set_notes(TPyHandle<AClip>, boost::python::tuple)
    at Ableton.handleUncompressedMessage (/<path/to/project>/node_modules/ableton-js/index.js:186:41)

My JS code looks like this

    const tracks = await ableton.song.get('tracks')
    const clipSlots = await tracks[0].get('clip_slots')
    const clip = await clipSlots[0].get('clip')
    if(clip) {
      await clip.setNotes([{ pitch: 60, time: 0, duration: 1, velocity: 98, muted: false }])
    }

I’ve attempted to define a custom setter in Clip.py that converts a List to Tuple, but then it throws a similar type error

UnhandledPromiseRejectionWarning: Error: set_notes() argument after ** must be a mapping, not list

I’ve exhausted my rudimentary Python knowledge so I thought I’d raise a ticket, thanks! 😄

https://github.com/leolabs/ableton-js/blob/2d89342d70f16a07427d17ec9fa43bc48c865d9e/midi-script/Interface.py#L102

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leolabscommented, Apr 5, 2021

Hey @deanfra!

Thanks for your feedback! I haven’t used setNotes in a while, but I can take a look at what’s going wrong with it tomorrow. I’ll keep you posted 😃

0reactions
deanfracommented, Oct 24, 2021

@leolabs Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

boost.python: Argument types did not match C++ signature
I am having a strange problem when calling a C++ function in python. I exposed a class from which I want to call...
Read more >
Error: did not match C++ signature #279 - boostorg/python
I'm calling a pyd as follows: equity = calculator.montecarlo({"3H", "3S"}, {"8S", "4S", "QH", "8C", "4H"}, 2, 10000) ` but it complains that ...
Read more >
hiero.core reference — Hiero Python Developers Guide
initializes x; see help(type(x)) for signature ... Do not specify if clip is a TrackItem. ... setNote () → sets the note on...
Read more >
Working with Patterns and Clips - Native Instruments
Arranging songs in MASCHINE can be done using Patterns or Clips. ... to scroll to hidden Sound slots in case all of them...
Read more >
Source code for sherpa.astro.ui.utils
_background_sources = {} # The fit-model for PHA data does not get stored in a ... of a data set. Notes ----- The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found