blinkinlabs / patternpaint Goto Github PK
View Code? Open in Web Editor NEWMaking beautiful light shows is as easy as drawing a picture with Pattern Paint!
Home Page: http://blinkinlabs.com/patternpaint/
License: GNU General Public License v2.0
Making beautiful light shows is as easy as drawing a picture with Pattern Paint!
Home Page: http://blinkinlabs.com/patternpaint/
License: GNU General Public License v2.0
We can read memory back from the BlinkyTape, so it would be a nice trick to download an animation from a BlinkyTape for further editing.
Shows an uglyish QT default one now
They are hard to find in the menu. In fact, make all the standard stuff available without going to the menu.
The patternplayer sketch should implement the brightness adjustment feature from ColorSwirl.
When an animation is opened that is larger than can be shown in the current window, it remains hidden until the user makes the window longer
Platform: OS X (but should affect all)
Steps to reproduce:
-Open a long animation
QT serial doesn't seem to send a notification that the pipe has been broken in Windows; maybe we need to scan for this ourselves?
Steps to duplicate:
Expected behavior: BlinkyTape.c gets notification that the device is gone, disconnects
Observed behavior: BlinkyTape not given any warning, continues running as if the device did not disappear
Should include some sample animations, to give inspiration on how to make cool patterns.
Should at a minimum support compression to RGB565 and RLE, in order to increase maximum image length.
For advanced Arduino users, it would be nice to have a way to export .h files from PatternPaint, so they can be used in non-standard ways.
A quick wizard to generate a new animation from a string of text would make light painting words fun.
Having trouble building on Ubuntu: can't get the QtSerialPort library to get picked up.
Downloaded the library, did a command line install (as root). Still getting
QTSerialPort: no such file or directory
in blinkytape.h.
Where do I go to get instructions on setting up a build environment for QT4 with the proper prerequisites?
Should either replace with a splash screen (not really useful) or merge with system information dialog.
It appears to be fine in 10.8 and 10.9. Not sure about 10.7 either.
Open PatternPaint and connect. While the frame indicator is moving, mouse & draw over it. After a few moments the BlinkyTape will hang. Remove USB connection and use connect/disconnect button to reconnect.
Maybe updating too fast?
Currently, when a tape is unexpectedly disconnected, the uploader fails, etc, there is no feedback to the user. Add some sort of mechanism (desktop notification?) that the operation failed, so the user can respond to it.
On slow systems running windows, it seems that it can take >4 seconds for the bootloader device to become available. That makes the one-shot method currently in use unreliable. This should be switched to a polled method that continually scans for new devices for up to N seconds (maybe 8 + 2) before giving up.
Right now, the only way to start a new animation is to draw over it with a black tool, which is kind of poor. A clear button or menu item could be useful.
To mitigate the potential for blinkytape bricking, patternpaint should only upload the sketch portion if it has actually changed.
If the program is opened, connected to a BlinkyTape, then closed, sometimes a subsequent open will connect to a BlinkyTape but the BlinkyTape will not show animation frames.
This seems to be a problem with the Arduino sketch. Workaround is to unplug BlinkyTape from USB and then reinsert.
When the main window is resized, the interface is centered in the larger window, and the animation portion doesn't change size. What should happen here? Perhaps the window should not be resizaable?
When sending a small number of bright pixels from one end of strip to the other (draw diagonal line in PatternPaint box) lower-number pixels turn on at maybe 30% intensity following that one. Gamma / antialising error?
Steps to reproduce:
Process: PatternPaint [1464]
Path: /Volumes/VOLUME/PatternPaint.app/Contents/MacOS/PatternPaint
Identifier: com.yourcompany.PatternPaint
Version: ???
Code Type: X86-64 (Native)
Parent Process: launchd [286]
User ID: 501
Date/Time: 2013-10-16 11:21:08.759 +0800
OS Version: Mac OS X 10.8.4 (12E55)
Report Version: 10
Interval Since Last Report: 9875 sec
Crashes Since Last Report: 1
Per-App Crashes Since Last Report: 1
Anonymous UUID: F14C8574-5FEF-EEFB-82FD-FEB9F1933CAA
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_ARITHMETIC (SIGFPE)
Exception Codes: EXC_I386_DIV (divide by zero)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtGui 0x000000010074f367 0x1005c6000 + 1610599
1 QtGui 0x000000010074f6f2 0x1005c6000 + 1611506
2 QtGui 0x0000000100788261 QRasterPaintEngine::stroke(QVectorPath const&, QPen const&) + 305
3 QtGui 0x000000010077c218 QPaintEngineEx::draw(QVectorPath const&) + 152
4 QtGui 0x000000010077d215 QPaintEngineEx::drawEllipse(QRectF const&) + 165
5 QtGui 0x000000010079048d QRasterPaintEngine::drawEllipse(QRectF const&) + 157
6 QtGui 0x000000010077d2d0 QPaintEngineEx::drawEllipse(QRect const&) + 80
7 QtGui 0x000000010079d21b QPainter::drawEllipse(QRect const&) + 363
8 com.yourcompany.PatternPaint 0x00000001000077fb PatternEditor::mouseMoveEvent(QMouseEvent_) + 427
9 QtWidgets 0x00000001000751ad QWidget::event(QEvent_) + 669
10 QtWidgets 0x000000010003e897 QApplicationPrivate::notify_helper(QObject_, QEvent_) + 311
11 QtWidgets 0x000000010004073b QApplication::notify(QObject_, QEvent_) + 3275
12 QtCore 0x0000000100bc32be QCoreApplication::notifyInternal(QObject_, QEvent_) + 110
13 QtWidgets 0x000000010003f25d QApplicationPrivate::sendMouseEvent(QWidget_, QMouseEvent_, QWidget_, QWidget_, QWidget*, QPointer&, bool) + 1037
14 QtWidgets 0x00000001000926a7 0x100014000 + 517799
15 QtWidgets 0x00000001000913e3 0x100014000 + 512995
16 QtWidgets 0x000000010003e897 QApplicationPrivate::notify_helper(QObject, QEvent_) + 311
17 QtWidgets 0x0000000100042119 QApplication::notify(QObject_, QEvent_) + 9897
18 QtCore 0x0000000100bc32be QCoreApplication::notifyInternal(QObject_, QEvent_) + 110
19 QtGui 0x00000001005e592f QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent_) + 1967
20 QtGui 0x00000001005e4cdc QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 92
21 QtGui 0x00000001005d6f68 QWindowSystemInterface::sendWindowSystemEventsImplementation(QFlagsQEventLoop::ProcessEventsFlag) + 56
22 QtGui 0x00000001005d6ff8 QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) + 24
23 libqcocoa.dylib 0x000000010161d385 0x101606000 + 95109
24 libqcocoa.dylib 0x000000010161ddcb 0x101606000 + 97739
25 com.apple.CoreFoundation 0x00007fff920f7b31 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
26 com.apple.CoreFoundation 0x00007fff920f7455 __CFRunLoopDoSources0 + 245
27 com.apple.CoreFoundation 0x00007fff9211a7f5 __CFRunLoopRun + 789
28 com.apple.CoreFoundation 0x00007fff9211a0e2 CFRunLoopRunSpecific + 290
29 com.apple.HIToolbox 0x00007fff95fd0eb4 RunCurrentEventLoopInMode + 209
30 com.apple.HIToolbox 0x00007fff95fd0b94 ReceiveNextEventCommon + 166
31 com.apple.HIToolbox 0x00007fff95fd0ae3 BlockUntilNextEventMatchingListInMode + 62
32 com.apple.AppKit 0x00007fff96aa7533 _DPSNextEvent + 685
33 com.apple.AppKit 0x00007fff96aa6df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
34 com.apple.AppKit 0x00007fff96a9e1a3 -[NSApplication run] + 517
35 libqcocoa.dylib 0x000000010161c98b 0x101606000 + 92555
36 QtCore 0x0000000100bc0753 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 403
37 QtCore 0x0000000100bc3845 QCoreApplication::exec() + 357
38 com.yourcompany.PatternPaint 0x0000000100003dad main + 61
39 com.yourcompany.PatternPaint 0x0000000100003d64 start + 52
The current paint tool is basic and sort of obnoxious. Nicer ones such as a line tool, stamp, gradients, etc, would be great additions.
Should be possible to brute force at least, QT has QUndoStack that could work.
Need written instructions for how to do this, followed with a script.
save-> 'save to png'
upload->'upload to tape'
This was reported, need to check and fix if it's true.
The QT library location shown in the system diagnostics page appears to be set at compile time, so it doesn't provide relevant information to the user. It should be removed.
Hi,
I am experimenting with PatternPaint on linux for another project using a 30 LEDs/meter strip. (BTW the code compiles fine with qmake -qt=5 && make
from command line, only some warnings).
I hacked the code to generate animation for HEIGHT 30, here is a rough patch in case anyone wants to use it:
diff --git a/src/PatternPaint/animationeditor.cpp b/src/PatternPaint/animationeditor.cpp
index ae3be23..80ff9b3 100644
--- a/src/PatternPaint/animationeditor.cpp
+++ b/src/PatternPaint/animationeditor.cpp
@@ -5,7 +5,7 @@
#include <QtWidgets>
// TODO: Change this when we connect to a tape, etc?
-#define BLINKYTAPE_STRIP_HEIGHT 60
+#define BLINKYTAPE_STRIP_HEIGHT 30
AnimationEditor::AnimationEditor(QWidget *parent) :
QWidget(parent)
diff --git a/src/PatternPaint/blinkytape.h b/src/PatternPaint/blinkytape.h
index be4faf5..3ac5b3f 100644
--- a/src/PatternPaint/blinkytape.h
+++ b/src/PatternPaint/blinkytape.h
@@ -28,7 +28,7 @@ public:
static QList<QSerialPortInfo> findBlinkyTapes();
static QList<QSerialPortInfo> findBlinkyTapeBootloaders();
- BlinkyTape(QObject *parent = 0, int ledCount = 60);
+ BlinkyTape(QObject *parent = 0, int ledCount = 30);
// TODO: Destructor!
diff --git a/src/PatternPaint/mainwindow.cpp b/src/PatternPaint/mainwindow.cpp
index 93c8a22..eb3302c 100644
--- a/src/PatternPaint/mainwindow.cpp
+++ b/src/PatternPaint/mainwindow.cpp
@@ -16,7 +16,7 @@
#include "ColorSwirl_Sketch.h"
// TODO: Change this when we connect to a tape, etc?
-#define BLINKYTAPE_STRIP_HEIGHT 60
+#define BLINKYTAPE_STRIP_HEIGHT 30
#define DEFAULT_ANIMATION_LENGTH 60
MainWindow::MainWindow(QWidget *parent) :
I have no immediate plans for a proper implementation, sorry.
Ciao,
Antonio
It can be a preferences option, autoconnect
An option to load the color swirl factory app back on to the tape, to have something pretty.
Sometimes an upload will get stuck at 0%. This is a timing issue caused by the BlinkyTape not resetting in time; it should be fixed in PatternPaint by allowing PatternPaint to search for a new device for multiple seconds rather than once. Workaround is to disconnect from BlinkyTape in PatternPaint, uplug BlinkyTape from USB, then reinsert. Sometimes PatternPaint also needs to be restarted.
Attempting to open this file doesn't work in OS X. Unsure if other platforms are affected.
PatternPaint version: Release 0.2.0
System affected: OX X 10.9
Steps to reproduce: File->Load File, select image
Expected response: Animation is loaded in PatternPaint
Observed response: File isn't loaded, and no prompt is returned to the user. Running in debug mode give the following message:
debug MainWindow::on_actionLoad_File_triggered: Error loading animation file "/Users/mattmets/Desktop/testImages/ingtekL.jpg"
When animation open or close are selected, they default to some unhelpful directory. They should default to somewhere sane (platform image/media directory?), and remember their last location for at least the duration of the program running.
Platforms affected: Windows, OS X, Linux
Either limit the maximum speed or ???
By lowering the color space to RGB555, the first bit could be used as a flag to say whether it is a single color, or a run of colors- that way the worst case would be as good as an RGB565 image with random data, and the best case would be as good as RGB565+RLE:
single case: 0RRRRRGG GGGBBBBB
run case: 1xxxxxxx 0RRRRRGG GGGBBBBB
where RRRRR, GGGGG, BBBBB are 5-bit color encodings, and xxxxxxx is the run length.
Opening a long animation causes it to go off-screen, without indicating to the user that the window should be resized. A scroll bar should be added to allow the user to scroll along the animation, and to indicate that there is more to see.
As suggested by teaelixer on the forums:
http://forums.blinkinlabs.com/index.php?p=/discussion/120/blinky-tape-with-8-bit-graphics
I am happy to be able to make these pictures, but it would be "cherry on top" if there was a timer display or how long the animation will take and a hotkey starter button (any dedicated key on the keyboard) that will start/end the animation. Holding down the button will allow it to loop animation until release.
Lastly, I would love to take this to the next level with making a series of pictures into an animation. At the moment I haven't found an efficient way to paint yet...
Should have links in the help menu to pages on the website:
http://blinkinlabs.com/blinkytape/docs/troubleshooting/
Would be great to be able to drag a photo file from the file manager directly into the program, instead of having to navigate to it using file open.
To reproduce:
-Run PatternPaint, plug in a BlinkyTape, click 'connect', then unplug the strip
Usually, this will cause the app to crash.
When running PatternPaint in the background on a machine running 10.9, the pattern eventually stops updating, and the BT reverts to playing it's built-in pattern. This appears to be related to PatternPaint being suspended. Likewise, when a really long pattern is played and the screen is not updated, a similar behavior seems to happen.
PatternPaint version: 0.2.0
Operating system: OS X 10.9
Steps to reproduce: Load long pattern, connect to tape, minimize PatternPaint
Observed behavior: described above
Expected behavior: pattern runs continuously
bonus points for listing the available ports under connect, or letting you select an available port a la arduino
Description: The bottom few rows of the animation are not displayed in windows, and it's not possible to resize the window to show them
Platform affected: Windows 7, probably Linux too
Steps to reproduce: Install and run PatternPaint 0.1.0, run.
This is likely because the window sizing is fixed, and was set in OS X where there isn't a menu bar. It's likely to be similar in Linux as well.
When upload fails because the image is too big, the 'saving animation' dialog pop up, then nothing happens (animation playback continues in the background.
There should be a more informative output that explains what happened, shows how much free memory is available, and gives some tips on what to do.
Attempting to save the image file fails; it appears the extension is not handled correctly.
Steps to reproduce:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.