Package: popsicle
Popsicle: Python integration for JUCE with pybind11OverviewPopsicle is a groundbreaking project designed to extend the accessibility ofJUCEby seamlessly integrating it with Python. Leveraging the power ofpybind11, Popsicle offers a Pythonic interface to the JUCE framework. This integration allows developers to utilize JUCE in a manner similar to using Qt with PySide, offering a simplified yet robust approach.Popsicle serves multiple purposes, each contributing to its significance in the development landscape.FeaturesEffortless JUCE App Prototyping: Effortlessly prototype JUCE apps. Popsicle streamlines the development process, allowing developers to focus on creativity by eliminating the need for intricate build configurations and setups.Python Scripting Integration: Seamlessly integrate Python scripting by embedding Popsicle into existing JUCE applications as a dedicated module. Extend and enhance your JUCE projects with the flexibility and ease of Python within the familiar JUCE framework.Unit Testing Made Easy: Ensure the robustness and reliability of JUCE classes with Popsicle’s built-in unit testing support. Leverage Python’s testing infrastructure for a seamless testing process.Cross-Platform Compatibility: Enjoy cross-platform compatibility with Popsicle. Work consistently across Windows, macOS, and Linux environments for a unified development experience.Popsicle stands as a humble yet powerful solution, aimed at enriching the development experience with JUCE by simplifying, extending, and enhancing its integration with Python.Example UsageA single 80 lines script is better than thousand of words:importpopsicleasjuceclassMainContentComponent(juce.Component,juce.Timer):def__init__(self):juce.Component.__init__(self)juce.Timer.__init__(self)self.setSize(600,400)self.startTimerHz(60)def__del__(self):self.stopTimer()defpaint(self,g):g.fillAll(juce.Colours.black)random=juce.Random.getSystemRandom()rect=juce.Rectangle[int](0,0,20,20)for_inrange(100):g.setColour(juce.Colour.fromRGBA(random.nextInt(256),random.nextInt(256),random.nextInt(256),255))rect.setCentre(random.nextInt(self.getWidth()),random.nextInt(self.getHeight()))g.drawRect(rect,1)deftimerCallback(self):ifself.isVisible():self.repaint()classMainWindow(juce.DocumentWindow):component=Nonedef__init__(self):super().__init__(juce.JUCEApplication.getInstance().getApplicationName(),juce.Desktop.getInstance().getDefaultLookAndFeel().findColour(juce.ResizableWindow.backgroundColourId),juce.DocumentWindow.allButtons,True)self.component=MainContentComponent()self.setResizable(True,True)self.setContentNonOwned(self.component,True)self.centreWithSize(800,600)self.setVisible(True)def__del__(self):ifself.component:delself.componentdefcloseButtonPressed(self):juce.JUCEApplication.getInstance().systemRequestedQuit()classApplication(juce.JUCEApplication):window=NonedefgetApplicationName(self):return"JUCE-o-matic"defgetApplicationVersion(self):return"1.0"definitialise(self,commandLine):self.window=MainWindow()defshutdown(self):ifself.window:delself.windowif__name__=="__main__":juce.START_JUCE_APPLICATION(Application)As easy as that ! You will find more example on JUCE usage in theexamplesfolder.Supported PlatformsList of popsicle supported platformsPlatformPython 3.10Python 3.11Python 3.12NotesmacOS-universal2✅✅✅win_amd64✅✅✅win_arm64✅✅✅manylinux_2014-x86_64✅✅✅manylinux_2014-aarch64⚠️⚠️⚠️Built but not tested exhaustivelySupported ModulesList of popsicle supported JUCE modulesModuleSupportedTest CoverageNotesjuce_analytics⛔️N/ANot Plannedjuce_audio_basics✅0.87%In Progressjuce_audio_devices✅0.0%In Progressjuce_audio_formats✅0.0%In Progressjuce_audio_plugin_client⛔️N/ANot plannedjuce_audio_processors✅0.0%In Progressjuce_audio_utils✅0.0%In Progressjuce_box2d⛔️N/APlannedjuce_core✅44.82%Readyjuce_cryptography⛔️N/APlannedjuce_data_structures✅55.61%Readyjuce_dsp⛔️N/APlannedjuce_events✅49.68%Readyjuce_graphics✅15.76%In Progressjuce_gui_basics✅9.77%In Progress, Basic Components Availablejuce_gui_extra✅0.57%In Progressjuce_midi_ci⛔️N/ANot Plannedjuce_opengl⛔️N/APlannedjuce_osc⛔️N/ANot Plannedjuce_product_unlocking⛔️N/ANot Plannedjuce_video⛔️N/ANot plannedExample ApplicationsSome images of JUCE tutorials and other small apps ported topopsicle.Hot Reloading (hotreload_main.pyandhotreload_component.py)Animated Component (https://docs.juce.com/master/tutorial_animation.html)Advanced GUI layout techniques (https://docs.juce.com/master/tutorial_rectangle_advanced.html)Responsive GUI layouts using FlexBox and Grid (https://docs.juce.com/master/tutorial_flex_box_grid.html)Table listbox (https://docs.juce.com/master/tutorial_table_list_box.html)Slider values example (https://docs.juce.com/master/tutorial_slider_values.html)Audio Player (https://docs.juce.com/master/tutorial_playing_sound_files.html)Audio Player with waveform (https://docs.juce.com/master/tutorial_audio_thumbnail.html)OpenCV IntegrationMatplotlib IntegrationEmojis Components (emojis_component.pyandemojis_font_component.py)Code CoverageThe current code coverage of the project refers to the combined JUCE + popsiclePopsicle places a strong emphasis on comprehensive code coverage to ensure the reliability and quality of the project. Our code coverage encompasses thorough testing of the JUCE framework, providing developers with confidence in the stability and performance of their applications.To explore detailed information about the testing, refer to thetests directoryin our GitHub repository. This resource offers insights into the specific areas of the JUCE framework that have been rigorously tested, empowering developers to make informed decisions about the robustness of their implementations.At Popsicle, we believe that extensive code coverage is essential for delivering software solutions that meet the highest standards of excellence. Feel free to delve into our testing documentation to gain a deeper understanding of the meticulous approach we take towards ensuring code quality and reliability.LicensingPopsicle is offered in two distinct licensed flavors to cater to diverse usage scenarios:GPLv3 License: This license is applicable when utilizing Popsicle from Python through the PyPi-provided wheels or embedding it in an open-source (OSS) application. Embracing the principles of open-source development, the GPLv3 license ensures that Popsicle remains freely accessible and modifiable within the open-source community.Commercial License: Tailored for scenarios where Popsicle is integrated into a closed-source application, the commercial license provides a flexible solution for proprietary software development. This option offers a streamlined approach for utilizing Popsicle within closed environments, with further details to be announced.Popsicle’s dual licensing approach ensures compatibility with a wide range of projects, whether they align with open-source principles or require the flexibility of a commercial license for closed-source applications.It’s important to note that when Popsicle is employed in a closed-source application, a corresponding JUCE license is also required to ensure proper adherence to licensing requirements.InstallationGetting started with Popsicle is a straightforward process, requiring just a few simple steps. Follow the instructions below to install Popsicle effortlessly:pip3installpopsicleEnsure that you have an up-to-date version ofpipto ensure a smooth installation process.Be sure you follow thequick start guideto know more abut how to usepopsicle.Build From SourceClone the repository recursively as JUCE is a submodule.gitclone--recursivegit@github.com:kunitoki/popsicle.gitInstall python dependencies.# Build the binary distributionpython3-mbuild--wheel# Install the local wheelpip3installdist/popsicle-*.whl