Giter Site home page Giter Site logo

kboard-editor's People

Contributors

naught101 avatar ssj71 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kboard-editor's Issues

Settings don't stay set in python 2: PortMidi call failed... PortMidi: `Bad pointer'

When I follow the example in the README, the lights flash on the K-board (both when I import kboard, and when I change a setting), and the settings appear to change, but when I exit python after making a change, I get an error, and the next time I open python and import kboard, I get the default settings - nothing is changed.

Is there some "save settings" call that's required or something?

Example:

In [1]: import kboard

Current KBoard Configuration:
...
 Velocity Curve:                lin
...

In [2]: kboard.setVelocityCurve('log')

Current KBoard Configuration:
...
 Velocity Curve:                log
...

In [3]: kboard.midi.quit()

In [4]: exit()
PortMidi call failed...
  PortMidi: `Bad pointer'
type ENTER...

$ ipython                

In [1]: import kboard

Current KBoard Configuration:

 Channel:                       0
 Pressure CC:                   1
 Pressure sends Chan. Pressure: No
 Tilt CC:                       127
 Tilt sends Bend:               Yes
 Pad Bend Max:                 +12 semitone
 Pad Bend Min:                 -12 semitone
 Tilt Bend Max:                +1 semitone
 Tilt Bend Min:                -1 semitone
 Velocity Sensitivity:          100
 Pressure Sensitivity:          100
 Tilt Sensitivity:              77

 Velocity Curve:                lin
 Return a Value...
   when Pressure Disabled:      No
    Disabled Pressure Value:    127
   when Tilt Disabled:          No
    Disabled Tilt Value:        127
 Note-On Threshold:             16

Fails in python 3

In [1]: import kboard
ALSA lib conf.c:3009:(snd_config_update_r) Cannot access file /etc/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
---------------------------------------------------------------------------
MidiException                             Traceback (most recent call last)
<ipython-input-1-0b8ee74ed658> in <module>()
----> 1 import kboard

/data/documents/electronics/kboard-editor/kboard.py in <module>()
     26 #it would be nice if these were constants
     27 midi.init()
---> 28 midi_out = midi.Output(midi.get_default_output_id())
     29 hi = [0xf0, 0x7e, 0x7f, 0x07, 0x06, 0x01, 0xf7]
     30 default = [

/home/naught101/miniconda3/envs/science/lib/python3.5/site-packages/pygame/midi.py in __init__(self, device_id, latency, buffer_size)
    387 
    388         if device_id == -1:
--> 389             raise MidiException("Device id is -1, not a valid output id.  -1 usually means there were no default Output devices.")
    390 
    391         try:

MidiException: 'Device id is -1, not a valid output id.  -1 usually means there were no default Output devices.'

This kind of looks like a problem with pygame, really, because it works fine in python2, and I can't see how your code is different between versions, but I figured you may have hit this, and might know what's causing it.

question leds?

cool, how did you find the sysex?
Have you managed to light the leds programmatically? Different note/velocity values perhaps as for the qunexus keyboard?

thx.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.